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?
Who is Participating?
brettmjohnsonConnect With a Mentor Commented:
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.

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).
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.

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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!!!
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.
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.

All Courses

From novice to tech pro — start learning today.