Tech Junkie Blog - Real World Tutorials, Happy Coding!: Linux Process Management: The ps command

Monday, February 28, 2022

Linux Process Management: The ps command

 In Linux managing processes is an essential part of keeping your system running in an efficient state.  In this post we are going to look at the commonly used ps command.

If you just type ps you will get the processes that's currently running along with the PID (process ID), TTY (terminal it is running in), Time (CPU utilization time), and the command that is used to run the process






Here are some of the options that are useful with the ps command:

1. ps -e this will show you all the processes









2. ps aux this will show you all the processes that are not assigned to a user terminal










3. ps -e --forest this will show you the process tree view of the process








There's a nicer way to look at the process tree with the command pstree










4. ps -f gives you the full ps process information which includes the user id and the parent process id





ps -F gives you even more information about the process, it gives you the size and RSS (memory size) of the process




5.  ps -l shows you the long listing, which shows you different kinds of information like the UID (number) and the process priority





6. You can combine options with commands like ps -elf which will give you the full ad long listing








7. As with other commands, you can search for a process when you combine it with the grep command.  Let's say we want to search for all the gnome processes we can type the following ps -elf | grep gnome





8. ps -ly will replace the address column with the resident size (memory size)



1 comment:

  1. It was an kinda informational post for Linux managing processes system. I'm gonna save your post to used it in a future, right I have to work on my dissertation posters, I didn't have much time left.

    ReplyDelete

Search This Blog