Hi,
Can someone explain in detail what 'uptime' ,'last reboot' and 'who -b' commands do in solaris.
this commands are not executing in every solaris box. why this is happening. Has solaris got some inbuilt commands into it. If yes then where i have found them?
The exact name and location of "utmp" and "wtmp" files varies. See "man who" to find out the names on your system. Then check whether the files exist and have size, and that "wtmp" is not size 2Gb (i.e. too big). If the "utmp" and "wtmp" files are missing they have to be created manually with the correct permissions for your system prior to rebooting the system.
Your output from your "last reboot" just shows that there is no "reboot" record in the "wtmp" file possibly because that file has been deleted, nulled or corrupted since the computer was last booted. Many sites age this file weekly to stop it getting too big.
An error from "who -b" suggests that the "utmp" file has been deleted, nulled or corrupted since the computer was last booted and that it does not contain a "system boot" record.
The "uptime" command uses the same information as "who -b" with the advantage that it is correct when system has been up for more than a year.
Actually i am looking forward to find the information about the server last boot time
i have used 'uptime' coomand to find out this and it gives an output like
3:50pm 2 users, load average: 1.39, 1.25, 1.24
Is it indicating something ? As i understand i am not able to find the no of days or time from this output. am i right?
Can you advice some other method with the help which i can find the last boot time of my server?