Purpose
pfind - Specifies a parallel find of files with a matching expression.
Syntax
pfind [-w - | noderange | 'hostlist args'] find_args
Flags
The pfind command requires the first flag or parameter on the command line to be a specification of the hosts on which the command is to be executed.
Operands
Description
The pfind command issues the AIX find command on multiple hosts. The output is formatted so that distinct output is displayed only once. The pfind command uses dsh to execute the find command on multiple hosts. The output of the ls commands is written to standard output and formatted. The pfind command is identical to pexec find.
Files
|Environment Variables
|PSSP 3.4 provides the ability to run commands using secure remote |command and secure remote copy methods.
|To determine whether you are using either AIX rsh or rcp |or the secure remote command and copy method, the following environment |variables are used. |If no environment variables are set, the defaults are |/bin/rsh and /bin/rcp.
|You must be careful to keep these environment variables consistent. |If setting the variables, all three should be set. The DSH_REMOTE_CMD |and REMOTE_COPY_CMD executables should be kept consistent with the choice of |the remote command method in RCMD_PGM: |
|For example, if you want to run pfind using a secure remote |method, enter:
|export RCMD_PGM=secrshell |export DSH_REMOTE_CMD=/bin/ssh |export REMOTE_COPY_CMD=/bin/scp
Security
|You must have access to the AIX remote commands or the secure remote |commands to run this command.
This command will automatically forward the DCE credentials if K5 is an enabled AIX authentication method and the user of the command has DCE credentials that can be forwarded. The special DCE credentials for root, called the machine or self host principal credentials, cannot be forwarded. To obtain DCE credentials that can be forwarded as a root user, a root user must issue dce_login -f.
Location
/usr/lpp/ssp/bin/pfind
Related Information
Commands: dsh, find, hostlist, pexec
Examples
To find out if the file elvis is contained in /usr/bin on any host1, host2, and host3 (described previously), enter:
pfind -w host1,host2,host3 /usr/bin -print -name "elvis"
Purpose
pfps - Finds and performs operations on processes on multiple hosts in parallel based on the value of an expression.
Syntax
pfps [-w - | noderange | 'hostlist args'] operation [expression]
Flags
The pfps command requires the first flag or parameter on the command line to be a specification of the hosts on which the command is to be executed.
Operands
Description
The pfps command performs operations on processes on one or more hosts in parallel. These operations include printing information about processes (-print), sending a signal to the process (-kill), and changing the priority of the process (-nice).
Authorization is via an Access Control List (ACL) on each node and is required when users try to kill a process that they do not own or nice a process to a higher priority. ACLs for pfs are contained in the /etc/sysctl.pfps.acl file.
An expression can also be specified using the preceding flags to select processes for when the expression evaluates to true. Flags are ANDed together unless the -or flag is used.
Parentheses can be used to group flags, but parenthesis must be separated from flags by a space. Also, parenthesis or any special shell character should be escaped with a backslash (\).
Since pfps uses sysctl, proper authentication and authorization to issue these commands is necessary.
Files
|Environment Variables
|PSSP 3.4 provides the ability to run commands using secure remote |command and secure remote copy methods.
|To determine whether you are using either AIX rsh or rcp |or the secure remote command and copy method, the following environment |variables are used. |If no environment variables are set, the defaults are |/bin/rsh and /bin/rcp.
|You must be careful to keep these environment variables consistent. |If setting the variables, all three should be set. The DSH_REMOTE_CMD |and REMOTE_COPY_CMD executables should be kept consistent with the choice of |the remote command method in RCMD_PGM: |
|For example, if you want to run pfps using a secure remote |method, enter:
|export RCMD_PGM=secrshell |export DSH_REMOTE_CMD=/bin/ssh |export REMOTE_COPY_CMD=/bin/scp
Security
Since pfps uses sysctl, proper authentication and authorization to issue these commands is necessary.
Location
/usr/lpp/ssp/bin/pfps
Related Information
Commands: hostlist, kill, nice, ps, renice, sysctl
Examples
pfps '-a' -print
pfps -w host1,host2 -rtime 24:00 -tn daemond -kill HUP
WCOLL=./wcollective pfps '' \( -cpu 10 -or -mem 10 \) -o root -print
Purpose
pls - Specifies a parallel list of files and directories.
Syntax
pls [-w - | noderange | 'hostlist args'] ls_args
Flags
The pls command requires the first flag or parameter on the command line to be a specification of the hosts on which the command is to be executed.
Operands
Description
The pls command issues the AIX ls command on multiple hosts. The output is formatted so that duplicate output is displayed only once. The pls command uses dsh to execute the ls command on multiple hosts. The output of the ls commands is written to standard output and formatted. The pls command is identical to pexec ls.
Files
|Environment Variables
|PSSP 3.4 provides the ability to run commands using secure remote |command and secure remote copy methods.
|To determine whether you are using either AIX rsh or rcp |or the secure remote command and copy method, the following environment |variables are used. |If no environment variables are set, the defaults are |/bin/rsh and /bin/rcp.
|You must be careful to keep these environment variables consistent. |If setting the variables, all three should be set. The DSH_REMOTE_CMD |and REMOTE_COPY_CMD executables should be kept consistent with the choice of |the remote command method in RCMD_PGM: |
|For example, if you want to run pls using a secure remote |method, enter:
|export RCMD_PGM=secrshell |export DSH_REMOTE_CMD=/bin/ssh |export REMOTE_COPY_CMD=/bin/scp
Security
|You must have access to the AIX remote commands or the secure remote |commands to run this command.
This command will automatically forward the DCE credentials if K5 is an enabled AIX authentication method and the user of the command has DCE credentials that can be forwarded. The special DCE credentials for root, called the machine or self host principal credentials, cannot be forwarded. To obtain DCE credentials that can be forwarded as a root user, a root user must issue dce_login -f.
Location
/usr/lpp/ssp/bin/pls
Related Information
Commands: dsh, ls, pexec
Examples
To list the contents of /usr from each host1, host2, and host3 (described previously), enter:
pls -w host1,host2,host3 /usr
Purpose
pmanchown - Changes the ownership of a user's Problem Management subscriptions.
Syntax
Flags
Operands
None.
Description
Use the pmanchown command to change the ownership of a user's Problem Management subscriptions. The first set of arguments (where the flags are all lowercase letters) identify the old subscription owner. The second set of arguments (where the flags are all uppercase letters) identify the new subscription owner. Note that the -d, -k, and -u flags are mutually exclusive; you cannot identify the old subscription owner by multiple ownership attributes. The -D, -K, and -U flags are also mutually exclusive; you cannot identify the new subscription owner by multiple ownership attributes.
The pmanchown command simply finds all subscriptions belonging to the old owner and transfers the ownership to the new owner. After running the command, the system administrator should refresh all of the pmand daemons in the system partition. If the pmanchown command is run several times in succession, then you can delay refreshing the pmand daemons until after the last invocation of pmanchown.
Security
You must have write access to the SDR to run this command.
Implementation Specifics
This command is part of the IBM Parallel System Support Programs (PSSP) Licensed Program (LP).
Location
/usr/lpp/ssp/bin/pmanchown
Examples
To transfer ownership of all subscriptions which belong to the Kerberos Version 4 principal joe@xyz.com to the DCE principal /.../xyz.com/joe, enter:
pmanchown -k joe@XYZ.com -D /.../xyz.com/joe
Purpose
pmanctrl - Controls the Problem Management subsystem.
Syntax
pmanctrl {-a | -s | -k | -d | -c | -t | -o | -r | -h}
Flags
Operands
None.
Description
Problem Management is a general purpose facility for monitoring and reacting to specific event occurrences within the SP system. The pmanctrl command controls the operations of the subsystems that are required for Problem Management. These subsystems are under the control of the System Resource Controller (SRC) and belong to a subsystem group called pman. Associated with each subsystem is a daemon.
An instance of the Problem Management subsystem executes on the control workstation and on every node of a system partition. Because Problem Management provides its services within the scope of a system partition, its subsystems are said to be system partition sensitive. For this reason, the pmanctrl command is normally invoked by the syspar_ctrl command during installation of the system, boot or reboot of individual nodes, and partitioning or repartitioning of the system.
From an operational point of view, the Problem Management subsystem group is organized as follows:
The pman subsystem is associated with the pmand daemon. The pmanrm subsystem is associated with the pmanrmd daemon.
The subsystem names on the nodes are pman and pmanrm. There is one of each subsystem per node and it is associated with the system partition to which the node belongs.
On the control workstation, there are multiple instances of each subsystem, one for each system partition. Accordingly, the subsystem names on the control workstation have the system partition name appended to them. For example, for system partitions named sp_prod and sp_test, the subsystems on the control workstation are named pman.sp_prod, pman.sp_test, pmanrm.sp_prod, and pmanrm.sp_test.
The pmand daemon provides the majority of Problem Management functions.
The pmanrmd daemon provides command-based resource monitor data to the pmand daemon.
The pmanctrl command provides a variety of controls for operating the Problem Management subsystems:
Unless the -c flag is used, the pmanctrl command only operates within a single partition. On a node, the pmanctrl command operates within the system partition to which the node belongs. On the control workstation, the pmanctrl command operates within any single partition, which can be chosen by setting the SP_NAME environment variable.
When the pmanctrl command is called with the -a flag, it uses the mkssys command to add the subsystems to the SRC, and it takes the necessary steps to make sure that the subsystems are automatically started when the node is booted.
When the pmanctrl command is called with the -s flag, it uses the startsrc command to start the pman and pmanrm subsystems.
When the pmanctrl command is called with the -k flag, it uses the stopsrc command to stop the pman and pmanrm subsystems.
When the pmanctrl command is called with the -d flag, it uses the rmssys command to delete the subsystems from the SRC, and if there are no more Problem Management subsystems remaining, it makes sure there is no /etc/inittab entry for the Problem Management subsystem.
When the pmanctrl command is called with the -c flag, it stops all running Problem Management subsystems, removes them all from the SRC, and makes sure there is no /etc/inittab entry for the Problem Management subsystem.
When the pmanctrl command is called with the -t flag, it uses the traceson command to turn on tracing in the pman subsystem. Tracing is not available for the pmanrmd subsystem.
When the pmanctrl command is called with the -o flag, it uses the tracesoff command to turn off tracing in the pman subsystem. Tracing is not available for the pmanrmd subsystem.
While they are running, the Problem Management daemons provide information about their operation and errors by writing entries in a log file that is located in the /var/adm/SPlogs/pman directory. On the control workstation, the pmand daemon writes to a log file named pmand.syspar_name.log, and the pmanrmd daemon writes to a log file named pmanrmd.syspar_name.log, where syspar_name is the name of the system partition. On the nodes, the pmand daemon writes to a log file named pmand.log and the pmanrmd daemon writes to a log file named pmanrmd.log .
Exit Values
Security
You must have root privilege to run this command.
Implementation Specifics
This command is part of the IBM Parallel System Support Programs (PSSP) Licensed Program (LP).
Prerequisite Information
The "Using the Problem Management subsystem" chapter in PSSP: Administration Guide
IBM AIX Commands Reference
Information about the System Resource Controller (SRC) in IBM AIX General Programming Concepts: Writing and Debugging Programs
Location
/usr/lpp/ssp/bin/pmanctrl
Related Information
PSSP commands: syspar_ctrl
AIX commands: mkssys, rmssys, startsrc, stopsrc
Examples
pmanctrl -a
pmanctrl -s
pmanctrl -k
pmanctrl -d
pmanctrl -c
pmanctrl -t
pmanctrl -o
Purpose
pmandef - Defines events and resulting actions to the Problem Management subsystem.
Syntax
To subscribe to an event and associate a set of actions with that event, use the following:
To deactivate or activate a Problem Management subscription, use the following:
or
To query or remove a Problem Management subscription, use the following:
Flags
Flags that specify the type of request follow:
Flags that specify the hosts to be affected by the request follow:
Flags that define a Problem Management subscription follow:
echo this is a test >/tmp/event.out
is allowed.
echo this is a test >/tmp/rearm.out
is allowed.
Operands
None.
Description
The Problem Management subsystem allows you to specify that an action takes place as the result of a specific event occurrence within the SP system. The Problem Management subsystem registers for the event with the Event Management subsystem. When the Event Management subsystem reports the occurrence of the event back to Problem Management, the Problem Management subsystem performs the requested action on your behalf. The actions that are performed as the result of an event can be any or all of the following:
The pmandef command is the command line interface for making such requests to the Problem Management subsystem. For example, running the following command on node 5:
pmandef -s Program_Monitor \ -e 'IBM.PSSP.Prog.pcount:NodeNum=12;ProgName=mycmd;UserName=bob:X@0==0' \ -r "X@0==1" -c "echo program has stopped >/tmp/myevent.out" \ -C "echo program has restarted >/tmp/myrearm.out"
causes the command echo program has stopped >/tmp/myevent.out to run on node 5 whenever the number of processes named "mycmd" and owned by user "bob" on node 12 becomes 0. When this number increases back to 1, the command echo program has restarted >/tmp/myrearm.out runs on node 5.
If you do not want the command to run on the same node from which the pmandef command was issued, then use one of the -h, -N , or -n flags.
The following example causes the commands to run on both k21n01 and k21n02 whenever bob's program dies or gets restarted on either nodes 12 or 13.
pmandef -s Program_Monitor \ -e 'IBM.PSSP.Prog.pcount:NodeNum=12-13;ProgName=mycmd;UserName=bob:X@0==0' \ -r "X@0==1" -c /usr/local/bin/start_recovery \ -C /usr/local/bin/stop_recovery -h k21n01,k21n02
The following example causes the commands to run on nodes 1, 2, 3, and 7 whenever bob's program dies or gets restarted on any of nodes 1, 2, 3, 4, 5, or 13. If bob's program dies on node 4, the command /usr/local/bin/start_recovery runs on nodes 1, 2, 3, and 7.
pmandef -s Program_Monitor \ -e 'IBM.PSSP.Prog.pcount:NodeNum=1-5,13;ProgName=mycmd;UserName=bob:X@0==0' \ -r "X@0==1" -c /usr/local/bin/start_recovery \ -C /usr/local/bin/stop_recovery -n 1-3,7
If you want to define a subscription for more than one node but you want the command to run only on the same node where the event occurs, use the -h local option. Consider the following command:
pmandef -s Filesystem_Monitor \ -e 'IBM.PSSP.aixos.FS.%totused:NodeNum=10-14;VG=myvg;LV=mylv:X>95' \ -l "filesystem is almost full" -h local
Whenever the file system associated with the " mylv" logical volume and " myvg" volume group on node 11 becomes more than 95 percent full, the text filesystem is almost full gets written to the AIX error log and BSD syslog only on node 11. Whenever the same thing occurs on node 12, the same text gets written to the AIX error log and BSD syslog only on node 12. The file system filling up on node 11 is really a separate event than the file system filling up on node 12 or node 13, and the -h local option is just a convenient way to define actions for several events at the same time.
Issuing the pmandef command with the -s flag to associate an action with an event creates a Problem Management "subscription." When you issue the pmandef command to create a Problem Management subscription, the definition of the subscription gets stored in the System Data Repository (SDR) so the definition becomes permanent. As soon as the subscription gets stored in the SDR, the pmandef command also requests the affected Problem Management daemons within the SP system to start acting on the new subscription. Since it is possible for some of the nodes affected by this to be down, the pmandef command is considered successful once the subscription is stored in the SDR. The inability to reach all of the affected Problem Management daemons is not considered to be an error, because they will eventually pick up the new subscription once they get restarted.
If the Event Management resource variable, resource identifier, expression, or re-arm expression contains an error, the error will not get discovered until the Problem Management daemon registers for the event with the Event Management subsystem. When this happens, the subscription definition does not automatically get removed from the SDR. You must remove the subscription by using the pmandef command with the -u flag. The argument to the -u flag is the same name that was previously specified as the argument to the -s flag.
The pmandef command with the -u flag removes the subscription definition from the SDR and tells the appropriate Problem Management daemons to stop monitoring for the event associated with that subscription. The pmandef command with the -d can be used to turn off or "deactivate" a subscription. This also tells the appropriate Problem Management daemons to stop monitoring for the event associated with that subscription, but it does not remove the subscription definition from the SDR. The subscription remains deactivated until you call pmandef with the -a flag to "activate" the subscription. You can also use the pmandef command with the -q flag to query the appropriate Problem Management daemons for status about a subscription. This just tells you whether each daemon is currently monitoring for the event associated with that subscription.
The pmandef command requires the user to have Problem Management access on the local node to make the necessary changes to the SDR. If the user does not have Problem Management access on the local node, the command will be unsuccessful. The user should also have Problem Management access on the nodes that are affected by the subscription for the Problem Management daemons on those nodes to dynamically process the request. If the user does not have Problem Management access to any of these nodes, the Problem Management daemons on these nodes will not process the request until the next time they are restarted or refreshed. See the "Using the Problem Management subsystem" chapter in PSSP: Administration Guide for information on obtaining Problem Management access in each of the supported PSSP trusted services security configurations.
When a new subscription is created using the pmandef -s command, the user's current security context is used to establish ownership of the subscription. Modifications to the subscription using the pmandef command with the -u, -d and -a flags are only allowed by a user who can be identified as the owner of the subscription. See the "Using the Problem Management subsystem" chapter in PSSP: Administration Guide for a complete description of subscription ownership in all of the supported PSSP trusted services security configurations. Subscription ownership is also used to decide whether the action that results from an event should be allowed.
After the Problem Management daemon receives notification that an event has occurred, and before it performs the action for that event, the Problem Management daemon checks to see whether the subscription owner is authorized to perform the requested action on the node where the Problem Management daemon is running. If the requested action is an entry in the AIX error log and BSD syslog or the generation of an SNMP trap, the subscription owner must have |AIX remote commands access to the node as the root user. If the requested action is execution of a command, the subscription owner must have |AIX remote commands access to the node as the command user. The command user is by default the same user who issued the pmandef -s command to create the subscription. A different user can be specified to pmandef by using the -U flag. See the "Using the Problem Management subsystem" chapter in PSSP: Administration Guide for a complete description of obtaining |AIX remote commands access.
Exit Values
Security
You must have Problem Management access to run this command.
You must have the appropriate |AIX remote commands access for requested actions to be executed in response to events.
Implementation Specifics
This command is part of the IBM Parallel System Support Programs (PSSP) Licensed Program (LP).
Prerequisite Information
IBM RS/6000 Cluster Technology: Event Management Programming Guide and Reference
The "Using the Problem Management subsystem" chapter in PSSP: Administration Guide
Location
/usr/lpp/ssp/bin/pmandef
Related Information
Commands: pmanquery, sysctl
Examples
In this example, a user issues the command:
pmandef -s Program_Monitor \ -e 'IBM.PSSP.Prog.pcount:NodeNum=12;ProgName=mycmd;UserName=relish:X@0==0' \ -r "X@0==1" -c /usr/local/bin/start_recovery \ -C /usr/local/bin/stop_recovery -n 5 -U ketchup
A subscription named "Program_Monitor" will be created on the local node if the user has Problem Management access. The requested actions for this subscription are for node 5, so the user must also have Problem Management access on node 5, in order for the Problem Management daemon on node 5 to act on this subscription immediately. Otherwise, the Problem Management daemon will not act on this subscription until the next time it gets restarted.
This subscription requests that whenever the number of processes named "mycmd" and owned by user relish on node 12 becomes 0, the command start_recovery will run on node 5. When the number of processes increases back to 1, the command stop_recovery will run on node 5. The subscription also requests that the commands start_recovery and stop_recovery are to run on node 5 as the user ketchup.
Once the subscription is created, any user who can be identified as the subscription owner can deactivate, activate, or remove this subscription.
To deactivate, enter:
pmandef -d Program_Monitor
To activate, enter:
pmandef -a Program_Monitor
To remove, enter:
pmandef -u Program_Monitor
Purpose
pmanquery - Queries the System Data Repository (SDR) for a description of one or more Problem Management subscriptions.
Syntax
Flags
Flags that specify the scope of the search follow:
Flags that format the output follow:
Operands
None.
Description
After a Problem Management subscription definition is stored in the SDR by the pmandef command, you can use the pmanquery command to retrieve the subscription definition. The pmanquery command prints the details of the subscription definition in raw format which can then be parsed by other applications.
The -n, -k , -p, -U and -H flags control the scope of the search for subscriptions in the SDR. If none of the -k, -p, -U or -H flags is specified, the pmanquery command searches for Problem Management subscriptions that are owned by the end user, based on the end user's current security context. See the "Using the Problem Management subsystem" chapter in the PSSP: Administration Guide for a complete description of the user's security context as in pertains to Problem Management. Refer to the Examples section for pmanquery flag usage information.
Implementation Specifics
This command is part of the IBM Parallel System Support Programs (PSSP) Licensed Program (LP).
Prerequisite Information
The "Using the Problem Management subsystem" chapter in PSSP: Administration Guide
Location
/usr/lpp/ssp/bin/pmanquery
Related Information
Commands: pmandef
Examples
pmanquery -n my_handle
pmanquery -n my_handle -k hotdog@XYZ.COM
pmanquery -n all -k hotdog@XYZ.COM
pmanquery -n all
pmanquery -n my_handle -k all -p all -U all -H all
pmanquery -n all -k all -p all -U all -H all