[Robelle] [SmugBook] [Index] [Prev] [Next]

"Toolboxes" (aka Nuggets) Utilities for MPE

Nuggets (aka Toolboxes) is a package of very handy utilities for MPE that was written by Stan Sieler and friends. It was originally distributed by SRN and is now distributed by Lund Performance Solutions.

Here are the "nuggets" that we use the most:

The Shot Tool Monitors MPE Processes

The Shot Process Monitor is an operator tool for managing the programs that are executing on your MPE system. When run, Shot reports when your system started and prompts for commands. If you press Return, Shot shows those programs that are using CPU time. It also reports the number of page faults system-wide since the last report. Shot also warns you if the HP Measurement Interface (MI) is active because simply turning on the MI consumes 20 to 40 percent of your CPU. Shot does not use the MI so it has very little impact on the system. There are many commands for controlling what Shot shows. For example, Set Faults asks Shot to report the number of new (delta) page faults for each process that uses CPU time.

Magnet Tool for Searching MPE Files

Magnet is a fast way to search a group of MPE files for one or more strings. By default, Magnet lists the files with a filecode of zero or 111 in your logon group that contain at least one line with the target string. Use the -F option to specify filesets, the -C option to ignore case, -L to list lines that match, and -E to show Editor-style line numbers; this is similar to the grep program in UNIX. The new Visual mode for Magnet gives the user an interface for point-and-click operation; it should be much easier for the casual user.

Text version.

:magnet "-f@.src fopen -c -l -e"{search @.src for "fopen", any case}
:magnet "hpta" {find lowercase 'hpta' in logon group}
:magnet "-f@.@-@.pub fopen"{search all groups except pub}

The Pages Memory Monitor for MPE

The Pages Memory Monitor is a tool that explores the usage of physical memory on MPE. It checks to see how each logical page of main memory is used.

Here is some typical output from the Status command:

  Memory size: 24,576 logical pages (96 MB)
   9,284 Dirty, 17,528 Referenced, 338 Unused, 5,099 Frozen.
  (5,715 Dirty, 12,721 Referenced of the unfrozen pages)

  State of in-use pages:23,975 Present,0 IMI,81 ROC,133 Absent.
  Memory usage by "type" of Object Class:

      Class       LogicalPages   MB  % total
   ------------- -------------  ---  -------

   SYSTEM_CODE         3,817     14  15.5%
   SYSTEM_DATA         8,409     32  34.2%
   RESERVED               49     0   0.2%
   UNUSED                338     1   1.4%
   TURBO_DATA          1,685     6   6.9%
   USER_CODE           6,162     24  25.1%
   USER_DATA             234     0   1.0%
   USER_STACK          1,359     5   5.5%
   USER_FILE           2,523     9   10.3%

   Totals:            24,576     96  100.0%

   "User" pages are  50.1% of memory (49 MB out of 96 MB)

Klondike Memory Utility for MPE Files

Klondike is a unique tool for dealing with MPE memory management and files. Working with one file at a time, Klondike can COUNT the number of logical pages currently in memory, FETCH the entire file into memory, FREEZE it in memory, and THAW it out of memory (Freeze and Thaw require Privileged Mode capability).

Cseq (calling sequence utility)

Cseq is an indispensable little tool for anyone trying to call intrinsics. Cseq reports the calling sequence of both Native-Mode and Compatibility-Mode intrinsics. Also see the Orbit MPE/iX Pocket Guide and the Listintr Option in HP Pascal.

Here is a sample Cseq run showing the parameters of the ASCII intrinsic and giving you tips:

NM:  Function ASCII (
           word        :        UInt16  ;       {R26}
           base        :        int16   ;       {R25}
           string      : anyvar record  )       {R24}
             := #chars : int16    {r28}
           {Bases: 10, 8, -10, and (MPE/XL base 16          }
           {Note: bases 8 and 16 return wrong character count}
           {Note: -10 moves backward                        }
           uncheckable_anyvar

Thus, ASCII is a Function that returns a 16-bit signed integer value in register 28. Word is an unsigned 16-bit integer value passed in register 26. Base is a signed 16-bit integer in R25 and String passes in R24 the address of a record of any data type. The caller does not pass any hidden size parameters to describe "anyvar" parameters (uncheckable_anyvar). If you see extensible 2 that means the number of actual parameters is passed as a hidden value in R26 and that at least the first 2 parameters are required.


[Robelle] [SmugBook] [Index] [Mpetips] [Prev] [Next]