[CentOS] Power Cut

Sun Oct 30 06:44:48 UTC 2016
John R Pierce <pierce at hogranch.com>

On 10/29/2016 10:12 PM, Hadi Motamedi wrote:
> 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 ?

look at /var/log/messages for reboots without shutdowns.

centos 6 linux boot starts logging something like...

Oct 25 15:01:25 new kernel: imklog 5.8.10, log source = /proc/kmsg started.
Oct 25 15:01:25 new rsyslogd: [origin software="rsyslogd" 
swVersion="5.8.10" x-pid="2740" x-info="http://www.rsyslog.com"] start
Oct 25 15:01:25 new kernel: Initializing cgroup subsys cpuset
Oct 25 15:01:25 new kernel: Initializing cgroup subsys cpu
Oct 25 15:01:25 new kernel: Linux version 2.6.32-642.6.1.el6.x86_64 
(mockbuild at worker1.bsys.centos.org) (gcc version 4.4.7 20120313 (Red Hat 
4.4.7-17) (GCC) ) #1 SMP Wed Oct 5 00:36:12 UTC 2016


followed by tons more about all the stuff starting up....


when its properly shutdown, you'd see something like this after 
everything has stopped

Oct 25 14:20:36 new init: Disconnected from system bus
Oct 25 14:20:38 new rpcbind: rpcbind terminating on signal. Restart with 
"rpcbind -w"
Oct 25 14:20:38 new auditd[2704]: The audit daemon is exiting.
Oct 25 14:20:38 new kernel: type=1305 audit(1477430438.399:37765): 
audit_pid=0 old=2704 auid=4294967295 ses=4294967295 res=1
Oct 25 14:20:38 new kernel: type=1305 audit(1477430438.497:37766): 
audit_enabled=0 old=1 auid=4294967295 ses=4294967295 res=1
Oct 25 14:20:38 new kernel: Kernel logging (proc) stopped.
Oct 25 14:20:38 new rsyslogd: [origin software="rsyslogd" 
swVersion="5.8.10" x-pid="2738" x-info="http://www.rsyslog.com"] exiting 
on signal 15.


if its booted without a clean shutdown, it will do some file system 
checking and such while starting.


-- 
john r pierce, recycling bits in santa cruz