HOWTO.4: How to install GENPOWER and Power Monitoring Software


HOWTO.4: GENPOWER and Power Monitoring Software Install

A number of modified system initialization and shutdown scripts, as well as an automated GENPOWER install script have been bundled into this in-house release of the GENPOWER software. With this improved package, system messages (some of which are normally sent to the console, some of which are recorded in various system log files) are captured and sent to a power log file placed in the user directory. In addition, all messages sent by GENPOWER reflecting UPS power status changes, and normally sent to the console are also logged to the power log file. Therefore, a new tool for monitoring system uptime and downtime, as well as transient power outages, system crashes, manual or automated shutdowns and reboots can be used to evaluate the performance of a field computer system.

For standalone systems, the power log file is automatically backed up to the zip drive when daily backups are done (see HOWTO.7).

The install procedure is very simple and should work for all Linux boxes configured with the latest RedHat Linux 5.2 release:

  1. Copy genpower-1_0_1.tar.gz into /root. Gunzip and untar.

  2. cd /genpower-1.0.1

  3. Run the install script install_genpower and follow the instructions.

You are done!

Before testing the software make sure you build the proper modified serial cable for apc-linux.

Note: If you prefer to install GENPOWER without the power monitoring log file option, follow the steps below:

  1. Copy genpower-1_0_1.tar.gz into /root. Gunzip and untar.

  2. cd /genpower-1.0.1

  3. cp genpowerd /sbin/genpowerd

  4. cp genpowerd.ini /etc/rc.d/init.d/genpowerd.ini

  5. cp genpowerfail /etc/genpowerfail

  6. Edit /etc/inittab – Replace the lines referring to UPS power monitoring with the ones below:
    pf::powerfail:/etc/genpowerfail start
    pg::powerokwait:/etc/genpowerfail stop

  7. Create necessary links:
    ln –s /etc/rc.d/init.d/genpowerd.ini /etc/rc.d/rc0.d/K99genpowerd
    ln –s /etc/rc.d/init.d/genpowerd.ini /etc/rc.d/rc3.d/S61genpowerd
    ln –s /etc/rc.d/init.d/genpowerd.ini /etc/rc.d/rc6.d/K99genpowerd

  8. Create a file called /etc/sysconfig/power with the following lines:
    UPS_DEVICE=/dev/ttyS#
    UPS_TYPE=apc-linux

  9. As root, issue the commands:
    chmod u+x /sbin/genpowerd,
    chmod u+x /etc/rc.d/init.d/genpowerd.ini
    chmod u+x /sbin/genpowerfail



Article ID: 269
Created: November 10, 2008
Last Updated: November 10, 2008
Author: Beth Bartel

Online URL: https://kb.unavco.org/article/howto-4-how-to-install-genpower-and-power-monitoring-software-269.html