HIGH CPU USAGE WHEN MAIL IS RUNNING

OK Finally got my mail system up and running. All works fine, SMTP, POP3 and Squirrelmail. Only thing I have noticed is that the CPU on the OSX 10.3.5 server is running at around 50% with no users logged in. I have done a TOP command in Terminal to see what is running and have noticed that PERL is running at 49%. Anybody any ideas why this is?
LVL 1
alfatecAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

brettmjohnsonCommented:
Make a note of the PID of the CPU-intensive Perl process,
then run 'ps -auxww | grep PID'  where PID is the Perl PID from top.
This will show you the Perl invocation command line.
It will also show you the Parent process PID, so you can trace the parent
chain up to some encompassing shell script (if any).
0
brettmjohnsonCommented:
Also check /var/log/mail.log and /var/log/system.log for obvious error messages.
This sounds vaguely familiar.  Possibly a script repeatedly spawning mail daemons
that crash/quit immediately.

0
alfatecAuthor Commented:
OK Cheers for that Brett, will try that in the morning. Sorry for being such a pain, is the ps_auxww | grep PID the actual command that I put in terminal. I know terminal commands enough to get me through but when it comes to PERL etc I am abit stuck.
Also do you think this has anything to do with my other problem that I had.

Again thanks for the help!!!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

brettmjohnsonCommented:
Suppose when running 'top', you see the following perl process consuming 50% of CPU time:

PID     COMMAND   %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
17798 perl              50.6%  0:01.63   1    17    26   416K   492K   792K  27.1M

The number in the first column is the Process ID (PID) of the running perl process.
Given that,  try to locate the perl process in the process table.
 
ps -auxww | grep 17798

The 'ps -auxww' command will show the full process status of all running processes
(even those not owned by you).  The 'ww' switch means 'wide window', so it will display
the full command line of the running processes.   I then pipe the output of ps to grep
to extract just the lines containing the PID of the perl process.  The output should contain
the original perl command, as well as any child processes running (they will have the
PID as their parent's PID), and any other process that happens to contain that string of
digits in the ps output (including the grep command itself).  You should be able to sort
through the reduced output to see which command is giving you problems.  Given the
full command, you should be able to locate the offending perl script.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
alfatecAuthor Commented:
Hi again Brett. Well as I said my knowledge of Terminal commands increases by the minute thanks to your help. Managed to
carry out everything you instructed and found out that the Squirrelmail Conf.pl was causing the high cpu usage. Once I had killed the PID of the PERL process that was running the CPU's went back to normal. If I then opened the Squirrelmail Conf.pl file the PERL service would reappear and the CPU's would jump back up to 50%. Even when I quit the Conf.pl file PERL was still running. So a quick kill on the service solved all the problems. Only thing that confuses me is that it is only the Conf.pl when open causing the problem, when I kill the service, Squirrelmail still runs without any problems. Anyway it seems to work great now, so I now have all my mail services up and running and my CPU's fine, its Friday afternoon and I can feel the need to consume large amounts of beer.
Many thanks for your help.
0
brettmjohnsonCommented:
Squirrelmail provides web-mail access, so you can disable it completely if
you only wish to support POP3/IMAP.  As I mentioned, I vaguely remember
a process starting/stopping in a rapid loop due to some mis-configuration
or permissions problem.  The process was supposed to start up and go
daemon.  A master loop was set to detect process death (crashes etc) and
respawn it.  In this case the process was exiting immediately with an error,
the master loop detected the termination and relaunched it, wherein it would
immediately exit, repeat.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apple OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.