READPROFILE(8)
๐ READPROFILE(8) โ the readprofile girlies' guide ๐
okay bestie, sit down, hydrate, and let me tell you about readprofile โ it's a System Administration command and it's literally the moment. no cap.
โจ NAME โจ
readprofile โ read kernel profiling information ๐ฆ
โจ SYNOPSIS โจ
readprofile [options]
โจ VERSION โจ
This manpage documents version 2.0 of the program. periodt. ๐
โจ DESCRIPTION โจ
So the readprofile command uses the /proc/profile information to print ascii data on standard output. That's the whole vibe. โจ
The output is organized in three columns:
- the number of clock ticks ๐
- the name of the C function in the kernel where those many ticks occurred
- the normalized
loadof the procedure, calculated as a ratio between the number of ticks and the length of the procedure
And the output is filled with blanks to ease readability, because we love a clean layout. ๐
important bestie: this utility is a diagnostic tool and is not designed or intended for use in security-sensitive contexts (e.g.,setuid,setgid,sudo, or similar privilege-elevation scenarios). It is installed without any special permissions. so like, do not put this in your sudo pipeline, i'm begging. ๐ญ
โจ OPTIONS โจ
-a,--allโ Print all symbols in the mapfile. By default the procedures with reported ticks are not printed. (so default = shy,-a= main character energy ๐)-b,--histbinโ Print individual histogram-bin counts. little numbers, big lore. ๐-i,--infoโ Info. This makesreadprofileonly print the profiling step used by the kernel. The profiling step is the resolution of the profiling buffer, and is chosen during kernel configuration (throughmake config), or in the kernel's command line. If the-t(terse) switch is used together with-ionly the decimal number is printed. ๐-m,--mapfilemapfile โ Specify a mapfile, which by default is/boot/System.map. You should specify the map file on cmdline if your current kernel isn't the last one you compiled, or if you keepSystem.mapelsewhere. If the name of the map file ends with.gzit is decompressed on the fly. obsessed. ๐ง-n,--no-autoโ Disable automatic byte order detection. ๐-M,--multipliermultiplier โ On some architectures it is possible to alter the frequency at which the kernel delivers profiling interrupts to each CPU. This option allows you to set the frequency, as a multiplier of the system clock frequency,HZ. Linux 2.6.16 dropped multiplier support for most systems. This option also resets the profiling buffer, and requires superuser privileges. ๐ฅ-p,--profilepro-file โ Specify a different profiling buffer, which by default is/proc/profile. Using a different pro-file is useful if you want tofreeze' the kernel profiling at some time and read it later. The <lavender>/proc/profile</lavender> file can be copied usingcat(1)orcp(1). There is <red>no more support for compressed profile buffers</red>, like inreadprofile-1.1`, because the program needs to know the size of the buffer in advance. rip to that feature fr fr ๐-r,--resetโ Reset the profiling buffer. This can only be invoked by root, because/proc/profileis readable by everybody but writable only by the superuser. ๐-s,--countersโ Print individual counters within functions. ๐-v,--verboseโ Verbose. The output is organized in four columns and filled with blanks:- the RAM address of a kernel function
- the name of the function
- the number of clock ticks
- the normalized load
-h,--helpโ Display help text and exit. ๐ซถ-V,--versionโ Display version and exit. โญ
โจ FILES โจ
/proc/profileโ A binary snapshot of the profiling buffer. ๐ธ/usr/src/linux/System.mapโ The symbol table for the kernel. ๐บ๏ธ/usr/src/linux/*โ The program being profiled :-) ๐ญ iconic
โจ BUGS โจ
bestie. listen. ๐
readprofile only works with a 1.3.x or newer kernel, because /proc/profile changed in the step from 1.2 to 1.3.
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. (not me leaving it as homework ๐)
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=2 (or another number) on the kernel commandline. The number you specify is the two-exponent used as profiling step. โจ
watch out: Profiling is disabled when interrupts are inhibited. This means that many profiling ticks happen when interrupts are re-enabled. Watch out for misleading information. ๐
โจ EXAMPLE โจ
Browse the profiling buffer ordering by clock ticks:
readprofile | sort -nr | less
Print the 20 most loaded procedures:
readprofile | sort -nr +2 | head -20
Print only filesystem profile:
readprofile | grep _ext2
Look at all the kernel information, with ram addresses:
readprofile -av | less
Browse a 'frozen' profile buffer for a non current kernel:
readprofile -p ~/profile.freeze -m /zImage.map.gz
Request profiling at 2kHz per CPU, and reset the profiling buffer:
readprofile -M 20
slay. go run them. ๐ โจ
โจ REPORTING BUGS โจ
For bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>. come tell us, we're listening ๐ซถ
โจ AVAILABILITY โจ
The readprofile command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>. ๐
okay that's the whole page bestie, you're so welcome ๐ this was documenting util-linux version 2.42.4, dated 2026-09-21, and yes it's the READPROFILE(8) era โ go profile something and text me how it goes. mwah. ๐๐ฆโจ
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms