proc_pid_io(5)
๐ proc_pid_io โ I/O statistics ๐
okay bestie so you found the proc_pid_io(5) page in the File Formats Manual section, and honestly? it's a little gem. it's the manual for /proc/pid/io, the file that spills all the tea about a process's I/O. let's get into it ๐ซถ
โจ NAME โจ
/proc/pid/io โ I/O statistics. that's it, that's the whole vibe ๐
๐ธ DESCRIPTION ๐ธ
so /proc/pid/io has been sitting there since Linux 2.6.20 (yes, ancient, iconic, a legend). it holds the I/O statistics for a process and its waited-for children. like, the whole family tree of I/O.
here's what it looks like when you peek at it, fr fr:
# cat /proc/3828/io
rchar: 323934931
wchar: 323929600
syscr: 632687
syscw: 632675
read_bytes: 0
write_bytes: 323932160
cancelled_write_bytes: 0
and now the field-by-field breakdown, because you know I'm gonna explain every single one ๐
๐ the fields ๐
rchar: characters read โ the number of bytes returned by successfulread(2)and similar system calls. it's giving "how much did this thing actually pull in".wchar: characters written โ the number of bytes returned by successfulwrite(2)and similar system calls. the outgoing side of the story โจsyscr: read syscalls โ the number of "file read" system calls. that means the wholeread(2)family, plussendfile(2),copy_file_range(2), and theioctl(2)BTRFS_IOC_ENCODED_READ[_32]one โ and that includes when the kernel invokes them as part of other syscalls. sneaky kernel behavior, we love to see it documented.syscw: write syscalls โ the number of "file write" system calls. same deal: thewrite(2)family,sendfile(2),copy_file_range(2), andioctl(2)BTRFS_IOC_ENCODED_WRITE[_32]โ including when the kernel calls them as part of other syscalls.read_bytes: bytes read โ the number of bytes really fetched from the storage layer. and it's accurate for block-backed filesystems, periodt. ๐ฅwrite_bytes: bytes written โ the number of bytes really sent to the storage layer.cancelled_write_bytes: โ okay bestie this one needs a second. the stats above do not account for truncation. so picture it: a process writes 1 MB to a regular file and then deletes it. that 1 MB never actually gets written, but it was still counted as a 1 MB write ๐. this field is the number of bytes that got "saved" from I/O writeback. and lowkey it can go negative โ like, actually negative I/O โ if caches that were dirtied by another process get truncated. also important:cancelled_write_bytesapplies to I/O already accounted-for inwrite_bytes.
๐ who's allowed in ๐
permission to access this file is governed by ptrace(2) access mode PTRACE_MODE_READ_FSCREDS. so it's not a free-for-all, bestie.
๐ CAVEATS ๐
these counters are not atomic. on systems where 64-bit integer operations may tear, a counter could get updated at the exact same moment as a read, and you'd end up with an incorrect intermediate value. so if a number looks cursed, it might genuinely be cursed. not a vibe, but forewarned is forearmed ๐
๐ฆ SEE ALSO ๐ฆ
and that's the whole page, bestie!! ๐ this was Linux man-pages 6.20, dated 2026-02-08, and you just read proc_pid_io(5) like a true main character. go check your own /proc/pid/io and slay ๐
โจ๐ซถ
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-3.0-or-later
- Copyright 1994-1995, Daniel Quinlan <Daniel.Quinlan@linux.org>
- Copyright 2002-2017, Michael Kerrisk <mtk.manpages@gmail.com>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms