Powerware NetWatch for UNIX
Installation and Configuration Instructions


Note: This document applies to Powerware NetWatch 4.2.0 for UNIX.

Click on any link to move to that section...


Introduction

Powerware NetWatch for UNIX monitors the status of a UPS being managed by a Powerware Shutdown Server such as a ConnectUPS-X, ConnectUPS-BD, ConnectUPS-E, or BestLink Web/SNMP Card. During an extended power failure, the Powerware NetWatch may alert users that are logged into the server, log UPS-related events to a log file and if necessary, shut down the operating system before the UPS reaches a critical, low battery condition.

For Powerware Shutdown Server users, Powerware NetWatch for UNIX also incorporates the shutdown client functionality required for a Powerware Shutdown Server to control the shutdown of one or more UNIX systems during an extended power failure. NetWatch client software is available separately for those other operating systems (Windows 9x, NT/2000/XP and NetWare) that also need to be shutdown automatically by a Powerware Shutdown Server.

Back to Top of Page


Firewall User Notice

NetWatch normally requires UDP ports 200, 2844 and 2845 for communicating with Web/SNMP Cards. If your system uses a Firewall, then these ports must be unblocked.

See the Advanced Network Settings topic for more information about UDP port configuration.

Back to Top of Page


Batch Script Execution

NetWatch can execute the /usr/Powerware/NetWatch/nw_batch.sh batch script when the Powerware Shutdown Server being monitored sends a shutdown message. If enabled, this batch script will always be exceuted, even if NetWatch is configured not to shutdown the operating system.

If NetWatch is configured to shutdown the operating system, NetWatch will wait for /usr/Powerware/NetWatch/nw_batch.sh to complete before beginning the system shutdown proccess.

Edit /usr/Powerware/NetWatch/nw_batch.sh to run any required commands or other scripts when the Powerware Shutdown Server being monitored sends a shutdown message.

  1. Default - Batch script execution is disabled by default.

Back to Top of Page


Advanced Network Settings

UDP Port Selection

The UDP ports that NetWatch uses to discover and monitor Powerware Shutdown Servers can be customized if required. See section 7 of the Installation and Configuration Process for an example of modifying the port parameters during installation. Additionally, the netwatch.cfg file may also be edited post-installation to select different port numbers. Edit the Monitor Port or Discover Port parameter to select a new port port number. If currently running, NetWatch must be restarted to use the new port numbers.

  1. Default - NetWatch will use Powerware assigned UDP port numbers (2844 and 2845) for network communications.
  2. Random - NetWatch will use random UDP port numbers for network communications. These port numbers will change each time NetWatch is run.
  3. Manual - Use this option if UDP ports need to be some value other than default. The allowable range of port values is (2000-32000). Use caution in selecting port numbers in order to avoid conflicts with other programs that may be using the same port numbers. The Discover and Monitor port settings must be different.

Network Address Translation (NAT) Selection

    Select this option if your network uses a Network Address Translation (NAT) firewall between the computer running the NetWatch client software and the Powerware Shutdown Server.

Back to Top of Page


Installing and Configuring NetWatch on a UNIX System

Installing NetWatch from CD-ROM

  1. Insert the compact disk into your computerís CD-ROM drive.
  2. Log on as root or superuser (su). Uninstall any currently installed NetWatch program.
  3. Mount the CD-ROM at the mount point /cdrom, setting the options for read only, file names are not converted, and default file permission 0500 (execute permission to owner). See man page of mount, or use the following as a guide:
    AIX: mount -v cdrfs -r /dev/cd0 /cdrom
    HP-UX: mount -F cdfs -o ro /dev/dsk/c0t2d0 /cdrom
    Linux: mount -r -o check=r /dev/cdrom /cdrom
    Solaris: mount -F hsfs /dev/dsk/c0t6d0s0 /cdrom
    TRU64: mount -r -t cdfs /dev/rz4c /cdrom
  4. Change directory to the NetWatch UNIX software directory of the CD-ROM - e.g. cd /cdrom/software/unix.
  5. Type ./install.sh or ./install_posix.sh (depending on your UNIX shell) to run the installation and configuration script.
  6. The installation script will automatically start the netwatch daemon upon completion.

Install NetWatch using a TAR file

  1. Log on as root or superuser (su). Uninstall any currently installed NetWatch program.
  2. Copy NetWatch_411_unix.tar or NetWatch_411_unix.tar.gz to a directory on your system.
  3. CD to the directory you copied the tar file to.
  4. If you copied the NetWatch_411_unix.tar.gz file, extract the tar file with either of the following commands:
    gzip -d NetWatch_411_unix.tar.gz
    gunzip -d NetWatch_411_unix.tar.gz
  5. Extract the install script files with either of the following commands:
    tar xf NetWatch_411_unix.tar install.sh
    tar xf NetWatch_411_unix.tar install_posix.sh
  6. Type ./install.sh or ./install_posix.sh (depending on your UNIX shell) to run the installation and configuration script.
  7. The installation script will automatically start the netwatch daemon upon completion.

Back to Top of Page


Install and Configuration Process

  1. Configure NetWatch install directory and startup options.

    ---------------------------------------------------------------
    Welcome to Powerware NetWatch Installation
    Version 411 for LINUX (x86)

    To install Powerware NetWatch, press
    and fill in the configuration items as they
    presented to you.

    Continue installation? (y/n) [y] y
    ---------------------------------------------------------------
    Automatic Startup:
    To automatically run Powerware NetWatch upon startup
    on the computer being installed, enter (y)es,
    otherwise enter (n)o.

    NOTE: It is strongly recommended that you select Yes
    for this option in order to provide full protection
    from multiple power outages.
    ---------------------------------------------------------------
    Automatically run Powerware NetWatch on startup? (y/n) [y] y
    ---------------------------------------------------------------
    Powerware NetWatch Installation Parameters:

    Target directory: /usr/Powerware/NetWatch
    Install archive file is: NetWatch_411_unix.tar
    Run Powerware NetWatch at bootup: yes
    ---------------------------------------------------------------
    Are these installation parameters acceptable? (y/n) [y] y
    ---------------------------------------------------------------


  2. Copy files and create startup links.

    Uncompressing NetWatch_411_unix.tar file....Done
    ---------------------------------------------------------------
    Installing the Powerware NetWatch files for LINUX (x86)...Done
    ---------------------------------------------------------------
    Linking /etc/rc.d/init.d/netwatch.init to to RC directories...Done
    ---------------------------------------------------------------

  3. The install script will start the NetWatch program in the interactive mode. Find and select a NetWatch Server, or configure Advanced Network Settings ( see section 7 below) and then find a NetWatch Server.

    Starting NetWatch Interactive Configuration Mode

    The focllowing methods can be used to register the NetWatch
    client to an Web/SNMP Card:

    1. Discover active Web/SNMP Cards (Network Broadcast Mode).

    2. Enter Web/SNMP Card IP Address, Hostname, or Subnet Broadcast IP Address.
    If for some reason, the Powerware Shutdown Server you wish to monitor
    is not listed in step 1, then you may enter its IP Address or Hostname
    manually, or perform a discovery within an IP Address Subnet. If using
    a Subnet Broadcast IP Address, please fill in the proper broadcast address
    taking into consideration the subnet mask configuration of your network
    card(s). An example Subnet Broadcast IP Address could be '10.222.51.255'.

    3. Advanced Network Settings.

    4. Exit Configuration Mode.

    Enter selection 1-4: 1

    Discovering Netwatch servers on the network, please wait...

    IP: 10.225.22.230 UPS Name: Sales Office
    IP: 10.225.22.245 UPS Name: Powerware 9170
    ->Load Segment #1: Production Line
    IP: 10.225.22.245 UPS Name: Powerware 9170
    ->Load Segment #2: Service Area
    IP: 10.225.21.232 UPS Name: Computer Rm 1

    The following methods can be used to register the NetWatch
    client to a Web/SNMP Card:

    1. Discover active Web/SNMP Cards (Network Broadcast Mode).
    2. Enter Web/SNMP Card IP Address, Hostname, or Subnet Broadcast IP Address.
    If for some reason, the Powerware Shutdown Server you wish to monitor
    is not listed in step 1, then you may enter its IP Address or Hostname
    manually, or perform a discovery within an IP Address Subnet. If using
    a Subnet Broadcast IP Address, please fill in the proper broadcast address
    taking into consideration the subnet mask configuration of your network
    card(s). An example Subnet Broadcast IP Address could be '10.222.51.255'.
    3. Exit Configuration Mode.

  4. Enter IP address and Load Segment #(if supported) of the NetWatch Server you wish to monitor.

    Enter selection 1-3: 2

    Enter the IP address or host name of the Web/SNMP Card: 10.225.22.245

    Please wait while NetWatch determines Web/SNMP Card information...

    IP: 10.225.22.245 UPS Name: Powerware 9170
    ->Load Segment #1: Production Line
    IP: 10.225.22.245 UPS Name: Powerware 9170
    ->Load Segment #2: Service Area

    Your UPS supports multiple Load Segments.

    Please enter the Load Segment number to which your system is connected: [1] 2

  5. Advanced Network Settings.

    1. Discover active Web/SNMP Cards (Network Broadcast Mode).

    2. Enter Web/SNMP Card IP Address, Hostname, or Subnet Broadcast IP Address.
    If for some reason, the Powerware Shutdown Server you wish to monitor
    is not listed in step 1, then you may enter its IP Address or Hostname
    manually, or perform a discovery within an IP Address Subnet. If using
    a Subnet Broadcast IP Address, please fill in the proper broadcast address
    taking into consideration the subnet mask configuration of your network
    card(s). An example Subnet Broadcast IP Address could be '10.222.51.255'.

    3. Advanced Network Settings.

    4. Exit Configuration Mode.

    Enter selection 1-4: 3

    Select the UDP ports NetWatch uses for Discovering
    and Monitoring Powerware Shutdown Servers. If using a
    Network Address Translation (NAT) firewall between the
    NetWatch client and Web/SNMP Card, set the NAT option to true.

    Discover Port: Default [2844]

    1. Default (2844)
    2. Random
    3. Manual

    Monitor Port: Default [2845]

    4. Default (2845)
    5. Random
    6. Manual

    7. Using NAT [false]

    Enter selection 1-7, or 0 to accept current values: 3

    Enter a value between 2000 and 31999: 3055

    Select the UDP ports NetWatch uses for Discovering
    and Monitoring Powerware Shutdown Servers. If using a
    Network Address Translation (NAT) firewall between the
    NetWatch client and Web/SNMP Card, set the NAT option to true.

    Discover Port: Manual [3055]

    1. Default (2844)
    2. Random
    3. Manual

    Monitor Port: Default [2845]

    4. Default (2845)
    5. Random
    6. Manual

    7. Using NAT [false]

    Enter selection 1-7, or 0 to accept current values: 7

    Enter 0 for false, or 1 for true: 1

    Select the UDP ports NetWatch uses for Discovering
    and Monitoring Powerware Shutdown Servers. If using a
    Network Address Translation (NAT) firewall between the
    NetWatch client and Web/SNMP Card, set the NAT option to true.

    Discover Port: Manual [3055]

    1. Default (2844)
    2. Random
    3. Manual

    Monitor Port: Default [2845]

    4. Default (2845)
    5. Random
    6. Manual

    7. Using NAT [true]

    Enter selection 1-7, or 0 to accept current values: 0

  6. Configure OS Shutdown and Messaging options.

    Select an item change its value or get additional information

    IP Address or Hostname 10.225.22.245
    Load Segment Number 2

    2. Broadcast User Messages Enabled Yes
    3. Log Power Events Enabled Yes
    4. Run Batch Script when Web/SNMP
    Card sends a shutdown message No
    5. Save Program Settings Yes
    6. Return to default values

    Select 1-6, 0 to Exit Menu and Save Configuration, or r to Refresh Menu: 1

    NetWatch has three shutdown options:
    1) Time on battery shutdown -
    The time on battery shutdown option allows you to configure the amount
    of time the UPS runs on battery (in the event of a power failure)
    before initiating OS shutdown. However, you must make sure that the
    shutdown settings configured on the adapter do not take precedence
    the time configured for this option.
    2) Web/SNMP Card controlled shutdown -
    If you select this option, you must make sure that parameters
    configured on the adapter allow for enough time to shut your
    system down gracefully in the event of an AC failure.
    3) Do not allow the Web/SNMP Card to shutdown your system.

    Enter the method for shutting down your system: [2] 1

    Select 1-6, 0 to Exit Menu and Save Configuration, or r to Refresh Menu: r

    *** NetWatch Program Settings ***
    Select an item change its value or get additional information

    IP Address or Hostname 10.225.22.245
    Load Segment Number 2

    1. Shutdown Type 1 (Time On Battery)
    2. Broadcast User Messages Enabled Yes
    3. Log Power Events Enabled Yes
    4. Run Batch Script when Web/SNMP
    Card sends a shutdown message No
    5. Save Program Settings Yes
    6. Return to default values

  7. Run Batch Script.

    Select an item change its value or get additional information

    IP Address or Hostname 10.225.22.245
    Load Segment Number 2

    2. Broadcast User Messages Enabled Yes
    3. Log Power Events Enabled Yes
    4. Run Batch Script when Web/SNMP
    Card sends a shutdown message No
    5. Save Program Settings Yes
    6. Return to default values

    Select 1-6, 0 to Exit Menu and Save Configuration, or r to Refresh Menu: 4

    If enabled, the batch script '/usr/Powerware/NetWatch/nw_batch.sh'
    will be run when a shutdown event is received from Web/SNMP Card.
    The batch script will be run even if OS system shutdown is disabled.
    Would you to enable Batch Script execution (Y/N)? [N]
    y

    *** NetWatch Program Settings ***
    Select an item change its value or get additional information

    IP Address or Hostname 10.225.22.245
    Load Segment Number 2

    1. Shutdown Type 1 (Time On Battery)
    2. Broadcast User Messages Enabled Yes
    3. Log Power Events Enabled Yes
    4. Run Batch Script when Web/SNMP
    Card sends a shutdown message Yesy
    5. Save Program Settings Yes
    6. Return to default values

  8. Save program options and start the NetWatch daemon.

    Select 1-6, 0 to Exit Menu and Save Configuration, or r to Refresh Menu: 0

    ---------------------------------------------------------------
    Starting netwatch (Powerware NetWatch)...Done
    ---------------------------------------------------------------
    Powerware NetWatch was successfully installed on your system.
    ---------------------------------------------------------------

Back to Top of Page


Uninstalling NetWatch

  1. Log on as root or superuser (su). Uninstall any currently installed NetWatch program.
  2. Type /usr/Powerware/NetWatch/uninstall.sh to run the uninstall script.
  3. Follow the uninstall instructions. An example is shown below.

    ---------------------------------------------------------------
    Welcome to Powerware NetWatch Uninstallation
    Version 411 for LINUX (x86)

    To uninstall Powerware NetWatch from
    /usr/Powerware/NetWatch, press
    ---------------------------------------------------------------
    Continue uninstall? (y/n) [y]
    ---------------------------------------------------------------
    Step 1: Stopping Powerware NetWatch.
    ---------------------------------------------------------------
    Step 2: Removing Powerware NetWatch auto start files...Done
    ---------------------------------------------------------------
    Step 3: Removing Powerware NetWatch files and directory...Done
    ---------------------------------------------------------------
    Powerware NetWatch was successfully removed from your system.
    ---------------------------------------------------------------

Back to Top of Page


Starting and Stopping the NetWatch daemon

Stopping the NetWatch daemon

  1. Log on as root or superuser (su).
  2. Type /usr/Powerware/NetWatch/netwatch.init stop.

Starting the NetWatch daemon

  1. Log on as root or superuser (su).
  2. Type /usr/Powerware/NetWatch/netwatch.init start.

Back to Top of Page


Reconfiguring the NetWatch daemon

Using the NetWatch Interactive Mode

  1. Log on as root or superuser (su).
  2. Type /usr/Powerware/NetWatch/netwatch.init stop to stop the NetWatch daemon.
  3. Type /usr/Powerware/NetWatch/netwatch -i to start NetWatch in the interactive configuration mode.
  4. Type /usr/Powerware/NetWatch/netwatch.init start to restart the NetWatch daemon.

Using the NetWatch Command Line Options

  1. Log on as root or superuser (su).
  2. Type /usr/Powerware/NetWatch/netwatch.init stop to stop the NetWatch daemon.
  3. Type /usr/Powerware/NetWatch/netwatch plus command line options to re-configure NetWatch parameters. Include the -save option to save your changes and update the NetWatch configuration file.
  4. Follow the configuration instructions to change the NetWatch operating parameters.
  5. Type /usr/Powerware/NetWatch/netwatch.init start to restart the NetWatch daemon.

Back to Top of Page


NetWatch Command Line Options

    Type /usr/Powerware/NetWatch/netwatch -h to view the command line options.

Powerware NetWatch v4.1.2.1
Copyright 1998-2005 Eaton Corporation. All Rights Reserved.
------------------------------------------------------------------------------
Usage: netwatch [hostname] [arguments]

All parameters indicated with < > are required;
those with [ ] are optional.

[--help|-help|-h|?] : Help for NetWatch options.

[hostname]  - Optional IP/hostname target.

[-i]        - Interactive Mode - Allows Netwatch to solicit program
              parameters from the user.
[-s]        - Shutdown option - Select 1-3
              1) Time on battery shutdown
              2) Web/SNMP Card controlled shutdown
              3) Web/SNMP Card will not shutdown the OS
[-t]        - Shutdown Delay Time (2-99 min) - If Shutdown option 1 is
              selected, this is the time that NetWatch will wait after
              receiving an ON BATTERY message from the Web/SNMP Card before
              starting the OS shutdown.
[-save]     - Save current settings to the configuration file.
              

Back to Top of Page