In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about the Linux system performance monitoring command commonly used content. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
Recently, I am writing project operation manual for the company. It involves performance monitoring of Linux systems.
Learn now and sell now, learn while recording. The following are common commands.
top
The code is as follows:
Description: View current operation
Command Format:
top [-] [d] [p] [q] [c] [C] [S] [n]
Parameter Description:
d: Specify the time interval between every two screen information refreshes. Of course, the user can change it using the s interactive command.
p: Monitor only the status of a process by specifying the monitor process ID.
q: This option will refresh top without any delay. If the caller has superuser privileges, top will run with the highest possible priority.
S: Specify accumulation mode
s: Causes the top command to run in safe mode. This removes the potential danger of interactive commands.
i: Make top not display any idle or dead processes.
c: Display the entire command line instead of just the command name
1 : Number 1, open detailed multi-CPU usage
u : Select the specified user process
or : refresh record
A: Open the top 4 views
G : Select one of views 1-4 of top
In the display window of the top command, we can also enter the following letters for some interaction:
Help documentation is as follows:
Help for Interactive Commands - procps version 3.2.7
Window 1:Def: Cumulative mode Off. System: Delay 4.0 secs; Secure mode Off.
Z,B Global: 'Z' change color mappings; 'B' disable/enable bold
l,t,m Toggle Summaries: 'l' load avg; 't' task/cpu stats; 'm' mem info
1,I Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode
f,o . Fields/Columns: 'f' add or remove; 'o' change display order
F or O . Select sort field
. Move sort field: '' next col right
R,H . Toggle: 'R' normal/reverse sort; 'H' show threads
c,i,S . Toggle: 'c' cmd name/line; 'i' idle tasks; 'S' cumulative time
x,y . Toggle highlights: 'x' sort field; 'y' running tasks
z,b . Toggle: 'z' color/mono; 'b' bold/reverse (only if 'x' or 'y')
u . Show specific user only
n or # . Set maximum tasks displayed
k,r Manipulate tasks: 'k' kill; 'r' renice
d or s Set update interval
W Write configuration file
q Quit
( commands shown with '. ' require a visible task display window )
Press 'h' or '? ' for help with Windows,
H or what? : Displays a help screen that gives a brief summary of the command.
K: Terminate a process. The user will be prompted to enter the PID of the process to terminate and what signal to send to that process. A normal process termination can be done using signal 15; if it does not end properly, signal 9 is used to force the process to end. The default value is signal 15. This command is masked in safe mode.
i: Ignore idle and dead processes. This is an on-off command.
Q: Exit the program.
r: Rearrange the priority of a process. The system prompts the user to enter the PID of the process to be changed and the priority value of the process to be set. Entering a positive value will cause the process to have a lower priority, or vice versa. The default value is 10.
S: Switch to cumulative mode.
s : Change the delay time between refreshes. The user is prompted to enter a new time in s. If there are decimals, convert them to ms. Enter a value of 0 and the system will refresh continuously. The default value is 5 s. It should be noted that if the setting time is too small, it is likely to cause constant refresh, so that it is too late to see the display, and the system load will be greatly increased.
f or F : Add or delete items from the current display.
o or O : Change the order in which items are displayed.
l: Toggle display of average load and start-up time information. The first line of shadow is displayed
M: Switch display memory information. Show shadow memory rows
t: Toggle display process and CPU status information. Show shadow CPU row
c: Toggles display command name and full command line. Show the complete command. This function is useful.
M: Sort by resident memory size.
P: Sort by CPU usage percentage size.
T: Sort by time/cumulative time.
W: Writes the current settings to the ~/.toprc file. This is the recommended way to write top profiles.
vmstat
Description: View overall system status
vmstat -n 1
df
Description: View system disk space usage
df -h
Linux View System Configuration Common Commands
# uname -a #view kernel/OS/CPU info # head -n 1 /etc/issue #view OS version
# cat /proc/cpuinfo #view CPU info # hostname #view computer name
# lspci -tv #list all PCI devices # lsusb -tv #list all USB devices
# lsmod #list loaded kernel modules # env #view environment variable resources
# free -m #view memory usage and swap area usage # df -h #view partition usage
# du -sh #View size of specified directory # grep MemTotal /proc/meminfo #View total memory
# grep MemFree /proc/meminfo #View amount of free memory # uptime #View system uptime, number of users, load
# cat /proc/loadavg #view system load disks and partitions # mount| column -t #View attached partition status
# fdisk -l #View all partitions # swapon -s #View all swap partitions
# hdparm -i /dev/hda #View disk parameters (IDE devices only)# dmesg| grep IDE #View IDE device detection status at startup Network
# ifconfig #View properties of all network interfaces # iptables -L #View firewall settings
# route -n #view routing table # netstat -lntp #view all listening ports
# netstat -antp #view all established connections # netstat -s #view network statistics progress
# ps -ef #View all processes # top #Display process status in real time User
# w #View active users # id #View specified user information
# last #View user login logs # cut -d: -f1 /etc/passwd #View all users of the system
# cut -d: -f1 /etc/group #View all groups in the system # crontab -l #View scheduled tasks for the current user Services
# chkconfig-list #List all system services # chkconfig-list| grep on #List all system services started
# rpm -qa #View all installed packages
Thank you for reading! About "Linux system performance monitoring commonly used commands" this article is shared here, I hope the above content can have some help for everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!
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.