home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxpmpapi.zip / rxpmptst.cmd < prev    next >
OS/2 REXX Batch file  |  1996-07-24  |  8KB  |  194 lines

  1. /* Rexx */
  2. call RxFuncAdd 'RxDCFLoadFuncs', 'RXPMPAPI', 'RxDCFLoadFuncs'
  3. call RxDCFLoadFuncs
  4.  
  5. res = RxDCFVerify()
  6. if res then
  7.    say "OK!"
  8. else
  9.    say "not ok!"
  10.  
  11. /*
  12. res = RxPMPShutDown()
  13. if res then
  14.   SAY "Shutdown OK"
  15. else
  16.   SAY "No shutdown"
  17. */
  18.  
  19. res = RxDCFUserDefined("Works!")
  20. SAY "UserDefined returned" res
  21.  
  22. res = RxDCFVerify()
  23. if res then
  24.    say "OK!"
  25. else
  26.    say "not ok!"
  27.  
  28. /*
  29. res = RxDCFGetStats('myVar.', 'stem2.')
  30. */
  31. res = RxDCFGetStats('myVar.')
  32. SAY "GetStats returned" res
  33. if res = 'DCF_NO_ERROR' then do
  34.    say "Version  " myVar.pmpVersion
  35.    say "StartTime" myVar.pmpStartTime
  36.    say "HPFS386? " myVar.hpfs32ActInd
  37.    say "OS20MEMU?" myVar.memActInd
  38.    say "mmos2?   " myVar.mmActInd
  39.    say "net?     " myVar.netActInd
  40.    say "LoggedOn?" myVar.netLogonInd
  41.    say "LPT1 Mon?         " myVar.lpt1ActInd
  42.    say "LPT2 Mon?         " myVar.lpt2ActInd
  43.    say "LPT3 Mon?         " myVar.lpt3ActInd
  44.    say "Spool?            " myVar.spoolActInd
  45.    say "UpdateTime        " myVar.upDateTime
  46.    say "Sys Uptime (sec)  " myVar.upTimeSecs
  47.    say "Inet connect (sec)" myVar.inetTimeSecs
  48.    say "Net workstation id" myVar.netWSId
  49.    say "Net user        id" myVar.netUserId
  50.    say "Net domain      id" myVar.netDomainId
  51.    say "Net server      id" myVar.netServerId
  52.    say "net req in (bytes)" myVar.netIn
  53.    say "net req out (byte)" myVar.netOut
  54.    say "LPT1 I/O tot bytes" myVar.lpt1TotIO
  55.    say "LPT1 I/O tot msec " myVar.lpt1TotTime
  56.    say "LPT1 total jobs   " myVar.lpt1TotJobs
  57.    say "LPT2 I/O tot bytes" myVar.lpt2TotIO
  58.    say "LPT2 I/O tot msec " myVar.lpt2TotTime
  59.    say "LPT2 total jobs   " myVar.lpt2TotJobs
  60.    say "LPT3 I/O tot bytes" myVar.lpt3TotIO
  61.    say "LPT3 I/O tot msec " myVar.lpt3TotTime
  62.    say "LPT3 total jobs   " myVar.lpt3TotJobs
  63.    say "Net drives  online" myVar.drivesOnline
  64.    say "Drive 1           " myVar.drive1
  65.    say "Drive 1 Offline?  " myVar.drive1OffLine
  66.    say "Drive 1 Size (byt)" myVar.drive1Size   
  67.    say "Drive 1 Free (byt)" myVar.drive1Free   
  68.    say "Drive 2           " myVar.drive2
  69.    say "Drive 2 Offline?  " myVar.drive2OffLine
  70.    say "Drive 2 Size (byt)" myVar.drive2Size   
  71.    say "Drive 2 Free (byt)" myVar.drive2Free   
  72.    say "Drive 3           " myVar.drive3
  73.    say "Drive 3 Offline?  " myVar.drive3OffLine
  74.    say "Drive 3 Size (byt)" myVar.drive3Size   
  75.    say "Drive 3 Free (byt)" myVar.drive3Free   
  76.    say "Drive 4           " myVar.drive4
  77.    say "Drive 4 Offline?  " myVar.drive4OffLine
  78.    say "Drive 4 Size (byt)" myVar.drive4Size   
  79.    say "Drive 4 Free (byt)" myVar.drive4Free   
  80.    say "Drive 5           " myVar.drive5
  81.    say "Drive 5 Offline?  " myVar.drive5OffLine
  82.    say "Drive 5 Size (byt)" myVar.drive5Size   
  83.    say "Drive 5 Free (byt)" myVar.drive5Free   
  84.    say "Drive 6           " myVar.drive6
  85.    say "Drive 6 Offline?  " myVar.drive6OffLine
  86.    say "Drive 6 Size (byt)" myVar.drive6Size   
  87.    say "Drive 6 Free (byt)" myVar.drive6Free   
  88.    say "battery life (%)  " myVar.batFreePct
  89.    say "Swp Res (bytes)   " myVar.swpAllocReserved
  90.    say "Swp Init (bytes)  " myVar.swpAllocInit
  91.    say "Swp Fil Now (byte)" myVar.swpAlloc
  92.    say "Swp Free    (byte)" myVar.swpFree 
  93.    say "Swp Free    (%)   " myVar.swpFreePct 
  94.    say "Swp Free          " myVar.swpFreeGph
  95.    say "Swp Used    (byte)" myVar.swpUsed
  96.    say "Swp Used    (%)   " myVar.swpUsedPct
  97.    say "Swp Used          " myVar.swpUsedGph
  98.    say "Phys ram (bytes)  " myVar.ramPhys
  99.    say "Virt ram tot (byt)" myVar.totVirt
  100.    say "Vram Free  (bytes)" myVar.vramFree
  101.    say "Vram Free  (%)    " myVar.vramFreePct
  102.    say "Vram Free         " myVar.vramFreeGph
  103.    say "Vram Used  (bytes)" myVar.vramUsed   
  104.    say "Vram Used  (%)    " myVar.vramUsedPct
  105.    say "Vram Used         " myVar.vramUsedGph
  106.    say "Ram Res    (bytes)" myVar.ramRes   
  107.    say "Ram Res    (%)    " myVar.ramResPct
  108.    say "Ram Res           " myVar.ramResGph
  109.    say "Ram swappable (by)" myVar.ramSwap
  110.    say "Ram swappable (%) " myVar.ramSwapPct
  111.    say "Ram swappable     " myVar.ramSwapGph
  112.    say "Ram free   (bytes)" myVar.ramFree   
  113.    say "Ram free   (%)    " myVar.ramFreePct
  114.    say "Ram free          " myVar.ramFreeGph
  115.    say "Ram used   (bytes)" myVar.ramUsed
  116.    say "Ram used   (%)    " myVar.ramUsedPct
  117.    say "Ram used          " myVar.ramUsedGph
  118.    say "CPU Magnified (%) " myVar.cpuMagPct
  119.    say "CPU Average   (%) " myVar.cpuAvgPct
  120.    say "CPU Idle      (%) " myVar.cpuIdlePct
  121.    say "CPU Current   (%) " myVar.cpuCurrPct
  122.    say "CPU current       " myVar.cpuCurrGph
  123.    say "Open windows      " myVar.winCount
  124.    say "Open files        " myVar.fileCount
  125.    say "Threads           " myVar.tidCount
  126.    say "OS Ver            " myVar.osVer
  127.    say "Processors        " myVar.cpuCnt
  128.    say "userDefined       " myVar.UserDefined
  129.    say "Swap evt count    " myVar.eventSwpGrowCnt
  130.    say "Last Swap evt Amt " myVar.eventSwpGrowLAmt 
  131.    say "Last Swap evt Time" myVar.eventSwpGrowLTime
  132.    say "CPU Avg evt Count " myVar.eventCpuAvgCnt  
  133.    say "CPU Avg evt Amt   " myVar.eventCpuAvgLAmt 
  134.    say "CPU Avg evt Time  " myVar.eventCpuAvgLTime
  135.    say "VRAM evt Count    " myVar.eventVRamFreeCnt  
  136.    say "VRAM evt Amt (byt)" myVar.eventVRamFreeLAmt 
  137.    say "VRAM evt  Time    " myVar.eventVRamFreeLTime
  138.    say "Drive 1 evt Cnt   " myVar.eventDrive1Cnt
  139.    say "Drive 1 evt Amt   " myVar.eventDrive1LAmt
  140.    say "Drive1 evt Time   " myVar.eventDrive1LTime
  141.    say "Drive 2 evt Cnt   " myVar.eventDrive2Cnt
  142.    say "Drive 2 evt Amt   " myVar.eventDrive2LAmt
  143.    say "Drive2 evt Time   " myVar.eventDrive2LTime
  144.    say "Drive 3 evt Cnt   " myVar.eventDrive3Cnt
  145.    say "Drive 3 evt Amt   " myVar.eventDrive3LAmt
  146.    say "Drive3 evt Time   " myVar.eventDrive3LTime
  147.    say "Drive 4 evt Cnt   " myVar.eventDrive4Cnt
  148.    say "Drive 4 evt Amt   " myVar.eventDrive4LAmt
  149.    say "Drive4 evt Time   " myVar.eventDrive4LTime
  150.    say "Drive 5 evt Cnt   " myVar.eventDrive5Cnt
  151.    say "Drive 5 evt Amt   " myVar.eventDrive5LAmt
  152.    say "Drive5 evt Time   " myVar.eventDrive5LTime
  153.    say "Drive 6 evt Cnt   " myVar.eventDrive6Cnt
  154.    say "Drive 6 evt Amt   " myVar.eventDrive6LAmt
  155.    say "Drive6 evt Time   " myVar.eventDrive6LTime
  156.    say "Battery evt Cnt   " myVar.eventBatFreeCnt  
  157.    say "Battery evt Amt   " myVar.eventBatFreeLAmt 
  158.    say "Battery evt Time  " myVar.eventBatFreeLTime
  159.    say "Swap free evt Amt " myVar.eventSwpFreeLAmt 
  160.    say "Swap free evt Cnt " myVar.eventSwpFreeCnt  
  161.    say "Swap free evt Time" myVar.eventSwpFreeLTime
  162.    say "Ram  free evt Cnt " myVar.eventRamFreeCnt  
  163.    say "Ram  free evt Amt " myVar.eventRamFreeLAmt 
  164.    say "Ram  free evt Time" myVar.eventRamFreeLTime
  165.    say "# procs           " myVar.pidCount
  166. /*
  167.    say "Other # procs     " stem2.0
  168.  
  169.    do i = 1 to stem2.0
  170.       say 'Array idx:' i
  171.       say '   PID ' stem2.i.pid
  172.       say '   PPID' stem2.i.ppid
  173.       say '   SID ' stem2.i.sid 
  174.       say '   TYPE' stem2.i.type
  175.       say '   RAM TOT' stem2.i.ramSizeTot
  176.       say '   RAM RES' stem2.i.ramSizeRes
  177.       say '   32 bit?' stem2.i.mmt32bit
  178.       say '   Mod Hnd' stem2.i.modHandle
  179.       say '   Threads' stem2.i.tidCount
  180.       say '   Sem Cnt' stem2.i.semCount
  181.       say '   Mod Cnt' stem2.i.modCount
  182.       say '   Shm Cnt' stem2.i.shrCount
  183.       say '   Max pri' stem2.i.maxClass
  184.       say '   Str Tim' stem2.i.startTime
  185.       say '   CPU pct' stem2.i.cpuPct
  186.       say '   Run cnt' stem2.i.runCnt
  187.       say '   Exe nam' stem2.i.exeName
  188.    end /* do */
  189. */
  190. end  /* Do */
  191. else
  192. call RxDCFDropFuncs
  193.  
  194.