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:
  #1  
Old September 19th, 2005, 01:00 PM
NoPeaceForJezmu NoPeaceForJezmu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 2 NoPeaceForJezmu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 41 sec
Reputation Power: 0
Unix Command to See if mysqld is running?

Is there a way using a UNIX command to tell if the mysqld daemon is running that simply returns a boolean?

I know you can use the ps command and then parse it, but I am wondering if there is a simpler way.

Thanks for any help,

-Marc

Reply With Quote
  #2  
Old September 19th, 2005, 03:13 PM
Vilo Vilo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 6 Vilo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 26 sec
Reputation Power: 0
ps -ef | grep mysqld
or when do you want to test it automatically in any script:
ps -ef | grep -q mysqld
if [ $? -eq 0 ]
then
echo "MySql is not running ..."
# do something
else
echo "MySql is already running."
fi

Reply With Quote
  #3  
Old September 19th, 2005, 03:38 PM
NoPeaceForJezmu NoPeaceForJezmu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 2 NoPeaceForJezmu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 41 sec
Reputation Power: 0
Thank you

Thanks very much...

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Unix Command to See if mysqld is running?


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 3 hosted by Hostway
Stay green...Green IT