Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's up to you to say check in your init script if you need to start another service before you.

In terms of uptime or IO and stuff, those metrics are already available. Be that via SNMP or other means. Say you start an nginx in systems, which network and disk usage does it report? Just the main process or all its forks? Same problem in RC.

But that is part of the point. Why in the ever-loving existence should an INIT system provide stats like disk usage? That is NOT what an init system is for.

If you need memory usage or IO usage or uptime, there are so many other tools already integrated into the system that the init system doesn't need to bother.

Init systems should only care about starting, stopping and restarting services. Period. The moment they do more than that, they failed at their core job.

This might came across stronger than meant to, but still holds true.

BSDs are about "keep it simple, keep it single purpose" to a "I can live with that degree". What you get though is outstanding documentation and every component is easily understandable. Prime examples are OpenBSD/FreeBSD PF. That firewall config is just easy to grok, easy to read up on and does 99.999% of what you ever need out of a firewall.





> which network and disk usage does it report? Just the main process or all its forks? Same problem in RC.

Well, the main process and its whole hierarchy, that's what you would expect of an init system monitoring its services, right? And what's nice with systemd is that I can get that from a simple `systemctl status my-service` – of course I could deploy a whole observability stack, but better if I can avoid it.

But there is no need to be defensive, it RC can that's nice, if it can't, then well, too bad.

> there are so many other tools already integrated into the system that the init system doesn't need to bother.

That's what I'd love to hear about, what are the equivalent in the BSDs world.


Best practice would be to pack the service into a jail and then use `ractl` to monitor I/O. Could also then monitor the VNET socket of the jail for network stats.

Or you just grab the PID and get it through that. A bit more manual, but composable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: