--- CyberPower - Guide ---


USER GUIDE
################################################################################
#                                                                              #
#        PowerPanel for Linux Software User's Manual                           #
#                                                                              #
################################################################################

Outline

* Getting Online Help
* Getting the UPS status
* Getting the Daemon settings
* Setup the UPS and Daemon
* Daemon Configuration
* Troubleshooting


Getting Help
============

pwrstat -help

Listing help contents with each direction and options for 'pwrstat' command.


Getting the UPS status
======================

pwrstat -status

Listing current UPS propertyies and status as following.

Properties:
	Model Name.................. UPS CP585
	Firmware Number............. BFH8102-6O1.5
	Rating Voltage.............. 120 V
	Rating Power................ 515 VA (335 Watt)

Current UPS status:
	State....................... Normal
	Power Supply by............. Utility Power
	Utility Voltage............. 111 V
	Output Voltage.............. 110 V
	Battery Capacity............ 100 %
	Remaining Runtime........... 60 min.
	Load........................ 0 Watt(0 %)
	Test Result................. Passed at 2011/01/27 13:17:15
	Last Power Event............ Blackout at 2011/01/27 13:21:15

Note. These display items depends on UPS specification.


Getting the Daemon settings
===========================

pwrstat -config

Listing current Daemon settings as following.

Daemon Configuration:

Alarm .................................... On
Hibernate ................................ Off

Action for Power Failure:

	Delay time since Power Failure ....... 60 sec.
	Run script command ................... On
	Path of script command ............... /etc/pwrstatd-powerfail.sh
	Duration of command running ........... 1 sec
	Enable shutdown system................ on

Action for Battery Low:

   Remaining runtime threshold .......... 300 sec.
   Battery capacity threshold ........... 35 %.
	Run script command ................... On
	Path of script command ............... /etc/pwrstatd-lowbatt.sh
	Duration of command running ........... 1 sec
	Enable shutdown system................ on


Setup the UPS and Daemon
========================

# Setup action for power failure as example

pwrstat -pwrfail -delay 60 -active on -cmd /etc/pwrstatd-powerfail.sh
-duration 1 -shutdown on

As above setting, it will take 1 second to run a shell script
/etc/pwrstatd-powerfail.sh and shutdown system since utility power has failure
for 1 minute.


# Setup action for low battery as example

pwrstat -lowbatt -runtime 300 -capacity 35 -active on -cmd /etc/pwrstatd-lowbatt.sh
-duration 1 -shutdown on

As above setting, it will take 1 second to run a shell script
/etc/pwrstatd-lowbatt.sh and shutdown system since UPS's remaining runtime has low 
than 300 seconds or battery capacity has low than 35 %.

Note. 
1. The battery capacity Threshold can be changed in file /etc/pwrstatd.conf.
2. The parameter -pwrfail and -lowbatt are exclusively.
3. The unit of options -delay is second.
4. Both shell script /etc/pwrstatd-powerfail.sh and /etc/pwrstatd-lowbatt.sh 
   were copied in installation procedure.
5. The parameter -pwrfail least one of parameter -delay, -active, -cmd, -duration
   or -shutdown is necessary.
6. The parameter -lowbatt least one of parameter -runtime, -capacity, -active,
   -cmd, -duration or -shutdown is necessary.
7. The options of -cmd can be any shell script in system, but it will be run by
   root authority.
8. The default action setting for both of -pwrfail and -lowbatt are same as 
   above setting of example.


# Setup UPS alarm

pwrstat -alarm on
pwrstat -alarm off

To turn UPS's alarm On or Off.

# Setup UPS mute temporary

pwrstat -mute

To mute UPS's alarm for this power event until next one.

# Setup UPS to do a battery test

pwrstat -test

To verify the UPS will work well in battery power.

# Setup hibernation

pwrstat -hibernate

Using hibernate to instead of system shutdown when power event occurred.

Daemon Configuration
====================

The daemon's configuration file is locate at /etc/pwrstatd.conf.


Daemon Event Log
================

The daemon will record the power event in 'pwrstatd.log' log file, which can be
found on /var/log directory.

Troubleshooting
===============

1. What kind of UPS is supported by PowerPanel for Linux.
   a. The pwrstatd support USB Port and Serial Port to monitor UPS.
   b. A UPS is designed under architecture of USB HID/Power Class, a UPS has 
      DB-9 connector for RS-232 or Dry-Contact communication.

2. Can not establish communication with UPS 
   a. Ensure UPS type is supported by PowerPanel for Linux. 
   b. Ensure USB or Serial cable is connected between UPS and computer.
      Directly connect computer and UPS without USB Hub is helpful to solve if
      which have communication problem.
   c. Try to unplug and plug the USB Cable with UPS.
   d. Ensure hid device can be found at directory of /dev/hiddev, 
      /dev/usb/hiddev, /dev/usb/hid/hiddev such as 'hiddev0' if UPS is
      connected by USB cable. Ensure hid device can be found at directory of
      /dev such as ttyS0 if UPS is connected by serial cable.
   e. Ensure Linux kernel version is more than 2.4.22 or 2.6. Ensure kernel
      module 'usbhid.ko' is loaded on system in kernel 2.4 and 'hid.o' in 
      kernel 2.6.
      
3. Can not installation or uninstallation
   a. Ensure user account is root, because the installation/uninstallation
      needs 'root' privilege to setup system.
   b. The target Linux may not work with our installation procedure, please
      refer to file doc/deploy-guide to get more detail information.

4. pwrstat have no function.
   a. Ensure pwrstatd is working.
   b. Ensure `prohibit-client-access' option is set as 'no' in pwrstatd 
      configuration file.
      
5. The pwrstatd daemon can not detect the UPS which has H2C USB adapter.
   a. Ensure linux system have libusb library. It can be found at /usr/lib
      directory.
   b. Ensure the libusb soname is libusb-0.1.so.4. 
   c. If libusb soname version is less than libusb-0.1.so.4, please go to 
      'rpmfind' or 'sourceforge' web site download the libusb rpm package
      and install it. The 'rpmfind' and 'sourceforge' download web site are
      shows as below:       
      *rpmfind web site, http://rpmfind.net
      *sourceforge web site, http://sourceforge.net
################################################################################
#                                                                              #
#        PowerPanel for Linux Software User's Manual                           #
#                                                                              #
################################################################################

Outline

* Getting Online Help
* Getting the UPS status
* Getting the Daemon settings
* Setup the UPS and Daemon
* Daemon Configuration
* Troubleshooting


Getting Help
============

pwrstat -help

Listing help contents with each direction and options for 'pwrstat' command.


Getting the UPS status
======================

pwrstat -status

Listing current UPS propertyies and status as following.

Properties:
	Model Name.................. UPS CP585
	Firmware Number............. BFH8102-6O1.5
	Rating Voltage.............. 120 V
	Rating Power................ 515 VA (335 Watt)

Current UPS status:
	State....................... Normal
	Power Supply by............. Utility Power
	Utility Voltage............. 111 V
	Output Voltage.............. 110 V
	Battery Capacity............ 100 %
	Remaining Runtime........... 60 min.
	Load........................ 0 Watt(0 %)
	Test Result................. Passed at 2011/01/27 13:17:15
	Last Power Event............ Blackout at 2011/01/27 13:21:15

Note. These display items depends on UPS specification.


Getting the Daemon settings
===========================

pwrstat -config

Listing current Daemon settings as following.

Daemon Configuration:

Alarm .................................... On
Hibernate ................................ Off

Action for Power Failure:

	Delay time since Power Failure ....... 60 sec.
	Run script command ................... On
	Path of script command ............... /etc/pwrstatd-powerfail.sh
	Duration of command running ........... 1 sec
	Enable shutdown system................ on

Action for Battery Low:

   Remaining runtime threshold .......... 300 sec.
   Battery capacity threshold ........... 35 %.
	Run script command ................... On
	Path of script command ............... /etc/pwrstatd-lowbatt.sh
	Duration of command running ........... 1 sec
	Enable shutdown system................ on


Setup the UPS and Daemon
========================

# Setup action for power failure as example

pwrstat -pwrfail -delay 60 -active on -cmd /etc/pwrstatd-powerfail.sh
-duration 1 -shutdown on

As above setting, it will take 1 second to run a shell script
/etc/pwrstatd-powerfail.sh and shutdown system since utility power has failure
for 1 minute.


# Setup action for low battery as example

pwrstat -lowbatt -runtime 300 -capacity 35 -active on -cmd /etc/pwrstatd-lowbatt.sh
-duration 1 -shutdown on

As above setting, it will take 1 second to run a shell script
/etc/pwrstatd-lowbatt.sh and shutdown system since UPS's remaining runtime has low 
than 300 seconds or battery capacity has low than 35 %.

Note. 
1. The battery capacity Threshold can be changed in file /etc/pwrstatd.conf.
2. The parameter -pwrfail and -lowbatt are exclusively.
3. The unit of options -delay is second.
4. Both shell script /etc/pwrstatd-powerfail.sh and /etc/pwrstatd-lowbatt.sh 
   were copied in installation procedure.
5. The parameter -pwrfail least one of parameter -delay, -active, -cmd, -duration
   or -shutdown is necessary.
6. The parameter -lowbatt least one of parameter -runtime, -capacity, -active,
   -cmd, -duration or -shutdown is necessary.
7. The options of -cmd can be any shell script in system, but it will be run by
   root authority.
8. The default action setting for both of -pwrfail and -lowbatt are same as 
   above setting of example.


# Setup UPS alarm

pwrstat -alarm on
pwrstat -alarm off

To turn UPS's alarm On or Off.

# Setup UPS mute temporary

pwrstat -mute

To mute UPS's alarm for this power event until next one.

# Setup UPS to do a battery test

pwrstat -test

To verify the UPS will work well in battery power.

# Setup hibernation

pwrstat -hibernate

Using hibernate to instead of system shutdown when power event occurred.

Daemon Configuration
====================

The daemon's configuration file is locate at /etc/pwrstatd.conf.


Daemon Event Log
================

The daemon will record the power event in 'pwrstatd.log' log file, which can be
found on /var/log directory.

Troubleshooting
===============

1. What kind of UPS is supported by PowerPanel for Linux.
   a. The pwrstatd support USB Port and Serial Port to monitor UPS.
   b. A UPS is designed under architecture of USB HID/Power Class, a UPS has 
      DB-9 connector for RS-232 or Dry-Contact communication.

2. Can not establish communication with UPS 
   a. Ensure UPS type is supported by PowerPanel for Linux. 
   b. Ensure USB or Serial cable is connected between UPS and computer.
      Directly connect computer and UPS without USB Hub is helpful to solve if
      which have communication problem.
   c. Try to unplug and plug the USB Cable with UPS.
   d. Ensure hid device can be found at directory of /dev/hiddev, 
      /dev/usb/hiddev, /dev/usb/hid/hiddev such as 'hiddev0' if UPS is
      connected by USB cable. Ensure hid device can be found at directory of
      /dev such as ttyS0 if UPS is connected by serial cable.
   e. Ensure Linux kernel version is more than 2.4.22 or 2.6. Ensure kernel
      module 'usbhid.ko' is loaded on system in kernel 2.4 and 'hid.o' in 
      kernel 2.6.
      
3. Can not installation or uninstallation
   a. Ensure user account is root, because the installation/uninstallation
      needs 'root' privilege to setup system.
   b. The target Linux may not work with our installation procedure, please
      refer to file doc/deploy-guide to get more detail information.

4. pwrstat have no function.
   a. Ensure pwrstatd is working.
   b. Ensure `prohibit-client-access' option is set as 'no' in pwrstatd 
      configuration file.
      
5. The pwrstatd daemon can not detect the UPS which has H2C USB adapter.
   a. Ensure linux system have libusb library. It can be found at /usr/lib
      directory.
   b. Ensure the libusb soname is libusb-0.1.so.4. 
   c. If libusb soname version is less than libusb-0.1.so.4, please go to 
      'rpmfind' or 'sourceforge' web site download the libusb rpm package
      and install it. The 'rpmfind' and 'sourceforge' download web site are
      shows as below:       
      *rpmfind web site, http://rpmfind.net
      *sourceforge web site, http://sourceforge.net








INSTALLATION
################################################################################
#                                                                              #
#     PowerPanel for Linux Installation Guide                                  #
#                                                                              #
################################################################################

PowerPanel for Linux is a software which provides command line interface that 
allows for monitoring of your UPS and control to gracefully shut down the 
computer during a power outage. The pwrstatd daemon runs at startup and 
communicates with the UPS while pwrstat is an interface that allows users to get
the status of the UPS and configure the UPS and daemon itself.


# Pre-requirement
1. The root authority is necessary for following instruction. You can use 'su'
   command to change authority as root.


# Installation

1. Install rpm package.

In terminal, change current directory to package location and typing command in
x86 linux as:

rpm -ivh powerpanel-ver-rev-i386.rpm

or typing command in x64 linux as:

rpm -ivh powerpanel-ver-rev-x86_64.rpm

In X Window desktop, open file browser and locate to folder of installation 
package. Double click on file 'powerpanel-ver-rev-i386.rpm' or 
'powerpanel-ver-rev-x86_64.rpm' according to your system architecture and 
following the wizard to finish installation.

Notes:
A. The ver-rev denotes a version and release number, you have to replace it by 
   physical one, for example, "1.1-0".
   
B. It will show 'Installation accomplished!' message after installation done.
   The daemon processes will startup to monitor UPS immediately.
   
C. You have to read completely and agree the content of Software License 
   Agreement file which is in /usr/share/doc/packages/powerpanel/LICENSE after 
   installation. 

# Un-installation

In terminal, run un-installation command as:
rpm -e powerpanel

In X Window desktop, open the software management then finds and selects the 
'powerpanel' package. To right click and select 'delete' option then following the 
wizard to finish un-installation.


# Notice

1. When the installation has accomplished, you can find more information on 
   '/usr/share/doc/packages/powerpanel' directory. The file describe as below:

LICENSE, PowerPanel for Linux software license agreement. 
README, information about this version of release.
install-guide, for this document.
user-manual, To instruct how to use this software.
deploy-guide, To instruct how software should be deployed. You may need this
              guide if you meet trouble at installation.

2. To ensure UPS is working well, you can use 'pwrstat -status' command to 
   check its status. Please in terminal typing as:

pwrstat -status

3. To get more information about 'pwrstat' command, typing command as:

pwrstat -help

4. The 'pwrstat' command is also need root authority, please see Pre-requirement
   section.

5. To get more information about 'pwrstat' and 'pwrstatd' man page helps, typing
   command as:

man pwrstat
man pwrstatd




Valid HTML 4.0 Transitional