Skip to main content

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

code:
cat /proc/uptime
the first number total number of seconds system has been up. second number how of time machine has spent idle, in seconds.

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

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

PProHeadless.exe has stopped working error when opening projects in Adobe Media Encoder CS6

Preconditions Failed. - Joomla! Forum - community, help and support