Tracking process stack command pstack

Source: Internet
Author: User

The pstack command must be run by the owner or root of the corresponding process. The stack trace of each process can be displayed. You can use pstack to determine where the process is suspended. The only option allowed by this command is the PID of the process to be checked.

Example

A program is written, sleep is suspended, and the PID of the process is viewed. Use pstack to view the PID. The result is as follows:

[Root @ SPA ~] # Ps aux | grep testroot 2901 0.0 0.0 3784 448 pts/0 S +. /testroot 2903 0.0 0.0 7188 pts/1 R + grep test [root @ SPA ~] # [Root @ SPA ~] # [Root @ SPA ~] # Pstack 2901 #1 0x000000325829a214 in sleep () from/lib64/libc. so.6 #2 0x000000000000004009c9 in main ()
This process is suspended at sleep.

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.