oar-team / oar3

OAR: versatile resource and job manager for cluster (third generation)
Other
8 stars 11 forks source link

Exit code reported by oarstat is not converted #50

Closed bzizou closed 3 weeks ago

bzizou commented 5 months ago
root@dahu-oar3:~# oarstat -fj 1801
[...]
exit_code = 32512

This is a "perl" status code, that has to be converted by a 8 bits right shift ( $code >>8) to get the exit status (which should be 127 here) or ($code & 127) to be equal to the kill signal if the command has been killed (bash like behavior) In OAR2, oarstat converted the values in the output inside parenthesis, which is not something very easy to parse, so I suggest that OAR3 outputs something like this:

exit_status_code = 127
exit_code = 32512
bzizou commented 3 weeks ago

Fixed by dbd2d54b6703accf4de3e6eb11e24482c6b9b266