KERNELTOP(1)
๐ KERNELTOP(1) ๐
okay bestie, sit down, we're talking about kerneltop โ that's the manual page name right there, KERNELTOP(1), section 1, the good section. it's a little program from the olden days and it's genuinely iconic, no cap.
โจ NAME โจ
kerneltop โ shows kernel function usage in an interactive style like top ๐ซถ
๐ธ SYNOPSIS ๐ธ
kerneltop [ options ]
๐ VERSION ๐
This manpage documents version 0.8 of the program. so like, 0.8, that's the vibe, that's the number, don't @ me.
๐ฆ DESCRIPTION ๐ฆ
bestie. so. the kerneltop command uses the /proc/profile file and the kernel system map to print ascii data on standard output, and it updates once a second. literally refreshing like your fyp, except it's your kernel.
The output is organized in three columns:
- the address of the function
- the name of the C function in the kernel
- the number of clock ticks the function has taken
The output is filled with blanks to ease readability (aesthetic spacing ๐ ), and it can either be sorted by the number of ticks per function โ that's the default โ or by the address of the function.
๐ OPTIONS ๐
Available command line options, bestie, all of them, here we go:
-mmapfile โ Specify a mapfile, which by default is/boot/System.map, or`/boot/System.map-`uname -r`` if/boot/System.mapdoesn't exist. You should specify the map file on the command-line if your current kernel isn't the last one you compiled, or ifuname -rdoes not refer to the correct suffix for the current System.map file. If the name of the map file ends with.gzit is decompressed on the fly. yes, on the fly, we love a self-decompressing moment โจ-pprofile โ Specify a different profiling buffer, which by default is/proc/profile. This should only be necessary if the proc filesystem is mounted somewhere other than/proc. (relatable, some people just live elsewhere ๐)-llines โ Lines. Number of lines to print on the display. Default is 20 and the maximum is 100. so 101 lines? not happening babes.-sseconds โ Sleep time between each pass in seconds. Default is 1 second. a lil nap between samples, as a treat ๐-tticks โ Lower threshold number of ticks to print. Default is 1 tick.-uโ Unsorted output. Default is sorted (by ticks). Note that unsorted output is actually sorted by address. yes it's giving "unsorted" but also, lowkey, sorted. we contain multitudes ๐ซถ-Vโ Version. This makeskerneltopprint its version number and exit.
๐ฅ EXAMPLES ๐ฅ
Display 46 lines of output (useful for 50 line terminals):
kerneltop -l 46
Show only processes that use 5 ticks or more:
kerneltop -t 5
Show unsorted output by default:
kerneltop -u
๐ฎ INTERACTIVE Commands ๐ฎ
There are a number of interactive commands available in kerneltop. The effect of these commands is documented above under OPTIONS. so yes, you have to scroll up, i don't make the rules ๐
<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. (sad.)<u>: Unsorted/Sorted โ Toggles between unsorted and sorted display (sorted by ticks).
๐ BUGS ๐
okay bestie, deep breath, the caveats section, and these are IMPORTANT, i'm not being dramatic, this is just the truth:
kerneltopworks with a 2.6.x or newer kernel. Do not expect previous kernels to work, but they might. YMMV. (literally, YMMV, it's in the source material.)- 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. so if that's you... good luck babe, you got this ๐
- 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. no hot-patching your way out of this one. - 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. โ ๏ธ like for real, watch out, the numbers can lie to you.
- Randy Dunlap <rddunlap@osdl.org>
๐ FILES ๐
/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 :-)
๐ AUTHOR ๐
This program is written by Randy Dunlap <rddunlap@osdl.org>, and is largely based on readprofile by Alessandro Rubini <rubini@unipv.it>. shoutout to the OGs, they really did that ๐
๐ SEE ALSO ๐
readprofile(1), top(1)
and that's the whole page babes. this manual documents the May 2004 edition of KERNELTOP(1) โ yes, May 2004, an absolute vintage, the archive queens were fed that day. slay, periodt, go profile your kernel ๐โจ๐
๐ฆ where this page comes from
- ubuntu stonking: kerneltop 0.92-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms