1833051 Members
2377 Online
110049 Solutions
New Discussion

Re: system life time

 
j773303
Super Advisor

system life time

How do know the system life time from last rebooted until now?
Hero
6 REPLIES 6
Alex Glennie
Honored Contributor

Re: system life time

man uptime ->

uptime(1)

NAME
uptime, w - show how long system has been up, and/or who is logged in and what they are doing

eg


hpwin057:/home/glennie>(glennie)> uptime
9:45am up 1 day, 22:59, 8 users, load average: 0.07, 0.07, 0.05


shows system was rebooted yesterday
Dave Wherry
Esteemed Contributor

Re: system life time

who -b
will give you the date and time the system was last booted.
Paul Sperry
Honored Contributor

Re: system life time

uptime

show how long system has been up
Lee Huei
Regular Advisor

Re: system life time

# uptime
eg output
6:38pm up 9 days, 3:36, 3 users, load average: 0.27, 0.27, 0.27

or check from shutdownlog, eg:
# cat /etc/shutdownlog
--> last entry

14:55 Mon Nov 17, 2003. Reboot: (by !root)--> the last time system was rebooted

or check rc.log
# cat /etc/rc.log

*********************************************
HP-UX Start-up in progress
Mon Nov 17 14:47:18 SST 2003
*********************************************
check when system starts up
Graham Cameron_1
Honored Contributor

Re: system life time

No-one mentioned the world's shortest unix command (or one of them) - "w".

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
John Palmer
Honored Contributor

Re: system life time

Neither did they mention the 'uptime' of this thread!