Linux command to view performance resources

Source: Internet
Author: User
Tags svn update
Linux command to view performance resources related to a, view the basic information of the system uname-a # view the kernel/operating system/CPU information head-n1/etc/issue # view the operating system version, linux cat/proc/cpuinfo # View CPU information ,... linux command to view performance resources 1. View basic system information uname-a # View kernel/operating system/CPU information head-n 1/etc/issue # view the operating system version, linux cat/proc/cpuinfo # View CPU information, several cores of hostname # View computer name lsmod # List loaded kernel module env # View environment variable 2. svn Command 1. svn log View log information 2. svn info can view version information, view File Information 3. svn update (up) 4. svn switch (sw): update the working copy to different URLs. 5. svn co code path download svn Code 3. View apache process in Linux: ps-ef | grep httpdLinux view Java process: ps-ef | grep javaLinux view nginx process: ps-ef | grep nginx 4. rpm-qa # View all installed software packages rpm-qa | grep httpd check whether Apache 5 is installed and there is a bottleneck in the SAR Command CPU, according to sar-u and sar-q, there is a bottleneck in I/O. for sar-B, sar-u, and sar-d, the value of % iowait cannot be too high, if % iowait is too high, the CPU spends too much time waiting for input and output, which means that the disk has an I/O bottleneck; % idle value is between 40 and ~ Between 100, once it continues less than 30, it indicates that the main resource competing with the process is not the memory but the CPU. 6. jmap: analyze the memory jmap-histo pid dumping once before and after the memory usage peak, and compare which GC objects are collected. 1. sudo su admin-c "/opt/java_1.6.0.21/bin/jmap-histo pid> jmap.txt" 2.vi jmap.txt generally check the first few items. First ps-ef | grep java find the pid and then go to its directory cd/home/yihan. zysudo-u admin jmap-histo pid> jmap.txt 7. jstack is used to view the threads in the current web application to help locate the threads in the program whose CPU usage is too high. It is also easy to use. under my account, run sudo-u admin/opt/taobao/java1/bin/with the sudo permission /. /jstack pid to dump the thread for analysis. Commands are easy to use. The key is to further analyze the threads in dump. Specifically, when the CPU is busy, we usually need to focus on runnable threads to see what the system is busy with. when the CPU is idle, we need to pay attention to the waiting state thread. Sudo-u admin/opt/java1/bin/jstack 17584> q.txt 8. jstat: you can use this command to view gc information. The syntax structure is as follows: jstat [Options] vmid [interval] [count] Options -- option. we generally use-gcutil to view the gc vmid-VM process number, that is, the currently running java process number interval -- interval, in milliseconds count -- number of prints. if the default is to print countless instances: jstat-gcti 16546 1000 4 16513 is the java process number, you can use (ps-ef | grep java) to print four times. The parameter meanings in the figure are as follows: s0 -- Percentage of used space in region vor space 0 on Heap S1 -- Percentage of used space in region vor space 1 on Heap E -- Eden space on Heap percentage O -- Percentage of space used in the Old space area on the Heap P -- Percentage of space used in the Perm space area YGC -- number of Young GC times from application startup to sampling YGCT -- from the time (in seconds) that Young GC takes when the application starts to sample) FGC-Number of Full GC times from application startup to sampling FGCT-duration (in seconds) from application startup to Full GC at sampling) GCT-total time used for garbage collection from application startup to sampling (unit: Seconds)
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.