lakshmi pathi wrote: > This is a case of where knowing what you are really trying to do would > be useful > > sorry :) I came across this interesting question in Linux forum , I > thought about digging "/var/log/messages" and grep > "Freeing initrd memory" or some unique message might give the required answer. > I posted the question here, because I wanted the professional answer :) > > Thanks guyz, today I learned by last command.But how reliable "last > reboot" is ? I quickly checked the man page it said /var/log/wtmp > used by last command.- what will happen if the log file > modified/erased or archived. You can also use de S.M.A.R.T. statistics of the hard drive, it will not show you the reboots but it will show the spin ups of the hard drive so power off power on, you can use this with the last reboot command and get a good indication. Best regards, Jelle de Jong
# /usr/sbin/smartctl -A /dev/sda | grep -E "Start_Stop_Count|Power_On_Hours|Power_Cycle_Count" 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 9 9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 8843 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 9 /usr/sbin/smartctl -A /dev/sdb | grep -E "Start_Stop_Count|Power_On_Hours|Power_Cycle_Count" 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 53 9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 8844 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 53
_______________________________________________ Ext3-users mailing list Ext3-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/ext3-users