Posted on 2004-10-28
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
    LVL 23

    Expert Comment

    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

    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.

    LVL 1

    Author Comment

    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!!!
    LVL 23

    Accepted Solution

    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.

    LVL 1

    Author Comment

    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 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 file the PERL service would reappear and the CPU's would jump back up to 50%. Even when I quit the 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 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

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Anonabox PRO Tor & VPN Router

    PRO is the most advanced way to fortify your privacy and online anonymity by layering the Tor network with VPN services. Use both together or separately, and without needing to download software onto your devices.

    Suggested Solutions

    Title # Comments Views Activity
    Use an iMac like a kiosk 4 29
    Install Sharp MX2310u on mac OS 4 281
    Anyone who knows iPhone 6 35
    MacBook Pro reason 20 94
    Apple's Mac OS X has become an official member of the malware club. The Flashback Trojan has affected over half million Macs, worldwide. It is behavior that ultimately gets malware onto a person’s computer. Obsolete or out-of-date software helps…
    In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    933 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now