Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PBS, refresh stdout

I have a long running Torque/PBS job and I'd like to monitor output. But log file only gets copied after the job is finished. Is there a way to convince PBS to refresh it?

like image 534
Anycorn Avatar asked May 10 '12 03:05

Anycorn


3 Answers

This is possible in TORQUE. If you have a shared filesystem you can set

$spool_as_final_name true

in the mom's config file. This will have the file write directly to the final output destination instead of spooling in the spool directory. Once you are set up with that you can tail -f the output file and monitor anything you want.

http://www.adaptivecomputing.com/resources/docs/torque/3-0-3/a.cmomconfig.php (search for spool_as_final_name

like image 187
dbeer Avatar answered Oct 31 '22 20:10

dbeer


Unfortunately, AFAIK, that is not possible with PBS/Torque - the stdout/stderr streams are locally spooled on the execution host and then transferred to the submit host after the job has finished. You can redirect the standard output of the program to a file if you'd like to monitor it during the execution (it makes sense only if the execution and the sumit hosts share a common filesystem).

I suspect the rationale is that it allows for jobs to be executed on nodes that doesn't share their filesystem with the submit node.

like image 4
Hristo Iliev Avatar answered Oct 31 '22 18:10

Hristo Iliev


For me, ssh-ing to the node where the job is running and looking at files under /var/spool/torque/spool/ works, but it might be specific to this particular environment.

like image 1
Evgeni Sergeev Avatar answered Oct 31 '22 19:10

Evgeni Sergeev