bpstat¶
Name¶
bpstat – Show cluster node status and cluster process mapping.
Synopsis¶
bpstat [-h, –help] [-V, –version] [-U, –update] [-c, –compact] [-l, –long] [-a, –address] [-s, –status] [-n, –number] [-t, –total] [-N, –sort-number] [-S, –sort-status] [-O, –keep-order] [-R, –sort-reverse] [-p] [-P [nodes]] [-A hostname] [-M] [nodes | allstate]
Description¶
This utility displays 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.
- -a, --address
Prints the IP address of the indicated node.
- -A hostname
Prints the node number that corresponds to the specified hostname or IP address.
- -c, --compact
Print compacted listing of nodes (default).
- -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.- -l, --long
Print long list of node status. This includes IP address, status, mode, user and group information.
- -M
Prints the status of the master node, in addition to the specified compute node(s), for the default case where no specific nodes are specified.
- -n, --number
Prints the node numbers that are being used and/or are available for the nodes in the cluster.
- -N, --sort-number
Prints the node list sorted by node number.
- -O, --keep-order
Prints the nodes in the order returned by the system (no sorting is done).
- -p
Prints a list of processes (by PID) that are currently running on the specified node.
- -P nodes
Postprocesses 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 theBProc
system will not have a number appended. If the optional [nodes] is supplied, then the ps output is filtered to show only the specified node(s). Node(s) can be identified by names, numbers, or a list of numbers.- -R, --sort-reverse
Prints the node list in reverse sorted order.
- -s, --status
Prints the state for the indicated node. The
BProc
states are “down”, “boot”, “error”, “unavailable”, “up”, “reboot”, “halt”, and “pwroff”.- -S, --sort-status
Prints the node list sorted by node status.
- -t, --total
Prints the total number of compute 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 maximum size of the cluster, not the current number of available nodes or the count of machines assigned node numbers.- -U, --update
Continuously update the status; otherwise, print status once and exit.
- -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.
- [nodes | allstate]
Optionally, specify the nodes for which information is to be displayed. Nodes can be specified individually, as ranges, or in a comma-separated list of individual nodes and/or ranges. Alternatively,
all
state specifies all nodes that are in a particular state, e.g., allup, alldown, allboot, allerror. Note:allup
does not include the master node, even if-M
is present.
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
[user@cluster user] $ bpstat --number allup | awk '{ print "."$1 }'
.0 .1 .2 .4 .5 .10 .16 .17 .20
Print status for all nodes, including the master node:
[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
-1,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
Print status for specific nodes:
[user@cluster user] $ bpstat 0-2,3,8
Node(s) Status Mode User Group
8 down ---------- root root
3 error ---x------ root root
0-2 up ---x--x--x root root
Augment ps aux for node numbers:
[user@cluster user] $ ps aux | bpstat -P
NODE USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 4756 552 ? S 10:58 0:02 init [5]
root 2 0.0 0.0 0 0 ? S 10:58 0:00 [migration/0]
(etc.)
Filter ps aux for nodes n1 and n2:
[user@cluster user] $ ps aux | bpstat -P n1,n2
NODE USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
1 root 1328 0.0 0.0 6864 692 ? Ss 12:45 0:00 [portmap]
2 root 32397 0.0 0.0 6864 692 ? Ss 12:45 0:00 [portmap]