[Planetlab-users] Configuring a service for automatic startup

David E. Eisenstat deisenst at CS.Princeton.EDU
Mon Aug 20 11:10:27 EDT 2007


On Mon, 20 Aug 2007, Adrian Suter wrote:

> Hello everybody

Hi Adrian,

> I'd like to implement a long-running service that should start 
> automatically after a reboot of the planet-lab node. I've read and 
> reread the subsection 4.3 of the user guide on 
> http://www.planet-lab.org/doc/guides/user but I get always the message
>
> *snip* bash: chkconfig: command not found *snap*

chkconfig lives in /sbin, which is not on the default PATH. Try 
/sbin/chkconfig instead.

> I would like to start up a perl script. Has anyone experience in this 
> kind of stuff? Is it possible to run an infinite loop (i.e. while(1) 
> {...} ) such that the script never stops, or are there some 
> admin-scripts that abort infinite runing perl scripts?

Yes, it is possible to run forever. Slices are killed only when they are 
the biggest consumer of memory on a box that's almost out OR when they 
expire.

> Today I have edited the file "/etc/rc.d/rc.local" but as the node did 
> not reboot yet, I can't say if this is working or not.

You can ask Node Manager to start your slice as if the node were starting 
up. NM supplies an XML-RPC interface on port 812, and the call is

Start('your_slicename')

In Python this can be accomplished by

import xmlrpclib 
xmlrpclib.ServerProxy('http://localhost:812/').Start('your_slicename')

-David



More information about the Users mailing list