Analysis command for high usage of CentOS process resources

Source: Internet
Author: User
Tags egrep
1. view the thread of the process: ps-eLf | egrep & #39; gateserver | UID & #39; 2. trace thread call: strace-p155303, statistical thread function call small CPU time: strace-p16334-cstrace-p15530-oout.file # output to out. file 4. only rec 1 is displayed. view the thread of the process:
Ps-eLf | egrep 'gateserver | uid'

2. trace thread call:
Strace-p 15530

3. count the CPU time for function calls in the thread:
Struts-p 16334-c
Strace-p 15530-o out. file # output to the out. file

4. only display the call of the recv function:
Strace-p 5314-f-F-e recv

5. gdb debugging thread:
Gdb-p pid

6. view the file descriptor opened by the thread:

Lsof-p pid

Ps: http://www.aiezu.com/code/strace_lsof_ps_gdb.html

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.