ivopk.blogg.se

Linux command to check cpu and memory usage
Linux command to check cpu and memory usage







linux command to check cpu and memory usage

By default, the output will be sorted in ascendant form, but we can reverse that order by adding a minus sign in front of the sort criteria. It shows the processes’ PIDs (pid), PPIDs (pid), the name of the executable file associated with the process (cmd), and the RAM and CPU utilization (%mem and %cpu, respectively).Īdditionally, we can use –sort to sort by either %mem or %cpu. The -o (or –format) option of ps allows us to specify the output format. # ps -eo pid,ppid,cmd,%mem,%cpu –sort=-%cpu |head How to Find the Process Which Uses Most CPU

linux command to check cpu and memory usage

# ps -eo pid,ppid,cmd,%mem,%cpu –sort=-%mem |head We can use this command to find out which process uses the highest CPU or Memory in Linux.









Linux command to check cpu and memory usage