Skip to content

Monitor window

The Monitor tool window shows the SSH host of the active tab. Without an SSH tab it says Open an SSH session…; before the first sample Waiting for the first sample (every 3 s after login)…; on a host that cannot be monitored Monitoring unavailable: it needs a Linux host (/proc) that allows running commands over SSH.

Monitor window

The last 5 minutes (100 samples, one every 3 s), kept in memory per session only.

  • CPU: stacked User, Kernel, I/O wait, IRQ, Steal (each can be hidden by clicking its legend entry); load average 1 / 5 / 15 min below.
  • Memory: stacked Apps (total − free − buffers − cache), Buffers, Cache (page cache plus reclaimable slab, without shared memory); used / total in the title.
  • Network: download and upload over the physical interfaces (see status bar).

Disks table

Every mounted filesystem except pseudo ones, from timeout 3 df -kPT: mount, device, type, used, size, use % (orange from 90 %).

Services table

Read every 30 s with systemctl:

  • systemd: <state> from systemctl is-system-running; anything but running is red. degraded means the system is up but at least one unit of any type (service, mount, timer, socket, …) has failed.
  • Failed units: N: systemctl --state=failed --all list-units, with description, result (Result: exit-code, timeout, signal, core-dump, …, and the exit status), since when, and the load state when it is not loaded (e.g. not-found).
  • Service table: running and failed services with description, uptime (or failed), memory of the unit’s cgroup (— without memory accounting) and main PID. The tooltip has the active/sub state and the unit file. local marks a unit file written by an administrator (/etc/systemd/system, /usr/local, /opt) rather than shipped by a package.
  • System services shows typical base-system services too (systemd-*, dbus, cron, ssh, getty, …); hidden by default so what was added to the server stands out.

Without systemd (e.g. in a container) the section says why, with the command’s answer.

Containers

Read every 15 s as one probe on the host, each step under timeout when the host has it: docker version (5 s), docker ps -aq --no-trunc (10 s), docker inspect with a fixed template (15 s), and only after a successful list docker stats --no-stream (10 s, it samples for about 2 s). A slow stats therefore never costs the list. Plain docker in the PATH of the non-interactive exec shell, without sudo.

  • Title: running / all, N need attention, engine version and platform, Stopped (show stopped containers).
  • Grouped by Compose project (com.docker.compose.project), then standalone.
  • Columns: Container (with the Compose service), Image, State (with health: healthy, unhealthy, starting), Up (or time since exit), CPU, Memory (tooltip: limit and %), Net ↓ / ↑ since start, Restarts (orange above 0, red when restarted and up for less than 10 minutes: probably a crash loop), published Ports (*:8080 = every address).
  • Need attention: restarting, dead, running but unhealthy, killed by the OOM killer, exited with a non-zero code. The failing health check’s output (at most 500 characters) or the engine’s State.Error shows under the row.
  • A container name expands to its details.

What does not leave the host: environment variables and labels (except the two Compose labels).

Messages: docker is not in the PATH of the SSH exec shell (non-interactive); permission denied on the socket (read access needs root or membership in the docker group, which is equivalent to root on the host); the daemon does not answer (stopped, or DOCKER_HOST / a rootless socket set only in an interactive shell profile). When the previous probe still runs on the host (its lock docker.lock is held), the next one is skipped and retried later.

nginx card

Below the containers, Services N detected lists one card per service found on the host, by its systemd unit or its binary in /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin. A service that is not found runs no further commands. Cards are read only while the Monitor window is open and shows this tab: detection on the first open and on Refresh, then each service at its interval (60 s unless its page says otherwise). The cards of each service are described under Services.

The state is always written out; the colour only stresses it.

State Meaning
reading… first probe not finished
OK probe finished
incomplete data a section began but did not end, or the output went over 256 KiB
passive off the passive read of this card is off for this host
no answer stopped by timeout on the host (sections named), or no answer within the local limit; next try with backoff 15 → 30 → 60 → 120 → 300 s; Retry now
busy the previous active probe still runs on the host (its lock kryodesk/<service>.lock is held; a passive read takes no lock); Retry now
stopped authentication or permission error: no automatic tries until Retry; the error is shown
refused the server refused an exec channel (MaxSessions?); Retry now

PostgreSQL card stopped after a permission error

Memcached card: no answer, next try later

Probes of all services and Docker share 2 exec channels per connection, so the terminal and SFTP keep theirs. A channel is released only when its processes end on the host.

A probe runs a binary it found on the host (nginx -V, mysql, redis-cli, …) only when that binary is trusted: a regular executable file, and /, every directory and every symbolic link on the way to it and the file itself owned by root or the session’s account, with no directory or file writable by its group or others (a sticky directory may be). A script (#!) also needs its interpreter to pass the same check; for #!/usr/bin/env <name> every <name> in the standard binary directories and the first one in the session’s PATH. Otherwise the card says which path failed and why, and the binary is not run.

Active probe

Every card has the checkbox Passive (reads files, /proc and systemd; every 60 s while this window is open), on by default. Unchecked, the card’s passive read stops for this host (kept in localStorage monitor-apps-hosts), the header says passive off and the card Nothing read: the passive read is off for this host.

Below it, for services whose binaries the passive read does not run, Package of <binary> (dpkg): with the package name and version from the package database files, or why there is none (RPM database: readable only through rpm…, no installed package lists this file).

Services with an active probe, or with binaries the passive read leaves out, have an Active part:

  • Run active probe: runs the passive and active sections once; the card then shows the data of that run (Shown: data of the active run at …, not the latest passive read. Show passive data);
  • Repeat every 60 s (this session): the active sections run with every read until the tab closes;
  • one or two plain sentences: what the probe reads and the traces worth knowing; the ? button next to them shows or hides the details (kept while the app runs):
    • Runs: the exact command and what it asks the daemon;
    • Traces on the host: what it leaves there;
    • Not in the passive read (binaries of the service, run only here): the version reads and tools (nginx -V, haproxy -v, rpm -q, …) that run only with this probe;
    • Script of the run (passive and active sections) with Copy;
  • Cannot run here: … when the host has no usable timeout or no flock;
  • Last run with its time and result (OK, no answer in time, paused, …);
  • Paused, not asked again until resumed with the answer that paused it (for example a refused Run) and Resume active probe;
  • Not run in the last probe: the lock on the host could not be taken.

MySQL card: Run refused, the active part paused

See passive and active probes.

With the service scan on and at least one card’s passive read on, a passive host-wide read every 60 s looks for TCP ports held by separate process trees: the listening sockets of /proc/net/tcp and tcp6 and their owners from one ls -lnq /proc/*/fd (socket inodes only, numeric ids). Only ports whose sockets have different owners are read further (at most 48 processes): per owner /proc/<pid>/stat, status and exe; for the first process of each tree its argv, masked on the host and reduced to option names, absolute paths, numbers and host:port (any other word is ***), and the files named after -f, -c, --config, … with their mtime (stat under timeout; not on autofs mount points, not for processes in another mount namespace, not at all on a host without timeout). A tree is a process and its ancestors with the same name, so nginx’s master and workers, or HAProxy’s master and workers, are one.

A port is reported when sockets of separate trees can both be reached:

  • the same address and address family: with SO_REUSEPORT the kernel spreads new connections over them, e.g. an old HAProxy left after a reload with its old configuration next to the new one;
  • the wildcard address next to a specific address of the same family: the specific socket takes connections to its address, the wildcard one all others;
  • the IPv4 and IPv6 wildcards in unrelated programs: clients reach one or the other by address family (one docker-proxy per family is not reported).

Different specific addresses (127.0.0.53:53 and 192.168.122.1:53) are not reported. pid 1 is left out when it is systemd or init (socket activation shares one socket).

Each report lists per tree the pid (and the pids holding the sockets), name, uid, start time, the sockets, the binary (deleted or replaced after the start, file newer than the process), the masked argv and each file with its mtime (changed after the process started; a reload since then is not visible), then what differs. It appears above the service cards and in the card of the service whose binary is involved. Processes of other accounts are seen only by root: the note N of M listening sockets belong to processes this account cannot see says how many were not checked. A failed read keeps the last one, with the reason and its time.

For services with a systemd unit, the card shows Unit: with its unit file and ExecReload: as read from systemctl show (a closed list of flags and keys). Options that silence the reload (-q, --quiet) are marked: when it fails, systemd shows only the exit code and the reason does not reach the journal. “Test config” shows it. Environment files the account cannot read are listed. When the journal is readable, the failed reloads, starts and stops of the last 7 days are listed with their times (journalctl -u <unit> --since -7d, filtered on the host).

Test config plan

Services with a configuration test have Test config… (with several units, a Unit list first). It runs nothing but an ownership check (stat) and shows the plan:

  • what the command does (e.g. that nginx -t opens log files and resolves DNS);
  • the exact command, with Copy: the paths and options are those of the systemd unit (-c, -f, EnvironmentFile keys), so the test reads the same files as the service;
  • Limit (seconds, default 30) and the session’s uid;
  • notes (where the configuration path came from) and warnings;
  • Ownership check (stat): owner and mode of the binary, every directory on its path and the configuration files.

The test is not run when the binary or a directory above it belongs to another account (other than root and the session’s) or is writable by its group or everyone. On a root session the card warns that the test runs as root, and lists configuration files writable by other accounts (the test would run code from them as root).

Run test runs exactly that plan once (a plan is valid for 15 minutes and refused when anything checked has changed), under timeout, with stdin from /dev/null, without silencing options.

Test config result

Result Meaning
configuration OK exit code 0
test failed non-zero exit code: the output says why
no permission (not a verdict on the configuration) the account cannot read files or write logs; grey, not red
no result in time the limit passed
not run / not run: changed since the plan see the plan’s reason
a previous test still runs
no result another error

Below: exit code, duration (measured on the host, or locally including the SSH round trip), and the output with stdout and stderr together, at most 64 KiB. The output is masked on the host (values in quotes and after secret keys); the unmasked output is only in the terminal: Copy command / Paste to terminal. After a permission error the card offers sudo <command>: Paste to terminal types it into this tab’s terminal without Enter, so you confirm it and type the sudo password there. KryoDesk does not run sudo. The result stays in the card only (no history, logs or assistant). Copy result copies it.

Services without a test say why in one sentence (No configuration test: …).

Some cards list Manual commands (KryoDesk does not run them): commands that connect outside the host, change state or need sudo. Copy, and Paste to terminal when the command is plain words (it is typed without Enter into whatever runs in the terminal now).

What KryoDesk runs

At the bottom of the window, under What KryoDesk runs on this host:

  • Scan services on this host while the Monitor shows it: off = no detection and no service probes on this host. Next to it default or own choice (use the default), and Default for hosts… (Settings → SSH Defaults).
  • The exact scripts run on this host, per probe (docker, detect, ports, each service) with their kind (automatic, detect, passive, passive+active for a repeated active probe, active (on Run)) and Copy. A script is sent as the stdin of exec /bin/sh -s; the nonce shown as NONCE is random in each run.

What KryoDesk runs on a host with more services

With the scan off: No service commands (scan off). Still running: the 3 s sample of the status bar and the Docker read.

Scroll or pinch to zoom · drag to move · double-click to zoom · Esc or click outside to close