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@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.