1. View apache concurrent requests and their TCP connection status netstat-n | awk '/^ tcp/{++ S [$ NF]} END {for (ainS) printa, S [a]} '2, displays the 10 processes that consume the most memory/CPU psaux | sort-nk + 4 | tail3, find the 10 most commonly used commands and the number of times sed-e's/|/\ n/G '~ /. Bash_hi 1, view the apache concurrent requests and their TCP connection status
Netstat-n | awk '/^ tcp/{++ S [$ NF]} END {for (a in S) print a, S [a]}'
2. displays the 10 processes that consume the most memory/CPU resources.
Ps aux | sort-nk + 4 | tail
3. Find the 10 most commonly used commands and the number of times of use.
Sed-e's/|/\ n/G '~ /. Bash_history | cut-d ''-f 1 | sort | uniq-c | sort-nr | head
4. lsof command
Displays the files currently opened by the abc process.
Lsof-p 2622
Display what programs are running on port 22
Lsof-I: 22
5. Check whether the network card has a physical connection.
/Sbin/mii-tool
6. view the server serial number
Dmidecode | grep "Serial Number"
7. Check the number of physical CPUs
Cat/proc/cpuinfo | grep "physical id" | sort | uniq | wc-l
View the number of logical CPUs in each physical CPU
Cat/proc/cpuinfo | grep "siblings"
8. view the number of logical CPUs
Cat/proc/cpuinfo | grep "processor"
10. Release the server memory.
To free pagecache, use:
Echo 1>/proc/sys/vm/drop_caches
To free dentries and inodes, use:
Echo 2>/proc/sys/vm/drop_caches
To free pagecache, dentries and inodes, use:
Echo 3>/proc/sys/vm/drop_caches
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service