Know When a power outage started

Status
Not open for further replies.

petoniano

Dabbler
Joined
Feb 14, 2018
Messages
29
I've had a power blackout at my home where my freenas server is. This morning i've received an email from the server :
System booted at Fri Apr 27 09:12:58 2018 was not shut down properly

So I know at 9:12 the power came back. But is there a way to know when was the power outage began?

In the "reporting" Page of the gui there is only infornation from that time, and I needed to know how long lasted that power outage.

Thank you very much
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
If you look at any of the graphs in the reporting section of the GUI I would think an extended power down would be shown as blank on the graphs. If you are not seeing a long blank period on the reporting graphs perhaps the outage was for a very short period of time. i.e. the cpu performance graph or the system load graph would be non-zero while the system is up. So I would expect you'd see activity, a blank space (system off, so no values reported), and then activity when the system rebooted at 9:12.

Depending on what you are logging you might find some clues in /var/log/
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
If you have a UPS on your system, and have it configured with the UPS monitoring utility in FreeNAS, the system will email you when the power goes out and if it stays out long enough (configurable in the tool) the system will email you again before it shuts the server down. That would prevent the system from being
not shut down properly
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Look at the log file /var/log/ups.log, if the power outage is to old you'll have to look at the older logs (ups.log.0.bz2, ups.log.1.bz2, ...), as the bz2 extension suggests it, they are compressed so you'll need to uncompress them before you can read them.
 

petoniano

Dabbler
Joined
Feb 14, 2018
Messages
29
So I would expect you'd see activity, a blank space (system off, so no values reported), and then activity when the system rebooted at 9:12.
The graphs start from the last session, the y don't show before the power cut.

If you have a UPS on your system
I don't have one :eek:( I definitively need one

Look at the log file /var/log/ups.log, if the power outage is to old you'll have to look at the older logs (ups.log.0.bz2, ups.log.1.bz2, ...), as the bz2 extension suggests it, they are compressed so you'll need to uncompress them before you can read them.
My /var/log/ups.log file says:
Code:
[root@freenas /var/log]# less ups.log										   
Apr 27 11:13:20 freenas newsyslog[1658]: logfile first created				 
ups.log (END)

And there are no other files ups.log files there :confused:

Thank you for the help, I'm out of my home, and I thought the server would give me info about the duration of the power outage
 
Status
Not open for further replies.
Top