1836373 Members
2294 Online
110100 Solutions
New Discussion

UPS_MOND

 

UPS_MOND

Hello everyone,

I have a hpux system connected to a PowerTrust UPS, and I want to instruct to the ups_mond daemon to do something diferent but /sbin/shutdown, in fact, I want it to run a shell script instead. I have read the documentation and ups_conf doesn't appear to have a field to do something like this, not even the daemon options (t or s) are able to do it.

Thanks in advance,
Carlos.
2 REPLIES 2
Andrew Merritt_2
Honored Contributor

Re: UPS_MOND

Hi Carlos,
I'm afraid that what ups_mond does is shut down the system when it gets the signal that the power has gone. Generally, I don't think there is much time to do anything else.

I guess there may be a third-party app. to do something like this.

Andrew
Stephen Keane
Honored Contributor

Re: UPS_MOND

You can instruct ups_mond to log messages without actually shutting down. You could in theory have a script that periodically checks for these log messages and takes whatever action you feel is necessary when they appear. The only problem with that is ups_mond is locked into memory (i.e. won't be paged out) whereas your script would be. thus there might be a delay between the power outage and your script being run. Plus your script would have to sleep for a finite time between each check for messages, otherwise it would consume a lot of CPU.