Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-22-2007, 03:02 AM   #1
LQ Newbie
Registered: May 2005
Distribution: Redhat
Posts: 25

Rep: Reputation: 15
Smile Counting number of system reboots


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,
Old 11-22-2007, 03:08 AM   #2
Registered: Nov 2007
Location: USA but now Ukraine
Distribution: ubuntu 7.10 "nasty gibbon" :) Mandriva 2008
Posts: 61

Rep: Reputation: 15
i have no idea...but yes it would be kinda cool
Old 11-22-2007, 03:28 AM   #3
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
counting number of lines inside a directory structure. vl@d Linux - General 4 11-20-2006 12:50 PM
Counting number of occurance in awk program sarajevo Programming 2 11-01-2006 10:31 AM
Counting number of occurences of a certain chacter in string java linuxmandrake Programming 4 04-27-2006 11:10 PM
counting number of sheets printed from a printe avirup dasgupta Linux - General 2 07-25-2005 07:36 PM
counting number of files akin81 Linux - Newbie 6 03-25-2004 01:53 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration