Thread: Alternitive to `uptime`?
i'm trying write script gather uptime of box , send email out if box has died. problem being hard when `uptime` changed format 23:59 1 day.
there method see uptime in hours or minutes or seconds?
thanks,
joe
the first number total number of seconds system has been up. second number how of time machine has spent idle, in seconds.code:cat /proc/uptime
uptime, in bash, can run like:
code:read -r uptime idle < /proc/uptime echo "$uptime"
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] Alternitive to `uptime`?
Ubuntu
Comments
Post a Comment