Do you know who is using your CPU on MPE/iX? If you do a :SHOWJOB command, MPE/iX will dutifully report what jobs and sessions are logged on, but it won't show the processes running within each job session. The :SHOWPROC command can show you a little more, if you have SM capability, and if you can live with the bugs that have been in it since its release. The contributed library program SOOXL (from the San Francisco 1989 Interex conference swap tape) shows some of the processes, but it doesn't seem to know about the many other system processes running on the CPU, some using significant amounts of resources.
The purpose of this article is to share a few techniques for determining exactly what is running. I have used SHOT, a program I wrote which is marketed by Lund Performance Solutions, as a tool for extracting some basic information about the process mix on the machine. Used in conjunction with the Native Mode DEBUG facility, you have all the tools you need to find out who is running. If you do not have SHOT at your site, any system monitoring utility that will show processes under MPE/iX (such as SOS/3000, Probe/XL, Glance/XL, and Ping/XL) may be substituted.
To begin, I run SHOT and hit <return> to see what processes are "active". A report is shown below:
:shot SHOT [1.25] - NUGGETS [H.28.03] Demo Tape [D1234] (c) 1989 Software Research Northwest, Inc. Demo Site For Help at the SHOT prompt enter ? My PIN is 53 MPE/iX 4.5 Highest PIN used = 68, max PIN possible = 5460 SHOT [Delta]: <return> SHOT @ MON, FEB 22, 1993, 6:39 PM ? PIN CPU Process Name Pri Q Delta % Ic TotFl Wait State - --- ------ -------------------------- --- - ----- --- -- ----- -------------- 7 17446 port_facility_process 152 C 1 Nn pfp_port3 24 36817 NMCONSOL.PUB.SYS 149 B 4 Nn 28 Port#-170 25 4300 io_mgr_process 13 A 23 Nn 456 Port#-175 53 1242 SHOT.PUB.NUGGETS 152 C 125 1 Nn 49 (executing) 65 11344 VTSERVER.NET.SYS 152 C 20 Nn 5 TERMINAL_READ_ CPU status: busy 1%, idle 99%
Our report shows some processes have used some CPU time since the first display: pins 7, 24, 25, 53, and 65. (A PIN is a Process Identification Number, which is a reusable value that identifies a process.)
PIN 53 is the SHOT program, PIN 7 is a system process called a "Port Facility Process" (a process that does some of the work in handling message passing via a mechanism called a "port"), but what is PIN 25?
Every process on the machine can be loosely placed into one of two separate categories: it is a part of a job/session, or it is a system process. Every process has a process type determined at the time the process is created, which is one of the following eight values:
Note that these values are a superset of the values used by MPE V. If you forget this list of values, MPE/iX and DEBUG can be used to get the list in Pascal/iX terms as noted in the sidebar .
Process types user, main and son are loosely referred to as being part of a job (or session). All other process types are loosely referred to as being system processes. If asked, SHOT will show the type of every process (ADM +PTYPE).
Assuming that PIN 25 might be part of a job/session and not a system process, I ask SHOT to show a job/session-oriented display of all processes by typing J (short for "Jobs") at the prompt:
SHOT [All]: j SHOT @ MON, FEB 22, 1993, 6:39 PM ? PIN CPU Process Name Pri Q Delta % Ic TotFl Wait State - --- ------ -------------------------- --- - ----- --- -- ----- -------------- Jobs: #J3 HOUR,OPERATOR.SYS, OPERATOR, total CPU used = 0 seconds, ldev 10. Step: RUN hourprog.operator.sys 31 456 CI.PUB.SYS 202 D Nn 35 SON, FATHER 51 419 HOURPROG.OPERATOR.SYS 202 D Cn 4 TIMER #J4 FTPMON,FTP.SYS, total CPU used = 1 seconds, ldev 10. Step: RUN ftpmon 54 640 CI.PUB.SYS 202 D Nn 36 SON, FATHER 36 273 FTPMON.ARPA.SYS 152 C Nn 26 OTHER_WAIT Sessions: #S6 OPERATOR.SYS, OPERATOR, total CPU used = 43 seconds, ldev 20. Step: STREAM jftpstrt.arpa.sys 43 4609 CI.PUB.SYS 152 C Nn 110 TERMINAL_READ_ #S10 CDR,MANAGER.SYS, PUB, total CPU used = 0 seconds, ldev 24. Step: COMMENT As of 4.0, [re]setting typeahead sometimes hangs session. 64 414 CI.PUB.SYS 152 C Nn 10 TERMINAL_READ_ 55 196 VTSERVER.NET.SYS 152 C Nn 13 TERMINAL_READ_ #S14 STAN.SIELER, SOURCE, total CPU used = 0 seconds, ldev 26. Step: <not available> 61 80 CI.PUB.SYS 152 C Nn FATHER 52 212 RPMDAD.NET.SYS 152 C Cn 27 TERMINAL_READ_ 68 137 FTPSRVR.ARPA.SYS 152 C Nn 1 OTHER_WAIT #S15 STAN.SIELER, SOURCE, total CPU used = 15 seconds, ldev 25. Step: QEDIT 58 960 CI.PUB.SYS 152 C Nn 64 SON, FATHER 62 12618 QEDIT.PUB.ROBELLE 152 C Nn 189 SON 53 1510 SHOT.PUB.NUGGETS 152 C 217 21 Nn 49 (executing) 65 11392 VTSERVER.NET.SYS 152 C 41 4 Nn 5 TERMINAL_READ_ CPU status: busy 25%, idle 75%
Well, as informative as it might be, I don't see PIN 25. Maybe it isn't part of a job or session? This would mean that it would be a "system" process.
Since we don't see it as part of a job/session, it must be a system process. In order to verify this, we should look at the process type. I could tell SHOT to display more information about each process, at the cost of having less space to report why a process is in the Wait State, by typing SET MOST at the prompt. In this case, I decided I wanted to see the basic information pluse the process type and the number of page faults each process has had so far. I enter:
ADM STATE, PIN, CPU, NAME, PRI, QUEUE, DELTA, PERCENT, & EXECMODE, TOTFAULTS, ptype, wait
Now, I ask to see all processes by typing ALL at the prompt:
SHOT [Delta]: all SHOT @ MON, FEB 22, 1993, 6:43 PM ? PIN CPU Process Name Pri Q Delta % Ic TotFl Ptyp Wait Stat - --- ------ -------------------------- --- - ----- --- -- ----- ---- --------- 1 31128 PROGEN.PUB.SYS 13 A Nn 2063 Syst PROGEN_GL 2 19937 LOAD.PUB.SYS 142 B Cn 156 Syst JUNK 3 9429 pm_cleanup 100 B Nn Syst JUNK 4 285 port_facility_process 13 A Nn Syst pfp_port0 5 2649 port_facility_process 152 C Nn Syst pfp_port1 6 1994 port_facility_process 152 C Nn 12 Syst pfp_port2 7 17560 port_facility_process 152 C 2 Nn Syst pfp_port3 8 52 port_purger_process 152 C Nn Syst DELAYED_P 9 52 xm_checkpoint_server 30 A Nn 3 Syst XM_CHECK_ 10 712 xm_static_checkpoint_serve 152 C Nn 2 Syst XM 11 83 spsnet_process_init 100 B Nn 1 Syst SPUNET_PO 12 21 repeater_process_init 152 C Nn 1 Syst REPEATER_ 13 43 io_mgr_process 13 A Nn 2 Syst Port#-98 14 70 io_mgr_process 13 A Nn 1 Syst Port#-102 15 1376 io_mgr_process 13 A Nn Syst Port#-106 16 1590 avr_process_init 100 B Nn 93 Syst AVR_PORT 17 36 mms_process_init 100 B Nn Syst MMS_PORT 18 3370 (CM procedure) 149 B Cn 895 Syst cm_MESSAG 19 464 (CM procedure) 120 B Cn 21 Syst IO, TIMER 20 8074 NMFILE.PUB.SYS 149 B Cn 29 Syst cm_MESSAG 21 1575 NMLOGMON.PUB.SYS 149 B Nn 78 Syst Port#-160 22 26 NMLOGICS.PUB.SYS 148 B Nn Syst NMS_LOG_G 23 181 NMTRCMON.PUB.SYS 149 B Cn 45 Syst cm_MESSAG 24 37077 NMCONSOL.PUB.SYS 149 B 1 Nn 28 Syst Port#-170 25 4343 io_mgr_process 13 A Nn 456 Syst Port#-175 26 47 io_mgr_process 13 A Nn 1 Syst Port#-179 27 223 io_mgr_process 13 A Nn 12 Syst Port#-183 28 190 io_mgr_process 13 A Nn Syst Port#-187 29 43 io_mgr_process 13 A Nn Syst Port#-191 30 1433 io_mgr_process 13 A Nn 456 Syst Port#-195 31 456 CI.PUB.SYS 202 D Nn 35 Main SON, FATH 32 158 LOG.PUB.SYS 50 B Nn 6 Syst SYSLOG 33 126 SYSMAIN.PUB.SYS 49 B Nn 8 Syst SYSMAIN_P 34 120 SPOOLMOM.PUB.SYS 100 B Nn 13 Syst SPOOLER_M 35 5517 OUTSPOOL.PUB.SYS 152 C Nn 64 Syst Port#-250 36 273 FTPMON.ARPA.SYS 152 C Nn 26 Son OTHER_WAI 37 1252 SESSION.PUB.SYS 100 B Nn 135 Syst SESSIONMA 38 341 JOB.PUB.SYS 100 B Nn 32 Syst 2 ports@$ waiting on: JOBMAIN_PORT, JOB_QUEUE_PORT 39 549 JSMAIN.PUB.SYS 152 B Nn 114 UCOP Port#-250 41 512 JSMAIN.PUB.SYS 152 B Nn 80 UCOP Port#-250 42 715 JSMAIN.PUB.SYS 152 B Nn 19 UCOP Port#-250 43 4609 CI.PUB.SYS 152 C Nn 110 Main TERMINAL_ 44 147 TCPSIP.NET.SYS 149 B Nn 2 Syst Port#-396 45 2522 DIAGMON.DIAG.SYS 13 A Nn 166 Deta TERMINAL_ 46 3017 MEMLOGP.DIAG.SYS 152 C Nn 40 Deta TERMINAL_ 47 989 PSMON.PRED.SYS 152 C Nn 46 Deta TERMINAL_ 48 596 JSMAIN.PUB.SYS 152 B Nn 24 UCOP Port#-250 49 33 PT2PNSTN.NET.SYS 149 B Nn 1 Syst MEMORY_WA 50 632 JSMAIN.PUB.SYS 100 B Nn 19 UCOP Port#-250 51 419 HOURPROG.OPERATOR.SYS 202 D Cn 4 Son TIMER 52 212 RPMDAD.NET.SYS 152 C Cn 27 User TERMINAL_ 53 18 JSMAIN.PUB.SYS 152 B Nn UCOP Port#-250 54 640 CI.PUB.SYS 202 D Nn 36 Main SON, FATH 55 196 VTSERVER.NET.SYS 152 C Nn 13 User TERMINAL_ 56 531 ICMPSERV.NET.SYS 152 C Nn 551 Syst MEMORY_WA 57 476 SOCKREG.NET.SYS 149 B Cn 288 Syst TERMINAL_ 58 960 CI.PUB.SYS 152 C Nn 64 Main SON, FATH 59 687 JSMAIN.PUB.SYS 152 B Nn 54 UCOP Port#-250 60 1129 DSDAD.NET.SYS 149 B Nn 67 Syst TERMINAL_ 61 80 CI.PUB.SYS 152 C Nn Main FATHER 62 19310 QEDIT.PUB.ROBELLE 152 C Nn 224 Son SON 63 302 JSMAIN.PUB.SYS 152 B Nn 16 UCOP Port#-250 64 414 CI.PUB.SYS 152 C Nn 10 Main TERMINAL_ 65 17716 VTSERVER.NET.SYS 152 C 6 Nn 5 User TERMINAL_ 66 1781 NETCP.NET.SYS 149 B Nn 275 Syst MEMORY_WA 67 715 JSMAIN.PUB.SYS 152 B Nn 26 UCOP Port#-250 68 137 FTPSRVR.ARPA.SYS 152 C Nn 1 User OTHER_WAI 71 645 SHOT.PUB.NUGGETS 152 C 55 2 Nn 39 User (executin CPU status: busy 3%, idle 97%
Well, PIN 25 is still alive, and has process type of system. It also has had 456 pages faults since it started running.
Note that SHOT displays the name of a process in three styles:
PIN 25 is a procreated process from NL.PUB.SYS. SHOT determined its name with the following technique, which you can use from DEBUG:
:debugNote: entering DEBUG from the Command Interpreter (CI) requires Privileged Mode (PM) capability.
PIN #25The "#" tells DEBUG that 25 is a decimal number, not a hex or octal number. Note that SHOT defaults to reporting pins in decimal, but will gladly report in hex if you type SET HEX at the SHOT prompt.
tr , i , d
NOTE: you normally want to combine the PIN and TR commands on one command line!. That's because the PIN command takes a snapshot of the registers ... which rapidly becomes stale information if the process is active, rendering the subsequent stack trace somewhat suspect. Thus, "PIN #25; TR, I, D" minimizes the time delay.
When I do this to PIN 25, I get a display:
PIN #25; TR, I, D PC=a.0014b6e8 enable_int+$2c NM* 0) SP=40331680 RP=a.002d47cc notify_dispatcher.block_current_process+$480 NM 1) SP=40331680 RP=a.002d81fc notify_dispatcher+$25c NM 2) SP=403315f0 RP=a.00421364 wait_for_active_port+$ec NM 3) SP=40331510 RP=a.00421dfc receive_from_port+$320 NM 4) SP=403314b0 RP=a.003652c0 receive_msg+$244 NM 5) SP=40331350 RP=a.003ac90c io_mgr_process+$290 NM 6) SP=40331250 RP=a.005233a0 outer_block+$138 NM 7) SP=403310e0 RP=a.00000000 _traplib_version
Look near the end of the stack trace for a procedure called "outer_block" (it should be underlined above, but not on a real "tr" output). The line above this contains the name of the procedure that was started as a process, unless it says something like ?TERMINATE.
If that is the case, look one line higher. For PIN 25, it is "io_mgr_process".
Using SHOT and DEBUG we've looked at what processes are running on a typical MPE/iX machine. On this machine, the first 38 processes were system processes -- more processes than were hanging around in MPE V!