-
Notifications
You must be signed in to change notification settings - Fork 50
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
How to access a wide range of job information for a user tool #5119
Comments
link to a brainstorming i just did #5120 |
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 |
Is this something could be made available in JobInfo? It certainly feels borderline on ok vs not ok. |
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 |
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 🤷 |
Problem: Several users have requested getting a job's current working directory from flux jobs/job-list. Solution: Add retrieval of job current working directory via the "cwd" attribute. Fixes flux-framework#5119
Problem: Several users have requested getting a job's current working directory from flux jobs/job-list. Solution: Add retrieval of job current working directory via the "cwd" attribute. Fixes flux-framework#5119
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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)
The text was updated successfully, but these errors were encountered: