LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-20-2009, 05:40 AM   #1
gsiva
LQ Newbie
 
Registered: Apr 2007
Posts: 22

Rep: Reputation: 0
difference between restarting a daemon and a service


Hi,

Can you please clear me the difference between restarting the daemon and the service. To be more clear,

/etc/init.d/mysqld restart
and
/etc/init.d/mysqld restart

What is the difference on this both two?.....
 
Old 07-20-2009, 05:50 AM   #2
whho
Member
 
Registered: Feb 2009
Posts: 38

Rep: Reputation: 16
Quote:
Originally Posted by gsiva View Post
Hi,

Can you please clear me the difference between restarting the daemon and the service. To be more clear,

/etc/init.d/mysqld restart
and
/etc/init.d/mysqld restart

What is the difference on this both two?.....

There is no difference between the 2, as far as the command lines you quoted here is concerned. They are exactly the same, aren't they?

Do you mean "service mysqld restart"? I think it depends on the distribution. You may take a look at /sbin/service anyway. It helps you so that you don't have to memorise the path "/etc/init.d" anyway, if it really helps at all.

Hope it helps!
 
Old 07-20-2009, 06:03 AM   #3
gsiva
LQ Newbie
 
Registered: Apr 2007
Posts: 22

Original Poster
Rep: Reputation: 0
Hi,

Thank you for your reply. ok, what is the main different between restarting the service via

service mysqld restart
and
/etc/init.d/mysqld restart

Do you find any difference on this, May be it depends on the distribution? I am sure that both the commands does not have any similar options.

And I am still not clear with my main doubt. ?>?????
 
Old 07-20-2009, 06:18 AM   #4
whho
Member
 
Registered: Feb 2009
Posts: 38

Rep: Reputation: 16
Quote:
Originally Posted by gsiva View Post
Hi,

Thank you for your reply. ok, what is the main different between restarting the service via

service mysqld restart
and
/etc/init.d/mysqld restart

Do you find any difference on this, May be it depends on the distribution? I am sure that both the commands does not have any similar options.

And I am still not clear with my main doubt. ?>?????
"service mysqld restart" is a wrapper which actually executes "/etc/init.d/mysqld restart". You may look at the source code /sbin/service

Some distribution like ubuntu doesn't have /sbin/service installed by default. I personally never use it. I always use "/etc/init.d/mysqld restart" which I think is more direct, don't you?
 
Old 07-20-2009, 06:39 AM   #5
gsiva
LQ Newbie
 
Registered: Apr 2007
Posts: 22

Original Poster
Rep: Reputation: 0
Yes I to use both of the commands to restart the service.

I am not in a clear state, with the difference in restarting the service with the daemon and the service under the daemon?....

I hope it makes sense ...
 
Old 07-20-2009, 08:16 PM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
There is no practical difference as far as mysqld is concerned.
The 'service' cmd simply enables users/script to not worry about exactly where the startup script happens to be located.
The service script can also be extended to do other custom actions for a given service that the default script will not take care of. Its basically a wrapper.
A daemon is simply an infinite loop running detached from the terminal. It won't respond to service cmds unless you've setup the init.d scripts to match.
 
Old 07-21-2009, 05:49 AM   #7
gsiva
LQ Newbie
 
Registered: Apr 2007
Posts: 22

Original Poster
Rep: Reputation: 0
Thank you Chris, I am quite clear now... Thank you for your update........
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Restarting dns service sandeepthug Linux - Newbie 8 12-17-2008 09:36 AM
Restarting the inetd daemon hypercondor Linux - Newbie 3 05-06-2008 03:09 PM
Enable daemon to run with service daemon start,etc baddah Programming 6 12-02-2007 05:51 PM
squid service not restarting celebnavin Linux - Server 1 11-22-2007 07:45 AM
How to make TCP server a daemon / service much like a dhcpd service? rajat Linux - Networking 1 05-22-2007 01:29 AM


All times are GMT -5. The time now is 03:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration