Process ID changing ubruptly while killing mysqld
Hi All,
I tried to stop mysqld deamon. It failed Code:
[zabbix@CDCTGIMCLSA ~]$ sudo /etc/init.d/mysqld stop Code:
[zabbix@CDCTGIMCLSA ~]$ ps -e | grep mysql Code:
sudo kill -9 `pgrep mysqld` |
Check if mysqld_safe is the parent
Code:
ps -ef|grep mysql |
Thanks for your reply chrism01.
Here mysqld seems to be the parent as mysqld PID 17705 < mysqld_safe PID 23163 Code:
[308718@CDCTGIMCLSB ~]$ sudo /sbin/service mysqld stop |
Quote:
run pstree | grep mysql and you will find parent and child process Code:
debian:~# pstree | grep mysql Code:
# ps -e | grep mysql |
Thanks sem007,
Here mysqld_safe seems to be the parenet with pstree command Code:
[zabbix@CDCTGIMCLSA ~]$ sudo pstree | grep mysq Code:
/etc/init.d/mysqld stop |
Here's a thought:
Code:
killall /etc/init.d/mysqld |
just run pkill command to kill mysqld
Code:
[root@localhost ~]# ps aux | grep mysql Quote:
Code:
[root@localhost ~]# ps -e | grep mysql [EDIT] when i run below command it works killall mysqld |
@sem007,
Yeah I got it how this pkill works. But my question is, does killing a process with pkill or kill cause abrupt deamon stop ? Is it the step taken when the deamon fails to stop ? @ Kenny_Strawn This gives error.. Code:
[root@localhost ~]# killall /etc/init.d/mysqld |
Quote:
some lines from /etc/init.d/mysqld script Code:
stop(){ HTH |
You should use ps -ef (full format) instead of ps -e. I'm pretty sure you will recognize that: mysqld_safe is parent process of mysqld:
Code:
# ps -ef | grep mysqld |
Exactly, the relative values of the pids is irrelevant, the system pids wrap around after 4 digits...
|
@quanta, @chrism01, @sem007
Thank you for your advices. |
All times are GMT -5. The time now is 12:03 AM. |