Skip to content
Browse docs

PM2 Process Manager: Restart a Process and Stream Its Live PM2 Logs

The PM2 tab lists every PM2 process on your server with live CPU, memory, and restart counts. Restart, reload, start, stop, or delete any of them from the list, expand a cluster to see its instances, and stream a single process's logs live. No pm2 commands to type.

Open in
Updated

If you run Node apps on a server, you already know the loop. SSH into the box, run pm2 list to see what is alive, squint at the table, run pm2 restart <name>, then pm2 logs <name> to find out whether that actually fixed anything. Every check is a command, and every command needs a shell.

For an overview of the PM2 GUI and what it shows, see the feature page.

The PM2 tab replaces that loop. Connect to a server and every process PM2 keeps alive is listed for you, with live CPU, memory, and restart counts. Restart, reload, start, stop, or delete any of them from the list. Click a process and you get a live log stream, with its metrics and Node.js runtime internals in the same panel. Apps you shipped through Deployments run under PM2, so they show up here automatically. For whole log files rather than one process's output, use the Logs tab, and for server-wide CPU and memory see Infrastructure Details. If an app is bound to 127.0.0.1 and you want to open it in your own browser, Port Forwarding tunnels that port to your machine.

What you can do in the PM2 tab

  • See every process PM2 is managing on the server, with live status, CPU, memory, and restart count.
  • Read totals for online, errored, and stopped processes at a glance, plus total CPU and memory.
  • Restart, reload, start, stop, or delete any process from the list.
  • Restart every process on the server at once.
  • Bring your processes back after a reboot with Save list and Start on boot.
  • Install PM2, and Node.js if it's missing, without opening a shell.
  • Open any process to see CPU, memory, event loop lag, heap usage, restarts, and uptime.
  • Check Node.js runtime internals like active handles, heap size, and event loop latency p95.
  • See the auto-restart rules a process is running under.
  • Stream a single process's logs live, and search them.
  • Expand a cluster to see and manage each of its instances individually.

Why a PM2 tab instead of pm2 commands

Doing it by handDoing it in CtrlOps
ssh user@host, then pm2 list to see what is runningClick the server, click the PM2 tab
Count the online and errored rows yourselfThe summary cards do it for you
pm2 restart <name>Click the restart button on the row
pm2 reload <name>Click Reload in the row's three-dot menu
pm2 stop <name> and pm2 start <name>Click Stop in the three-dot menu, then Start on the row
pm2 delete <name>Click Delete in the row's three-dot menu
pm2 restart allClick Restart all
pm2 saveClick Save list
pm2 startupTurn on Start on boot
pm2 monit, which holds the terminal hostageLive metric cards you can leave open
pm2 logs <name> in a second SSH sessionClick the process. Its Logs tab opens first
pm2 describe <name> and read a wall of textView details in the three-dot menu, laid out and labelled

Open the PM2 tab

Connect to your server

Open CtrlOps and click the server you want to manage. Wait for the header to show Connected.

Click the PM2 tab

In the left sidebar, click PM2. It sits between Deployments and Infra Details.

PM2 sits in the left sidebar between Deployments and Infra Details, and opens on the summary cards and process list.

Read the process list

Every process PM2 is managing appears in the table, with the summary cards above it showing how many are online, errored, and stopped.

One row per process, with its script name under the process name and live status, mode, CPU and memory.

The panel header confirms the state of PM2 itself, showing PM2 · running next to the title once CtrlOps has found the binary and talked to the daemon.

If PM2 is not installed

Not every server has PM2 on it. If CtrlOps cannot find a pm2 binary, the tab shows PM2 is not installed instead of a process list, and offers to install it for you.

Open the PM2 tab on that server

Click your server, then click PM2 in the left sidebar. If no pm2 binary is found, CtrlOps shows the PM2 is not installed screen.

Click Install PM2

Click the green Install PM2 button in the middle of the panel. CtrlOps installs PM2 globally on the server.

On a server with no pm2 binary, the tab shows this empty state instead of a process list.

Wait for the process list to appear

When the install finishes, the empty state is replaced by the process list. On a fresh install the list is empty until you start something.

Read the summary bar

Five cards sit above the process list. They are the fastest way to tell whether the server is healthy before you read a single row.

CardWhat it tells you
OnlineHow many processes are running right now.
ErroredHow many have crashed or failed to start. Anything above zero is worth opening.
StoppedHow many are registered with PM2 but deliberately not running.
Total CPUCombined CPU across every PM2 process on the server.
Total MemCombined memory across every PM2 process on the server.
The five cards above the list: online, errored and stopped counts, then total CPU and memory across every PM2 process.

The process list

Each row is one process PM2 is managing.

ColumnWhat it shows
IDThe PM2 process id, the same number pm2 list prints.
ActionsA Restart or Start button, a Logs button, and a three-dot menu for the rest.
NameThe process name, with the script it runs underneath it, such as app.js, index.js, or bash.
StatusONLINE, ERRORED, or STOPPED, with a coloured dot.
↺How many times PM2 has restarted it. Colour-coded, so a high count stands out.
Modefork ×1 for a single process, cluster ×4 for a clustered app and its instance count.
CPULive CPU use for that process.
MemoryLive memory use for that process.

The list refreshes about every 5 seconds.

Act on a process from the list

Find the process in the list

Scan the Name column for your app. The script file it runs, such as app.js or index.js, is shown underneath the name.

Pick an action from the Actions column

The Actions column at the start of each row has a restart button, a logs button, and a three-dot menu with the remaining actions. Click the one you want.

The Actions column: restart, logs, and a three-dot menu for the rest.

Watch the row update

The row updates with the new status, CPU, memory, and restart count within a few seconds, so you can confirm the action took effect without leaving the tab.

The restart count column ticks up in place after a restart, alongside the live status, CPU and memory.

What each action does:

ActionWhere it isEquivalent commandWhat it does
RestartButton on the row, while it's onlinepm2 restart <name>Stops the process and starts it again. Brief downtime.
StartThe same button, when it's stopped or erroredpm2 start <name>Starts the process.
LogsButton on the rowpm2 logs <name>Opens the process on its Logs tab.
StopThree-dot menupm2 stop <name>Stops the process and keeps it in the list.
ReloadThree-dot menupm2 reload <name>Replaces the process without dropping requests.
View detailsThree-dot menupm2 describe <name>Opens the process on its Overview tab.
DeleteThree-dot menupm2 delete <name>Removes the process from PM2 entirely.

Restart, Stop, Reload, and Delete ask you to confirm first.

Restart every process at once

The green Restart all button at the top right restarts every process PM2 is managing on that server. It is the equivalent of pm2 restart all.

Restart all sits at the top right of the PM2 tab. It restarts every process on the server.

Keep processes running after a reboot

Two controls work together, and you need both.

ControlWhere it isWhat it decides
Start on bootThe card below the process listWhether processes come back. It sets up a systemd boot script with pm2 startup
Save listTop right, beside Restart allWhich processes come back. It's the same as pm2 save

Turn on Start on boot

Turn on the Start on boot switch. It needs root or sudo on the server. Once it's on, the card says a systemd boot script will bring the saved process list back after any reboot.

While the switch is off, the card warns that processes will not come back if the server restarts.

Click Save list after you add or remove a process

Save list writes the current set of processes to PM2's saved list. If you don't click it, a reboot brings back whatever was saved last, which may not match what is running now.

Save list writes the current process set to PM2's saved list, the same as pm2 save.

Turning Start on boot off

CtrlOps asks you to confirm first, in a dialog titled Disable start on boot?. Leave Bring processes back afterwards on to keep your apps running: it runs pm2 save first and pm2 resurrect afterwards. If you turn that option off, the processes stay down until you start them again.

Inspect one process

Click any row and a detail panel opens on the right, on its Logs tab. To open it on Overview instead, click View details in the row's three-dot menu. The header shows the process name and status, along with its id, pid, mode, and how long it has been up.

The same actions are repeated at the top of the panel as full buttons - Restart, Reload, Stop or Start, and delete - so you do not have to close the panel to act on what you are looking at. Under them sit quick chips for CPU, memory, and restart count.

The panel has two tabs: Logs and Overview.

Overview tab

The Overview tab: the four actions across the top, then six metric cards and the Node.js runtime table.

Six cards across the top, each showing the current number. The small line on each card is only decoration, not a history, so read the number and not the line:

MetricWhy it matters
CPUSustained high CPU on a Node process usually means a blocking loop, not real work.
MemoryResident memory. A number that only ever climbs is the classic leak signature.
Event loop lagHow long the event loop is delayed. This is the number that actually predicts slow responses.
Heap usageHow full the V8 heap is as a percentage. Near 100% and climbing means a crash is coming.
RestartsHow many times PM2 has had to bring this process back.
UptimeHow long it has been up since the last restart.

Below the cards, Node.js runtime reports what the process looks like from inside V8, with the Node version it is running on:

  • Active handles and active requests - open sockets, timers, and file operations the process is holding.
  • Heap size, used heap size, and heap usage - how much memory V8 has claimed and how much of it is actually in use.
  • Event loop latency and event loop latency p95 - the typical delay, and the delay at the bad tail. The p95 is the one your slowest users feel.

If you see No runtime metrics for this process instead, nothing is broken. PM2 can only collect these numbers when it launches your Node script itself, and the note shows which start commands work.

Then Auto-restart rules shows the conditions PM2 will act on for this process:

  • Max memory restart - the memory ceiling that triggers an automatic restart, or not set.
  • Watch & reload - whether PM2 restarts the process when its files change.
  • Autorestart - whether PM2 brings it back when it exits.
  • Last exit code - shows 1 when the process is errored and 0 otherwise. It follows the status and isn't the process's real exit code, so read the Logs tab to find out why something stopped.

Logs tab

The Logs tab opens first, and that single process's output streams in live.

The Logs tab streams one process's output live, with Search logs above it.

This is scoped to the one process you opened, which is the difference between it and the Logs tab. Here you are watching one app's output as it happens. There you are reading whole log files on disk, with history, download, and search across everything on the server.

  • Search logs finds the lines you are looking for.
  • Pause holds the stream while you read, and Resume carries on.
  • Clear view clears the screen so the next lines land against a clean view. It asks you to confirm first, and the logs on the server stay. Useful right before you reproduce a bug.

Manage a cluster

An app running in cluster mode appears as a single row with its instance count under the name, for example 4 instances · index.js, and cluster ×4 in the Mode column. The CPU and memory on that row are the totals across every instance.

Click the chevron at the left of the row to expand it. Each instance is then listed on its own line with its own PM2 id, status, CPU, memory, and restart count, plus its own Restart or Start button, a Logs button, and a three-dot menu with Stop and View details.

That split matters when only one worker is misbehaving. Instead of reloading the whole cluster, expand it, find the instance eating memory or racking up restarts, and restart just that one.

The parent row keeps its own controls, so you can still act on the cluster as a whole. It also has a Scale instances button: use - and + to change how many instances run. CtrlOps shows how many CPU cores are available as a guide, not a limit.

Tips

Troubleshooting

The PM2 tab says PM2 is not installed

CtrlOps looked for a pm2 binary on that server and did not find one. Click Install PM2 and CtrlOps installs it for you.

PM2 needs Node.js on the server. If Node.js is missing too, the screen offers Install Node.js first.

A process shows ERRORED and keeps restarting

A high number in the restart column means PM2 has been crash-looping it. Click the process to open its Logs tab. The reason is almost always in the last lines before each restart - commonly a missing environment variable, a port already in use, or a database it cannot reach.

My process list is empty even though my apps are running

PM2 keeps a separate process list per Linux user. If your apps were started by a different user than the one CtrlOps connects as, that user's processes will not show up here.

Reconnect to the server as the user that started the apps. You can check which user you are connected as in the header next to the server name.

My processes are gone after a server reboot

You need both Start on boot and Save list. Turn on Start on boot in the card below the process list, so PM2 starts with the server. Click Save list after you add or remove a process, so PM2 knows which ones to restore. Start on boot needs root or sudo.

Reload did not avoid downtime

Reload only genuinely avoids downtime in cluster mode, where PM2 has other instances to carry the traffic while one is replaced. On a fork ×1 process there is a single worker, so reload behaves much like a restart. If zero-downtime restarts matter for an app, run it in cluster mode.

Frequently Asked Questions

How do I manage PM2 processes without the command line?

Open CtrlOps, click your server, and go to the PM2 tab. Every process PM2 keeps alive on that server is listed with its status, mode, CPU, memory, and restart count. Each row has a Restart or Start button, a Logs button, and a three-dot menu with Stop, Reload, View details, and Delete, so you never type a pm2 command into a shell.

What is the difference between restart and reload in PM2?

Restart kills the process and starts it again, so there is a short window where it serves nothing. Reload replaces workers one at a time and keeps serving requests throughout, which is why it is called a zero-downtime restart. Reload only truly avoids downtime in cluster mode - on a fork ×1 process it behaves much like a restart.

Can I restart all my PM2 processes at once?

Yes. Click the green Restart all button at the top right of the PM2 tab. It restarts every process PM2 is managing on that server, the equivalent of pm2 restart all. It affects everything on the box, so use it when you mean the whole server, not one app.

How do I see how much CPU and memory a PM2 process is using?

The process list shows live CPU and memory for every process, and the summary cards at the top add up total CPU and total memory across all of them. For more, open the row's three-dot menu and click View details. The Overview tab shows CPU, memory, event loop lag, heap usage, restarts, and uptime, each on its own card.

Can I view PM2 logs for a single process live?

Yes. Click a process and its detail panel opens on the Logs tab. Lines stream in as the process writes them. Use Search logs to find lines, Pause to hold the stream, and Clear view to clear what is on screen so the next lines arrive against a clean view. Clear view doesn't touch the logs on the server.

Does CtrlOps work with PM2 cluster mode?

Yes. A clustered app appears as a single row showing the instance count and combined CPU and memory. Expand it with the chevron and every instance is listed separately with its own id, CPU, memory, and restart controls. You can act on one misbehaving instance or on the whole cluster from the parent row.

What does Save list do?

Save list writes the current set of running processes to PM2's saved process list, the same thing pm2 save does. That list decides which processes come back after a reboot, but they only come back if Start on boot is also on.

Ask AI

Your privacy preferences. We use product analytics to improve CtrlOps. Google measurement runs without analytics cookies. Live chat stays off until you allow it. Cookie policy