sv
The sv command line tool is a part of the runit service supervision suite. It is used to control and manage services on Unix-like systems. sv allows users to start, stop, restart, and monitor services running on a system. It provides an easy way to manage the lifecycle of services in a simple and efficient manner. One of its primary functions is to send signals to services, such as sending a SIGTERM or SIGHUP to gracefully stop or restart a service. sv also provides options for configuring and controlling the behavior of services, with flags like -w to wait until a service is ready or -t to temporarily disable a service. The tool reads service configurations from a specific directory, usually /etc/service, where individual directories represent each service. Inside these service directories, there are run and log scripts that sv uses to start, stop, and log the service. A commonly used subcommand with sv is svlogd, which is used to manage service logs, including rotation, compression, and deletion. Overall, sv is a versatile command line tool for managing services and their logs, providing an efficient way to control and monitor the behavior of running services on Unix-like systems.
List of commands for sv:
-
sv:tldr:328ea sv: Stop a service.$ sudo sv down ${path-to-service}try on your machineexplain this command
-
sv:tldr:44eec sv: Start a service.$ sudo sv up ${path-to-service}try on your machineexplain this command
-
sv:tldr:69db7 sv: Get service status.$ sudo sv status ${path-to-service}try on your machineexplain this command
-
sv:tldr:bb997 sv: Reload a service.$ sudo sv reload ${path-to-service}try on your machineexplain this command
-
sv:tldr:c1a53 sv: Start a service, but only if it's not running and don't restart it if it stops.$ sudo sv once ${path-to-service}try on your machineexplain this command