# Zeus daemon (`zeusd`) `zeusd` is a daemon designed to run with admin privileges and expose API endpoints that wrap privileged NVML methods. ## Problem Energy optimizers in Zeus need to change the GPU's configurations including its power limit or frequency, which requires the Linux security capability `SYS_ADMIN` (which is pretty much `sudo`). However, it's not a good idea to grant the entire application such strong privileges just to be able to change GPU configurations. ## Solution `zeusd` runs as a privileged daemon process on the node and provides API endpoints that wrap privileged NVML methods. Then, unprivileged applications can ask `zeusd` to change the GPU's configuration on their behalf. To make this as low latency as possible, `zeusd` was written with Rust. ## How to use `zeusd` To install `zeusd`: ```sh cargo install zeus ``` With the following, `zeusd` will listen to a unix domain socket at `/var/run/zeusd.sock`, which is writable to anyone (since file permission is 666). ```sh sudo zeusd --socket-path /var/run/zeusd.sock --socket-permissions 666 ``` Full help message: ```console $ zeusd --help The Zeus daemon runs with elevated provileges and communicates with unprivileged Zeus clients to allow them to interact with and control compute devices on the node Usage: zeusd [OPTIONS] Options: --mode Operating mode: UDS or TCP [default: uds] Possible values: - uds: Unix domain socket - tcp: TCP --socket-path [UDS mode] Path to the socket Zeusd will listen on [default: /var/run/zeusd.sock] --socket-permissions [UDS mode] Permissions for the socket file to be created [default: 666] --socket-uid [UDS mode] UID to chown the socket file to --socket-gid [UDS mode] GID to chown the socket file to --tcp-bind-address [TCP mode] Address to bind to [default: 127.0.0.1:4938] --allow-unprivileged If set, Zeusd will not complain about running as non-root --num-workers Number of worker threads to use. Default is the number of logical CPUs -h, --help Print help (see a summary with '-h') -V, --version Print version ```