hang process in RH linux?

Posted on 2004-09-06
Last Modified: 2010-03-18
1. How do I identify a nearly hang process in RH linux?

2. Is that safe to remove it once the process had hang?

3. Which log message is the most improtant to be watched over?
Question by:johntsai90
  • 4
  • 3

Expert Comment

ID: 11993408
You could run top.  if the process is taking processor cycles and no result the it could ba a culprit.  Depending on the process check out /var/log/messages.  Other processes have their own logging besides this that might be under /var/log or a corresponding subdirtectory to the process.  If  process is hung you don't really have a choice.  Make sure you have good backup of your data if your having that sort of issue.  

Author Comment

ID: 11993640
How do you define the no result on the top? RRS, Share or anything else?

I found out there are 2 stopped processes described from the top, but i am not sure exactly which 2 does it indiciate it?

To stop it, I can just kill -9 "PID#", right?

Expert Comment

ID: 11995954
Normally, if the service is not responding, like it is dns and it's not resolving names then just do service named stop.  If it is still in your list of processes then yes you can kill it.  Just because the process isn't taking or is taking cpu cycle doesn't mean it isn't hung or in a loop.  It's more a matter of taking way too long to do something or just not responding to a request.
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.


Author Comment

ID: 12003390
But as i can see some stopped processes on the "top" as it states? How do I know which one isn't hung or which one is really getting stopped?

Accepted Solution

jonnietexas earned 377 total points
ID: 12003455
The process may not be stopped but sleeping.  I wouldn't worry about it unless the process is needed and is not reposnding to your request.

Author Comment

ID: 12007418
Thanks Jonnietexas,

I'm just wondering why does my memory will always decrease after certain while. I knew some  of the restart process action has trigger the memory to be used. However, the momery is only thing I need to release in order for our server kept functioning. Is any way of improving this? Our squid or port_redirector usually got hung after virus attacked from our huge LAN, and we don't have other choice but restart the process. Is any way I can protect this from our server. So far as I used ACL to block certain port at switch level, but i need to figure out a way to block this virus traffic effectively. Any products or ways to recommand here?

Expert Comment

ID: 12648529
I would go look at the processes that are started by default.  In redhat type in chkconfig --list.  You will see a list of all of the processes that start or not by run level.  Examine each of them carefully to see if you can shut them off.  To shut it off type chkconfig process_name off.  For instance, Networking is S10network.  To have it not start at boot type chkconfig network off.  (just an example.)  This will move the file to a K script instead of an S and won't be started.  The scripts are located in /etc/rc.d/rc5.d (for multi-user GUI startup).  You can use the header of the file to find out important info about each.  For example, head S10network.  This may give you a starting place, talk about dependencies and other cool stuff.

Another idea will be to recompile your kernel.  You might be able to make it smaller and take up less memory by doing that also.  

You can also adjust the squid config file so that squid uses a different amount of memory.  This is documented in your squid.conf file.

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Open BDS Pf 3 52
Recipient address rejected: User unknown in virtual alias table 1 303
IPA - how do I choose who can log into which servers? 1 77
centos linux 65 155
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question