KERNELTOP(1) | KERNELTOP(1) |
kerneltop - shows kernel function usage in an interactive style like 'top'
kerneltop [ options ]
This manpage documents version 0.8 of the program.
The kerneltop command uses the /proc/profile and the kernel system map to print ascii data on standard output, updated once a second. The output is organized in three columns: the first is the address of the function, the second is the name of the C function in the kernel, and the third number of clock ticks the function has taken. The output is filled with blanks to ease readability, and can either be sorted by the number of ticks per function (the default), or the address of the function.
Available command line options:
Display 46 lines of output (useful for 50 line terminals):
kerneltop -l 46
Show only proceses that use 5 ticks or more:
kerneltop -t 5
Show unsorted output by default:
kerneltop -u
There are a number of interactive commands available in kerneltop. The effect of these commands is documented above under OPTIONS.
<h> or <?>: Help
This is simply a list of available commands for the interactive mode.
<l>: Lines
Set number of console lines to use for display
<s>: Seconds
Set number of seconds between sample periods
<t>: Threshold
Set lower threshold for number of ticks required to be printed
<q>: Quit
Leaves the program
<u>: Unsorted/Sorted
Toggles between unsorted and sorted display (sorted by ticks)
kerneltop works with a 2.6.x or newer kernel. Do not expect previous kernels to work, but they might. YMMV.
This program only works with ELF kernels. The change for a.out kernels is trivial, and left as an exercise to the a.out user.
To enable profiling, the kernel must be rebooted, because no profiling module is available, and it wouldn't be easy to build. To enable profiling, you can specify "profile=1" on the kernel commandline.
See Documentation/basic_profiling.txt , which can be found in the Linux kernel source tree for your kernel for more information.
Profiling is disabled when interrupts are inhibited. This means that many profiling ticks happen when interrupts are re-enabled. Watch out for misleading information.
Randy Dunlap <rddunlap@osdl.org>
/proc/profile A binary snapshot of the profiling buffer. /boot/System.map The symbol table for the kernel. /usr/src/linux/* The program being profiled :-)
This program is written by Randy Dunlap <rddunlap@osdl.org>, and is largely based on readprofile by Alessandro Rubini <rubini@ipvvis.unipv.it>.
May 2004 |