Solved

hang process in RH linux?

Posted on 2004-09-06
7
398 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
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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

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 Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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