1

As a developer I'm working on a multi-process/service application. I'm looking for a tool, that can start/stop, perhaps monitor my services in the user space.

I found process monitoring tools, but all seem to be targeting the OS level. Monit e.g. might be good for my usecase, but it seems still a bit heavyweight. So is systemd.

Expected functionality:

  • give a tool to developers to manage all the application processes they work on
  • ideally store script in git with the application source code (this is not a must)
  • list services in a config file
  • mytool all start -> start all services within project root e.g. /home/myname/workspace/project
  • create PID file for each service
  • redirect stdout to a log file
  • mytool foo stop or mytool foobar restart
  • optinally: continue to run as a daemon, and be able to monitor / alert for dead processes with some rules

So basically what the services command does in Ubuntu, but manage simple user space command.

1

http://lxinitd.tp23.org/ might fit that purpose. It was designed it as an alternative for systemd for use in LXC containers. It has simple service management, when run as /sbin/init it reads just /etc/rc.local with a list of services.
It can be run as a user space application using a different configuration file. It only starts & restarts failed services, it monitors their pids, (either child's pid or reading a pid file) if they are killed restarts them.

e.g. create a script like this and execute it

#!/bin/lxinitd

service /run/somed.pid /sbin/somed
service /run/nginx.pid /sbin/nginx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.