librelist archives

« back to archive

[RFC] New command line commands

[RFC] New command line commands

Loic d'Anterroches
2011-07-05 @ 09:21

as discussed before, I am creating the new command line commands. They
will be incompatible with the previous, so this is a backward
compatibility issue.

The goal is to push the process management out of Photon to have more

1. By default, nothing will daemonize, no pid file created.
2. When going as daemon, a pid file is created.
3. Hit CTL+C to stop when run in forground.
4. Send SIGTTERM to the process to stop cleaning when daemon.

Start your handler:
$ hnu start [--daemonize [--pid-file=/path/]]

Start a task:
$ hnu task start [--daemonize [--pid-file=/path/]] <taskname>

You will be able to enable the smart protocol, the smart protocol is
just a zeromq sink where the handler or the task can publish stats on a
regular basis.

$ hn start --smart-port=tcp:// --smart-interval=60

This will enable smart reporting of running stats (memory, average
polling waiting time, etc.) every 60s to the collector on port

By default, smart is not enabled.

If you do not have particular remarks, you can expect to find this in
the develop branch by the end of the day.