Shell scripts for retrieving useful HACMP information via SNMP Copyright 2002 Matilda Systems Corporation All rights reserved Please read the file haLICENSE (included in the tar file) for details. ------------------------------------------------------------------------------- See www.matilda.com/hacmp/snmp.html for the latest scripts. Environment variables: HASNMPHOST the name of the host that the SNMP queries should be directed to (defaults to localhost) HASNMPCOMMUNITY the SNMP community name used in all queries HASNMPHAMIB the path to the HACMP MIB description file (i.e. hacmp.defs on AIX and hacmp.my on Linux) If you'd rather not have these variables cluttering up your environment, put definitions for the variables into "~/.hasnmprc". Scripts: hagetclustername prints the name of the cluster hagetclusterid prints the cluster's id hagetclusterstate prints the cluster's state (up/down/unknown) hagetclustersubstate prints the cluster's sub-state (unstable/stable/error/reconfig/unknown) hagetnodes prints a two column list of cluster node ids and names hagetnodeids prints a list of cluster node ids hagetnodenames prints a list of cluster node names hagetadapters prints a three column list of network adapters (the first column is the node id of the adapter's node, the second column is the adapter's address and the third column is the name of the adapter) hagetactiveadapters prints a three column list of active network adapters (the format is the same as the output of the getAdapters script) hamapnodeid-nodename maps a node id to a node name (takes a single positional parameter specifying the node id to map) hamapip-adapter maps a IP address to an adapter name (takes a single positional parameter specifying the IP address and prints the corresponding adapter name) hasnmpget performs an SNMP GET request on either AIX or Linux hagetsnmpinit helper script used by all of the above scripts hasnmpwalk extracts a set of SNMP variables at or below a name in the SNMP variable tree