From: Giovanni T. <gt...@li...> - 2011-03-03 10:08:40
|
Hi, I would like to configure a monitoring program for my MooseFS components, and I was searching for pid files for mfsmaster, mfsmetalogger and mfschunkserver. Unfortunately, I didn't find anything both in /var/run/mfs (although the folder it's created and chowned in the default init.d script) and /var/lib/mfs (only empty hidden lock files are present). I also tried to add -m --pidfile to start-stop-daemon on my init.d script, but it probably forks on startup from main process because I get a wrong PID in it. Thanks. -- Giovanni Toraldo http://www.libersoft.it/ |
From: Michal B. <mic...@ge...> - 2011-03-03 10:20:59
|
Hi! Please have a look at these two answers: http://www.moosefs.org/moosefs-faq.html#master-pid http://www.moosefs.org/moosefs-faq.html#master-online Regards Michal -----Original Message----- From: Giovanni Toraldo [mailto:gt...@li...] Sent: Thursday, March 03, 2011 11:08 AM To: moo...@li... Subject: [Moosefs-users] mfs* pid files? Hi, I would like to configure a monitoring program for my MooseFS components, and I was searching for pid files for mfsmaster, mfsmetalogger and mfschunkserver. Unfortunately, I didn't find anything both in /var/run/mfs (although the folder it's created and chowned in the default init.d script) and /var/lib/mfs (only empty hidden lock files are present). I also tried to add -m --pidfile to start-stop-daemon on my init.d script, but it probably forks on startup from main process because I get a wrong PID in it. Thanks. -- Giovanni Toraldo http://www.libersoft.it/ ---------------------------------------------------------------------------- -- Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ moosefs-users mailing list moo...@li... https://lists.sourceforge.net/lists/listinfo/moosefs-users |
From: Giovanni T. <gt...@li...> - 2011-03-03 10:58:28
|
Il 03/03/2011 11:20, Michal Borychowski ha scritto: > Hi! > > Please have a look at these two answers: > http://www.moosefs.org/moosefs-faq.html#master-pid Uh, there isn't something more scripting friendly? :P Every daemon that forks in background should write a PID somewhere, why mfs did not, even inside the lock file? Thanks. -- Giovanni Toraldo http://www.libersoft.it/ |
From: Thomas S H. <tha...@gm...> - 2011-03-03 15:56:26
|
Here is my Arch Linux init script, I am just using the pidof application to detect the pid, http://projects.archlinux.org/svntogit/community.git/tree/mfs/trunk/mfsmaster I think that using ps or pidof is a far more reliable way to detect if a process is running, since often times a crashed daemon can leave behind the pid file I hope this helps! On Thu, Mar 3, 2011 at 3:58 AM, Giovanni Toraldo <gt...@li...> wrote: > Il 03/03/2011 11:20, Michal Borychowski ha scritto: > > Hi! > > > > Please have a look at these two answers: > > http://www.moosefs.org/moosefs-faq.html#master-pid > > Uh, there isn't something more scripting friendly? :P > > Every daemon that forks in background should write a PID somewhere, why > mfs did not, even inside the lock file? > > Thanks. > > -- > Giovanni Toraldo > http://www.libersoft.it/ > > > ------------------------------------------------------------------------------ > Free Software Download: Index, Search & Analyze Logs and other IT data in > Real-Time with Splunk. Collect, index and harness all the fast moving IT > data > generated by your applications, servers and devices whether physical, > virtual > or in the cloud. Deliver compliance at lower cost and gain new business > insights. http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > moosefs-users mailing list > moo...@li... > https://lists.sourceforge.net/lists/listinfo/moosefs-users > |
From: Giovanni T. <gt...@li...> - 2011-03-04 10:46:28
Attachments:
pidof.patch
|
Hi, thanks to everyone, I've modified Debian defaults scripts to make use of pidof for saving in /var/run/mfs/*.pid the pidfiles of mfs processes. I'm attaching the diff, maybe could be included in default mfs scripts. Bye. -- Giovanni Toraldo http://www.libersoft.it/ |
From: jose m. <let...@us...> - 2011-03-03 16:57:05
|
El jue, 03-03-2011 a las 11:58 +0100, Giovanni Toraldo escribió: > Il 03/03/2011 11:20, Michal Borychowski ha scritto: > > Hi! > > > > Please have a look at these two answers: > > http://www.moosefs.org/moosefs-faq.html#master-pid > > Uh, there isn't something more scripting friendly? :P > > Every daemon that forks in background should write a PID somewhere, why > mfs did not, even inside the lock file? > > Thanks. > * Use webmin, alive servers module is friendly for centralized alerting system, and syslog errors, write error, read error, over mail, mobil, with google calendar, other provider ...... * Form the mailing of the alert after at least 2+ cross-checks of the error, in order to avoid to alert circumstantial errors. |
From: Ricardo J. B. <ric...@da...> - 2011-03-03 22:22:46
|
El Jue 03 Marzo 2011, Giovanni Toraldo escribió: > Il 03/03/2011 11:20, Michal Borychowski ha scritto: > > Hi! > > > > Please have a look at these two answers: > > http://www.moosefs.org/moosefs-faq.html#master-pid > > Uh, there isn't something more scripting friendly? :P Quick and dirty if you're on Linux (watch out for line-wrapping): lsof -X -n | grep $(awk '/^DATA_PATH/ {print $NF}' /etc/mfs/mfsmaster.cfg)/.mfsmaster.lock | awk '{print $2}' > Every daemon that forks in background should write a PID somewhere, why > mfs did not, even inside the lock file? > > Thanks. Cheers, -- Ricardo J. Barberis Senior SysAdmin / ITI Dattatec.com :: Soluciones de Web Hosting Tu Hosting hecho Simple! ------------------------------------------ Nota de confidencialidad: Este mensaje y los archivos adjuntos al mismo son confidenciales, de uso exclusivo para el destinatario del mismo. La divulgación y/o uso del mismo sin autorización por parte de Dattatec.com queda prohibida. Dattatec.com no se hace responsable del mensaje por la falsificación y/o alteración del mismo. De no ser Ud. el destinatario del mismo y lo ha recibido por error, por favor notifique al remitente y elimínelo de su sistema. Confidentiality Note: This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited by Dattatec.com. Dattatec.com shall not be liable for the message if altered or falsified. If you are not the intended addressee of this message, please cancel it immediately and inform the sender. Nota de Confidencialidade: Esta mensagem e seus eventuais anexos podem conter dados confidenciais ou privilegiados. Se você os recebeu por engano ou não é um dos destinatários aos quais ela foi endereçada, por favor destrua-a e a todos os seus eventuais anexos ou copias realizadas, imediatamente. É proibida a retenção, distribuição, divulgação ou utilização de quaisquer informações aqui contidas. Por favor, informe-nos sobre o recebimento indevido desta mensagem, retornando-a para o autor. |
From: Ricardo J. B. <ric...@da...> - 2011-03-03 22:26:55
|
El Jue 03 Marzo 2011, Ricardo J. Barberis escribió: > El Jue 03 Marzo 2011, Giovanni Toraldo escribió: > > Il 03/03/2011 11:20, Michal Borychowski ha scritto: > > > Hi! > > > > > > Please have a look at these two answers: > > > http://www.moosefs.org/moosefs-faq.html#master-pid > > > > Uh, there isn't something more scripting friendly? :P > > Quick and dirty if you're on Linux (watch out for line-wrapping): > > lsof -X -n | grep $(awk '/^DATA_PATH/ {print $NF}' /etc/mfs/mfsmaster.cfg)/.mfsmaster.lock | awk '{print $2}' OK, now the not-so-dirty way ;) lsof -X -n -t $(awk '/^DATA_PATH/ {print $NF"/.mfsmaster.lock"}' /etc/mfs/mfsmaster.cfg) > > Every daemon that forks in background should write a PID somewhere, why > > mfs did not, even inside the lock file? > > > > Thanks. > > Cheers, Cheers again :) -- Ricardo J. Barberis Senior SysAdmin / ITI Dattatec.com :: Soluciones de Web Hosting Tu Hosting hecho Simple! |
From: Ricardo J. B. <ric...@da...> - 2011-03-03 22:34:01
|
El Jue 03 Marzo 2011, Thomas S Hatch escribió: > Thats some fine lsof skills you have there, Not really, I'm a quick reader and skimmed through 'man lsof' (check the second version in another mail!!). > although I am going to argue that pidof is simpler, and it should be less > intrusive, since lsof needs to read in the table of open file descriptors: > > pidof -o %PPID -x /usr/sbin/mfsmaster Well, acording to time your pidof version is consistenly three times faster than my last lsof version, so this one wins :) In my defense, I said it was a dirty way!! :P Cheers. > On Thu, Mar 3, 2011 at 3:22 PM, Ricardo J. Barberis < > > ric...@da...> wrote: > > El Jue 03 Marzo 2011, Giovanni Toraldo escribió: > > > Il 03/03/2011 11:20, Michal Borychowski ha scritto: > > > > Hi! > > > > > > > > Please have a look at these two answers: > > > > http://www.moosefs.org/moosefs-faq.html#master-pid > > > > > > Uh, there isn't something more scripting friendly? :P > > > > Quick and dirty if you're on Linux (watch out for line-wrapping): > > > > lsof -X -n | grep $(awk '/^DATA_PATH/ {print $NF}' > > /etc/mfs/mfsmaster.cfg)/.mfsmaster.lock | awk '{print $2}' > > > > > Every daemon that forks in background should write a PID somewhere, why > > > mfs did not, even inside the lock file? -- Ricardo J. Barberis Senior SysAdmin / ITI Dattatec.com :: Soluciones de Web Hosting Tu Hosting hecho Simple! |