Singularity: [ instances ] name of stderr and stdout files

Created on 29 Oct 2017  路  8Comments  路  Source: hpcng/singularity

From what I can tell, the files for error and output are named with a nice, intuitive convention, and then a randomly generated string:

/tmp/expfactory.web1.stderr.DxjOce
/tmp/expfactory.web1.stderr.LeFHme
/tmp/expfactory.web1.stderr.QNfVIw
/tmp/expfactory.web1.stderr.zFvkgm
/tmp/expfactory.web1.stdout.bTDvFc
/tmp/expfactory.web1.stdout.ES5Xfo
/tmp/expfactory.web1.stdout.iMfuxM
/tmp/expfactory.web1.stdout.xiKQqb

This is really great! I am hoping that we might be able to have the extensions match for each of stderr and stdout, for example:

/tmp/expfactory.web1.stdout.iMfuxM
/tmp/expfactory.web1.stderr.iMfuxM

that way I can easily associate that those two belong to the same instance run. Right now, I'm just :confused:

but that happens a lot... now where did I put my container socks? :footprints:

Enhancement Runtime

Most helpful comment

@vsoch As a follow up I'm opening an issue to display log paths with singularity instance list. Sorry, I misunderstood the original request.

All 8 comments

Closing. Path to instances log files in v3 doesn't end anymore with a random string and can be retrieved in $HOME/.singularity/instances/logs/$(hostname)/$USER/instance_name.out and $HOME/.singularity/instances/logs/$(hostname)/$USER/instance_name.err.

Thank you @cclerget !

hey @cclerget one small clarification here - I don't see any err or output files, but I do see the instance name as a folder, and then a nested json below it:

 ls /home/vanessa/.singularity/instances/sing/vanessa-ThinkPad-T460s/vanessa/salted_avocado_6987/salted_avocado_6987.json 

Is it just the case that this instance hasn't produced the files yet? The json file itself appears to have instance metadata, e.g.,

$ cat /home/vanessa/.singularity/instances/sing/vanessa-ThinkPad-T460s/vanessa/salted_avocado_6987/salted_avocado_6987.json 
{"pid":27110,"ppid":27109,"name":"salted_avocado_6987","user":"vanessa","image":"/home/vanessa/.singularity/cache/oci-tmp/1303dbf110c57f3edf68d9f5a16c082ec06c4cf7604831669faf2c712260b5a0/busybox_latest.sif","config":"eyJlbmdpbmV ...

For most software, I've seen it common to produce log files (even if empty) so that the user can find them regardless. Is that something that might be a good idea to do? With the (empty) log files, I can be certain that:

  • I found the right place
  • the instance is running (mostly) as expected

If I don't find them, however, I think:

  • Is this the right spot?
  • Was there some other error in generating them?

@vsoch - you should find a logs directory.... if I run a test instance on my machine called piran then they are at:

dave@piran~> ls .singularity/instances/logs/piran/dave/
test.err  test.out

Found it!

$ ls /home/vanessa/.singularity/instances/logs/vanessa-ThinkPad-T460s/vanessa/
salted_avocado_6987.err  salted_avocado_6987.out

Thanks @dctrud ! And we have this record in the issue for future users looking for it.

Thanks again for your help with this @dctrud and @cclerget - for some follow up /details, the reason I posted the issue is because I wanted to programatically be able to get logs for Singularity Python, newly added!

@vsoch As a follow up I'm opening an issue to display log paths with singularity instance list. Sorry, I misunderstood the original request.

Was this page helpful?
0 / 5 - 0 ratings