Re: how long do systems stay up you ask? a comparison shop.

John Boyer (johnboy@hiwaay.net)
Thu, 19 Jun 1997 08:21:46 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_01BC7C89.D3D64510
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Well, this is enough to lure me out of lurk mode. A closet M$ lover can't
stand a dare like this.

>first, if there is such a command (i'm sure joeB will tell us), i

>challenge any user on the group to find an NT system that has stayed

>up over, say, a month. you find one, i'll buy you dinner.

>
I have access to a few dozen NT boxes that have run for over a month. They
are in my client's system integration bay being tested (pounded on) before
they will be installed in nuke plants.
.

Not even Cygnus makes an uptime command. So attached is a quick and dirty.
I did this for my own use this morning because I absolutely hate using the
event log. Needless to say it hasn't been tested very well. Actually, this
is a sort of a joke, because the counter I used will reset every 49 days.
But given the NT experience of some of you, this shouldn't be a problem.

(BTW: _My_ NT box hasn't been up very long only because it's a notebook).

JB

====================================================
| John Boyer
| mailto:johnboy@hiwaay.net
|
| Creative Systems Inc. (CSI)
| 1508 Marks Drive
| Hartselle, AL 35640
|
| (205) 751-3075 (Main CSI Number)
| (205) 751-3077 (fax)
| (205) 233-4438 (office - voice )
| (205) 219-9769 (Pager)
====================================================

------=_NextPart_000_01BC7C89.D3D64510
Content-Type: application/octet-stream;
name="uptime.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="uptime.c"

#include <windows.h>
#define MSPDAY 86400000
void main(void)
{
DWORD dwCount,dwDays, dwHrs, dwMins;
/* get number of milliseconds since last boot*/
dwCount =3D GetTickCount();
dwDays =3D dwCount / MSPDAY;
dwHrs =3D (dwCount - dwDays * MSPDAY) / (1000*60*60);
dwMins =3D ( (dwCount - dwDays * MSPDAY - dwHrs *(1000*60*60) ) / =
(1000*60));
printf("Up %3d days, %2d:%2d, One User, Load Average: who =
knows?",dwDays,dwHrs,dwMins);
return;
}
------=_NextPart_000_01BC7C89.D3D64510--