In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how to use the top command of Linux". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Top command is a commonly used performance analysis tool under Linux, which can display the resource consumption of each process in the system in real time, similar to the task manager of Windows.
1. Usage
Top [options]
2. Command option-b operate in batch mode-c display complete governance command-d screen refresh interval time-I ignore failure process-s secret mode-S cumulative mode-I set refresh interval time-u specify user name-p specify process-n cycle display times 3, In this command, the commonly used shortcut key h displays shortcut keys to help k terminate a process I turn on / off ignore idle and dead processes Q exit program r reschedule a process's priority S switch to cumulative mode s change refresh interval Add or remove items o from the current display O change the order in which items are displayed l toggle display average load and startup time information m toggle display memory information t toggle display process and CPU status information c toggle display command name and full command line M sort by memory usage P sort by CPU usage (default sort) T sort by time / cumulative time Sequence w writes the current settings into the ~ / .toprc file 1 expand multicore cpu display 4, Instance top-18:17:22 up 8:52 1 user, load average: 0.05,0.04, 0.05Tasks: 99 total, 2 running, 97 sleeping, 0 stopped, 0 zombie%Cpu (s): 0.0 us, 0.1 sy, 0.0 ni, 99.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 stKiB Mem: 739932 total, 353944 free, 125284 used, 260704 buff/cacheKiB Swap: 1044476 total, 1044476 free, 0 used. 459304 avail MemPID USER PR NI VIRT RES SHR S% CPU% MEM TIME+ COMMAND47 root 2000 00 S 0.1 0.0 kworker/0:1643 root 36.55 kworker/0:1643 root 20 21668 1284 972 S 0.1 0.2 0 irqbalance1668 root 18.13 irqbalance1668 root 20 00 S 0.1 0.0 irqbalance1668 root 01.08 kworker/1:11 root 20 0 127968 6480 4096 S 0.90 systemd2 root 20 00 S 0.0 irqbalance1668 root 00.02 kthreadd3 root 20 00 S 0.0 0.00: 00.23 ksoftirqd/05 root 0-20 000 S 0.0 0.00: 00.00 kworker/0:0H7 root rt 00 00 S 0.0 0.00: 00.02 migration/08 root 20 00 00 S 0.0 0.00: 00.00 rcu_bh9 root 20 00 R 0.0 0.00: 01.95 rcu_sched10 root 0-20 000 S 0.0 0.00: 00.00 lru-add-drain5, Description
Overall resource statistics of the top 5 behavior systems
Top-system current time up system powered on how long user current users load average cpu average load, three values are: 1 minute, 5 minutes, 15 minutes Tasks system current processes, total: total processes, running: running processes, sleeping: sleep processes, stopped: processes stopped, zombie: zombie processes% Cpu (s) cpu utilization Us: user uses cpu 100%, sy: system kernel uses cpu 100%, id: remaining cpu 100% memory usage information, total: total memory size, free: free memory, used: used memory, buff/cache: cached memory size Swap virtual memory information PID process owner PR priority NI nice value, negative value indicates high priority A positive value indicates the total amount of virtual memory used by low-priority VIRT processes physical memory size used by RES processes SHR shared memory size S process state, D: uninterruptible sleep state, R: run, S: sleep, T: track / stop Z: zombie process% percentage of CPU used by CPU process% percentage of physical memory used by MEM process total CPU time used by TIME+ process total COMMAND command name "how to use the top command of Linux", thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.