- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How To identify A hang Process in Linux
Operating System - Linux
1755132
Members
2777
Online
108830
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2008 09:02 PM
тАО06-12-2008 09:02 PM
Re: How To identify A hang Process in Linux
I think dfunct represents the Zombie process.But the requirement is to monitor all processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2008 10:44 PM
тАО06-12-2008 10:44 PM
Re: How To identify A hang Process in Linux
you can also take a look at what the process is doing with the 'strace' command. either no output appears for a long time. or you see the same calls appearing all the time, which could mean it's stuck in a loop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2008 01:05 AM
тАО06-15-2008 01:05 AM
Re: How To identify A hang Process in Linux
Hi, Dheeraj
The problem seems to be vague, why would somebody want to monitor a client(mozilla), One should worry about the hang of a server and not a client.
Still as you say you want to know if a process has not done anything for some specified amount of time(you need to fix a limit on that)-Also process consuming no cpu is not hanged always. What you can do is:
have a look at /proc//stat
This has a lot of numbers includeing the accounting information. You can extract the cpu time consumed in a loop and go on checking the previous value with the new value if they both are same for quite some time(you decide the time) you can take it a hanged.
-Sri
The problem seems to be vague, why would somebody want to monitor a client(mozilla), One should worry about the hang of a server and not a client.
Still as you say you want to know if a process has not done anything for some specified amount of time(you need to fix a limit on that)-Also process consuming no cpu is not hanged always. What you can do is:
have a look at /proc/
This has a lot of numbers includeing the accounting information. You can extract the cpu time consumed in a loop and go on checking the previous value with the new value if they both are same for quite some time(you decide the time) you can take it a hanged.
-Sri
abandon all hope, ye who enter here..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2008 02:40 AM
тАО06-15-2008 02:40 AM
Re: How To identify A hang Process in Linux
The problem seems to be almost equivalent to the Halting Problem of computability theory.
See Wikipedia's article about the Halting Problem:
http://en.wikipedia.org/wiki/Halting_problem
Any modern computer is essentially a Turing machine. Alan Turing proved in 1936 that there are no general solutions in the Halting Problem. In other words, your task is *impossible* unless you can get some extra information or are willing to accept some false detections.
For example, the problem becomes much easier if you have a way of determining whether the program is making progress or not. For server programs that take in requests and process them, this is usually easy: determine the maximum acceptable time to process a request, and if the program is spending much more time with one request it's probably hung.
Or you could simply monitor the length of the queue of unprocessed requests: if the queue grows too long, there is a problem.
For interactive programs like a web browser, the "queue" is in the user's mind, so your program cannot determine the queue length. You'll have to add some assumptions, for example:
- when the browser process has a large %CPU value, it is probably drawing a new page to the display
- nobody will want to wait 10 minutes for a webpage to be displayed
- so if the browser has a large %CPU value for 10 minutes continuously, it's probably hung
But someday you might need to read a super-heavy web page which takes 11 minutes to display on your old computer...
Assumptions like this are always specific to the type of program (web browser) and are not correct for any other type of program. For example, if a database engine is processing a lot of requests, it may have a high %CPU for hours at a time. But if your system is getting a lot of work done, that's exactly what is supposed to happen.
MK
See Wikipedia's article about the Halting Problem:
http://en.wikipedia.org/wiki/Halting_problem
Any modern computer is essentially a Turing machine. Alan Turing proved in 1936 that there are no general solutions in the Halting Problem. In other words, your task is *impossible* unless you can get some extra information or are willing to accept some false detections.
For example, the problem becomes much easier if you have a way of determining whether the program is making progress or not. For server programs that take in requests and process them, this is usually easy: determine the maximum acceptable time to process a request, and if the program is spending much more time with one request it's probably hung.
Or you could simply monitor the length of the queue of unprocessed requests: if the queue grows too long, there is a problem.
For interactive programs like a web browser, the "queue" is in the user's mind, so your program cannot determine the queue length. You'll have to add some assumptions, for example:
- when the browser process has a large %CPU value, it is probably drawing a new page to the display
- nobody will want to wait 10 minutes for a webpage to be displayed
- so if the browser has a large %CPU value for 10 minutes continuously, it's probably hung
But someday you might need to read a super-heavy web page which takes 11 minutes to display on your old computer...
Assumptions like this are always specific to the type of program (web browser) and are not correct for any other type of program. For example, if a database engine is processing a lot of requests, it may have a high %CPU for hours at a time. But if your system is getting a lot of work done, that's exactly what is supposed to happen.
MK
MK
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP