last | grep -i "^reboot" | wc -l
This command will show only the count of the server reboots (but this will
not include the server shutdown)
Ex:
last | grep -i "^reboot"|wc -l
2
last | grep -i "^reboot"
reboot system boot 2.6.18-128.1.10. Sun May 31 20:10 (00:34)
reboot system boot 2.6.18-128.1.10. Sun May 31 20:05 (00:03)
tune2fs -l /dev/hda1|grep -i mount|grep -v Maximum
This will show you the details of the server how many times mounted
(including server down/shutdown/reboot)
Note: /dev/hda1 denotes /boot partition of the server
Ex:
tune2fs -l /dev/hda1|grep -i mount|grep -v Maximum
Last mounted on: <not available>
Default mount options: user_xattr acl
Last mount time: Sun May 31 20:10:57 2009 -> last
rebooted/mount time of the /boot partion
Mount count: 6 -> Total server shutdown/reboot count
Have a nice day folks...!