How to find the start up time of a Solaris 5.1 server using a shell script,need to know how much time it took to be on running state?I need to know how much time it took to come to running mode from starting mode?
A:
There is no such thing as Solaris 5.1, I guess you mean Solaris 10 a.k.a. SunOS 5.10.
Anyway, here is a way to know when the system last booted
last reboot | head -1
and here is an alternative, assuming CPUs weren't taken off and one later:
psrinfo
jlliagre
2009-11-25 05:26:16
A:
Easiest way to find the boot-up time (which is not entirely accurate, assumes you're doing a complete reboot with no pause, and ignores hardware bootstrapping time, but does the job) is to simply inspect the logs and get the timecode where the system enters whichever state you're worried about, and subtract the timecode of the last 'halting' state
Andrew Bolster
2010-03-15 11:18:19