Linux ps command to view the cpu and memory usage sorting (conversion), linuxps
Run the following command to View Details:
ps -aux | sort -k4,4nps auxw --sort=rssps auxw --sort=%cpu
Ps commands in linux
% CPU usage of the cpu process % memory usage of the MEM process the size of the virtual memory used by the VSZ process the size of the RSS process uses a large resident set or the actual memory size of the TTY and the terminal associated with the process (tty) STAT check status: Process status is represented by characters, such as R (running is running or ready to run), S (sleeping sleep), I (idle), and Z (stiff), D (uninterruptible sleep, usually I/O), P (waiting for switching page), W (switching out, indicating that the current page is not in memory), N (low-priority task) T (terminate), W has no resident pagesSTART (process start TIME and date) TIME; (total cpu TIME used by the process) COMMAND (COMMAND line COMMAND being executed) NI (nice) Priority PRI process priority number PPID parent process ID (parent process id) SID session ID (session id) Name of the kernel function in which the WCHAN process is sleeping; The function name is obtained from the/root/system. map File. FLAGS and process-related digital identification common parameter-A shows all processes (equivalent to-e) (utility)-a shows all processes of A terminal, except session lead-N ignore selection. -D: display all processes, but omit all session leads (utility)-x: display processes without control terminals, and display the specific path of each command. Dx cannot be used together. (Utility)-p pid process uses the cpu time-u uid or username to select a valid user ID or user name-g gid or groupname to display all processes in the group. U username displays all processes under the user and detailed paths of each command. For example, ps U zhang; (utility)-f is all listed. It is usually used with other options. For example, the ps-fa or ps-fx and so on.-l long format (with fields such as F, wchan, and C)-j job format-o User-Defined Format. V displays s in the format of virtual memory in the signal format.-m Displays all threads.-H displays the process layers (used with other commands, such as ps-Ha) (utility) environment (for example, ps-d e; ps-a e) (utility) h does not display the first line