gitmyhub

pman

C++ ★ 12 updated 7y ago

Process management tool for UNIX systems using gRPC

Pman is a tool that starts, stops, and monitors other programs on Mac or Linux machines. Think of it as a caretaker for your background processes—it can automatically restart them if they crash, keep track of whether they're running, and let you control them all from the command line.

The way it works is pretty straightforward. You write a configuration file that lists all the programs you want pman to manage, along with details like what command to run, where to send their output logs, and whether to restart them automatically if they fail. When you start the pman daemon (the background service), it reads that config and takes over managing those programs. Then you use simple commands like pman start sample or pman stop all to control them. The daemon keeps running in the background, watching your programs and restarting them if they crash, depending on how you've configured it.

Under the hood, pman uses a technology called gRPC to communicate between the command-line interface you type into and the background daemon that's actually managing the processes. This is a fairly standard way to build tools like this, and it also means you could write your own custom programs in other languages that talk to pman's daemon if you needed to.

This kind of tool is useful for anyone running services or background tasks on a server who wants a simple, reliable way to manage them without having to write custom scripts or use more heavyweight solutions. A developer running multiple services locally, a DevOps person managing server processes, or anyone who's tired of manually restarting crashed programs would find this helpful. The README notes that it was inspired by Supervisor, a similar and more established tool, so if you're already familiar with that ecosystem, pman will feel familiar.