Re: [Dorset] stdout and stderr redirection weirdness

2021-03-08 Thread Hamish McIntyre-Bhatty
Thanks, this all worked fine and I figured out the issue - I needed to use Python's -u option to disable buffering. The NAS box now logs everything to syslog so hopefully the next time python crashes I'll know why. Hamish On 18/02/2021 17:29, Hamish McIntyre-Bhatty wrote: Thanks, this all

Re: [Dorset] stdout and stderr redirection weirdness

2021-02-18 Thread Hamish McIntyre-Bhatty
Thanks, this all sounds like it'll be a very good idea. syslog is attractive, but I'm not sure this even has syslog. Or maybe I need to turn it on, I remember hearing something about it anyway. I'll figure it out and get back to you. At the moment I'm adding indexes to the database so it'll have

Re: [Dorset] stdout and stderr redirection weirdness

2021-02-18 Thread Keith Edmunds
OK, this is what I would do. Check whether logger (typically /usr/bin/loggger) is installed on the system. If it is, create a script that runs at boot as follows: #!/bin/ash [if /bin/bash is available, I'd use that] /usr/bin/logger -t xyzzy "SHELL=$SHELL" /usr/bin/logger -t xyzzy "me=$(whoami)"

Re: [Dorset] stdout and stderr redirection weirdness

2021-02-18 Thread Hamish McIntyre-Bhatty
On 18/02/2021 15:34, Keith Edmunds wrote: >> I'm finding that during startup piping and redirecting output doesn't >> work. This is using the ash shell from busybox. > By "during startup" do you mean system startup or your process startup? During system startup (that's the only way to get it

Re: [Dorset] stdout and stderr redirection weirdness

2021-02-18 Thread Keith Edmunds
> I'm finding that during startup piping and redirecting output doesn't > work. This is using the ash shell from busybox. By "during startup" do you mean system startup or your process startup? -- Linux Tips: https://www.tiger-computing.co.uk/category/techtips/ -- Next meeting: Online,

[Dorset] stdout and stderr redirection weirdness

2021-02-18 Thread Hamish McIntyre-Bhatty
Hi all, I have yet another query relating to the NAS box. I suspect this issue is once again due to the weird setup and ancient software. I'm finding that during startup piping and redirecting output doesn't work. This is using the ash shell from busybox. I have the following in my script: