PEEKFD(1)

๐Ÿ“ฆ
version 23.7 ยท 2 versions
  • 23.7 ยท alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 23.4 ยท centos-stream 9, ubuntu jammy
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

โœจ PEEKFD(1) โ€” peekfd, the manual bestie ๐Ÿ’–

okay so peekfd is the manual name for this one, and it's giving "peek at file descriptors of running processes" ๐Ÿ‘€๐Ÿฆ‹

โœจ SYNOPSIS โœจ

peekfd [-8,--eight-bit-clean] [-n,--no-headers] [-c,--follow]
[-d,--duplicates-removed] [-V,--version] [-h,--help] pid [fd] [fd] ...

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

okay so peekfd slides right up to a running process and intercepts every single read and write going through its file descriptors ๐Ÿ˜ญโœจ You can name the exact fd numbers you care about, or just dump all of them. Main character energy, no cap ๐Ÿ’…

๐Ÿ’… OPTIONS ๐Ÿ’…

  • -8 โ€” bestie, this one means no post-processing on the bytes being read or written. Raw and unfiltered ๐Ÿ“
  • -n โ€” skip the headers that show where the bytes came from. Less noise, more vibes ๐ŸŒธ
  • -c โ€” also dump the requested fd activity in any new child processes that spawn. It follows the drama everywhere ๐Ÿงš
  • -d โ€” removes duplicate reads/writes from the output. Lowkey essential if you're staring at a tty with echo on ๐Ÿ™ˆ
  • -v โ€” displays a version string โœจ
  • -h โ€” displays a help message ๐Ÿซถ

๐Ÿฆ‹ FILES ๐Ÿฆ‹

  • /proc/*/fd โ€” not used by peekfd itself, but super useful for you to peek at so you can pick good fd numbers ๐Ÿ‘€

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

None. Zero env vars, zero drama ๐Ÿ’œ

๐Ÿšจ DIAGNOSTICS ๐Ÿšจ

The following diagnostics may be issued on stderr:

  • Error attaching to pid <PID> โ€” an unknown error popped up while trying to attach to a process. You might need to be root, so go check ๐Ÿ™ˆ

๐Ÿ’€ BUGS ๐Ÿ’€

Probably lots. Don't be surprised if the process you're monitoring dies on you ๐Ÿ˜ญ

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Trent Waddington, the icon who made this ๐Ÿซถ

๐Ÿ”— SEE ALSO ๐Ÿ”—

  • ttysnoop(8) โ€” go check this one out next ๐Ÿงš

bestie, that's the whole page ๐Ÿ’– Brought to you by psmisc, last updated 2021-12-01. Stay iconic, stay curious, and go peek at some file descriptors โœจ๐Ÿ’