bpstat

Name

bpstat -- Show cluster node status information and cluster process mapping.

Synopsis

bpstat [-h, --help ] [-V, --version ] [-c, --compact ] [-l, --long ] [-a, --address ] [-s, --status ] [-n, --number ] [-t, --total ]
[-R, --sort-reverse] [-N, --sort-number] [-S, --sort-status] [-O, --keep-order] [-U update] [-A hostname] [-p] [-P num] [[nodes... | allup]...]

Description

This is a common line program to display the BProc status of cluster nodes, and processes running on those nodes. Node information includes the node's IP address, state, user ownership, group ownership, and running node user processes.

Options

The following options are available to the bpstat program.

-h, --help

Print the command usage message and exit. If -h is the first option, all other options will be ignored. If -h is not the first option, the other options will be parsed up to the -h option, and those options will be processed.

-V, --version

Print the command version number and exit. If -V is the first option, all other options will be ignored. If -V is not the first option, the other options will be parsed up to the -V option, and those options will be processed.

-c, --compact

Print compacted listing of nodes (default).

-l, --long

Print long list of node status. This includes IP address, Status, Mode, User and Group information.

-a, --address

Prints the IP address of the indicated node.

-s, --status

Prints the state for the indicated node. The BProc states are down, boot, error, unavailable, up, reboot, halt, pwroff

-n, --number

Prints the node numbers being used and/or that are available for the nodes in the cluster.

-t, --total

Prints the total number of nodes configured for the cluster. The number is calculated from the cluster configuration in the /etc/beowulf/config file. Note that this is the potential size of the cluster, not the current number of available nodes or the count of machines assigned node numbers.

-R, --sort-reverse

Prints the node list in reverse sorted order.

-N, --sort-number

Prints the node list sorted by node number.

-S, --sort-status

Prints the node list sorted by node status.

-O, --keep-order

Prints the nodes in the order returned by the system (no sorting is done).

-U update

Continuously update the status.

-A hostname

Prints the node number that corresponds to the specified hostname or IP address.

-p

Prints a list of processes (by PID) that are currently running on the specified node.

-P num

Filter the output from the ps command, prepending the node number that BProc-controlled processes are running on. This is typically used as ps -aux | bpstat -P. Processes not controlled by the BProc system will not have a number appended.

[nodes... | allup]

Examples

Print the number of available nodes.

[user@cluster user]$ bpstat --total allup
9

Generate a list of all usable nodes.

[user@cluster user]$ bpstat --number allup
0 1 2 4 5 10 16 17 20
bpstat --number allup | awk '{ print "."$1 }'
.0 .1 .2 .4 .5 .10 .16 .17 .20

Print status for all nodes.

[user@cluster user]$ bpstat
Node(s)                        Status       Mode       User       Group
8,11,22-31                     down         ---------- root       root
3,6-7,9,12-15,18-19,21         error        ---x------ root       root
0-2,4-5,10,16-17,20            up           ---x--x--x root       root

Print the PIDs and associated node number of currently running processes.

[user@cluster user]$ bpstat -p
PID	Node	
7503	0
8262	1

See Also

beomap(1), bproc_nodestatus(3), bproc_nodeaddr(3), bproc_nodeinfo(3), bproc_pidnode(3)