![]() ![]() The ‘ps’ command is a powerful tool for monitoring and managing processes in a Linux system. This will display a hierarchical tree view of all processes, with parent process at top and child processes below. To display a tree view of all processes, use following command − pstree This will display a list of all processes using more than 10% of CPU and memory, using a user-defined filter. To display a list of all zombie processes, use following command − ps aux | awk '$8="Z" ' Replace ‘name’ with name of process you want to view. To display a list of all processes with a specific name, use following command − ps -C name Display a list of all processes with a specific name Replace ‘pid’ with process ID of parent process you want to view child processes for. To display a list of all child processes for a specific parent process, use following command − ps -ppid pid Display a list of all child processes for a specific parent process Replace ‘pgid’ with process group ID of group you want to view processes for. To display a list of all processes in a specific process group, use following command − ps -pid pgid Display a list of all processes in a specific process group Replace ‘tty’ with name of terminal you want to view processes for. To display a list of all processes running in a specific terminal, use following command − ps -t tty Display a list of all processes running in a specific terminal Replace ‘command’ with name of command you want to view processes for. To display a list of all processes for a specific command, use following command − ps -C command Display a list of all processes for a specific command ![]() Replace ‘username’ with actual username of user you want to view processes for. To display a list of all processes owned by a specific user, use following command − ps -u username ![]() Display a list of all processes owned by a specific user This will display a list of all processes sorted in descending order of memory usage. To display a list of all processes sorted by memory usage, use following command − ps aux -sort=-%mem Display a list of all processes sorted by memory usage This will display a list of all processes sorted in descending order of CPU usage. To display a list of all processes sorted by CPU usage, use following command − ps aux -sort=-%cpu Display a list of all processes sorted by CPU usage This will display a tree-like structure of all processes, making it easier to see how they are related. To display a list of all processes along with their full command lines, use following command − ps auxf Display a list of all processes with full command lines This will display a list of all processes along with their PID (process ID), CPU usage, memory usage, and other relevant information. To display a list of all processes running on a Linux system, use following command − ps aux In this article, we will discuss 25 useful ‘ps command’ examples for Linux process monitoring. This information can be useful for troubleshooting, optimizing performance, and identifying potential security issues. It stands for ‘process status’ and is used to display information about processes currently running on a system. The ‘ps’ command is a popular tool used for monitoring processes in Linux operating system. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |