Monitor Tools is a collection of programs I wrote in the early 90's that read in a file created by MONITOR/RECORD and extracts useful information. All the programs are defined in one CLD, named FIND_MWAITS.CLD.

I recently had to use one of these programs on a OpenVMS V8.3 machine and found that the record structure in the data file had changed. So I updated the record structures and added some directives to allow the program to be compiled with pre or post V8.3 record structures. The programs in the .ZIP were compiled for OpenVMS V8.3, if you want to use the programs on a file created in an earlier version of VMS then you must change the .INC file for that program as shown in the file.

There are three programs in the code.

Each of them is designed to read in a MONITOR /RECORD file looking for any process record, when it finds a process record it reports on what it found. If there are other records in the file then they are ignored.

FIND_MWAITS

This was the original program that I created when I managed a cluster where processes kept going into a MWAIT state. At that time MONITOR only showed the generic "MWAIT" text, not the exact MWAIL. The syntax to call this program is shown below. The qualifier is shown in the left column and the default value of the qualifier is in the right column.

               MWAIT input_file_name
                       /OUTPUT=output_file_name        (/OUTPUT=SYS$OUTPUT)
                       /[NO]COUNT=number               (/COUNT=4)
                       /[NO]COLPG                      (/COLPG)
                       /[NO]MWAIT                      (/MWAIT)
                       /[NO]CEF                        (/NOCEF)
                       /[NO]PFW                        (/NOPFW)
                       /[NO]LEF                        (/NOLEF)
                       /[NO]LEFO                       (/LEFO)
                       /[NO]HIB                        (/NOHIB)
                       /[NO]HIBO                       (/HIBO)
                       /[NO]SUSP                       (/SUSP)
                       /[NO]SUSPO                      (/SUSPO)
                       /[NO]FPG                        (/FPG)
                       /[NO]COM                        (/NOCOM)
                       /[NO]COMO                       (/COMO)
                       /[NO]CUR                        (/NOCUR)
                       /[NO]SUMMARY                    (/NOSUMMARY)

Just "MWAIT filename" will show write the report to SYS$OUTPUT, showing all processes in COLPG, MWAIT, LEFO, HIBO, SUSP, SUSPO, FPG or COMO state. It will also report if there were more than 4 COM or COMO processes in the time slice. The /SUMMARY will show how many Interactive, Batch, Network and Other processes were in each time slice.

This is what the output looks like when run with MWAIT filename /HIB/SUMMARY

                                                      Processes State Summary
                      On nodename from 15-OCT-2022 14:00:00.00 to 15-OCT-2022 15:00:04.92 ( 10 Second Interval)
                                                 Run Date: 15-OCT-2022 15:42:59.66
                                    System data for 15-OCT-2022

Time            UIC       PID    Process Name     State                                   Total
14:43:43.54 [0001,0004] 2020021E EVL              Hibernate Wait                             56
14:43:43.54 [0001,0003] 2020021F REMACP           Hibernate Wait                             56
14:43:43.54 [0001,0004] 20200226 TCPIP$INETACP    Hibernate Wait                             56
14:43:43.54 [0001,0004] 20200234 TCPIP$TNS1       Hibernate Wait                             56
14:43:43.54 [0001,0004] 20200245 SYSLOGD          Hibernate Wait                             56
...
14:43:43.54                                         5 Computable processes.                  61
14:43:43.54               Interactive:     4 Batch:     5 Network:     8 Other:    44        61

PROCESS_REPLAY

This program will accept a PID and show the data for that PID from each time slice. If you ever had to do a MONITOR PROCESS/OUTPUT=x.x then SEARCH x.x pid then this is basically doing the same. If the process is in LEF during a time slice then it will be ignored unless you specify the /LEF qualifier.

The syntax to call this program is shown below. The qualifier is shown in the left column and the default value of the qualifier is in the right column.

               PROCESS_REPLAY input_file_name process_id
                       /OUTPUT=output_file_name        (/OUTPUT=SYS$OUTPUT)
                       /[NO]LEF                        (/NOLEF)
                       /[NO]STATUS                     (/NOSTATUS)

The qualifier /LEF will show the LEF records instead of suppressing them. /STATUS will translate the Status column into meaningful text.

For instance if I did a PROCESS_REPLAY data-file /STATUS then I would get a report like this. The "%CPU" column shows the percentage of the CPU the process used since the last time slice and the "COM" shows the total number of COM and COMO processes in that time slice.

                                                  Process Replay for: 20200245
Process Name: SYSLOGD UIC: [0001,0004]

Time        State                          PRI  GPGCNT   PPGCNT PAGEFLTS   DIOCNT  BIOCNTS  Status    CPU Time      %CPU COM
14:43:23.50 Hibernate Wait                  4      111      221      300       27   119022   140001    0 00:00:42.02   0   0
14:43:33.51 Hibernate Wait                  5      111      221      300       27   119034   140001    0 00:00:42.02   0   0
14:43:43.54 Hibernate Wait                  5      111      221      300       27   119034   140001    0 00:00:42.02   0   0
14:43:53.55 Hibernate Wait                  5      111      221      300       27   119034   140001    0 00:00:42.02   0   0
14:44:03.56 Hibernate Wait                  5      111      221      300       27   119034   140001    0 00:00:42.02   0   0

With /STATUS you would see this

Time        State                          PRI  GPGCNT   PPGCNT PAGEFLTS   DIOCNT  BIOCNTS  Status    CPU Time      %CPU COM
14:43:23.50 Hibernate Wait                  4      111      221      300       27   119022   140001    0 00:00:42.02   0   0
                   ****** Resident, In Balance Set
                   ****** Process Header Resident
                   ****** Login Without Reading Auth File
14:43:33.51 Hibernate Wait                  5      111      221      300       27   119034   140001    0 00:00:42.02   0   0
                   ****** Resident, In Balance Set
                   ****** Process Header Resident
                   ****** Login Without Reading Auth File

FIND_COMPUTES

This program will read in the monitor data file looking for COM and COMO processes. If the number of processes exceeds the number passed with /COUNT=number then a summary is written. That summary can then be read into Excel and graphed. The only qualifiers are /OUTPUT and /COUNT=number.