<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How To identify A hang Process in Linux in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215310#M32875</link>
    <description>Hi, Dheeraj&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;have a look at /proc/&lt;PID of="" mozilla=""&gt;/stat&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;/PID&gt;</description>
    <pubDate>Sun, 15 Jun 2008 08:05:46 GMT</pubDate>
    <dc:creator>Srimalik</dc:creator>
    <dc:date>2008-06-15T08:05:46Z</dc:date>
    <item>
      <title>How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215298#M32863</link>
      <description>I am Looking for a script for identifying a hang process in Linux.&lt;BR /&gt;I am not sure whether its is on the basis of the %CPU time usage or any other parameters which decides the hang up of a process.</description>
      <pubDate>Thu, 12 Jun 2008 06:20:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215298#M32863</guid>
      <dc:creator>DhsDheeraj</dc:creator>
      <dc:date>2008-06-12T06:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215299#M32864</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;A combination of top and or a process analysis script may be needed.&lt;BR /&gt;&lt;BR /&gt;When I suspect a problem like this, I take a look at top and then run ps commands against the suspected process.&lt;BR /&gt;&lt;BR /&gt;Automated identification is not possible in many cases. The eyes and mind of a systems administrator are required.&lt;BR /&gt;&lt;BR /&gt;Take a look at this script for ps command options.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hpux.ws/?p=8" target="_blank"&gt;http://www.hpux.ws/?p=8&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 12 Jun 2008 06:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215299#M32864</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-06-12T06:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215300#M32865</link>
      <description>Thanks for Your comments.But I am not able to get the Script.&lt;BR /&gt;Actually I am writing a Monitor program(using java) which should report the status of process if it is hanged up specially a web browser like mozilla.&lt;BR /&gt;Can You provide an idea how should i proceed.&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2008 07:04:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215300#M32865</guid>
      <dc:creator>DhsDheeraj</dc:creator>
      <dc:date>2008-06-12T07:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215301#M32866</link>
      <description>I think you will easily know if a web browser hangs or not - it won't respond anymore ...</description>
      <pubDate>Thu, 12 Jun 2008 08:21:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215301#M32866</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2008-06-12T08:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215302#M32867</link>
      <description>Yeah a user can see that but how can i check that using java code.As i need to make a check in the code and then generate a summary for that.&lt;BR /&gt;So far What i have thought of taking the CPU usage(High one) and process status(Running) as the parameters to decide that a process has hanged up.But I am not sure of the approach whether its correct or not.&lt;BR /&gt;Please correct me if I am wrong.</description>
      <pubDate>Thu, 12 Jun 2008 08:35:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215302#M32867</guid>
      <dc:creator>DhsDheeraj</dc:creator>
      <dc:date>2008-06-12T08:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215303#M32868</link>
      <description>First, you're in an HP-UX forum, and there&lt;BR /&gt;is a Linux forum:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/familyhome.do?familyId=118" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/familyhome.do?familyId=118&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Define "hang process".&lt;BR /&gt;&lt;BR /&gt;A program can get into a state where it uses&lt;BR /&gt;no CPU because it's waiting for something to&lt;BR /&gt;happen.  It's really hung only if that thing&lt;BR /&gt;never happens.  How can you decide if that&lt;BR /&gt;thing _will_ happen?&lt;BR /&gt;&lt;BR /&gt;A program can use all (or nearly all) the CPU&lt;BR /&gt;for a long time without producing a result,&lt;BR /&gt;because it has much work to do.  A user may&lt;BR /&gt;believe that it's hung, even though it's&lt;BR /&gt;simply working hard.&lt;BR /&gt;&lt;BR /&gt;What condition are you trying to detect?</description>
      <pubDate>Thu, 12 Jun 2008 10:11:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215303#M32868</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-12T10:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215304#M32869</link>
      <description>Thanks Steven for providing the link for Linux forum and constructing a refined form of  problem definition.&lt;BR /&gt;Well I am looking for the first condition.But how can we decide that_thing.&lt;BR /&gt;Can You Please tell me your opinion on this by taking care that I am looking for a solution to  detect the mozilla web browser in the hang status.</description>
      <pubDate>Thu, 12 Jun 2008 10:24:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215304#M32869</guid>
      <dc:creator>DhsDheeraj</dc:creator>
      <dc:date>2008-06-12T10:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215305#M32870</link>
      <description>My opinion (which may be worth little) is&lt;BR /&gt;that you would need to know exactly why (or,&lt;BR /&gt;at least, approximately why) the program is&lt;BR /&gt;hung, that is, what it's waiting for.  And&lt;BR /&gt;whether there's any chance of it ever getting&lt;BR /&gt;the thing it's waiting for.  (My personal&lt;BR /&gt;psychic powers are weak, and I don't know how&lt;BR /&gt;to write a psychic computer program.)&lt;BR /&gt;&lt;BR /&gt;In the case of a Web browser like Mozilla,&lt;BR /&gt;the program can send a request (HTTP) to a&lt;BR /&gt;server, and wait for a response.  It can&lt;BR /&gt;_appear_ to hang because of a problem in the&lt;BR /&gt;server, but the server could recover at any&lt;BR /&gt;time, and all would be well again (unless&lt;BR /&gt;Mozilla times out and moves on before the&lt;BR /&gt;server responds).  It could also have some&lt;BR /&gt;problem (internal, or a bad JavaScript or&lt;BR /&gt;Java program) which could cause it to wait&lt;BR /&gt;for some event which will never happen.  I&lt;BR /&gt;don't know any practical way you can (from&lt;BR /&gt;the outside) distinguish between a&lt;BR /&gt;slow-to-respond server and a hung client.&lt;BR /&gt;&lt;BR /&gt;What, exactly, is the problem which you are&lt;BR /&gt;trying to solve?</description>
      <pubDate>Thu, 12 Jun 2008 11:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215305#M32870</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-06-12T11:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215306#M32871</link>
      <description>Steven ,actually I am doing an assignment where i need to monitor the state of mozilla instance which will be used for connecting to pre-decided Server (for a web based application)&lt;BR /&gt;Now in case if the Browser get hang up (i do not know the reasons probably its in any case) then i need to identify it using my java code and report the same(for the time being i need to just log the data).&lt;BR /&gt;Can You suggest me an approach for that.</description>
      <pubDate>Thu, 12 Jun 2008 12:34:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215306#M32871</guid>
      <dc:creator>DhsDheeraj</dc:creator>
      <dc:date>2008-06-12T12:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215307#M32872</link>
      <description>I am not sure for Linux&lt;BR /&gt;This is for HP-UX:&lt;BR /&gt;ps -ef |grep defunct</description>
      <pubDate>Thu, 12 Jun 2008 22:03:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215307#M32872</guid>
      <dc:creator>MSECO_1</dc:creator>
      <dc:date>2008-06-12T22:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215308#M32873</link>
      <description>I think dfunct represents the Zombie process.But the requirement is to monitor all processes.</description>
      <pubDate>Fri, 13 Jun 2008 04:02:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215308#M32873</guid>
      <dc:creator>DhsDheeraj</dc:creator>
      <dc:date>2008-06-13T04:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215309#M32874</link>
      <description>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.</description>
      <pubDate>Fri, 13 Jun 2008 05:44:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215309#M32874</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2008-06-13T05:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215310#M32875</link>
      <description>Hi, Dheeraj&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;have a look at /proc/&lt;PID of="" mozilla=""&gt;/stat&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;/PID&gt;</description>
      <pubDate>Sun, 15 Jun 2008 08:05:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215310#M32875</guid>
      <dc:creator>Srimalik</dc:creator>
      <dc:date>2008-06-15T08:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: How To identify A hang Process in Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215311#M32876</link>
      <description>The problem seems to be almost equivalent to the Halting Problem of computability theory.&lt;BR /&gt;&lt;BR /&gt;See Wikipedia's article about the Halting Problem:&lt;BR /&gt;&lt;A href="http://en.wikipedia.org/wiki/Halting_problem" target="_blank"&gt;http://en.wikipedia.org/wiki/Halting_problem&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Or you could simply monitor the length of the queue of unprocessed requests: if the queue grows too long, there is a problem.&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;- when the browser process has a large %CPU value, it is probably drawing a new page to the display&lt;BR /&gt;- nobody will want to wait 10 minutes for a webpage to be displayed&lt;BR /&gt;- so if the browser has a large %CPU value for 10 minutes continuously, it's probably hung&lt;BR /&gt;But someday you might need to read a super-heavy web page which takes 11 minutes to display on your old computer...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Sun, 15 Jun 2008 09:40:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-identify-a-hang-process-in-linux/m-p/4215311#M32876</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2008-06-15T09:40:51Z</dc:date>
    </item>
  </channel>
</rss>

