How to View Running Processes in Linux Using ps and top

October 31, 2025 / Servers, Hosting & Email

Monitoring running processes in Linux is important for identifying what applications are active, measuring system load, and ensuring that services are performing correctly, especially on servers like VPS, dedicated hosting, or Cloud hosting.

Linux provides powerful command-line tools such as ‘ps’ and ‘top’ to help system administrators and developers check process status and resource usage in real time.

What are Linux Processes?

A Linux process is an instance of an executing program. Linux assigns each process a unique PID (Process ID) and tracks its resource usage, including:

  • CPU usage
  • Memory consumption
  • Process owner/user
  • Execution state (running, sleeping, stopped, zombie)

Understanding these details helps maintain smooth server performance.

View Running Processes Using ps

The ps command shows static snapshots of currently running processes on the system.

  1. Common ps options and examples:
    ps: Shows processes in the current shell
    ps-e: Displays all processes
    ps -u username: List processes owned by a specific user
    ps aux: Shows all processes with CPU and memory usage
    ps -ef: Displays full-format output including PPID and start time.
  2. Example: List all running processes with resource info
    ps aux
  3. Example: Sort processes by highest CPU usage
    ps aux --sort=-%cpu | head
  4. Example: Find specific service (e.g., Apache)
    ps aux | grep apache

Tip: Use grep to quickly isolate suspicious or misbehaving processes.

Monitor Processes in Real Time Using top

When you want to check current resource usage and running processes on a Linux system, the top command is one of the most useful tools. It continuously refreshes the display (default every 3 seconds) to show live system activity.

  1. To run, use the following command:
    top
  2. You will see:
    1. Load average
    2. CPU & memory utilisation
    3. Processes sorted by CPU usage
  3. Frequently Used Controls in the top:
    While the top is running, you may press keys as follows:
    P- Sort by CPU usage
    M- Sort by memory usage
    u- Filter by user
    k- Kill a process (enter PID when prompted)
    h- Help menu
    q- Quit top
  4. Example: Sort by memory usage
    Press M inside the top

Understanding CPU, Memory & Process States

  1. Key metrics you will observe:
    %CPU: CPU usage by each process
    %MEM: Percentage of RAM consumed
    TIME+: Total CPU time used by the process
    STAT: Process state (e.g. , S=sleeping, R= running, Z= zombie)
  2. Zombie processes (Z) are inactive but still tracked; usually safe to terminate the parent service if unnecessary.

Best Practices for Hosting Environments

For servers running websites, especially WordPress, eCommerce, or database apps:

  • Check for PHP-FPM, Apache, or MySQL processes consuming too many resources.
  • Monitor frequently during peak traffic.
  • Investigate unknown or suspicious processes.
  • Consider upgrading resources if the load is consistently high.
  • Use monitoring tools alongside ps & top (like htop, server panels or eukhost monitoring services).

If you are on Managed VPS or Managed Dedicated Hosting, eukhost Support can assist in diagnosing high-load issues.

Conclusion

From the above article, it is clear that both ps and top are essential tools for viewing processes in Linux. Regular monitoring helps prevent downtime and ensures optimal performance of your hosted applications.

Keeping track of Linux processes and system resources?
A Linux VPS Hosting solution provides the flexibility to analyse server activity, monitor workloads and optimise performance for demanding applications.
Spread the love