# Processes and logs

> Start, stop and restart supervisord processes, see their CPU and memory, follow their stdout and stderr live, and see each program’s history of state changes.

Source: https://getvisor.dev/docs/processes/
Author: Touhidur Rahman (https://touhidurabir.github.io/)

The dashboard shows every process supervisord runs, grouped by the config file it comes from. Each config has its own page with a plain-English overview, live logs, the file itself and a history of state changes.

## The dashboard

Above it, a tab bar holds **This Mac** and each [server](https://getvisor.dev/docs/remote-servers/) you open; every tab has its own dashboard. At the top of the dashboard: the server’s name and the path of its supervisord.conf, a search box (⌘F), **Check for changes**, **Add new** and a ⋯ menu for the whole server.

![The dashboard: tabs for This Mac and staging, a strip with the latest change made outside Visor, a health line with counts, then each config file with its processes, their state, CPU and memory with a small chart, how long, PID and a Watch bell; failing rows are tinted red with the reason under the name](https://getvisor.dev/docs/shots/dashboard-light.webp)

Under it, one line sums up health, such as *All 12 processes are running* or *1 process is failing*, with counts of running and stopped processes and a link to open issues. When something fails, **Show it** jumps to it.

A strip above it shows the latest change made outside Visor, such as a restart from `supervisorctl`. It links to [Activity](https://getvisor.dev/docs/activity/).

**Configs and processes** lists each config file and its processes, with columns for name, state, **Usage**, how long, PID and Watch. **Start all**, **Stop all** and **Restart all** act on every process; Stop all and Restart all ask first.

When a config file changed on disk and supervisord still runs the old version, a banner says so with **Apply changes**. **Recently removed** at the bottom lists configs you removed, with **Restore**.

## The ⋯ menus

Every process, config and the server has a ⋯ menu. Each item shows the matching `supervisorctl` command in grey; copy it with the button beside it, or ⌘C.

Action menus:

| Menu | Items |
| --- | --- |
| Process | Start, Stop, Restart, Send signal…, View logs, Clear logs (running processes only), Copy PID |
| Config file | Start all in file, Stop all in file, Restart all in file, Open / edit config (**Open config** on a server), Describe, Reveal in Finder (**Download a copy** on a server), Open log in editor (not on a server), Load into supervisord (when it hasn’t loaded the file), Apply changes, Remove from supervisor |
| Server | Check for changes, Apply all changes, View supervisord log, Restart supervisord, Shut down supervisord, Server settings |

When supervisord hasn’t loaded a file yet, for example one added outside Visor, its programs show as *Not loaded* rows with a **Load** button. The file’s menu then has **Load into supervisord**, and Start all in file becomes **Load and start all in file**. The config’s page shows a banner with **Load** too.

**Remove from supervisor** stops the file’s processes and removes them from supervisord. On this computer the file isn’t deleted: it moves to Visor’s backups folder. On a server, Visor deletes the file there and keeps a copy in its backups on this computer. Either way, **Undo** or **Restore** brings it back. Restarting or shutting down supervisord asks first, because it stops every process.

## CPU and memory

The **Usage** column shows each process’s CPU and memory, such as *4.1 % · 182 MB*. 100 % is one core, and memory is resident memory. Both count the children a process starts, such as Horizon’s workers or the program behind an `sh -c`. Wide windows add a small chart of the last 10 minutes of CPU.

- *…* means the CPU figure comes with the next sample.
- *–* means the process isn’t running, or can’t be measured: on macOS, another user’s process; on a server mounted with `hidepid`, a process the SSH user isn’t allowed to see.

Memory counts pages shared between processes once per process, as `top` does, so a program that forks workers, such as PHP-FPM or Gunicorn, shows more than it really uses. On macOS, when Visor can’t read a process, the processes it started are left out too, even ones Visor could read.

Visor samples every 10 seconds and keeps the last hour in memory. Nothing is written to disk. On a server it reads `/proc` over the connection, with nothing installed. A worker started through Docker shows the Docker client’s figures, not the container’s.

A config’s Overview has a **Resources** card: each process’s CPU and memory now, and the hour’s peak and average. Under them, two one-hour charts, **CPU %** and **Memory**, show one process; with more than one, pick it in the **Chart** select. A gap in a chart is time the process wasn’t running.

![The Resources card on a config’s Overview: app-queue’s CPU and memory now, with the peak and average over the last hour, and a chart of CPU over the hour](https://getvisor.dev/docs/shots/resources-light.webp)

## A config’s page

Click a config file to open its page. The header shows its name and path, badges such as *2 failing*, *All running* or *Changed on disk*, and buttons for **Watch**, Start all, Stop all, Restart all and **Reveal in Finder**. A row of chips lists its processes; click one to pick which process the Logs and History tabs show.

The page has four tabs: **Overview**, **Logs**, **Config** and **History**. Use the arrow keys to move between them.

**Overview** starts with the **Last error**, when there is one: what failed, with **Restart**, the stderr log and **Open in editor**. When a line of the config caused it, it links to that line. Under it, *What this config does* explains the file program by program, and **Resources** shows CPU and memory. See [Program configs](https://getvisor.dev/docs/configs/). The **Config** tab is the editor.

## The Logs tab

Logs follow live: new lines appear as the process writes them.

- **stdout** and **stderr** switch streams.
- **Pause** holds the view while new lines wait, as in *Paused · 12 new lines waiting*. **Resume** shows them.
- **Search log** (⌘F) highlights matches and counts them in the lines the tab has loaded. With **Search the whole log file** on in [Settings](https://getvisor.dev/docs/settings/), **Search the whole file** reads all of it, newest first.
- Lines are coloured by level. Level chips, such as **Errors** and **Warnings** with their counts, show only the lines of the levels you pick.
- **Save…** saves the log to a file. **Open in editor** opens the log file itself, on this computer only.
- **Clear** empties both the stdout and stderr logs of a running process, after you confirm. It can’t be undone.

When a log is cleared or rotated, a line in the view says so and Visor carries on from the new file. If a process writes faster than Visor reads, a line marks the gap. A stream with no log file in the config shows why there’s nothing to see.

## The History tab

History lists the selected process’s state changes, newest first: when, the new state, and a note such as *From RUNNING*, *by you* or *Restarted by supervisord*. It shows the 200 most recent.

Visor records history only while it runs. It keeps it for 90 days by default; change that under **Checking and history** in [Settings](https://getvisor.dev/docs/settings/).