Previous Topic: 5.3.2.3 DEMMOD Usage Considerations

Next Topic: 5.3.3 VMS MONITOR Disk File (DEMDSK)

5.3.2.4 DEMMOD Retrieval Examples


This section presents typical DEMMOD retrieval examples.

1.  Print the ratio of the time spent in supervisor mode to
    the sum of time in supervisor and user modes for node
    DEV1 yesterday.

    DATA;
    SET &pDEMX..DEMMOD01 END=EOF;
    IF DATEPART(ENDTS)=TODAY()-1;
    IF SYSID='DEV1';
    RETAIN SUP SUPUSR 0;
    SUP+MODSUPTM;
    SUPUSR=SUPUSR+MODSUPTM+MODUSRTM;
    IF EOF THEN DO;
      IF SUPUSR GT 0 THEN RATIO=SUP/SUPUSR;
      PUT SUP SUPUSR RATIO;
      END;

2.  Print the percentage of idle time for node DEV1
    yesterday.

    DATA;
    SET &pDEMX..DEMMOD01 END=EOF;
    IF DATEPART(ENDTS)=TODAY()-1;
    IF SYSID='DEV1';
    RETAIN IDLE DUR 0;
    IDLE+MODIDLTM;
    DUR+DURATION;
    IF EOF THEN DO;
      IDLEPCT=IDLE/DUR;
      PUT IDLEPCT;
      END;