Ticket 6886 - Access to stdout/stderr path in accounting
Summary: Access to stdout/stderr path in accounting
Status: OPEN
Alias: None
Product: Slurm
Classification: Unclassified
Component: Accounting (show other tickets)
Version: 18.08.6
Hardware: Linux Linux
: 5 - Enhancement
Assignee: Tim Wickberg
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2019-04-18 11:37 MDT by Matt Ezell
Modified: 2022-09-21 07:22 MDT (History)
4 users (show)

See Also:
Site: NOAA
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ORNL
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Tzag Elita Sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
Description Matt Ezell 2019-04-18 11:37:30 MDT
Is it possible to find a job's StdOut and StdErr paths after it has completed and been purged from the controller (in sacct, for example)?  Is the data even saved in accounting?
Comment 1 Jason Booth 2019-04-18 14:40:04 MDT
Hi Matt,

 This information is not currently stored in the database. The structure that is used to write this information to the database, or to a flat file, is a job_record (src/slurmctld/slurmctld.h) which has no support for the std_err, std_out or std_in. 

-Jason
Comment 3 Jason Booth 2019-04-19 14:41:32 MDT
Matt,

 After looking at this again and talking internally we think you should be able to use the jobcomp plugin, specifically elasticsearch to save this information.

https://slurm.schedmd.com/jobcompplugins.html

-Jason
Comment 4 Matt Ezell 2019-04-22 11:11:46 MDT
Thanks.  That would be useful for the system administrators, but is it advisable to give end users access to ElasticSearch?
Comment 5 Jason Booth 2019-04-22 13:51:53 MDT
Matt,

>That would be useful for the system administrators, but is it advisable to give end users access to ElasticSearch?

 That question is best answered by their documentation.

https://www.elastic.co/blog/found-elasticsearch-security

 It does look like elasticsearch has some role/profiles support so that might be an option however, if you want users to access data then you would do this through some other dashboard or reporting tool. 

https://www.elastic.co/guide/en/elastic-stack-overview/current/built-in-roles.html

https://www.elastic.co/guide/en/elastic-stack-overview/current/setting-up-authentication.html
Comment 6 Jason Booth 2019-04-22 15:52:22 MDT
Matt, 

One other note about elasticsearch and the std_err and std_out.

If you do not specify the -e or -o then just the work_dir is shown. 

>          "queue_wait" : 1,
>          "work_dir" : "/home/jason/slurm/17.11",
>          "std_in" : "/dev/null",
>          "ntasks" : 0,

Slurm will use the work_dir as the location to put the std_err and std_out if not specified so you can image an implied location here.



>   WorkDir=/home/jason/slurm/17.11
>   StdErr=/home/jason/slurm/17.11/slurm-42.out
>   StdOut=/home/jason/slurm/17.11/slurm-42.out

However, if you do specify a -e/-o


>          "queue_wait" : 0,
>          "work_dir" : "/home/jason/slurm/17.11",
>          "std_err" : "/tmp/some.error",
>          "std_in" : "/dev/null",
>          "std_out" : "/tmp/some.out",
>          "ntasks" : 0,


I am going to close out this issue as info given.
Comment 8 Tim Wickberg 2019-06-25 09:16:30 MDT
Matt -

I'm looking at getting this included in slurmdbd in 20.02 based on further prompting through email.

One alternative I can suggest for now is to use a job_submit plugin to store this data in the AdminComment field in some fashion. That field is explicitly designed to give you - the admin - a text column in the database to store arbitrary data in. Some sites have taken to packing additional accounting detail in json format, in advance of us adding/extending the data we capture ourselves.

- Tim
Comment 9 Matt Ezell 2019-06-25 11:14:27 MDT
(In reply to Tim Wickberg from comment #8)
> One alternative I can suggest for now is to use a job_submit plugin to store
> this data in the AdminComment field in some fashion. That field is
> explicitly designed to give you - the admin - a text column in the database
> to store arbitrary data in. Some sites have taken to packing additional
> accounting detail in json format, in advance of us adding/extending the data
> we capture ourselves.

Understand the suggestion.  Unfortunately these fields can contain replacement values (%j, %a, %A), which is not trivial to implement.
Comment 10 Anthony DelSorbo 2020-05-04 09:03:01 MDT
(In reply to Matt Ezell from comment #9)
> (In reply to Tim Wickberg from comment #8)

> 
> Understand the suggestion.  Unfortunately these fields can contain
> replacement values (%j, %a, %A), which is not trivial to implement.

Hi Tim,

Any chance this is getting some attention?  The last time we spoke of it, Jess/you mentioned possibly being able to get this into the 20.11 release.

Thanks,

Tony.
Comment 11 Anthony DelSorbo 2020-06-09 11:39:10 MDT
Tim/Jess,

Would you provide an update on the state of this issue?

Thanks,

Tony.
Comment 12 Anthony DelSorbo 2020-06-22 08:08:28 MDT
Tim/Jess,

Do you know if this is slated to be worked into an upcoming update?  If not, would you provide me a Statement of Work at your earliest opportunity?  

Thanks,

Tony
Comment 13 Tim Wickberg 2020-07-01 20:33:05 MDT
> Do you know if this is slated to be worked into an upcoming update?  If not,
> would you provide me a Statement of Work at your earliest opportunity?  

We'll have an SoW over to you next week.

- Tim
Comment 15 Jess 2020-07-09 13:13:23 MDT
SOW details sent to Tony and Matt  👍