In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "Linux server performance query commands", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn the "Linux server performance query commands" it!
There are many reasons for the slow performance of the server system, most of which are:
1:Cpu occupies too much
2: excessive memory footprint
3: hard disk occupancy
4: number of disk io
5: network io
Combine the java program to locate the specific reason in the Linux environment.
First, write a piece of code that is sure to be an endless loop:
Public class TestLinuxDemo {public static void main (String [] args) {while (true) {System.out.println (new Random (). NextInt (66668888));}
Locate the source file directory and copy it to the Linux file system
Linux terminal executes javac TestLinuxDemo.java
Java TestLinuxDemo
Step 1: troubleshoot the system command top
Parameter 1:Linux command
2: current system load balancer: 3 digits add up * 100% Bash 3 if greater than 60% indicates that the load is too high
3: specific java process id and occupancy information
Press the number 1 key the specific number of cpu in the current system
Uptime: compact version of top
Step 2: troubleshoot the CPU command vmstat
Mainly focus on procs (process) cpu id (idle): the higher the cpu idle rate, the better than 80%.
Query all cpu information: mpstat-P ALL 2
View the decomposition information of cpu usage: pidstat-u 1-p pid
Step 3: troubleshoot the memory command free
Total memory 3935m nearly 4G has used 1079m idle 500m
Step 4: troubleshoot the hard drive command df: disk free
Step 5: network io ifstat
Precise positioning:
1:top check that the specific occupied process is 2588.
2: accurate positioning of ps-ef | grep 2588 | grep-v grep
3: locate thread code: ps-mp 2588-o THREAD,tid,time
4: convert the hexadecimal expression of a specific process to the lowercase letter A1d
Ps: the right way to open your calculator? Calc
5:jstack 2588 | grep A1d-A60
Identify the 12 lines of the java program
At the end of the ok location, just kill the process.
At this point, I believe that everyone on the "Linux server performance query commands" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.