Is it possible to see the outputs of tasks, that are schedule with "at" in real-time? Say, I want to see the values of my loss function as I train my network.
Asked
Active
Viewed 779 times
1 Answers
2
From my post on Super User, obtain the PID of the at job and then you could see where at is saving the output:
$ at now
warning: commands will be executed using /bin/sh
at> sleep 10m
at> <EOT>
job 7 at Sat Jan 7 20:18:00 2017
$ pgrep sleep
7582
$ ls -l /proc/7582/fd
total 0
lr-x------ 1 muru muru 64 Jan 7 20:19 0 -> /var/spool/cron/atjobs/a0000701795998 (deleted)
lrwx------ 1 muru muru 64 Jan 7 20:19 1 -> /var/spool/cron/atspool/a0000701795998
lrwx------ 1 muru muru 64 Jan 7 20:19 2 -> /var/spool/cron/atspool/a0000701795998
As you can see, the output is saved to a temp file, which you can now check:
$ sudo tail -f /var/spool/cron/atspool/a0000701795998
Subject: Output from your job 7
To: muru
You need sudo because the containing directory is not world-accessible (at least on Ubuntu 14.04):
$ sudo namei -lx /var/spool/cron/atspool/a0000701795998
f: /var/spool/cron/atspool/a0000701795998
Drwxr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root spool
drwxr-xr-x root root cron
drwxrwx--T daemon daemon atspool
-rw------- muru muru a0000701795998
muru
- 207,228