[torqueusers] pbsnodes message=EVENT in status field

Bas van der Vlies basv at sara.nl
Fri Dec 21 00:28:48 MST 2012

> Hello,
>   i want to know how i can set a EVENT message for a node; e.g.: pbsnodes n1:
> {{{{
>   eg: node: n1
>     state = free
>     np = 8
>     properties = ib,switch1,highmem
>     ntype = cluster
>     jobs = 0/567403.sara.nl, 1/567403.sara.nl
>     status =
> ..,loadave=0.00,message=EVENT:sample.time=1288864220.003:cputotals.user=0:iconnect.pktout=0,netload=3487600394,state=free,…
> }}}
> This is an example that i programmed in pbs_python for somebody else, but i can not remember how to set it. .  I can set  MESSAGE=ERROR,  just print ERROR to stdout in a health script with a description. Or is the same for an event message?

I have found the answer in the source mom_server.c:
         if (!strncasecmp(tmpPBSNodeMsgBuf, "ERROR", strlen("ERROR")))
          IsError = 1;
        else if (!strncasecmp(tmpPBSNodeMsgBuf, "EVENT:", strlen("EVENT:")))
          /* pass event directly to scheduler for processing */

          /* NO-OP */

Here are some examples how i use it.  I could not find any info on the web.

in your health script print EVENT: to stdout. You can set multiple events with or without values.
  * echo EVENT:reason1=kernel_upgrade
  * echo EVENT:reason2=reinstall_node
  * echo EVENT:firmware_update

I have also patched PBBQuery.py in the pbs_python package so it can handle multiple EVENTS.


Bas van der Vlies           
mail: basv at sara.nl     
SARA - Academic Computing Services , Amsterdam, The Netherlands

More information about the torqueusers mailing list