Get Info on the Nodes

You can get an up-to-date summary of the nodes, queues and jobs by visiting the HPC Status page. You may wish to obtain more detailed information though for use in your job scripts. You can do this by using the pbsnodes command.

The manual pages for pbsnodes can be viewed using man pbsnodes and running pbsnodes with no options will show a usage summary.

Obtaining Information on the Nodes Available

Use the pbsnodes -a command to query the status of all nodes, showing the number of CPUs and the amount of memory in each node.

$ pbsnodes -a

To just query one node supply the node name as an option. Below is an example of how to query hpcnode03. Some non-essential information has been left out.

$ pbsnodes hpcnode03
hpcnode03
  Mom = hpcnode03
  state = free
  pcpus = 56
  jobs = 110298.hpcnode0/0, 110298.hpcnode0/1, 110298.hpcnode0/2, 110298.hpcnode0/3, etc... 
  resources_available.host = hpcnode03
  resources_available.intel_node = yes
  resources_available.mem = 384000000kb
  resources_available.ncpus = 56
  resources_available.Qlist = normal
  resources_available.vnode = hpcnode03
  resources_assigned.hbmem = 0kb
  resources_assigned.mem = 278921216kb
  resources_assigned.ncpus = 32
  resources_assigned.vmem = 0kb

Obtaining Machine Parsable Output

This information could be used to help you automate PBS job submission. In which case you may wish to use a more structured output as there are good Python parsers for structured data such as JSON (JavaScript Object Notation). To print the output as JSON use the optin -F json as below.

$ pbsnodes -F json hpcnode03 
{
    "timestamp":1606173513,
    "pbs_version":"19.2.6.20200311140837",
    "pbs_server":"pbsserver",
    "nodes":{
        "hpcnode03":{
            "Mom":"hpcnode03",
            "ntype":"PBS",
            "state":"free",
            "pcpus":56,
            "jobs":[
                "110298.hpcnode0",
                "110609.hpcnode0"
            ],
            "resources_available":{
                "arch":"linux",
                "centos6_node":"no",
                "host":"hpcnode03",
                "intel_node":"yes",
                "mem":"384000000kb",
                "ncpus":56,
                "Qlist":"normal",
                "vnode":"hpcnode03"
            },
            "resources_assigned":{
                "mem":"278921216kb",
                "ncpus":32
            },
            "resv_enable":"True",
            "sharing":"default_shared",
            "last_state_change_time":1606093393,
            "last_used_time":1606111932
        }
    }
}

If you wish the output to be in delimiter-separated value format the use the option -F dsv. The default delimiter is a vertical bar ("|").

$ pbsnodes -F dsv hpcnode03 

An optional delimiter specification can be used to change this.

$ pbsnodes -F dsv -D ',' hpcnode03 

You can also use the above options and query all the nodes.

$ pbsnodes -F json -a
This is custom footer