Solved

hang process in RH linux?

Posted on 2004-09-06
7
403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 4

Expert Comment

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

Author Comment

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

Expert Comment

by:jonnietexas
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.
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

Author Comment

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

Accepted Solution

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

Author Comment

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

Expert Comment

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

Featured Post

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

705 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