[fpc-pascal]Computer/Server uptime (Linux)
Peter Vreman
pfv at cooldown.demon.nl
Sat Jan 6 22:29:33 CET 2001
> anybody knows how to find out the time the computer is running under
> Linux?
>
> I want to display the same time the Linux program "top" is displaying
> in the top left corner (ex. "up 27 days, 23:26").
>
> Is that possible? If yes, how?
>
> And (less important) maybe also the current IDLE level (ex. "99.2%")?
Look in the /proc filesystem. You can use 'strace top 2> strace.txt' to
get a list of files to use. For the running time (uptime) it's
/proc/uptime
More information about the fpc-pascal
mailing list