ASWM (ASUS System Web-based Management System.) version 2.0 for LINUX 
The contents of ASWM are Copyright (C) 2003-2005 ASUS, Inc.
Mar 22, 2005
=============================================================================

Content:
========
1. Overview
2. Installation and Configuration
3. Function Description
4. Start and stop serivce
5. MIB File
6. Uninstallation
7. System/ASWM Log
8. Compile and install drivers
9. Disclaimer
10. Appendix


1. Overview:
============
ASUS ASWM provide System Health Monitor functions, and helps you to monitor
device's temperature, voltage, cooling fans speed, CPU & memory utilization,
storage capacity and other system status and OS environment.

ASUS ASWM supports several ways to send alert notification including SNMP trap,
alert mail, system log, SMS messages and MSN messages.

When the ASWM detects some abnormal events of system, some actions could be
adopted for handling recovery or preventing futher damage. These actions are
shutdown, reboot, power off or some user defined procedures which depend on
administrator's configuration.

ASUS ASWM is controlled through Web system to retrieves system health on real
time. ASUS ASWM also supports remote control by SNMP protocol, one can use
SNMP console (like HP OpenView) to monitor system healthy status.


2. Installation and Configuration:
==================================

2-1. System requires:
---------------------
  a. Supported Linux distribution: RedHat Enterprise 4
  
  b. Required Packages: textutils apache2.0 openssl
  
2-2. Installation:
------------------
The ASWM files are packeted into three RPM packages.
To install the ASWM, there are three RPM packages need to be installed:

  a. Core RPM: This RPM contains the core files of ASWM system.
     example: aswm_core-2.0-1.el4rhat.i386.rpm.

  b. Model RPM: This RPM contains the files depending on the hardware model.
     example: aswm_ncl-d-2.0-1.el4rhat.i386.rpm. (for model NCL-D)
  
  c. Document RPM: This RPM contains the on-line documents of ASWM.
     example: aswm_doc-2.0-6.noarch.rpm

There are four steps to install ASWM.
  a. Install core RPM. Type: rpm -ivh aswm_core-X.X-X.Y.i386.rpm. The X.X-X
     means the version of this RPM, and Y is the OS distribution.
     example:
     rpm -ivh aswm_core-2.0-1.el4rhat.i386.rpm
  
  b. Install the model RPM. Type rpm -ivh aswm_M-X.X-X.Y.i386.rpm. The M is
     the model name, X is the version and Y is the OS distribution.
     example:
     rpm -ivh aswm_ncl-d-2.0-1el4rhat.i386.rpm

  c. Install the document RPM. Type rpm -ivh aswm_doc-X.X-X.noarch.rpm. The
     X.X-X is the version of RPM. (note: This RPM is optional. You can skip it
     if you don't need on-line documents.) 
     example:
     rpm -ivh aswm_doc-2.0-6.noarch.rpm

  d. Execute the aswm_post_install and answer the questions to configure your
     ASWM.
     example:
     aswm_post_install
   
2-3. Configuration:
-------------------
To configure ASWM, type: "aswm_post_install". Press [Enter] on a question to
use the default setting in aswm_post_install.

For example:
[root@localhost root]# aswm_post_install

==============================================================================
          Welcome to setup ASWM

          Notice!!! Type enter to choose default value in [...]. 
==============================================================================


-- I. SNMPD Configuration --
1-1) Input the path of snmpd: [/usr/sbin/snmpd]
1-2) Input the path of snmpd.conf: [/etc/snmp]
1-3) Input SNMP community string of this server or workstation: [aswm]
1-4) Input SNMP console location [subnet/mask] (ex.192.168.0.0/16) where SNMP
    console can access (Get/Get Next/Set) your agent information ? [0.0.0.0/0]
1-5) Input SNMP access privilege type: 0)None, 1)Read, 2)Write, 3)Read/Write ? [3]

-- II. HTTPD Configuration --
2) Input the password for the login id 'aswm' to access ASWM2.
   Please type it:aswm

Updating password for user aswm

-- III. VNC Server Configuration --
   No official installation of VNC Server is detected. Skip the configuration.

-- IV. SELinux Configuration --
4) Default SELinux policy detected, Update it with ASWM policy?
   Please answer [y/N]: 

*** Do you want to start ASWM agent now ? [Y/n]
Rescan module dependency ...
Starting snmpd:                                            [  OK  ]

Starting spmgr services:                                   [  OK  ]
Starting evmgr services:                                   [  OK  ]
Starting snmpagt services:                                 [  OK  ]
Shutting down aswm2:                                       [FAILED] *
Starting aswm2:                                            [  OK  ]

In the part I "SNMPD Configuration", the aswm_post_install will ask the paths
of SNMP commands and SNMPD configuration files. It also need you to input the 
community strings, console location and access privilege. The aswm_post_install
will configurate the snmpd.conf by your answer. After aswm_post_install, if you
want to change these settings by yourself, you need to edit snmpd config file
"/etc/snmp/snmpd.conf" manually. (the path is depended on where you installed
the snmpd). Once "/etc/snmp/snmpd.conf" has been changed, you need to restart
the snmpd service (usually /etc/init.d/snmpd restart).

The part II is HTTPD configuration. The aswm_post_install will ask you something
about web configutration like password.

The part III is VNC configuration. The aswm_post_install will auto-detect the
VNC package in your system. If there is VNC installed, aswm_post_install will
execute the setup of VNC. If there is no VNC, the aswm_post_install will skip
the VNC configuration.

The part IV is SELinux Configuration. The aswm_post_install will help you to 
merge the policy of SELinux and ASWM, when you use the default policy in RedHat 
Enterprise CDs. If not, choose "N", and you need do it by yourself.

At last, aswm_post_install will ask you to start the aswm agent. Type 'y' or
just press ENTER to start the ASWM service. If you want to start it manually,
you need to do:
  /etc/init.d/aswm_agent start
  /etc/init.d/aswm2 start
The detail of service's script is in section 4.

note:
The failure of shutting down aswm2 is caused by first time start of aswm2.


3. Function Description:
=========================
  a. SNMP function
    1. Get/Get Next: allows the SNMP console to get attribute value of the
       managed system such as fan speed, working voltage and system temperature.
    2. Set: sets the attribute value of the managed system from the SNMP
       console.
    3. Trap: managed computer system can inform the SNMP console of some event
       (when the interested attributes, such as fan/voltage/temperature, over or
       lower the thresholds ) asynchronously.

  b. ASR function: Automatic Server Restart, is a function that can reboot the
     computer system automatically when the computer system hangs.

  c. Chassis Intrusion: Chassis intrusion warns when the server chassis is
     opened and logs the event. This provides some security over the computer
     hardware.

  d. System Log (in /var/log/agent.log): The ASWM log will wirte to 
    /var/log/agent.log and also /var/log/messages.


4. Start and stop service:
==========================
ASWM has two init scripits.
   a. aswm_agent: The monitoring service init script. This script will start the
                  serivce provider manager, event manager and snmp agent. 
                  example:
                  aswm_agent {start | restart | stop}
 
   b. aswm2     : Web serivce init script. Run this script to start or stop web
                  service. The ASWM can run without web service, you can only 
                  run the aswm_agent if you don't need the web control.
                  example:
                  aswm2 {start | restart | stop}

note: The aswm2 need to restart after aswm_agent restarted.


5. MIB file:
============
ASWM has five mib files for snmp control. They are located in /etc/aswm/mib.
  1. aswmagtconfig.mib
  2. aswmagtconfigtrap.mib
  3. aswmagthealth.mib
  4. aswmagthealthtrap.mib
  5. aswmbase.mib


6. Uninstallation:
==================
To uninstall the ASWM, please uninstall all ASWM RPM files as specified in
section 2. There are three steps to uninstall them.

  a. Uninstall the document RPM. Type: rpm -e aswm_doc. (note: If the document
     RPM doesn't install, please skip this step)
     example:
     rpm -e aswm_doc

  b. Uninstall the model RPM. Type: rpm -e aswm_M. The M is the model name.
     example:
     rpm -e aswm_ncl-d

  c. Uninstall the core RPM. Type: rpm -e aswm_core.
     example: 
     rpm -e aswm_core


7. System/ASWM Log:
===================
ASWM will keep whole warning, critical and info messages in /var/log/agent.log
and /var/log/messages. You can also view these logs by web browser.

The web service of ASWM (httpd) will log its message in the /var/log/aswm2.log.


8. Compile and install driver:
==============================
The aswm_core RPM has already contained driver's binaries for offical kernel
of RedHat. For an non-offical upgraded kernel, you have to rebuild
(re-compile) whole the ASWM's drivers which source code are installed in
/usr/aswm/lib/modules/src/drvsrc.

Before compiling the drivers, you have to install the kernel source RPM which
version matches current running kernel. The make program will detect the system
environment and build drivers for running kernel.

The steps to build driver:
  a. Login as root.

  b. Stop the aswm_agent service:
     /etc/init.d/aswm2 stop
     /etc/init.d/aswm_agent stop

  c. cd /usr/aswm/lib/modules/src/drvsrc

  d. make install

After make install, the drivers of ASWM are put into
/lib/modules/<kernel-version>/kernel/drivers/char.

To uninstall driver:
  a. /etc/init.d/aswm2 stop
     /etc/init.d/aswm_agent stop

  b. cd /usr/aswm/lib/modules/src/drvsrc
  
  c. make uninstall

note:
  a. Suggested to compile drivers under the following distributions:
     RedHat Enterprise AS 4.0 

  b. It is better to use the formal RedHat released kernel source for
     compiling driver sources.

9. Disclaimer:
==============
ASUS is not responsible for any damages, including loss of profits, loss of
information, interruption of business, personal injury and/or any damage or
consequential damage without limitation, incurred before, during or after the
use of our products.


10. Appendix:
=============

1. How to update the pcitable and pci.ids
---------------------------------------------------
The pcitable and the pci.ids keep a list of all known PCI information.
Old pcitable may cause unknown devices on ASWM web pages. Updating the
pcitable is suggested for displaying the correct PCI device data.

To update the pcitable and pci.ids, please download the latest hwdata RPM
and install it.

For example:
    rpm -ivh hwdata-0.101.12-3.i386.rpm


2. Brief how-to about enabling SELinux for ASWM safely
---------------------------------------------------
1). Make sure SELinux is not currently running
2). Check if /usr/aswm/http/policy.18 is existed, if there it is,
    ASWM post install has once setup SELinux. You may stop now.
    (See N.B. 1)
2). Turn off ASWM agent and web by chkconfig in initrc.
3). Stop service of ASWM agent and web.
4). Run ASWM post install to install new policy.18 and file_contexts.
    This step can ensure your original SElinux files (e.g. policy.18
    and file_contexts) are safely backup by ASWM.
5). Turn on SELinux in /etc/sysconfig/selinux and reboot OS.
6). Start service of ASWM agent and web manually.
7). If no problem occurred, turn on ASWM agent and web by chkconfig

N.B. 1: System original policy.18 and file_contexts will be backup in
        /usr/aswm/http. When ASWM RPM is uninstalled, these files are restored.
N.B. 2: The pre-built policy.18 is located at
        /usr/aswm/http/policy.18.<OS-VERSION>.aswm2 (e.g., OS-VERSION is RHEL4UP2)
N.B. 3: The pre-configured file_contexts is located at
        /usr/aswm/http/file_contexts.gz.<OS-VERSION>
N.B. 4: In case it has to merge ASWM's policy manually, find necessary
        files in /usr/aswm/http. (There are selinux.fc.aswm2, selinux.te.aswm2,
        and selinux.net_contexts.aswm2)
N.B. 5: To relabel all necessary ASWM files via 'setfiles' utility, do
        /usr/sbin/setfiles -q -F /etc/selinux/targeted/contexts/files/file_contexts \
        /etc /var /lib /lib64 /usr/lib /usr/lib64 /usr/aswm /var/www/aswm2
N.B. 6: Before relabel ASWM, always stop service of ASWM agent and web
        first.
