[rrd-users] RRDTool as a server in Solaris

Jose Ignacio Gil Jaldo naranja82 at gmail.com
Wed Dec 1 10:15:12 CET 2010


Hi Steve,

I will try what you suggest but there is a couple of things that are strange
to me in what you say.

1. I completely agree with except for the fact that when I run in
commandline: rrdtool - <directory> the process does not end (it waits until
I type commands). That's why it's so strange to me that the process exists
inmediately.
2. I know that stop method is not right (as I recognized in my first post)
but as I am not very proficient in Solaris/SMF/RRDTOOL I was trying to solve
the problem incrementally. So first of all I wanted to start the process.

I will try 1 option and see how it goes.

Thanks

On Wed, Dec 1, 2010 at 2:50 AM, Steve Shipway <s.shipway at auckland.ac.nz>wrote:

> When you define a normal solaris SMF service, it expects to be given a
> command that starts the process, and this process continue to live until
> killed by the kill command.
>
>
>
> Your ‘start’ method is just ‘rrdtool’, which will exit on finishing the
> commands – which is what happens.
>
> Your ‘stop’ method has ‘blabla’ instead of the process ID (which you cannot
> determine anyway).
>
>
>
> When you want to run rrdtool as a service, you actually should do it via
> xinetd, which will spawn a separate handler per connection.
>
>
>
> To make it work with solaris, you have two options:
>
>
>
> 1.       Use the inetd method; I’m not an expert with SMF, but I know you
> can (somehow) define inetd-type handlers via SMF as well using a differrent
> syntax
>
> 2.       Use rrdcached instead of rrdtool.  This is probably a better
> solution, though you might want to get the trunk version of rrdtool 1.4.x in
> order to have the maximum possible support for the various rrdtool
> commands.  The rrdcached command will work nicely with SMF as it is a single
> daemon and will output the PID to a separate file which you can then use in
> your kill command.
>
>
>
> I would use option (2) but your circumstances might mean (1) is a better
> option for you.
>
>
>
> Steve
>
>
> ------------------------------
>
> *Steve Shipway*
>
> ITS Unix Services Design Lead
>
> University of Auckland, New Zealand
>
> Floor 1, 58 Symonds Street, Auckland
>
> *Phone: +64 (0)9 3737599 ext 86487*
>
> *DDI: +64 (0)9 924 6487*
>
> *Mobile: +64 (0)21 753 189*
>
> *Email: s.shipway at auckland.ac.nz*
>
> P Please consider the environment before printing this e-mail
>
> * *
>
>
>
> *From:* rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch[mailto:
> rrd-users-bounces+s.shipway <rrd-users-bounces%2Bs.shipway>=auckland.ac.nz
> @lists.oetiker.ch] *On Behalf Of *Jose Ignacio Gil Jaldo
> *Sent:* Wednesday, 1 December 2010 1:04 a.m.
> *To:* rrd-users at lists.oetiker.ch
> *Subject:* [rrd-users] RRDTool as a server in Solaris
>
>
>
> Hi,
>
> I'm very new to Solaris and to rrdtool, but in my company we've been using
> rrdtool in linux without any problem.
>
> Anyway, I'm trying deploy it in a solaris 10 machine and I am not being
> able to start it as a server.
>
> I have created a SMF to start it but it seems to go down. The SMF is:
>
> <?xml version='1.0'?>
> <!DOCTYPE service_bundle SYSTEM
> '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
> <service_bundle type='manifest' name='export'>
>   <service name='rrdtool' type='service' version='0'>
>     <create_default_instance enabled='true'/>
>     <single_instance/>
>  <instance name='rrdtool' enabled='false'>
>                 <exec_method
>                         type='method'
>                         name='start'
>                         exec='/opt/csw/bin/rrdtool - <Directory>'
>                         timeout_seconds='0'>
>                 </exec_method>
>                 <exec_method
>                         type='method'
>                         name='stop'
>                         exec='kill -9 blabla'
>                         timeout_seconds='30'>
>                 </exec_method>
>         </instance>
>   </service>
> </service_bundle>
>
> where <Directory> is the place where I want to leave the statistics.
> However, when I try to start it using: svcadm enable rrdtool:rrdtool
>
> I get the following log:
> /usr/bin/kill[8]: blabla: Arguments must be %job or process ids
> [ Nov 30 11:42:55 Method "stop" exited with status 1 ]
> [ Nov 30 11:50:44 Leaving maintenance because disable requested. ]
> [ Nov 30 11:50:44 Disabled. ]
> [ Nov 30 11:50:47 Enabled. ]
> [ Nov 30 11:50:47 Executing start method ("/opt/csw/bin/rrdtool -
> /opt/synchronica/synchronica/demo-server/statistics") ]
> [ Nov 30 11:50:47 Method "start" exited with status 0 ]
> [ Nov 30 11:50:47 Stopping because all processes in service exited. ]
> [ Nov 30 11:50:47 Executing stop method ("kill -9 blabla") ]
> /usr/bin/kill[8]: blabla: Arguments must be %job or process ids
> [ Nov 30 11:50:47 Method "stop" exited with status 1 ]
> [ Nov 30 11:50:47 Executing stop method ("kill -9 blabla") ]
> /usr/bin/kill[8]: blabla: Arguments must be %job or process ids
> [ Nov 30 11:50:47 Method "stop" exited with status 1 ]
> [ Nov 30 11:50:47 Executing stop method ("kill -9 blabla") ]
> /usr/bin/kill[8]: blabla: Arguments must be %job or process ids
> [ Nov 30 11:50:47 Method "stop" exited with status 1 ]
>
> Also if I run that command in command-line it does not end inmediately and
> I can run commands.
>
> I know that kill -9 blablabla is not correct but it should not be executed
> (it is executed because the command ends). Any clue about the problem cause?
> Do I have to register something else anywhere?
>
> Thanks a lot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20101201/20302b61/attachment.htm 


More information about the rrd-users mailing list