Replies: 5 comments
-
link to a brainstorming i just did #5120 |
Beta Was this translation helpful? Give feedback.
-
Some initial comments:
Here I assume you are getting the bulk of the information from the flux.job.JobList or more simply for a single job flux.job.job_list_id functions. E.g. here's a simple script to get the job priority: import sys
import flux
from flux.job import JobID, job_list_id
job = job_list_id(flux.Flux(), JobID(sys.argv[1])).get_jobinfo()
print(f"priority = {job.priority}") The |
Beta Was this translation helpful? Give feedback.
-
Is this something could be made available in JobInfo? It certainly feels borderline on ok vs not ok. |
Beta Was this translation helpful? Give feedback.
-
Here's an example of how to currently fetch the jobspec and pull information like the import sys
import flux
import json
from flux.job import JobID
h = flux.Flux()
payload = {"id": JobID(sys.argv[1]), "keys": ["jobspec"], "flags": 0}
jobspec = json.loads(h.rpc("job-info.lookup", payload).get()["jobspec"])
cwd = jobspec["attributes"]["system"]["cwd"]
print(f"WorKDir: {cwd}") Note that this is redacted jobspec, so the environment has been removed, and the instance may have added or modified fields (like adding a default queue or duration). I don't think the |
Beta Was this translation helpful? Give feedback.
-
Since only the job user can fetch jobspec, you'd want to catch
Good question. Slurm seems to show it for other user jobs so it is likely ok 🤷 |
Beta Was this translation helpful? Give feedback.
-
Post TOSS 4 updates on LC, users have asked about the disappearance of the
checkjob
command on systems running Slurm, which is a handy Moab utility for seeing all sorts of job stats. Since we're not supporting Moab anymore, Jeff Long & I put together a tool that nicely formats some of the output you can get withsqueue
andsacct
. The result looks something likeA user requested a similar utility for Flux (as well as more tutorials on how to get job stats with native Flux commands), and I was trying to use the Python APIs to get there. What I have so far:
Thanks so much for helping me out @vsoch!
Originally posted by @xorJane in flux-framework/flux-docs#229 (comment)
Beta Was this translation helpful? Give feedback.
All reactions