[CentOS] Power Cut

Leonard den Ottolander leonard at den.ottolander.nl
Wed Nov 2 11:52:28 UTC 2016


Hello Hadi,

On Sat, 2016-10-29 at 22:12 -0700, Hadi Motamedi wrote:
> 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 ?

People have already pointed you to dmesg and /var/log/messages.

To receive an email every time it gets rebooted put the below lines
in /etc/rc.d/rc.local (or wrap them in a script and add a reference to
that):

mail -s "Server <name> rebooted" you at example.com << ENDOFMESSAGE
Server <name> has been rebooted.
ENDOFMESSAGE

This of course will only notify you after the fact and will be no good
if the system stays down.

Regards,
Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research





More information about the CentOS mailing list