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.
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.


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

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

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

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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: (…

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now