Supervisor activates some child processes.

I configured each of them like this:


One of the processes is producing a lot of screen output that I would like to read in real time during tests: 5 lines are printed every second.

They are now logged in stdout.log.

I thought to read stdout.log with

watch -0.1 tail /XXXXX/stdout.log

but I see that it is NOT updated upon receiving each line: the log content is probably cached till it reaches some predefined size before being saved to file.

I don't need to keep the stdout for future reference.

Is there a possibility to set Supervisor to continuously update stdout.log?

Or, even better to avoid damaging the disk on the long run, is there a possibility to print back the last X lines of stdout WITHOUT saving it to stdout.log?


If you want to avoid damaging the disk (which I hadn't seen someone worry about for ages), you can create a ramdisk to direct those log files to like this:

mkdir /var/log/tmplogs
mount -t tmpfs -o size=5m tmpfs /var/log/tmplogs

Or in fstab format:

tmpfs       /var/log/tmplogs   nodev,nosuid,noexec,nodiratime,size=5M 0 0

And then use this /var/log/tmplogs directory as destination for those files.

This won't solve any log buffering problem that said. But usually the delay is caused by your command buffering its output (it may behave differently with and without tty) and not by supervisord, you can confirm that following the exemple in supervisord's issue 803.

Is there a possibility to set Supervisor to continuously update stdout.log?

I'd say no, as it is already supposed to write logs as soon as received and that mostly this is not a supervisord problem, but without the command launched there's no way to tell if you're hitting a bug or if it's normal by your command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.