I have released as open source a small web application to show the nodes, queues and jobs running on a cluster which uses PBS Pro. This is useful for administrators to quickly see the status of the nodes and how busy they are, to check how full each queue is and to see what jobs are running and queued. It’s also useful for users to see this information as well.
Hi @daniel, i am doing good, thank you. How are you? I have written a python script that outputs the above html page. This python script runs as a cronjob updating the page every minute or so.
Quite a few users would probably like to use your Python script. We look forward to it if you can release it under an open source license. That screen shot of the page it generates looks very useful. A simple python script run by cron would be easier to install than my Python WSGI app for some users.
This release is version 2.0.0 which now has a script to ease the installation, better documentation, bug fixes, and now most importantly it works with Python 3.8 instead of Python 2.7. See the Change Log and the Install instructions. For other details read the top of this post.
On my _pbs.so created from swig_compile_pbs.sh I can check where this comes from:
$ ldd _pbs.so
… snipped
libpbs.so.0 => /opt/pbs/lib/libpbs.so.0 (0x00007ff94c5f8000)
libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007ff94bc5b000)
libsec.so.0 => /opt/pbs/lib/libsec.so.0 (0x00007ff94ba58000)
… snipped
So in my system with PBSPro it comes from /opt/pbs/lib/libsec.so.0 which is from the pbspro-client package. Perhaps OpenPBS does not have this.
Googling says it provides “Functions in this library provide comparison and manipulation of File Access Control Lists.”
Edit the swig compile and remove that link requirement. I see that on my system it still makes _pbs.so so I willl need to lookup why I had it there.
Hi mike,
Sorry to bother you. I did that and wen ahead, install_pbsweb.sh … but then this gives error pbs.py and pbs.so not found. so i commented those also.
now it has permission issues.
Although the script is convinient, but i guess lot of setups will have different architecture.
So is there someway, i can get the python app, which i can just copy paste modify the wsgi file and host it as per my web server preference suppose apache.
Hi Vinay
Did you copy pbs_ifl.h to the pbsweb directory?
After removing the -lsec did the swig script create the three files: pbs.py, pbs_wrap.c and _pbs.so ?
What of those three files did it create?
If it did not create _pbs.so that issue needs to be solved as the application needs that file to work.
Mike
Hi
In the swig script you will see there is a compiling step and a linking step.
The compiling is just this one line:
gcc -c -shared -fpic -I$PYTHON_INCL -I$PBS_EXEC/include pbs_wrap.c
After that line add “exit” into the script so it will stop at this point. Run the script.
This should create three files pbs_wrap.c pbs_wrap.o pbs.py
Do you get these 3 files being created? What is the output of the swig script when it runs?
There should be no output if this step went OK.
Then we will move onto the linking step later on.
Mike
Hi Mike,
I was able to go further. Yes those 3 files were created. Now after starting the application when I try to access http://ip_address/statuspbs it gives - Internal server error.
Hi Vinay
Next step is to remove the “exit” you added and run swig again. We know that everything is fine (probably) up to this step. The linking step should create _pbs.so. That’s what the option -o means, i.e. output _pbs.so by linking together the preceeding files.
Also check that there is a $PBS_EXEC/lib/libpbs.so
Mike
Hi Mike,
So after removing exit from swig script. It gave the same error -
as earlier. So I removed the -lsec option from third line. and then executed it again, and it ran fine. created the file _pbs.so
Hi Vinay
Check in the pbsweb.ini that the paths there are all present.
Check your webserver conf setup and its logs.
Googling has a lot of stuff with that error message. I find that Python WSGI is not easy!
I also have a minimal Python WSGI app that is useful for testing that just prints some text. Don’t seem though to be able to upload or attach them here.
Mike