Earlier quoted context omitted.
I built the tool simply to improve developer experience. Run `systemctl list-units` and the console is flooded with a wall of services, most of them are not mine. Run `ser status` and I only see the ones that I created. The activity state, CPU and memory usage is displayed so I don't need to run a separate command. hp@hp:~$ ser status +-----+-------------+----------+----------------+-------+--------+ | pid | name | a…
> The activity state, CPU and memory usage is displayed so I don't need to run a separate command. https://github.com/crazy-canux/awesome-monitoring Check out Netadata + Nagios https://news.ycombinator.com/item?id=36944388 Check out this as well systemctl list-units | grep my-service
Show HN: Servicer, pm2 alternative built on Rust and systemd
31–40 of 41 posts
Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#32As someone who knows systemd very well, my team of Mac-based devs did appreciate when I made something like this. I used a different framework, a precursor to Tome: https://github.com/toumorokoshi/tome Using this, I was able to create a very focused tool with few commands and simple docs, which supported things like: - my-cli help - my-cli start - my-cli stop - my-cli restart - my-cli status Sometimes the commands we…
I don't have a solution for managing services though and that has been the one pain point after moving away from containerized dev envs. The cross platform network and service management you get with docker is pretty ideal. devenv.sh is on to something with their 'services' feature but it doesn't quiet fit the bill for us yet.
Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#33Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#34Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#35You might like systemd's run command, it's a hidden little gem that basically does what your tool does--it turns some CLI params into a transient service file: https://www.freedesktop.org/software/systemd/man/systemd-run... I dunno if this was a more recent addition to systemd, but it's pretty slick in my limited use. I use it for exactly the scenarios you mention, like quickly spinning up some local user services du…
TIL, Pretty cool! But I suppose there isn't away to run these transient services as boot because they are definition gone after they have stopped?
Generally results of -run services can be captured through journalctl, so it's possible to run systemctl show on them and get the config.
Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#36As someone who knows systemd very well, my team of Mac-based devs did appreciate when I made something like this. I used a different framework, a precursor to Tome: https://github.com/toumorokoshi/tome Using this, I was able to create a very focused tool with few commands and simple docs, which supported things like: - my-cli help - my-cli start - my-cli stop - my-cli restart - my-cli status Sometimes the commands we…
Wow, never seen tome before but I built almost the exact same thing at my current company with the only difference being all the sub-commands run in a nix environment. Being able to share bash scripts in our monorepo by just creating a file at ./scripts/bash/foo.bash and calling it with 'my-cli foo' has been awesome. You can also set up runners so ./scripts/js and ./scripts/python works as you would think. Having eve…
Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#37You might like systemd's run command, it's a hidden little gem that basically does what your tool does--it turns some CLI params into a transient service file: https://www.freedesktop.org/software/systemd/man/systemd-run... I dunno if this was a more recent addition to systemd, but it's pretty slick in my limited use. I use it for exactly the scenarios you mention, like quickly spinning up some local user services du…
TIL, Pretty cool! But I suppose there isn't away to run these transient services as boot because they are definition gone after they have stopped?
You can abuse the fact that systemctl has the edit subcommand. It meant to modify the existing service file, but nothing means you can't just save it out elsewhere and then modify it.
Additionally, if it's a long running service it should be located where other systemd unit files are located (`$HOME/.config/systemd/user/` for user units, `/etc/systemd/system/` for service units) and just copy them while the unit is still running.
systemd-run --user -u test -t bash
cp $HOME/systemd/user/test.service /new/path/for/test.service
Of course this requires it to live long enough.Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#38Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#39> Systemd on the other hand has most of the things I need, but I found it cumbersome to use Could you please expand on this? From what I understand, to use systemd to deploy a microservice is basically one file: # /etc/systemd/system/myservice.service [Unit] Description=My Microservice After=network.target [Service] ExecStart=/path/to/myservice Restart=always User=myuser Group=mygroup Environment=VARIABLE=value Worki…
I like systemd but I can see a lot of value in friendlier tools like this. What I really want is a TUI tool like Lazydocker for managing systemd services.
Re: Show HN: Servicer, pm2 alternative built on Rust and systemd
#40I don't understand this. Why not just... use systemd ? Is there something I'm missing here?
No commands work as you'd expect them to, and require a lot of very specific cmd line flags to do what should be the default.
I think the architecture and design of systemd might be okay but the user experience is horrible.
It's the same with git.