home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / system / jm1.lzh / jm / RexxExamples / sysload.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1992-03-13  |  933 b   |  23 lines

  1. /*c:rx
  2.  
  3.  *****************************************************************************
  4.  *                                                                           *
  5.  * Example program to check with JM server about system load                 *
  6.  *                                                                           *
  7.  *****************************************************************************/
  8.  
  9.  
  10. options results     /* we want to hear about results     */
  11. address jmserver    /* connect to JM server's ARexx port */
  12.  
  13. sysload             /* figure out idle cpu time          */
  14. load = result       /* we get: load average times 100    */
  15.  
  16. if load < 50                then say "The system is lightly loaded"
  17. if load >= 50  & load < 100 then say "The system is moderately loaded"
  18. if load >= 100 & load < 500 then say "The system is heavily loaded"
  19. if load >= 500              then say "Maybe you should buy a Cray!"
  20.  
  21. exit
  22. end
  23.