[net.sources.d] uptime for System V

sjm@dayton.UUCP (Steven J. McDowall) (09/15/86)

I just want to make sure I acknowledge that the routines to
read kmem are borrowed from the ldave program 
contributed by Phil Budne @ Boston U / DSG, and 
that uptime.c is simply a re-working of his more complex
program to fake rwho.c packets with some bells and whistles
(and a lot less code!). Any thanks should go to him, and 
of course the bugs are all mine. (But there aren't any of 
those, right? :-)

-- 
Steven J. McDowall	
Dayton-Hudson Dept. Store. Co.		UUCP: ihnp4!rosevax!dayton!sjm
700 on the Mall				ATT:  1 612 375 2816
Mpls, Mn. 55408

dlm@cuuxb.UUCP (Dennis L. Mumaugh) (09/24/86)

In article <199@dayton.UUCP> sjm@dayton.UUCP (Steven J. McDowall) writes:
> *	uptime.c -- Print how long the system has been up 
> *				System V Implmenentation
> *
> *	9/19/86 - Version 1.1
....
>	uptime = (times(tbuf) / HZ);
>
New C compilers have  the  ability  to  pass  structures  on  the
argument of a function.  Times requires a pointer to a structure.
Thus
>	uptime = (times(&tbuf) / HZ);
is correct.  The second  code  is  correct  no  matter  what  the
compiler.

I just talked with Paul and we agree.  His worked because he used
a trick and had an array instead of a structure.
-- 
=Dennis L. Mumaugh
 Lisle, IL       ...!ihnp4!cuuxb!dlm