System Administration

SAM
All actions taken by SAM are logged into the SAM log file /var/sam/log/samlog. The log entries in this file can be viewed via the SAM utility samlog_viewer. samlog_viewer can filter the log file by user name, by time of log entry creation, and by level of detail.

To configure the initial parameters

 #set_parms

To configure additional network parameter

 # set_parms addl_network

SMH System Management Homepage

The text-based HP-UX System Management Homepage (HP SMH) replaces the System Administration Manager (SAM). It operates as a logged-in management tool

The web based SMH can be accessed using http://targetsystem:2301/ address. After a brief time, this will open a another login screen in https://targetsystem:2381/ address.

To start the HP SMH Daemon

 # /opt/hpsmh/bin/hpsmh autostart

As system administrator, you can give limited text based HP SMH access to nonsuperuser individually by user and collectively by primary group name.

To activate restricted HP SMH

 # /usr/sbin/smh -r

HP Web Based Enterprise Management (WBEM)

WBEM is a set of management and internet technologies based on Common Information Model (CIM).

Three core standards used by HP WBEM are

  • A data Model, CIM, The Common Information Model Standard
  • An encoding specification xmlCIM for representing CIM in XML
  • A transport mechanism, CIM operations over HTTP

WBEM providers provide configuration data and information about a device or service and performs a requested action on it.

WBEM clients are WBEM-enabled management applications that receive data from providers and allow you to perform needed management operations. HP offers two WBEM clients - HP SIM and HP SMH - in addition to basic clients that come with HP WBEM Service Software.

HP WBEM Services includes a server component that acts as an intermediary between the client and providers. All communication between the client and providers passes through it. The server components is based on CIM and, therefore, referred as CIM Server. Key configuration files for the CIM servers are cimserver_current.conf and cimserver_planned.conf located in /var/opt/wbem directory.

When the client issues a request to retrieve data from a managed hardware or software resource, the request goes to CIM server which looks into the CIM repository for the information. IF the requested information is available, the CIM server simply send it back to the client. In case the information is unavailable, it engages appropriate providers. The providers obtain the information and rerun it the CIM server, which updates the repository and forward the information to the client.

WBEM Deamons and Commonds


  1. cimservera - Works with PAM to provide authentication services to cimserverd
  2. cimserverd - Main Daemon. Interacts with cimservera for authentication
  3. cimconfig - Set, unset and get CIM server properties
  4. cimprovider - disable, enable, remove or list registered CIM providers or CIM provider modules and module status
  5. cimserver - starts, stops and manages daemons

cimserver is a HP WBEM Services daemon process; it is designed to restart automatically when the operating system reboots, and stay running as long as the operating system is running. If cimserver should fail on HP-UX, another daemon (cimserverd) automatically restarts it. However, cimserver will not be automatically restarted in two cases. In both cases, you need to start it with the cimserver command.

  • If a user deliberately stopped the CIM Server with the cimserver -s command, and then never restarted it
  • If a user disabled both the HTTP and the HTTPS connections. This is done with the cimconfig command, setting both enableHttpConnection and enableHttpsConnection to false. When you restart CIM Server, you can specify the type of connection on the cimserver command line to get started. Once the CIM Server is running, use cimconfig to enable one type of connection type in the properties file.
 # cimserver  # without any options, it starts the CIMSERVER
 # cimserver -s  # stops the cimserver
 # cimserver -v # displays the version number of cimserver

By default, cimserverd checks the status of the cimserver process every 30 seconds. To adjust the time between checks, edit the value in the /etc/opt/wbem/cimserver_retry.conf file. After editing the file, you must kill the process to force cimserverd to read the file:

  1. Find the cimserverd PID (process identification number), using ps -ef |grep cimserverd
  2. Kill the process, using kill -9 <pid_number>
  3. cimserverd will automatically respawn, because it has an entry in /etc/inittab

cimprovider


  -d       # Disables the specified CIM provider module
  -e       # Enables the specified CIM Provider module
  -r       # Disables and removes the specified provider module
             and all of its contained providers
  -l Displays all the registered providers module
  -s Displays the status of provider modules
  -m module        # Specifies the module for operation
  -p provider      # Specifies the provider for operation

To list the registered providers and their status

$ cimprovider -l -s
MODULE                                   STATUS
OperatingSystemModule                    OK
ComputerSystemModule                     OK
ProcessModule                            OK
IPProviderModule                         OK
DNSProviderModule                        OK
--------
-------- 

To Disable provider module "OperatingSystemModule" and all of its contained providers (placing them in a stopped state).

 # cimprovider -d -m OperatingSystemModule

To Enable provider module "OperatingSystemModule" and all of its contained providers (placing them in an OK state).

 # cimprovider -e -m OperatingSystemModule

To Disable and remove (un-register) the "OperatingSystemModule" provider module and all of its contained providers.

 # cimprovider -r -m OperatingSystemModule

To Disable and remove (un-register) the "PG_OperatingSystemProvider" provider that is contained in the "OperatingSystemModule" provider module.

 # cimprovider -r -m OperatingSystemModule -p PG_OperatingSystemProvider

cimconfig


The cimconfig command manages CIM Server configuration properties. The operations are executed on the local host by submitting requests to the CIM Server. An operation on a current configuration property takes effect immediately, and an operation on a planned configuration property takes effect the next time the CIM Server is started with cimserver.

    -g          - Get the value of the specified configuration property.
    -c          - Use the current configuration.
    -p          - Configuration user on the next CIM server start.
    -d          - Use the default configuration.
    -s          - Add or update configuration property value.
    -u          - Reset the configuration property to its default value.
    -l          - Display all the configuration properties.

Get the current value for the configuration property shutdownTimeout

 #  cimconfig -g shutdownTimeout -c
 PGC00213: The current property value is 30.

Get the planned value for the configuration property shutdownTimeout.

 # cimconfig -g shutdownTimeout -p

Get the default value for the configuration property shutdownTimeout.

 # cimconfig -g shutdownTimeout -d

Set the current value of the property shutdownTimeout to the new value 15.

 # cimconfig -s shutdownTimeout=15 -c

Display all the configuration properties

 # cimconfig -l
 enableAuditLog
 sslClientVerificationMode
 idleConnectionTimeout
 enableSubscriptionsForNonprivilegedUsers
 shutdownTimeout
 authorizedUserGroups
 enableRemotePrivilegedUserAccess
 enableHttpsConnection 
 enableNamespaceAuthorization
 enableHttpConnection

osinfo


osinfo command run a HP WBEM Services client that gathers information about the operating system where the command is issued. The command uses the Operating System Provider, which is bundled with HP WBEM Services for HP-UX.

# osinfo
OperatingSystem Information
  Host: test1
  Name: HP-UX
  Version: B.11.31
  UserLicense: Unlimited user license
  Number of Users: 1 users
  Number of Processes: 469 processes
  OSCapability: 64 bit
  LastBootTime: Mar 14, 2010  3:08:53 (-0500)
  LocalDateTime: Mar 15, 2010  16:22:04 (-0500)
  SystemUpTime: 133991 seconds = 1 day, 13 hrs, 13 mins, 11 secs

System Fault Management

The SFM software is a collection of tools used to monitor the health of HP servers running HP-UX. SFM retrieves information about a system’s hardware devices such as CPU, memory, power supply, and cooling devices. SFM operates within the Web-Based Enterprise Management (WBEM) environment

  • The log file for sfm provider module is /var/opt/sfm/log/sfm.log
  • The events monitored by sfm are logged to /var/opt/sfm/log/event.log

To confirm the current monitoring mode

 # /opt/sfm/bin/sfmconfig -w -q
 EMS hardware monitors are disabled & SysFaultMgmt is monitoring devices.

To switch the monitoring mode from EMS to SFM

 # /opt/sfm/bin/sfmconfig -w -s

To switch back from the SFM monitoring mode to the EMS monitoring mode

 # /opt/sfm/bin/sfmconfig -w -e

To send a test event for checking if the SFMIndicationProvider is working properly

 # /opt/sfm/bin/sfmconfig -t -m
 Sending test event for memory monitor.

To view the list of events

 # evweb eventviewer -L
 EvArchNo  Severity    Event #        Event Category Archive Time   Summary
      
 35        Information 103            Memory         2010-03-15 16: This is a t...
 34        Critical    932            System Hard... 2010-03-14 04: Power is no...
 33        Critical    931            System Hard... 2010-03-14 04: Power is no...

To view the details of an event

# evweb eventviewer -E -n <event number>
# evweb eventviewer -E -n 35

Event Time...........: Mon Mar 15 16:31:49 2010
Severity.............: Information
Provider.............: MemoryIndicationProviderIA
Event #..............: 103
.............
.............
.............
Error Details:

     Additional information on this event can be obtained by viewing the low
     level log details for logid 4724 using the command:
     evweb logviewer -E -r -i 4724

To view, create, modify and delete event subscriptions, use evweb subscribe option

 evweb 
     {-C [ -e|-h|-i|-n|-r|-t|-s|-v|-o ]  # creates new subscription
          +  -n subscription_name
          +  -e [eq|ne|le|ge|bw]:severity_level1[,severity_level2]
          +  -v [event_category]
          +  -i Event_ID
          +  -o Provider_Name
          +  -t [archive|email][handler_properties]
          +  -s [syslog]
          +  -h (help)

     {-D [ -f|-n ] }   # Deletes subscription
          +  -n subscription_name     
          +  -f

     {-E [ -h|-n ] }  # Lists details of an event subscription

     {-L [ -n|-h ] }  # Lists a summary of event subscriptions

     {-M [ -e|-h|-i|-n|-r|-t|-s|-v|-o ]  # Modifies the subscription
                +  -n subscription_name
                +  -e [eq|ne|le|ge|bw]:severity_level1[,severity_level2]
                +  -v [event_category]
                +  -i Event_ID
                +  -o Provider_Name
                +  -t [archive|email][handler_properties]
                +  -s [syslog]
                +  -r
                +  -h

Lists all subscriptions that are created using EVWEB

 # evweb subscribe -L

 Subscription Name      HP Known Is Deprecated  Event Archive  Email    Syslog
      
 HP_defaultSyslog       FALSE    FALSE          FALSE          FALSE    TRUE
 HP_General Filter@1_V1 TRUE     FALSE          TRUE           FALSE    FALSE

To Display details of the subscription

# evweb subscribe -E -n "HP_General Filter@1_V1"

Subscription Details
====================
Subscription Name : HP_General Filter@1_V1

HP Known : TRUE
Filter Type : HP Advised

Subscription Criteria :
Query : Select * from HP_DeviceIndication 
Subscription Destinations :
Event Archive 

To create a new subscription named "Email_Subs" to email the event details in case of events with severity level 1 or more

 # evweb subscribe -C -n Email_subs -e ge:1 -t email:to:user@xyz.com;user2@xyz.com:cc:user3@xyz.com

TO Change the sender address in the SFM email notifications,

  01. Edit the from email id in: /var/opt/sfm/conf/evweb.conf to suit your domain.
  02. Enter the following command at the HP-UX prompt:
      # /opt/sfm/bin/sfmconfig -c /var/opt/sfm/conf/evweb.conf

HP's EMS Hardware Monitoring

Hardware monitoring gives you the ability to detect problems with many of your system hardware resources. By providing immediate detection and notification, hardware monitoring allows you to quickly identify and correct problems - often before they impact system operation.

By default, EMS HW Monitoring is enabled on your system (In 11i v3, SFM is enabled by defaul). Also by default, messages regarding major warnings, serious and critical events that occur on hardware being monitored will be:
- Written to /var/adm/syslog/syslog.log
- E-mailed to root

All events will be stored in /var/opt/resmon/log/event.log.

To send an test event to disk_em monitor

 # /etc/opt/resmon/lbin/send_test_event disk_em

EMS HW Monitoring can be reconfigured using the Monitoring Request Manager, /etc/opt/resmon/lbin/monconfig.

Complete information on using hardware monitoring is included in the EMS Hardware Monitors User's Guide, which can be downloaded from Hewlett-Packard's external web site at http://docs.hp.com/hpux/diag/.

To stop or start EMS Hardware Monitoring

 # /etc/opt/resmon/lbin/monconfig 
 Press K for Kill (Disable) Event Monitoring
 Press E for Enabling Event Monitoring

To check the current Monitoring status

# /etc/opt/resmon/lbin/moncheck

>/StorageAreaNetwork/events/SAN_Monitor ... NOT MONITORING.
  (Possibly there is no hardware to monitor.)

>/system/events/cpu/cmc ... OK.
 For /system/events/cpu/cmc/cache_errors:
  Events >= 3 (MAJOR WARNING) Goto SYSLOG
  Events >= 3 (MAJOR WARNING) Goto EMAIL; addr=root
  Events >= 1 (INFORMATION) Goto TEXTLOG; file=/var/opt/resmon/log/event.log

>/system/events/cpu_hitachi/cmc ... NOT MONITORING.
  (Possibly there is no hardware to monitor.)

>/system/events/cpe ... OK.

.....
.....
>/system/events/system_status ... OK.
 For /system/events/system_status/ui_host/aemhpvm1:
  Events >= 1 (INFORMATION) Goto TEXTLOG; file=/var/opt/resmon/log/event.log
  Events >= 3 (MAJOR WARNING) Goto SYSLOG
  Events >= 3 (MAJOR WARNING) Goto EMAIL; addr=root

To stop getting monitoring alerts for any devices, add the HW address of the device not to be monitored in "/var/stm/data/tools/monitor/disabled_instances" file and restart (stop and start) EMS services. For more information, open the file /var/stm/data/tools/monitor/disabled_instances in vi and refer the examples.

/opt/resmon/bin/emsui /opt/resmon/bin/EMSconfig.ui