LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Counting number of system reboots (https://www.linuxquestions.org/questions/linux-newbie-8/counting-number-of-system-reboots-601626/)

rbh123 11-22-2007 03:02 AM

Counting number of system reboots
 
hi,

I am curious to know if there is way by which we can say/count the number of reboots the system has gone through ?

Thanks in advance,
rbh

nate6874 11-22-2007 03:08 AM

i have no idea...but yes it would be kinda cool :)

reddazz 11-22-2007 03:28 AM

One way you can achieve this is by using the command "last" which reads from the log file /var/log/wtmp. "last reboot" is supposed to show you the number of reboots since the log file /var/log/wtmp was created. The only problem with using this method is that some distros don't automatically create /var/log/wtmp, so if you did not create if yourself then you probably won't have any of the info that last is supposed to display.


All times are GMT -5. The time now is 02:48 PM.