This command fails
This command fails
static IP and hostname
/etc/hosts should be populated
root@pbsserver:~# cat /etc/hosts
192.168.1.101 pbsserver.pbspro.org pbsserver
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
commands are working
firewall disabled , selinux disabled and system should be restarted.
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:
Thank you @aanderr. It seems like the pbs services are not up and running
As root user, please run the below commands and instructiosn:
hostnamectl set-hostname pbsserver --static
#close the terminal
#open the terminal and go to step 1
edit /etc/pbs.conf and update
edit /var/spool/pbs/mom_priv/config and update
ps -ef | grep pbs_
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
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.
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
It seems there is no default queue or queue created;
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
This looks like a breakthrough!
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?
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;
If you want to run your python script:
You can get the command help on the Linux by executing:
Sorry , it seems looking at this thread , i am all over the place. Thank you for your patience.
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
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
qsub is the command to submit jobs
qstat is the command to know the status of the jobs
Steps to submit a bash script
[pbsdata@pbsserver ~]$ cat pbs.sh #PBS -N testjob hostname echo "########################" env echo "####################### " /bin/sleep 100 echo " Done " [pbsdata@pbsserver ~]$ chmod + pbs.sh [pbsdata@pbsserver ~]$ [pbsdata@pbsserver ~]$ qsub pbs.sh 526.pbsserver [pbsdata@pbsserver ~]$ qstat -answ1 pbsserver: 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 pbsserver ######################## MANPATH=:/opt/pbs/share/man HOSTNAME=pbsserver HW_DISABLE_GL_COMPATIBILITY_CHECK=1 SHELL=/bin/bash HISTSIZE=1000 PBS_JOBNAME=testjob TMPDIR=/var/tmp/pbs.526.pbsserver PBS_ENVIRONMENT=PBS_BATCH PBS_O_WORKDIR=/home/pbsdata NCPUS=1 QT_GRAPHICSSYSTEM_CHECKED=1 USER=pbsdata PBS_TASKNUM=1 LD_LIBRARY_PATH=/opt/Mesa-9.2.2/
[pbsdata@pbsserver ~]$ cat pbs.py #!/bin/python 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 530.pbsserver [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
[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 532.pbsserver [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.