On 10/30/2016 01:12 AM, Hadi Motamedi wrote:
Dear All I am using a centos server for cdr billing and mediation device on a remote network. I am experiencing problem that I am suspicious it comes from main supply power cut at the remote site. The power supply to the remote site comes from battery charger that will be automatically switched in circuit under main supply power cut but cannot provide adequate power for more than 2 hours . I am suspicious that the remote system is suffering from many frequent main supply power cut . Can you please do me favor and let me know if there is any log on my centos server that I can check to see if there would be many frequent power cut there ? Thank you for your time
I have been experiencing a similar situation with a remote server, and found it much easier to use the command: last -x | tail -n50 to see reboots. You can tell a power cut because the end time for the previous boot up will be the same as the begin time for the next boot. If it is an orderly shutdown, there will be a time gap that is logged. As I understand it, the 'last' command uses the data stored in /var/log/wtmp, but that information is not in human-readable format. Ted Miller Indiana, USA