[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now



Posted on 2004-10-28
Medium Priority
Last Modified: 2010-04-14
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?
Question by:alfatec
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
  • 2
LVL 23

Expert Comment

ID: 12437581
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).
LVL 23

Expert Comment

ID: 12437624
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.


Author Comment

ID: 12437693
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!!!
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

LVL 23

Accepted Solution

brettmjohnson earned 2000 total points
ID: 12437920
Suppose when running 'top', you see the following perl process consuming 50% of CPU time:

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.


Author Comment

ID: 12444437
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.
LVL 23

Expert Comment

ID: 12445023
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.


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Even though Mac OS X has been around for many years now, certain well-liked and eminently useful software apps never made the jump from Mac OS 9 to Mac OS X. Ever used Word Perfect for Mac? Version 3.5 was the last version, built for Mac OS 9. Who c…
A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

650 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