Run top for a live, auto-refreshing view of every process and how much CPU and memory it's using right now. Run ps aux for a one-time snapshot you can search, pipe, or save to a file. Use top when you're watching something happen; use ps when you need to find something specific.
Both are available on any Linux shell, including the SSH session into your Flashcloud hosting account. What you see in the output can vary by hosting type - on a VPS, this can change how you read the columns below.
Listing processes with ps
The ps command prints a snapshot of processes at the moment you run it. By itself, ps only shows processes attached to your current terminal, which isn't very useful. The command you actually want is:
ps aux
The three flags mean: a shows processes from all users, not just yours; u switches to a user-oriented format with CPU and memory columns; x includes processes not attached to a terminal, like background daemons.
The columns worth knowing:
- USER: who owns the process
- PID: the process ID, needed if you're going to send it a signal
- %CPU and %MEM: current CPU and RAM usage
- VSZ and RSS: virtual size and resident set size (actual RAM in use) in kilobytes
- STAT: process state, like
S(sleeping),R(running),Z(zombie), orD(uninterruptible sleep, usually waiting on disk I/O) - COMMAND: the command that launched it, including arguments
Since ps aux prints everything at once, pipe it through grep to find what you're after:
ps aux | grep php
That's a quick way to check whether a specific service, cron script, or long-running job is even running.
Watching live activity with top
Where ps gives you a snapshot, top gives you a moving picture. Run it with no arguments:
top
The header shows load averages (1, 5, and 15-minute), total tasks, and overall CPU and memory usage. Below that is a live-updating, sorted list of processes, by default sorted by CPU usage, so whatever is working hardest floats to the top.
Useful keys while top is running:
Msorts by memory usage instead of CPUPsorts by CPU usage (the default)klets you kill a process by PID without leavingtopqquits
If a page is loading slowly or a background job seems stuck, top can help confirm whether something is actually pegging the CPU or stuck waiting on something else. A process camped in D state for a long time is often waiting on disk or a database, not CPU-bound.
Reading load average correctly
The three numbers in top's header (and in uptime) are load averages over the last 1, 5, and 15 minutes. A load average is roughly the number of processes wanting CPU time at once. On a single-core system, a load of 1.0 means the CPU is fully busy; on a 4-core system, 4.0 means the same. If you don't know your core count, check /proc/cpuinfo or run nproc.
Rising load with a lot of processes in R state points to a CPU-bound problem, like an inefficient script or a traffic spike. Rising load with processes stuck in D state points to disk or database contention instead, and killing the process won't fix the underlying bottleneck.
Shared hosting vs VPS: what you can actually see
On shared and WordPress hosting, your SSH session runs inside your own account. On most hosting accounts, that's normal and by design; it's also why the platform's own protections, like the Imunify360 web application firewall, handle server-wide security rather than something you configure per account.
On a VPS, what ps and top can show you is different - check the linked overview for what's included on that plan.
When to contact support
If top shows a process you don't recognize consuming heavy CPU or memory and you're not sure whether it's legitimate, or if a shared/WordPress account seems throttled and you want to understand why, open a ticket from Support in the portal. Real humans review these and can help you figure out next steps.