100% CPU on OSX

(UP)

First, get the PID of the mailserver process

Server:~ root# ps auxw | grep mailserver
root 2341 7.0 0.9 50980 4612 ?? Ss 8:56AM 0:00.22 /usr/local/kerio/mailserver/mailerver /usr/local/kerio/mailse
root 2344 0.0 0.0 27792 4 p2 R+ 8:56AM 0:00.00 grep mailserver

So the PID is 2341 in this example.

Get profiling data using the "sample" command

cd /usr/local/kerio/mailserver
sample mailserver 10 100 -file profile.txt

Send us the profile.txt file for developers to analyze.

Sometimes it is necessary to gather more in depth profiling data. For that, you need to use "shark" which is installed separately. The customer might need a contractor or Apple to help them to find and install shark. Then, they can follow the instructions in the following document:

Mac Performance Tools

Gather about 10 seconds of network trace data

tcpdump -s 0 -w /100cpu.cap

After about 10 seconds, hit Ctrl-C to stop the trace. If it did not gather any packets, you may need to use the -i option to specify a different interface.

Get profiling data using "shark"

Shark can produce an output file our developers can analyze. There is a simple txt file at: How-to-gather-a-shark-trace.txt

Mac Performance Tools

Get a core file from KMS by crashing the mailserver

killall -SEGV mailserver

This will create a core file in /cores.

ls -lt /cores | head

This will list the cores in /cores in order of newest to oldest. Gzip the most recent core, and send it to our FTP site. Call Kerio technical support for an FTP account.

How to FTP a file to the Kerio FTP server.