About

pulse is a Unix shell client-server host monitor. The client and the server run in containers on the alpine base image. Both follow POSIX, the Portable Operating System Interface standard, and are built on the shellbase framework. Every five seconds the client sends the following data to the server:

  • Host uptime

  • Host network interface names and IPv4 addresses

The server prepends a timestamp to each report and appends it to dat/db. After every fifth update, the server sends the client a die message. The client then terminates, and the container runtime restarts it.

Usage

Build and start the containers with Podman Compose. The server listens on port 8080 and the client on port 9090.

# Starts the Podman VM.
podman machine start

# Builds both images and starts the containers in the background.
podman-compose up --build --detach

# Follows the reports as the server stores them.
tail -f dat/db

# Stops and removes the containers.
podman-compose down

# Stops the Podman VM.
podman machine stop

Test

The project uses Daniel J. Bernstein’s build system, redo. You can install Sergey Matveev’s goredo implementation. redo test builds both images and runs a round-trip check with Podman Compose. redo lint applies the following linters to the source files: actionlint, checkbashisms, conform, gitleaks, hadolint, reuse, shellcheck, shfmt, typos, yamllint, zizmor. It also parses each script with dash and mksh to reject syntax the project’s target shells do not accept.

License

pulse belongs to David Rabkin and is licensed under the Zero-Clause BSD license.