SirMon user-initiated capturing of statistics

From m204wiki
Jump to navigation Jump to search

SirMon includes a feature for capturing statistics into a database file at user-specified intervals. The statistics captured are the same as those displayed on the system overview screen.

Although SirMon does not handle presentation of the captured statistics, you can write external programs to extract and display these numbers. Technical Support can also provide sample programs (including Janus Web-based programs that allow the captured statistics to be downloaded into a spreadsheet or displayed as vector graphics over time).

To verify that your site has the SirMon Capture capability, check for the existence of procedure MOPR-CAPTURE in the SIRIUS or SIRMON file.

Here is how the SirMon Capture works:

  1. The optional file, MONDATA, must be allocated to the SIRMON application subsystem.

    MONDATA should have at least 1000 pages of Table B and 200 pages of Table D.

    Field definitions are:

    IN FILE MONDATA DEFILE FIELD INTERVAL IN FILE MONDATA DEFILE FIELD SAMPLE (ORD CHAR) IN FILE MONDATA DEFILE FIELD STAT IN FILE MONDATA DEFILE FIELD TIME IN FILE MONDATA DEFILE FIELD TYPE (ORD CHAR)

  2. To initiate captures, execute this command:

    SIRMON CAPTURE int samples

    where:

    • int is the number of seconds between samples (60 seconds minimum)
    • samples is the number of samples to take (1440 maximum)

    The SIRMON CAPTURE command locks up the thread it is executed on, so the sensible thing to do is to insert the command into a BATCH2 job, or to execute the command in an sdaemon. Here is a sample program that uses an sdaemon to run the command:

    Begin %s is float %s = $ListNew Call $ListAdd( %s, 'SIRMON CAPTURE 60 600') Call $CommBG(%s) Call $ListDel(%s) End

    After the above request, SirMon would capture the system overview statistics every 60 seconds for 10 hours.

  3. Review the captured data, which is stored as a single TYPE=H header record and a set of TYPE=S statistic records.

    The header and statistic records are linked together by matching starting-time values in the SAMPLE field.

    The header record specifies the length of the intervals between samples, as well as the names of the individual statistics (as values of a STAT field). The statistic records each have a time stamp (so they can be sorted in order by capture starting time), and they contain the captured value of each statistic (as a STAT field value) in the same order as listed in the header record.

    An example of a header record is followed by an example of a statistic record:

    TYPE = H SAMPLE = 3291966206 INTERVAL = 120 TIME = 3291966206 STAT = RESPMED STAT = RESP90 STAT = RESPAVG STAT = VTAMBW STAT = RSXCOMP ... TYPE = S SAMPLE = 3291966206 TIME = 3291966206 STAT = 0.00 STAT = 0.00 STAT = 0.00 STAT = 0 STAT = 0 STAT = 0.38 STAT = 3.86 STAT = 16.05 ...

    The TIME field on each S record displays the actual time of the sample, while the SAMPLE field remains the same, allowing the records within a sample to be selected as a set.

See also