You can run the er_kernel utility to profile only the kernel or both the kernel and the load you are running. For a complete description, see the er_kernel (1) man page.
To display a usage message, run the er_kernel command without arguments.
The er_kernel option -p on is used by default, so you do not need to explicitly specify it.
You can replace the -p on argument to the er_kernel utility with -p high for high-resolution profiling or -p low for low-resolution profiling. If you expect the run of the load to take 2 to 20 minutes, the default clock profiling is appropriate. If you expect the run to take less than 2 minutes, use -p high; if you expect the run to take longer than 20 minutes, use -p low.
You can add a -t duration argument, which will cause the er_kernel utility to terminate itself according to the time specified by duration.
The –t duration can be specified as a single number, with an optional m or s suffix, to indicate the time in minutes or seconds at which the experiment should be terminated. By default, the duration is in seconds. The duration can also be specified as two such numbers separated by a hyphen, which causes data collection to pause until the first time elapses, and at that time data collection begins. When the second time is reached, data collection terminates. If the second number is a zero, data will be collected after the initial pause until the end of the program's run. Even if the experiment is terminated, the target process is allowed to run to completion.
If no time duration or interval is specified, er_kernel will run until terminated. You can terminate it by pressing Ctrl-C (SIGINT), or by using the kill command and sending SIGINT, SIGQUIT, or SIGTERM to the er_kernel process. The er_kernel process terminates the experiment and runs er_archive (unless –A off is specified) when any of those signals is sent to the process. The er_archive utility reads the list of shared objects referenced in the experiment, and constructs an archive file for each object.
The -x option can be used to exclude profile events from idle CPUs and is set to on by default so the events are not recorded. You can set -x off to record profile events from idle CPUs so all CPU time is accounted for completely.
You can add the -v argument if you want more information about the run printed to the screen. The -n argument lets you see a preview of the experiment that would be recorded without actually recording anything.
By default, the experiment generated by the er_kernel utility is named ktest.1.er; the number is incremented for successive runs.