Skip to content

job-archive: gap analysis for fields needed to create job usage reports  #3136

@cmoussa1

Description

@cmoussa1

I am in the process of developing a front-end for the job-archive (as required by stakeholders like Ryan Day to create job usage reports). This involves building a JobRecord class which holds job data:

class JobRecord(object):
        '''
        A record of an individual job.
        '''

        def __init__(self, jobid, user, group, project, nnodes, hostlist, sub, start, end) :
                self.jobid = jobid
                self.user = user
                self.group = group
                self.project = project
                self.hostlist = hostlist
                self.nnodes = nnodes
                self.sub = sub
                self.start = start
                self.end = end
                return None

        @property
        def elapsed(self) :
                return time.mktime(self.end) - time.mktime(self.start)
        
        @property
        def queued(self) :
                return time.mktime(self.start) - time.mktime(self.sub)

I have been able to grab most of these fields from the job-archive, but a couple either are not present, or I have a question on how to fetch that data -

user - Currently I can grab the user ID from the job-archive, but not a username. Is it planned to include a username field along with a userid? Is there a way to do a lookup to find a username given a user ID?

group (project probably fits in here too) - these are actually the account (and in the future, wckey) fields from flux-accounting. From speaking with Ryan, I believe this is specified when users are submitting jobs; if not specified, it defaults to some bank. Realistically, probably not a high priority item at this moment, but something we will need in the near future.

nnodes - Is there a way to get nnodes from the R or jobspec columns from job-archive? Is it the rank field in R?

bash-4.2$ flux mini submit -N 2 -n 2 hostname
ƒRneAoWNB
bash-4.2$ flux job info ƒRneAoWNB R
{"version":1,"execution":{"R_lite":[{"rank":"0-1","children":{"core":"0"}}]}}
                                        ^
                                        |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions