How to Insert a PDF in WordPress without using Plugin
In this article, you will learn how to insert a PDF in WordPress without the…
Monitoring the processes running on a Linux system is an essential task for system administrators and users who want to manage system resources effectively. This guide will walk you through various methods to check running processes in Linux in a human-readable way.
ps CommandThe ps command displays information about active processes. It’s one of the simplest ways to view running processes.
ps
This command shows processes related to the current terminal session.
ps -e: Displays all processes.ps -f: Shows full-format listing, including additional details like the user and command.ps aux: Provides a comprehensive view of all processes along with their CPU and memory usage.ps aux | less
This command lists all processes and pipes the output into less for easier navigation.
top CommandThe top command is an interactive utility that provides a dynamic, real-time view of system processes.
top
Key columns include:
q to quit.h for help within the top interface.htop Commandhtop is an enhanced alternative to top with a more user-friendly interface. It provides color-coded information and easier navigation.
htop (if not already installed):sudo apt install htop # For Debian/Ubuntu
sudo yum install htop # For CentOS/RHEL
htop
pidof CommandThe pidof command is useful for finding the PID of a specific process.
pidof <process_name>
For example, to find the PID of the nginx service:
pidof nginx
pgrep CommandThe pgrep command searches for processes based on name and other attributes.
pgrep <process_name>
Example:
pgrep ssh
This will list the PIDs of all processes related to ssh.
jobs CommandThe the jobs command displays processes started by the current shell.
jobs
This is particularly useful for managing background and stopped jobs in the terminal.
/proc FilesystemLinux maintains information about processes in the /proc directory. Each running process has a corresponding directory under /proc with its PID as the name.
To view the status of a process with PID 1234:
cat /proc/1234/status
systemctl CommandFor systems using systemd, the systemctl command helps monitor service-related processes.
systemctl list-units –type=service
systemctl status apache2
netstat CommandTo view processes related to network activity, the netstat command can be useful.
netstat -tulnp
You can combine commands with grep to filter specific results.
To find all processes running under a specific user:
ps -u <username>
To filter for a specific process:
ps aux | grep <process_name>
These commands provide versatile ways to monitor and manage processes on a Linux system. By mastering these tools, you can efficiently track system performance, diagnose issues, and optimize resource usage.
Learn More: How to Check the Size of a Directory in Linux
Explore more hosting insights, tips and industry updates.
In this article, you will learn how to insert a PDF in WordPress without the…
CGI (Common Gateway Interface) scripts allow you to run programs or scripts (such as .cgi,…
What happens if my resource usage begins to exceed the original specifications of my…