Re: [systemd-devel] systemctl how to stop a service

2016-05-16 Thread Christian Boltz
Hello, Am Samstag, 14. Mai 2016, 16:55:11 CEST schrieb liuxueping: > I have a test in arm64,my test case try to start/stop a ntp service > frequently,like that: > > #!/bin/bash > i=0 > while [ 1 ];do > echo "$((i++))" > systemctl restart ntpd & > kill -9 $! You are

Re: [systemd-devel] systemctl how to stop a service

2016-05-16 Thread Andrei Borzenkov
16.05.2016 13:28, Reindl Harald пишет: > > > Am 16.05.2016 um 08:58 schrieb Andrei Borzenkov: >> 16.05.2016 09:01, liuxueping пишет: >>> Do you mean to say that systemctl will return a value when the process >>> is still at terminate gracefully? >>> >> >> By default systemctl should wait for

Re: [systemd-devel] systemctl how to stop a service

2016-05-16 Thread Reindl Harald
Am 16.05.2016 um 08:58 schrieb Andrei Borzenkov: 16.05.2016 09:01, liuxueping пишет: Do you mean to say that systemctl will return a value when the process is still at terminate gracefully? By default systemctl should wait for stop job to complete. What may happen - if it takes more time

Re: [systemd-devel] systemctl how to stop a service

2016-05-16 Thread liuxueping
If it is as you say,it takes more time than JobTimeout,job is canceled while systemd is still trying to terminate unit,then the return value should not be 0. 在 2016/5/16 14:58, Andrei Borzenkov 写道: 16.05.2016 09:01, liuxueping пишет: Do you mean to say that systemctl will return a value

Re: [systemd-devel] systemctl how to stop a service

2016-05-16 Thread Andrei Borzenkov
16.05.2016 09:01, liuxueping пишет: > Do you mean to say that systemctl will return a value when the process > is still at terminate gracefully? > By default systemctl should wait for stop job to complete. What may happen - if it takes more time than JobTimeout, job is canceled while systemd is

Re: [systemd-devel] systemctl how to stop a service

2016-05-16 Thread liuxueping
Do you mean to say that systemctl will return a value when the process is still at terminate gracefully? 在 2016/5/14 18:32, Reindl Harald 写道: Am 14.05.2016 um 10:55 schrieb liuxueping: The result of "ps aux" before sleep 5 shows: root 6698 0.0 0.0 0 0 ?Ds 08:45

Re: [systemd-devel] systemctl how to stop a service

2016-05-14 Thread Reindl Harald
Am 14.05.2016 um 10:55 schrieb liuxueping: The result of "ps aux" before sleep 5 shows: root 6698 0.0 0.0 0 0 ?Ds 08:45 0:00 [ntpd] After 5 seconds,there is no ntpd process in system. the stop status is 0,the execution of the stop command is successful,the PID of

[systemd-devel] systemctl how to stop a service

2016-05-14 Thread liuxueping
Hi: I have a test in arm64,my test case try to start/stop a ntp service frequently,like that: #!/bin/bash i=0 while [ 1 ];do echo "$((i++))" systemctl restart ntpd & kill -9 $! sleep 10 systemctl stop ntpd echo "stop status:$?" systemctl start ntpd ps aux >> file