static Posted June 13, 2003 Report Share Posted June 13, 2003 Is there a CLI command to show how long the computer has been up and running? eg [root@pc root]# showmeuptime 2 day(s): 54 minutes: 34 seconds Quote Link to comment Share on other sites More sharing options...
Guest xaff Posted June 13, 2003 Report Share Posted June 13, 2003 "uptime"? Quote Link to comment Share on other sites More sharing options...
static Posted June 13, 2003 Author Report Share Posted June 13, 2003 LOL seriously?? Quote Link to comment Share on other sites More sharing options...
Guest anon Posted June 13, 2003 Report Share Posted June 13, 2003 :lol: Yea, "uptime" Or for lots more info. "top" Quote Link to comment Share on other sites More sharing options...
Guest xaff Posted June 13, 2003 Report Share Posted June 13, 2003 harr harr :D "top" was a lot nicer though. Quote Link to comment Share on other sites More sharing options...
bvc Posted June 13, 2003 Report Share Posted June 13, 2003 cat /proc/uptime but it's not 'human readable' :roll: Quote Link to comment Share on other sites More sharing options...
aru Posted June 13, 2003 Report Share Posted June 13, 2003 cat /proc/uptime but it's not 'human readable' :roll: then make it yourself: :mrgreen: ~$ uptime () { read secs x </proc/uptime; > printf "%s hours, %s minutes and %s secondsn" $((${secs%.*}/3600)) $(($((${secs%.*}%3600))/60)) $(($((${secs%.*}%3600))%60)); } ~$ ~$ uptime 13 hours, 30 minutes and 14 seconds ~$ Seriously, static, I'm surprised that you don't have the "/usr/bin/uptime" command. apart from top and uptime, the w command (/usr/bin/w) shows the uptime of your system too. Quote Link to comment Share on other sites More sharing options...
bvc Posted June 13, 2003 Report Share Posted June 13, 2003 If you don't have one you won't have the other. [root@localhost /]# urpmf uptime procps:/usr/bin/uptime [root@localhost /]# urpmf /usr/bin/w which:/usr/bin/which SysVinit:/usr/bin/wall coreutils:/usr/bin/wc coreutils:/usr/bin/who coreutils:/usr/bin/whoami procps:/usr/bin/w Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.