kernel/system up time
Is there a library function that tells me how long the system or the kernel has been up.
Thanks IFti |
"uptime" will give you the info. If you want the text file, it's /proc/uptime.
|
Thanks. Isn't there any C callabel function?
|
dunno, but isn't it possible to just read /proc/uptime as text with the functions from stdio.h?
|
That's a good idea. Thanks.
When I did cat /proc/uptime it gave me 97983.95 85870.88 How to read from it. What are these 2 values and are they in seconds? |
from "man proc"...
"""uptime This file contains two numbers: the uptime of the system (seconds), and the amount of time spent in idle process (seconds).""" |
Great thanks for all the help
|
iftiuk,
You can also download gkrellm as it has a running counter of machine uptime towards the bottom. J |
Thanks for letting me know
|
All times are GMT -5. The time now is 12:54 PM. |