The pmanrmd daemon is a resource monitor daemon that provides resource variables to Event Management services. When you install your SP system, a pmanrmd daemon is automatically configured on each node in a system partition. Additionally, there is a pmanrmd daemon running on the control workstation for each system partition in the SP system.
The pmanrmd daemon is under the System Resource Controller (SRC). Only the following SRC commands are available for controlling the pmanrmd daemon:
startsrc -s pmanrm
To start pmanrmd running, issue startsrc -s on a control workstation.
startsrc -s pmanrm.system_partition_name
stopsrc -s pmanrm
To stop pmanrmd running, issue stopsrc -s on a control workstation.
stopsrc -s pmanrm.system_partition_name
No command is provided to refresh the pmanrmd daemon while it is running. To refresh the daemon, you must stop and start the daemon (using stopsrc and startsrc).
The Problem Management subsystem provides sixteen resource variables, named IBM.PSSP.pm.User_state1 through IBM.PSSP.pm.User_state16. You can associate values with the provided resource variables and configure pmanrmd to supply the values that you associate to Event Management services.
Two mechanisms are provided for associating values with the Problem Management resource variables:
The /usr/lpp/ssp/bin/pmanrminput command requires root authority to use. The command can be run from within scripts. It takes as arguments:
For example, if you have a server application running on node 10 and you sometimes want to tell users on nodes 1-9 to stop using the server application, you could use the Problem Management subsystem to accomplish this. Create a Problem Management subscription on nodes 1-9 to run the wall command to inform the users about the state of the server application:
pmandef -s ready_or_not \ -e 'IBM.PSSP.pm.User_state3:NodeNum=10:X@0=="READY"' \ -r 'X@0!="READY"' \ -c "wall Node 10 is ready" -C "wall Stop using node 10" -n 1-9
When the server application is ready for users, it uses the pmanrminput command to communicate its state to the Problem Management subsystem:
pmanrminput -s pman -a "IBM.PSSP.pm.User_state3+READY+"
The Problem Management subsystem passes the string READY to Event Management as the value of the resource variable IBM.PSSP.pm.User_state3, and that value satisfies the event definition, so the command wall Node 10 is ready runs on nodes 1-9. When the server application has a problem, it can use pmanrminput to communicate its state change:
pmanrminput -s pman -a "IBM.PSSP.pm.User_state3+NOT READY+"
The resource value NOT READY satisfies the rearm event definition, so the command wall Stop using node 10 runs on nodes 1-9.
Another way to associate a value with one of the Problem Management resource variables is to provide the name of the resource variable and a command in a configuration file, based on the pmanrmd.conf sample file (for more information on the pmanrmd.conf sample file refer to Configuring pmanrmd to provide resource variables). The standard output of the command will be provided to Event Management services as the value for the specified Problem Management resource variable.
In the example in Associating values with Problem Management resource variables, the resource, an application server, was able to communicate its state change directly to the Problem Management subsystem. However, this is not always possible. For example, if you want to run a command whenever the contents of the /etc directory on nodes 1-5 change, the /etc directory is the resource, and a directory is not capable of stating when it has changed. In this case, the Problem Management subsystem needs to be configured to periodically send the name and time stamp of the last changed file in the /etc directory as the resource variable value to Event Management. This can be accomplished by defining a resource monitor command to the Problem Management subsystem.
A sample pmanrmd.conf file is provided. Copy, rename, and edit this file to specify:
TargetType=NODE_RANGE Target=1-5 Rvar=IBM.PSSP.pm.User_state2 SampInt=600 Command="/bin/ls -tl /etc | /bin/head -2 | /bin/grep -v total"
In this example, the pmanrmd daemon will run the command /bin/ls -tl /etc | /bin/head -2 | /bin/grep -v total every ten minutes, and it will send the output of that command as the value of the resource variable IBM.PSSP.pm.User_state2 to Event Management. The output of this command is the name of the last file to be changed and its time stamp. You could then subscribe to changes in the /etc directory resource with the following command:
pmandef -s etc_file_changed \ -e 'IBM.PSSP.pm.User_state2:NodeNum=1-5:X@0!=X@P0' \ -c "echo somebody changed a file in /etc >/tmp/etc_change_log"
Whenever the most recent output of the /bin/ls -tl /etc | /bin/head -2 | /bin/grep -v total command is different from the previous output, the event definition will be satisfied, and the "echo somebody changed a file in /etc >/tmp/etc_change_log" command will be run.
pmanrmdloadSDR reads the configuration file and loads the information in the stanzas into the SDR. pmanrmdloadSDR runs on the control workstation.
The syntax for pmanrmdloadSDR is :
After you load the configuration information into the SDR, refresh the affected pmanrmd daemons.