Operating System - HP-UX
1748205 Members
4603 Online
108759 Solutions
New Discussion юеВ

Re: Determine if shutdown was started after it's been cancelled

 
Carl Houseman
Super Advisor

Determine if shutdown was started after it's been cancelled

HP Power Manager (HPPM) 4.1 is directly or indirectly sending the following broadcast messages:

Broadcast Message from root () Sat May 5 14:17:40...
System is being shut down in approximately 2 minute(s).

Broadcast Message from root () Sat May 5 14:17:47...
System shut down has been canceled. (Power Fail)

How can I, from a script in another process, figure out that the shutdown was started and then cancelled? I can't find any log file that records that a shutdown was ever started.

The HPPM log files are binary, not easily deciphered.
7 REPLIES 7
Sandman!
Honored Contributor

Re: Determine if shutdown was started after it's been cancelled

How about the /etc/shutdownlog file?
Sandman!
Honored Contributor

Re: Determine if shutdown was started after it's been cancelled

Or you could run strings on the HPPM log files and grep for keywords viz.,

# strings | egrep "Broadcast|shut down|canceled"
Carl Houseman
Super Advisor

Re: Determine if shutdown was started after it's been cancelled

By the time something is recorded in /etc/shutdownlog, the system has actually been shutdown.

When I said the HPPM log is "not easily deciphered" that means "no text" - nothing for strings to show.
Steven E. Protter
Exalted Contributor

Re: Determine if shutdown was started after it's been cancelled

Shalom,

tail -f /var/adm/syslog/syslog.log

You will see shutdown data there.

Connect to the console, you will see ongoing data to that device.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Carl Houseman
Super Advisor

Re: Determine if shutdown was started after it's been cancelled

Obvious answers aren't going to work for this one. syslog's got nothing.
Carl Houseman
Super Advisor

Re: Determine if shutdown was started after it's been cancelled

Is there something I can run that looks like a logged-in terminal which will receive and record the broadcast messages to a file?
Carl Houseman
Super Advisor

Re: Determine if shutdown was started after it's been cancelled

I found my answer by digging into the HPPM setup pages and docs. HPPM can run a predefined script at shutdown. From there I can log something to syslog, set flags and so forth.

I'd still be interested to know of any way to capture broadcast messages to a file.