[c3-users] [srt-contact] How to start program as daemon on nodes by cexec (fwd)

Thomas Naughton naughtont at ornl.gov
Thu Feb 2 17:37:06 EST 2012



  _________________________________________________________________________
   Thomas Naughton                                      naughtont at ornl.gov
   Research Associate                                   (865) 576-4184


---------- Forwarded message ----------
Date: Thu, 2 Feb 2012 17:35:43 -0500 (EST)
From: Thomas Naughton <naughtont at ornl.gov>
To: Ning Shi <nshi_nb at hotmail.com>
Cc: "srt-contact at ornl.gov" <srt-contact at ornl.gov>
Subject: Re: [srt-contact] How to start program as daemon on nodes by cexec

Hi Ning,

I'm not familiar with what the 'mysqld' daemon does by default w.r.t.
daemonizing itself.  However, I would expect it to have an init script for
use with startup via 'init.d'.

There are not daemonizing options to cexec, but you could use one of the
utilities that come with most distros for init scripts.  I did a quick test
on my Debian/Ubuntu cluster using '/sbin/start-stop-daemon', which support
the "--background" option daemonizing naive applications.

   cexec :1 /sbin/start-stop-daemon --background --start --exec sleep2048

I would expect mysqld to have some option that support this background
startup, but I'm not familiar its config.

I hope that helps.
--tjn

  _________________________________________________________________________
   Thomas Naughton                                      naughtont at ornl.gov
   Research Associate                                   (865) 576-4184


On Wed, 1 Feb 2012, Ning Shi wrote:

> Hi,
>     I am using c3-5.1.2 with my database cluster (mysql).
>     OS environment is RHEL5.6 x86_64
>
>     I want to start mysqld on each nodes in cluster by cexec on head nodes.
> The cexec command is:
>     "cexec gn: "nohup /opt/mysql/bin/mysqld &"
>
>     But the command cann't return as normal command such as "ls".
>
>     How can I start mysqld as a daemon by cexec?
> 
> Best Regards
> 
> Shining.
>


More information about the c3-users mailing list