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:

  1. the number of clock ticks ๐Ÿ•
  2. the name of the C function in the kernel where those many ticks occurred
  3. the normalized load of 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 makes readprofile only print the profiling step used by the kernel. The profiling step is the resolution of the profiling buffer, and is chosen during kernel configuration (through make config), or in the kernel's command line. If the -t (terse) switch is used together with -i only the decimal number is printed. ๐Ÿ’…
  • -m, --mapfile mapfile โ€” 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 keep System.map elsewhere. If the name of the map file ends with .gz it is decompressed on the fly. obsessed. ๐Ÿงš
  • -n, --no-auto โ€” Disable automatic byte order detection. ๐Ÿ™ˆ
  • -M, --multiplier multiplier โ€” 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, --profile pro-file โ€” Specify a different profiling buffer, which by default is /proc/profile. Using a different pro-file is useful if you want to freeze' the kernel profiling at some time and read it later. The <lavender>/proc/profile</lavender> file can be copied using cat(1)orcp(1). There is <red>no more support for compressed profile buffers</red>, like in readprofile-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/profile is 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:
    1. the RAM address of a kernel function
    2. the name of the function
    3. the number of clock ticks
    4. 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