need reboot count using tuptime --tsince -86400 for past 24 hrs
svshubham01 opened this issue · comments
Hi,
i need the reboot count of the server in the past 24 hrs, found that tuptime --tsince -86400 returns the system info for the past 24 hrs, can anyone help to get the reboot count.
Thanks In Advance
Hi,
The default output have all the information that you need, from the "System startups" line, you can get the reboots count, which is equal to startups minus one:
tuptime --tsince -86400 --csv | grep 'System startups' | awk -F\" '{print $4 -1}'
Hi,
Thanks for the quick response.
tuptime --tsince -86400 --csv | grep 'System startups' | awk -F" '{print $4 -1}'
you mean this command returns me the reboot count for the past 24 hours?
Yes, it is.
Thanks a lot for your help.. I tested it out and found that it works perfectly for me... :)