Also, you can use -F json with qstat and pbsnodes commands which will dump results in json which then can be easily parsed by your programs. Usage: qstat -f -F json pbsnodes -av -F json
-F json
qstat -f -F json
pbsnodes -av -F json