home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / xuptime.zip / readme.txt < prev    next >
Text File  |  1998-08-29  |  4KB  |  91 lines

  1. Program: Enhanced Uptime Meter for OS/2, Version 1.1
  2. ====================================================
  3.  
  4. Author:  Tobias Ernst, e-mail: tobi@bland.fido.de, Fidonet: 2:2476/418.0
  5. License: Released to the Public Domain. I do not claim any copyright for this.
  6.  
  7. This program realises an uptime meter for OS/2, i.E. it displays the number
  8. of days, hours, minutes and seconds that have passed since the machine has
  9. last been rebooted.
  10.  
  11. The method this program by default uses to determine the uptime is to
  12. calculate the difference between the current date and the creation date of
  13. the swap file.  In contrast to the method that most other OS/2 uptime
  14. meters use (querying the OS/2 internal uptime timer), this has both
  15. advantages and disadvantages:
  16.  
  17.   Advantages:
  18.      - This method is able to correctly detect upimes greater than 25 and
  19.        even greater than 50 days. In fact, it can handle uptimes up to
  20.        about 60 years correctly.  (Programs querying the OS/2 uptime timer
  21.        wrap to zero at 50 days, because the timer cannot hold values
  22.        greater than 2^32 - 1  milliseconds).
  23.  
  24.   Disadvantages:
  25.      - The program has to parse your CONFIG.SYS file in order to determine
  26.        the location of your swap file. On some very queer installations,
  27.        this may fail, and of course, it takes a little more time than
  28.        the other method of querying the OS/2 internal uptime timer.
  29.  
  30.      - If you are using a notebook with hibernation feature or a PC like
  31.        the IBM Aptiva  with RapidResume[tm], the time during which your
  32.        computer is hibernated will (IMO incorrectly) also account for the
  33.        uptime if you use this tool, while the OS/2 internal uptime timer
  34.        is not increased while the system sleeps.
  35.  
  36.      - The value reported by this program is about 1 minute less than the
  37.        value reported by the OS/2 internal uptime timer, because the swap
  38.        file is only created about one minute after the OS/2 kernel has been
  39.        booted.
  40.  
  41. If these disadvantages are a problem to you, you can also instruct the
  42. program to query the OS/2 internal uptime timer instead of the swap file.
  43.  
  44. For running the program, you only need UPTIME.EXE.  Run it in an OS/2
  45. windowed or fullscreen session.  Here are some usage examples:
  46.  
  47.    [C:\]uptime
  48.  
  49.        Running the program without parameters will make it query the uptime
  50.        from the swyp file and report the result in an unix-like manner.
  51.  
  52.    [C:\]uptime -v
  53.  
  54.        This will give some more verbose information.
  55.  
  56.    [C:\]uptime -2
  57.  
  58.        This will force the program to query the OS/2 internal uptime timer
  59.        instead of the swap file. This will yield incorrect values if your
  60.        machine is running longer than about 50 days, but it is the only
  61.        choice if you use a notebook with hibernation features.
  62.  
  63.    [C:\]uptime -h
  64.  
  65.        Prints a help screen.
  66.  
  67. The return code of this program (which can be found in the rc variable if
  68. UPTIME.EXE is started from within a REXX script) is the uptime in days.
  69. This could be used for a web server status display, for example.
  70.  
  71. The source code UPTIME.C can be compiled with about any OS/2 C compiler.  I
  72. tested with EMX GCC, Borland C anc IBM CSet. The executable shipped is
  73. compiled with Borland C.
  74.  
  75. Credits:
  76.  
  77.  - Thanks to the people from COMP.OS.OS2.BUGS for the idea of writing
  78.    an uptime meter that queries the swap file. (I do not remeber who
  79.    exactly first came up with it, unfortunately).
  80.  
  81.  - Thanks to IBM for providing us with an operating system that runs so
  82.    stable that one can proudly use uptime meters. :-)
  83.  
  84.  - Thanks to John Moore and Joachim Benjamins for their input on the
  85.    previous version of this tool.
  86.  
  87. If you have any comments, feel free to contact me at the address listed
  88. above.
  89.  
  90. [EOF]
  91.