UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #16  
Old July 30th, 2004, 10:30 PM
kwik222 kwik222 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 77 kwik222 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 39 sec
Reputation Power: 5
i finally got mysql to work.
Now can some one help me how to find the parent mysql process and it children.

PHP Code:
 bash-2.05ps -efl grep mysql 
 8 S kwik  7923  7908  0  50 20        
?    121        22:21:34 pts/4    0:00 grep mysql
 8 S     root  6888     1  0  40 20        
?    133        ?   Jul 29 ?        0:00 /bin/sh bin/mysqld_safe --user=mysq
 8 T kwik7913  7908  0  40 20        
?    396          22:12:58 pts/4    0:00 mysql -u kwik -p kwik_db
 8 S    mysql  6912  6888  0  40 20        
?   5247        ?   Jul 29 ?        0:01 /usr/local/mysql/libexec/mysqld --

Reply With Quote
  #17  
Old August 2nd, 2004, 10:51 AM
faulkner faulkner is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 103 faulkner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Here is an example of how to read the 'ps' command.
Code:
                UID   PID  PPID  C    STIME TTY  TIME CMD
              root     0     0  0   Sep 18 ?    0:17 sched
              root     1     0  0   Sep 18 ?    0:54 /etc/init -
              root     2     0  0   Sep 18 ?    0:00 pageout
              root     3     0  0   Sep 18 ?    6:15 fsflush
              root   418     1  0   Sep 18 ?    0:00 /usr/lib/saf/sac -t 300
             daemon  156     1  0   Sep 18 ?    0:00 /usr/lib/nfs/statd


PID is the process ID.
PPID is the Parent process ID.

So you see under PID, there is a number of "1" and it is running the /etc/init process. Well, if you look for "1" under PPID, you will see /usr/lib/saf/sac and /usr/lib/nfs/statd. Those are child processes from /etc/init. The "1" in PPID tells you what the parent process is.

Yours is hard to read because of the php text box you put it in, but PID 6888 is parent and 6912 is its' child.

Reply With Quote
  #18  
Old August 2nd, 2004, 12:31 PM
kwik222 kwik222 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 77 kwik222 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 39 sec
Reputation Power: 5
Quote:
Originally Posted by faulkner
Here is an example of how to read the 'ps' command.
Code:
                UID   PID  PPID  C    STIME TTY  TIME CMD
              root     0     0  0   Sep 18 ?    0:17 sched
              root     1     0  0   Sep 18 ?    0:54 /etc/init -
              root     2     0  0   Sep 18 ?    0:00 pageout
              root     3     0  0   Sep 18 ?    6:15 fsflush
              root   418     1  0   Sep 18 ?    0:00 /usr/lib/saf/sac -t 300
             daemon  156     1  0   Sep 18 ?    0:00 /usr/lib/nfs/statd


PID is the process ID.
PPID is the Parent process ID.

So you see under PID, there is a number of "1" and it is running the /etc/init process. Well, if you look for "1" under PPID, you will see /usr/lib/saf/sac and /usr/lib/nfs/statd. Those are child processes from /etc/init. The "1" in PPID tells you what the parent process is.

Yours is hard to read because of the php text box you put it in, but PID 6888 is parent and 6912 is its' child.


Thanks that was a great help

Reply With Quote
  #19  
Old August 7th, 2004, 11:46 PM
totoyrox totoyrox is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 totoyrox User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to kill a process ID while running a script

Quote:
Originally Posted by stevengs
...

hi.. can you h elp me with this one..
i am running a script that will kill the PID of a certain process if it sees something wrong in the system..
for example: if i encountered an error while one process is running then my script should kill the PID of the said process..
how will i be able to grep the PID and kill it..
thanks very much..

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > how can i find the PIDs in MySql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway