← Linux LabsWhat is /proc? (start here)Part 2 · the labDo it on Ubuntu →

How /proc/self/io counts

Do the steps on the left. Every command runs inside one process, pid 4242. Its /proc/self/io is on the right, and the diagram shows where in the kernel each number was counted.

Lesson

0 of 12

    Where the kernel counts

    1 cell ≈ 1/32 of the file

    process 4242 user space

    waiting for your first command
    system call boundary rcharwcharsyscrsyscw

    /dev/null

    Takes the bytes and drops them. Nothing below it.

    pipe

    A 64 KiB buffer in RAM between two fds.

    page cache 4 KiB pages in RAM

    write_bytes · a page turns dirty cancelled_write_bytes · a dirty page is thrown away
    block layer read_bytes · a read had to go to the disk

    disk ext4 on a block device

    cached, clean cached, dirty (not on disk yet) on disk not cached
    pid 4242 · every command runs in this one process ·