qevent(1)
π qevent(1) β the Grid Engine event-listener era π
okay bestie, come closer, because qevent is one of those lil utilities that's lowkey iconic once you get it. It lives in the General Commands Manual section, and it's about to be your new hyperfixation. π¦
β¨ NAME β¨
qevent β subscribe and respond to Grid Engine events. yes queen, it's literally in the name. π
πΈ DESCRIPTION πΈ
So here's the vibe: qevent subscribes to "events" that the Grid Engine system is out here generating, and then it just... loops. Forever. Living its best life. π But before it starts looping, it writes its own pid to the file qevent.pid, which is giving "leaving a note on the fridge so you know where I am."
Who's using this? The Grid Engine test suite, mostly. But also β and this is the slay part β you can use it to wait for a job or a task to finish, and it's way more efficient than sitting there running qstat in a loop like some kind of peasant. π No cap.
Peep the example down below, it'll make it click. π
π SYNOPSIS π
qevent [-h|-help] [-ts|-testsuite] [-sm|-subscribe] [-trigger event
script [-trigger event script],...]
π OPTIONS π
-h,-helpβ shows you the usage. that's it, that's the whole job. short king behavior. π-ts,-testsuiteβ run in test suite mode. yes, the mode named after the test suite. we love a self-explanatory moment. β¨-sm,-subscribeβ run in subscribe mode, which means it prints events from the system as they come in. it's giving live commentary. π-trigger event scriptβ this is the main character right here. it starts an executablescriptwhenever the specifiedeventoccurs. thescriptgets handed three arguments, in this order: the event name, the job id, and the task id. fr fr, three whole arguments. π«Ά
and event has to be one of these two:
JB_ENDβ signals a job end. it's over, bestie. πJB_TASK_ENDβ signals a job task end. one lil piece of the job said bye. π
π§ FILES π§
qevent.pidβ the id of theqeventprocess. that's the receipt, keep it. π
β EXAMPLE β
okay so this is the moment. here's how you'd wait for a job β and you'd reach for this when the -sync, -hold_jid, or -hold_jid_ad options of qsub just aren't cutting it. like, they tried their best, but no. π
$ cat wait-for-job
#!/bin/sh
if [ "$2" = $JOBID ]; then
echo Job $JOBID finished
kill $(cat qevent.pid)
exit 0
fi
$ export JOBID=`qsub -b y -terse sleep 30`
$ qevent -trigger JB_END ./wait-for-job
Job 122837 finished
$
see how the script checks $2 against $JOBID? that's the job id argument showing up exactly where the manpage said it would. and then it goes and kills the process using the pid it read out of qevent.pid. iconic. the whole loop. ate. π₯
π BUGS π
Needs tidying up and extending.
yep. that's the entire bug report. it's giving "we'll fix it later" energy and honestly? relatable. π
and that's the whole page, bestie!! every flag, every argument, every file, every vibe β all accounted for. π¦
this lil legend is from 2012-01-09, and it's part of the General Commands Manual family (that's the qevent(1) you'll see floating around in the header/footer). mwah. take care of her. π
π¦ where this page comes from
- debian bookworm: gridengine-client 8.1.9+dfsg-10+b1 Β· SISSL
- debian trixie: gridengine-client 8.1.9+dfsg-13.1 Β· SISSL
- ubuntu jammy: gridengine-client 8.1.9+dfsg-10build1 Β· SISSL
- ubuntu noble: gridengine-client 8.1.9+dfsg-11build3 Β· SISSL
- ubuntu questing: gridengine-client 8.1.9+dfsg-13.1
- ubuntu resolute: gridengine-client 8.1.9+dfsg-13.2 Β· SISSL
- ubuntu stonking: gridengine-client 8.1.9+dfsg-13.2ubuntu1 Β· SISSL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms