Looking for a "get started guide"


This command fails

  1. static IP and hostname

  2. /etc/hosts should be populated

    root@pbsserver:~# cat /etc/hosts pbsserver.pbspro.org pbsserver localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

  3. commands are working

  4. firewall disabled , selinux disabled and system should be restarted.



I think? :smiley:


Does the command contain a tilde like so `
or is it a single quote like so ’

I tried both cases, the second giving me a >
Would that be correct or no?

If you copy paste it from windows, then there might be some special characters.
You can use double quotes instead (notepad++ or notepad )

qmgr -c “set server job_history_enable=true”

Please use the IP address of your VM or the system, the information given above was a sample /etc/hosts

Done. Missed that.


Please share the output of these commands:

  1. ps -ef | grep pbs_
  2. cat /etc/hosts
  3. hostname
  4. cat /etc/pbs.conf
  5. source /etc/pbs.conf ; cat $PBS_HOME/mom_priv/config
  6. ifconfig

Thank you @aanderr. It seems like the pbs services are not up and running

As root user, please run the below commands and instructiosn:

  1. hostnamectl set-hostname pbsserver --static
    #close the terminal
    #open the terminal and go to step 1

  2. edit /etc/pbs.conf and update


  1. edit /var/spool/pbs/mom_priv/config and update
    $clienthost pbsserver

  2. /etc/init.d/pbs start

  3. ps -ef | grep pbs_

  4. /etc/init.d/pbs status

Thanks, looks much better! However, the errors persist

Please note, all the qmgr commands are to be run by the root user
Please share us the output of this command (run as root user)
0. /etc/init.d/pbs restart

  1. qstat -Bf
  2. netstat -tunap | grep pbs
  3. /etc/init.d/pbs status

If the “qstat” command does not work , then please run the below command and share us the contents of strace.txt. If you do not have strace command, then please install it using yum

strace qstat -Bf -o strace.txt

Ah. I think that did it!

The last two commands:

So the /bin/sleep 100 is supposed to start a job, right?

The snippet has the wrong commands:
I’ve now done /bin/sleep 100 and qstat -answ1 on another terminal and can’t see anything.

qstat command

Please do not copy paste, some special characters might be inserted.

qsub -- /bin/sleep 100
qsub -- /bin/hostname 
qstat -answ1

after qsub there is space and two hypens and space and application and argument

Have a nice day ! Nice one

Trying to run a test hello world python script on the pbsserver
Got the command from https://www.altair.com/pdfs/pbsworks/PBSUserGuide19.2.3.pdf

Please try this


Nothing like pbs.sh exists? Should I create it?

Hmm, trying to wrap my head around how these commands work :smiley:

It seems there is no default queue or queue created;

as root:
qmgr -c “create queue workq queue_type=e, started=t, enabled=t”
qmgr -c “set server default_queue=workq”

as pbsdata user :
qsub – /bin/sleep 1000
qsub -q workq – /bin/sleep 1000
qstat -answ1

This looks like a breakthrough! :smiley:

But not too sure what I’m looking at here.
Two jobs - 13 & 14 - perhaps some others were started before?
Are these jobs doing something in particular or?

Say I wanted to run my hello.python script which does a print. How could I do that?

Getting closer :slight_smile:

Are these jobs just waiting in the queue now right? If I wanted them to run?

as there is no node added to run your jobs, hence the jobs were in the queued state. 13 and 14 are queued jobs, that are running sleep commands for 1000 seconds.

As root user:
qmgr -c "create node pbsserver "

To list nodes;
pbsnodes -aSJ
pbsnodes -av

If you want to run your python script:

qsub yourpython.script

You can get the command help on the Linux by executing:

man qstat
man sleep
man qsub
man pbsnodes

Sorry , it seems looking at this thread , i am all over the place. Thank you for your patience.

  1. There is no pbs.sh script that exists on the system, it is the name of the script that needs to be created by the user. It can have any name and extension, but it should be made executable by running chmod +x pbs.sh

  2. You can get help on all the commands that exists on the system
    User and admin commands are present in : /opt/pbs/bin
    You can use man to get an explanation and q to quit the man page

  3. qsub is the command to submit jobs

  4. qstat is the command to know the status of the jobs

  5. Steps to submit a bash script

[pbsdata@pbsserver ~]$ cat pbs.sh
#PBS -N testjob
echo "########################"
echo "####################### "
/bin/sleep 100
echo " Done "

[pbsdata@pbsserver ~]$ chmod + pbs.sh
[pbsdata@pbsserver ~]$

[pbsdata@pbsserver ~]$ qsub pbs.sh

[pbsdata@pbsserver ~]$ qstat -answ1

                                                                                                   Req'd  Req'd   Elap
Job ID                         Username        Queue           Jobname         SessID   NDS  TSK   Memory Time  S Time
------------------------------ --------------- --------------- --------------- -------- ---- ----- ------ ----- - -----
526.pbsserver               pbsdata         workq           testjob           195279    1     1    --    --  R 00:00:00 pbsserver/0
   Job run at Wed Apr 22 at 18:36 on (pbsserver:ncpus=1)
[pbsdata@pbsserver ~]$ qstat
[pbsdata@pbsserver ~]$

[pbsdata@pbsserver ~]$ ls *526*
testjob.e526  testjob.o526

[pbsdata@pbsserver ~]$ cat testjob.o526 | more
  1. steps to submit python script
[pbsdata@pbsserver ~]$ cat pbs.py
print "This is my first python pbs  job"
print "hello world"

[pbsdata@pbsserver ~]$ chmod +x pbs.py

[pbsdata@pbsserver ~]$ ls -ltr pbs.py
-rwxrwxr-x 1 pbsdata pbsdata 76 Apr 22 18:43 pbs.py

[pbsdata@pbsserver ~]$ qsub pbs.py

[pbsdata@pbsserver ~]$ qstat
[pbsdata@pbsserver ~]$ qstat -xH | grep 530
530.uklm-pbstes pbsdata  workq    pbs.py     205791   1   1    --    --  F 00:00

[pbsdata@pbsserver ~]$ ls -ltr *530*

-rw------- 1 pbsdata pbsdata  0 Apr 22 18:47 pbs.py.e530
-rw------- 1 pbsdata pbsdata 45 Apr 22 18:47 pbs.py.o530

[pbsdata@pbsserver ~]$ cat pbs.py.o530
This is my first python pbs  job
hello world
  1. Another way to submit the python script without the python shebang line
[pbsdata@pbsserver ~]$ cat pbs.py
print "This is my first python pbs  job"
print "hello world"

[pbsdata@pbsserver ~]$ chmod +x pbs.py

[pbsdata@pbsserver ~]$ ls -ltr pbs.py
-rwxrwxr-x 1 pbsdata pbsdata 61 Apr 22 18:49 pbs.py

[pbsdata@pbsserver ~]$ qsub -S /opt/pbs/bin/pbs_python pbs.py

[pbsdata@pbsserver ~]$ qstat
[pbsdata@pbsserver ~]$ qstat -xH | grep 532
532.uklm-pbstes pbsdata  workq    pbs.py     208954   1   1    --    --  F 00:00

[pbsdata@pbsserver ~]$ ls *532*
pbs.py.e532  pbs.py.o532

[pbsdata@pbsserver ~]$ cat pbs.py.o532
This is my first python pbs  job
hello world

Note : The above jobs are very short jobs, so you do not see their status in the qstat command as they get executed quickly. All jobs by default create standard out and standard error file ( .o and .e ).
Sleep job ( qsub – /bin/sleep 1000 ; qstat -answ1 ) would show you the job status , as it remains on the system as job for 1000 seconds.

I hope this is clear to you.