Linux finds the full path of the launcher based on the process number PID

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/lsbhjshyn/article/details/18764613

Working environment encountered network is not normal, detection is a server exception to send packets, using the netstat command to view, found a program. This process state of IptabLex is an exception connection. Cannot be effectively purged, so you want to know which directory this program is in zombie state.


[Email protected]/]# NETSTAT–ANP | Less

When the problem occurs, the status of the process is:
[[email protected]/] PS x

The way to find a process startup path is:
1. We can get the PID of the zombie process from the PS command, as in the above example 23347
2. Enter the directory named under the PID in the/proc directory
3. Enter Ls-ail, the result of the EXE link is the full path of the executable file details
[[email protected]/] ls/proc/found 23347 folders

[[email protected]/] cd/proc/23347

[[email protected] 23347] Ls–ail

Can find this connection has an exception, the corresponding application is also a problem, the rest is to find a way to delete the application of this zombie process, is generally redundant or garbage program, can rm-f kill ...

You can also view the command path by Lsof-p PID

Linux finds the full path of the launcher based on the process number PID

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.