Re: [systemd-devel] Regarding service rate limiting (systemd 237)

2022-07-22 Thread Ani A
Hi Michal, Found the issue, posting here to close this thread (and possibly help someone who might land in this situation!) The daemon which had issues with rate-limit, was invoking some `systemctl stop/start ` commands in its initialization! (probably this has some unwanted side effects?) If I

Re: [systemd-devel] Regarding service rate limiting (systemd 237)

2022-07-14 Thread Ani A
Hi Michal, >> systemctl show $UNIT | grep -E >> "StartLimit.*|InactiveExitTimestamp|ActiveEnterTimestamp" This is the output from unit show : InactiveExitTimestamp=Thu 2022-07-14 21:19:16 IST InactiveExitTimestampMonotonic=3181663063 ActiveEnterTimestamp=Thu 2022-07-14 21:19:16 IST Acti

Re: [systemd-devel] Regarding service rate limiting (systemd 237)

2022-07-12 Thread Ani A
Hi Michal, >Does your service crash later than the demo service terminates? Demo services work fine, the actual service is quite heavy and takes time to startup. > you may not reach the sufficient fail rate for start limit to kick I didn't get this part. Say the daemon takes 60s to startup and cr

[systemd-devel] Regarding service rate limiting (systemd 237)

2022-07-11 Thread Ani A
Hello, I am on Ubuntu 18.04 (systemd version 237), I have been trying to get service rate limiting to work, but not getting it right! I checked/tested many examples with the same directives that I use in my service files, they all work well (for e.g.) cat < /usr/local/bin/myservice.sh #!/usr/bin/

Re: [systemd-devel] Redirect logs from script to systemd's StandardOutput file

2020-03-14 Thread Ani A
Hi Andrei, > > echo "..." >> /var/log/my-.log > > > > It is not clear where you are using this command. In one of scripts that > are part of unit definition? In some other script that is run outside of > running unit? In interactive shell session? This command is called from the shell script w

[systemd-devel] Redirect logs from script to systemd's StandardOutput file

2020-03-12 Thread Ani A
Hello, I am on Ubuntu 18.04.2, and I have systemd version 237. I have some common tasks which need to happen prestart and poststop which I have moved to a script. All unit files look like: StandardOutput=file:/var/log/my-.log ExecStartPre=/path/to/helper.sh -t prestart -u ExecStopPos