Hostxpeed
Login Get Started →
Getting Started

How to View Running Processes

5 min read
19 views
Jun 10, 2026

Prerequisites

Before viewing processes, make sure you have:

  • SSH access to your VPS
  • Your server IP address and password

What are Processes?

Processes are running programs on your server - web servers, databases, cron jobs, user sessions, and system services.

Method 1: Using the ps Command

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22

View all processes:

ps aux

Output columns:

  • USER - Who owns the process
  • PID - Process ID number
  • %CPU - CPU usage percentage
  • %MEM - Memory usage percentage
  • VSZ/RSS - Virtual/Physical memory used
  • STAT - Process state (R=running, S=sleeping, Z=zombie)
  • START - When process started
  • TIME - Total CPU time used
  • COMMAND - The command that started it

Common ps Filters

Show processes by user:

ps -u username

Show process hierarchy (tree view):

ps auxf

Show only your processes:

ps x

Show all processes with full format:

ps -ef

Find a specific process (e.g., nginx):

ps aux | grep nginx

Method 2: Using the top Command (Interactive)

top

Top shows real-time updating process list. Keyboard shortcuts:

  • q - Quit
  • P - Sort by CPU usage
  • M - Sort by memory usage
  • k - Kill a process (enter PID)
  • r - Renice (change priority)
  • 1 - Show each CPU core individually
  • c - Show full command path

Method 3: Using htop (Better Alternative)

Install htop first:

apt install htop -y

Run htop:

htop

htop features:

  • Color-coded output
  • Mouse support
  • Easier process killing (F9)
  • Tree view (F5)
  • Search processes (F3)

Method 4: Using pgrep (Find Process by Name)

Get PID of a process:

pgrep nginx

Get PID with process name:

pgrep -l nginx

Method 5: Check Your Own Processes Only

ps u

Count Total Running Processes

ps aux | wc -l

Sort Processes by Memory Usage

ps aux --sort=-%mem | head -10

Sort Processes by CPU Usage

ps aux --sort=-%cpu | head -10

Show Process Tree (pstree)

pstree

With PIDs:

pstree -p

Understanding Process States

  • R - Running or runnable
  • S - Sleeping (waiting for event)
  • D - Uninterruptible sleep (usually disk I/O)
  • Z - Zombie (dead but not cleaned up)
  • T - Stopped (by job control)
  • I - Idle kernel thread

⚠️ High number of zombie processes (Z) indicates an issue that may require reboot.

Real-time Process Monitoring Script

#!/bin/bash
while true; do
    clear
    echo "=== Top 5 CPU Processes ==="
    ps aux --sort=-%cpu | head -6
    echo ""
    echo "=== Top 5 Memory Processes ==="
    ps aux --sort=-%mem | head -6
    sleep 2
done

✅ You can now view and monitor all running processes on your Hostxpeed VPS.

Was this article helpful?