[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: How can I stop multiple slapd?



Hi,

Thanks a lot.
But I found ... m_@ 
...
the first slapd was killed successfully,
but the second ,the third...(which behind the first)still not be killed
success.

like this:

# ps -ef | grep slapd
root      2534     1  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2535  2534  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2536  2535  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2540     1  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2541  2540  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2542  2541  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2546  2497  0 19:14 pts/6    00:00:00 grep slapd
# kill -INT 2534
# ps -ef | grep slapd
root      2540     1  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2541  2540  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2542  2541  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2552  2497  0 19:15 pts/6    00:00:00 grep slapd

strace the 2534

# strace -p 2534
--- SIGINT (Interrupt) ---
time([1028715320])                      = 1028715320
getpid()                                = 2534
rt_sigaction(SIGPIPE, {0x400fed24, [], 0x4000000}, {SIG_IGN}, 8) = 0
send(3, "<167>Aug  7 19:15:20 slapd[2534]"..., 62, 0) = 62
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
write(5, "0", 1)                        = 1
--- SIGRT_0 (Real-time signal 0) ---


# kill -INT 2540
#  ps -ef | grep slapd
root      2541  2540  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2542  2541  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2540     1  0 19:14 ?        00:00:00 /usr/local/libexec/slapd
root      2555  2497  0 19:16 pts/6    00:00:00 grep slapd

# strace -p 2540
--- SIGINT (Interrupt) ---
time([1028715373])                      = 1028715373
getpid()                                = 2540
rt_sigaction(SIGPIPE, {0x400fed24, [], 0x4000000}, {SIG_IGN}, 8) = 0
send(3, "<167>Aug  7 19:16:13 slapd[2540]"..., 62, 0) = 62
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
write(5, "0", 1)                        = 1
sigreturn()                             = ? (mask now [])
rt_sigsuspend([]

and now I input "killall -9 slapd" the all stoped.

like this:
rt_sigsuspend([] <unfinished ...>
+++ killed by SIGKILL +++
#

I added slapd.conf like this:

pidfile         /usr/local/var/slapd.pid
pid='cat /usr/local/etc/openldap/slapd.conf |grep ".pid"| sed -e "s/pidfile//g"|
sed -e "s/ //g"'
pid='cat $pid'
kill -INT $pid
argsfile        /usr/local/var/slapd.args

Did I make any mistake?

I will send the mail to list.

Best regards.

P.Zhang



>Hi,
>
>please send your mail to the list too,
>so other people also know that it works
>and that the thread is finished now ...
>
>greets Harry
>
>>ZhangPu wrote:
>> 
>> I added the slapd.conf.
>> And killed them success.
>> Thank you very much.
>> Best regards
>> 
>> P.Zhang