> ## Documentation Index
> Fetch the complete documentation index at: https://docs.areawp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Terminal & Logs

> Log file viewer, systemd journal, process manager, and service control — all in the browser without SSH.

<Info>
  **Path:** Terminal (`/terminal`) — Admin only

  The Terminal page provides four tools for inspecting and managing running systems: log files, systemd journal, process list, and service control.
</Info>

## Log Files Tab

Browse and view any log file on the server.

**Left sidebar** — clickable list of log files showing path and size. Click any file to load it in the main viewer.

**Viewer controls:**

| Control            | Description                            |
| ------------------ | -------------------------------------- |
| **Search pattern** | Filter log lines by text or regex      |
| **Line count**     | Load 50 / 100 / 200 / 500 / 1000 lines |
| **Auto-refresh**   | Toggle live updates                    |

**Actions:**

* **Refresh** — reload the log content
* **Download** — save the log file to your computer
* **Clear log** — truncate the log file (admin only)

Log output is displayed in a monospace, scrollable view.

***

## Journal Tab

Read systemd journal output for any service.

| Control             | Description                                                                        |
| ------------------- | ---------------------------------------------------------------------------------- |
| **Unit / Service**  | Type a service name, or pick from quick-select chips (nginx, apache2, mysql, etc.) |
| **Line count**      | 50 / 100 / 200 / 500 lines                                                         |
| **Priority filter** | Emergency / Alert / Critical / Error / Warning / Notice / Info / Debug             |

Click **Load Logs** to fetch the journal output. If journalctl is not available, the fallback source is shown in an info notice.

***

## Processes Tab

Live process list for the selected server.

**Controls:**

* **Search** — filter by process name, command, or PID
* **Sort** — CPU / Memory / PID / Name
* **Limit** — show 25 / 50 / 100 processes

**Refresh** button reloads the list.

**Table columns:**

| Column       | Description                       |
| ------------ | --------------------------------- |
| **PID**      | Process ID                        |
| **Name**     | Process name                      |
| **User**     | System user running the process   |
| **CPU %**    | Current CPU usage                 |
| **Memory %** | Memory usage as a percentage      |
| **Memory**   | Human-readable memory size        |
| **Status**   | Running / Sleeping / Zombie badge |

Click any row to expand a **details panel** showing: full command line, thread count, created time, and open file count.

**Kill options per process:**

* **Kill** — send SIGTERM (graceful)
* **Force Kill** — send SIGKILL (immediate)

***

## Services Tab

All systemd services on the server displayed as a grid of cards.

**Each service card shows:**

* Status dot (green = running, red = stopped)
* Service name and description
* Status badge
* PID and memory usage (if running)

**Per-service actions:**

* **Start / Restart / Stop** — lifecycle control
* **Logs** — opens a modal with the last 100 lines from the service journal

**Refresh** button reloads all service statuses.

<Tip>
  Common services you'll manage here: `areawp` (panel backend), `nginx`, `postgresql`, `docker`, `fail2ban`, `postfix`, `dovecot`.
</Tip>
