![]() ![]() To do this, we need to execute the following command: ps -U edxdĪfter we scroll to the headers, it only lists limited fields – PID, TTY, TIME, and CMD. For example, let’s say that we want to view the processes for edxd user. To do this, we need to use the -U parameter along with the username. Let’s now look at the user-specific commands. List Processes for Specific User (ps -U edxd) CMD: is the name of the command that started this process.If there is a dash (-) status marked, it means that the process is running. WCHAN: displays whether a process is running.SZ: is the memory consumed by the process.ADDR: is the process address in the memory.Smaller the number, the higher the priority. NI: is the nice value, which is also the priority of the process.C: displays the CPU usage by the process.PPID: is the ID of the parent process of the current process.PID: is the ID of the process that is currently running.UID: displays the user ID who is running this process.The number 4, for example, indicates that the process is executed with superuser authority. F: displays the process authority by displaying a number.Let’s quickly look at the headers to understand them closely. Some are common, like TTY, TIME, and PID, to the ps aux command, but others are new. Just like the ps aux command, several headers are listed. Let’s scroll up to see the column headers. Because of the -l parameter, detailed information about the processes is displayed. This is because all processes running in the system are listed. Notice that once again, a long output is generated. Both the commands provide the same output. Note: You can also use the commands like ps -l -e or ps -le. The -l parameter displays the output in the long format, which is about providing detailed information. To do this, we need to use the -le parameter, which includes two individual parameters, -l and -e. We can also list all processes in the Linux standard format. List Processes in Linux Standard Format (ps -le) COMMAND: is the name of the command that started this process.TIME: is the amount of time a process occupies the CPU.START: is the start time of the process.These are some of the key process statuses. STAT: is the process status, such as running (R), sleep but cannot be awakened (D), sleep and can be awakened (S), stop (T), zombie (Z), or locked into memory (L).TTY: is the terminal that is running the process.RSS: is the amount of physical memory size consumed by the process.VSZ: is the amount of virtual memory consumed by a process.%MEM: is the percentage of physical memory consumed by a process.%CPU: is the percentage of CPU resources consumed by a process.USER: is the name of the user who started the process.Let’s quickly understand the column headers: Also, notice in the USER column, there are processes listed from the root user as well. When we scroll up, we get the headers, such as user, PID, %CPU, %MEM, VSZ, RSS, TTY, STAT, START, TIME, and COMMAND. Before doing that, notice that the output towards the end displays the username in the first column. ![]() We need to scroll up to view the headers that will help us understand the information listed in various columns. The output displays a long list of processes. Note: The aux parameter does not require the – (hyphen) like the other parameters. Let’s execute the following command: ps aux To do this, we need to use the aux option with the ps command. We can also view all processes that are currently running. It shows only two processes, which are bash and the ps command. Notice that the output does not display several pieces of detail. When we executed the ps command, the output displayed the currently running processes. ![]() This command displays the currently running processes for a particular user who is logged into the system. We have used the ps command, which means Process Status. We can simply execute the following command to view them: ps We may need to view the static processes running in the system. Acting as a non-root sudo user to ensure a secure environment.Display Absolute Paths for Processes (top -c).Automatically Close top After n Refreshes (top -n ).Understanding the top Command System Values and Column Headers.The top Command (Real-Time Process Monitor).Show Process Tree for Process Name (pstree -p | grep ).Show Process Tree with PIDs (pstree -p).Show Tree for a Single Proceess (pstree ).Show Processes for a Specific User (pstree ).Show Threads for Each Process (pstree -t).The pstree Command (Processes as a Tree).List Processes for Specific User (ps -U edxd).List Processes in Linux Standard Format (ps -le). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |