Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query accounting info for failed jobs #70

Open
arnikz opened this issue Dec 18, 2019 · 1 comment
Open

Query accounting info for failed jobs #70

arnikz opened this issue Dec 18, 2019 · 1 comment

Comments

@arnikz
Copy link

arnikz commented Dec 18, 2019

This is a feature request: add option to list jobs with non-zero exit code. Currently, I use an ad hoc solution to post-process the output line(s).

@sverhoeven
Copy link
Member

The Xenon api does not have a method to ask for only non-zero exit code jobs.
Only the statuses of a list of job identifiers can be requested.

You could use the JSON formatted output for filtering with jq, for example to get a list of failed job ids:

xenon --json scheduler slurm --location ssh://localhost:10022 \
  --user xenon --password javagat list --identifier 2 \
  | jq '.statuses | map(select(.done and .exitCode != 0)) | map(.jobIdentifier)'

I could add the following option to the list sub command:

--exclude-exitcode=0      Only list completed job statuses which do not have the given exit code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants