Link to home
Start Free TrialLog in
Avatar of omom
omom

asked on

Unknown process takes over

My system is taken over by a process a couple times a day for 3 minutes or so.  When its happening, I look at the system monitor and i see some cpu usage with enormous amounts of memory usage.

I checked for viruses, nothing.  I really can't do much while its happening, so i just sit it out.  Its really annoying.  

Is there anyway to tell what is happening, and possibly prevent it, or at least schedule it?

I'm using RedHat 9.0 and KDE.  
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Run a terminal window with top that you display on your screen. When this happens again, you should be able to see which process is the one hogging your CPU - that is, if the X display is still getting updated during this slowdown. One other thing you can try is log in remotely and then check the top output. Chances are that even though your system seems to come to a stop, it's mainly the GUI that gets locked out. A remote network connection may still work.
Upgrade to a 2.6.x kernel - they have an improved scheduler, and your X session should not get that unresponsive anymore.
ASKER CERTIFIED SOLUTION
Avatar of Alf666
Alf666

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of owensleftfoot
owensleftfoot

At a guess I would think XFS - the xwindows font server to be the problem. The only other thing I can think of which causes behaviour like this is the anacron job which updates the locate database and logrotate.
Avatar of omom

ASKER

So the process "X" is the culprit i guess, what does this mean?

 08:00:45  up  1:09,  3 users,  load average: 1.51, 0.76, 0.42
101 processes: 100 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:   1.1% user   5.3% system   0.1% nice   0.0% iowait  93.2% idle
Mem:  1030932k av,  575716k used,  455216k free,       0k shrd,   84404k buff
                    378948k actv,   11268k in_d,   16260k in_c
Swap: 1309288k av,     812k used, 1308476k free                  183264k cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
 1095 root      15   0  116M  51M  8156 S     2.3  5.1   9:56   0 X
 1270 root      15   0 51444  49M 22204 S     0.0  4.8   0:56   0 netscape-bin
 2266 root      15   0 21564  21M 15952 S     0.0  2.0   0:01   0 kdeinit
 1307 root      15   0 15040  14M  9048 S     0.0  1.4   0:02   0 evolution-mail
 1259 root      15   0 14060  13M 11192 S     0.0  1.3   0:01   0 kdeinit
 2302 root      15   0 13700  13M 11112 S     0.5  1.3   0:00   0 kdeinit
 1257 root      15   0 13540  13M 10876 S     0.0  1.3   0:01   0 kdeinit
Your memory is fine. Swap is unused (or nearly. Maybe an old sitting process).

X is not the culprit :-)
X is your X-windows server. He is responsible for everything graphics your display on your box. You do not want to kill that :-)

I notice you still use an old netscape version which could easily be replaced by a more recent version of Mozilla.

This does not solve your problem though as nothing bad appears in what you're showing me there.

Your top shows that the system has been a bit loaded for the last minute, but that's it.

We'd need the same stuff, but at the moment when your box is very loaded (when you have your problem).
You may want to change the interval that top uses to display it's data to 1 second. To do that, use the "s" key and then type 1 <Enter>

This way, you get more current data.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of omom

ASKER

you may be right about updatedb.  In 'top' I did a <shift>-P to arrange by CPU use, and it was at the top.  I'll try the other things you suggest.  
Avatar of omom

ASKER

none of my cron.* directories contain updatedb.

cron.daily directory contains:
00-logwatch  logrotate rpm         tetex.cron 0anacron makewhatis.cron  slocate.cron  tmpwatch

cron.weekly:
0anacron  makewhatis.cron

cron.montly:
0anacron  

cron.hourly is empty

here is crontab:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
makewhatis.cron & slocate.cron are probably to blame.
Avatar of omom

ASKER

So the format for the crontab file is:
minute hour day month weekday command
which means the its running cron.daily every day at 0402 (4:02 am)?

I'm usually not up at that hour. Does the 'job' get 'queued' when computer is not on?
 
Sorry, updatedb is run from the slocate script, which is run from cron.daily. If the PC isn't on when the cron.daily job's scheduled (4:02am), the job will be run at some stage after you next boot.

So you can either leave your PC on all night, or change the time. My home PC is on permanently, so I leave it set to 4:02am and don't have the problem. But my work PC is off all night, so I've got it configured to run at 12:45
(45 12 * * * ...). When it cuts in I know it's time to go to lunch!
Avatar of omom

ASKER

ok, i'm going to try the lunch time schedule and see how that goes:

01 * * * * root run-parts /etc/cron.hourly
30 11 * * * root run-parts /etc/cron.daily
50 11 * * 0 root run-parts /etc/cron.weekly
10 12 1 * * root run-parts /etc/cron.monthly