Solved

hang process in RH linux?

Posted on 2004-09-06
7
395 Views
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?
0
Comment
Question by:johntsai90
  • 4
  • 3
7 Comments
 
LVL 4

Expert Comment

by:jonnietexas
Comment Utility
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.  
0
 

Author Comment

by:johntsai90
Comment Utility
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?
0
 
LVL 4

Expert Comment

by:jonnietexas
Comment Utility
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.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:johntsai90
Comment Utility
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?
0
 
LVL 4

Accepted Solution

by:
jonnietexas earned 377 total points
Comment Utility
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.
0
 

Author Comment

by:johntsai90
Comment Utility
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?
0
 
LVL 4

Expert Comment

by:jonnietexas
Comment Utility
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.
Thanks,
Jon
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

8 Experts available now in Live!

Get 1:1 Help Now