readproctitle(8)

πŸ“¦
version 0.76 Β· 2 versions
  • 0.76 Β· debian bookworm, debian trixie, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.11 Β· alpine 3.24
, in debian bookworm, debian trixie, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

readproctitle β€” bestie, it keeps an automatically rotated log in memory so you can peek at it with ps(1) 🫢

readproctitle is available in daemontools 0.75 and above ✨


🌸 SYNOPSIS 🌸

readproctitle L D

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so listen. L is literally any number of arguments. No cap. And D is one argument that has to contain at least five dots. That's the vibe check βœ…

readproctitle reads data into the end of D, shifting D to the left to make room for it. The way that works means the most recent data is what's visible to process-listing tools like ps(1) πŸ‘€βœ¨ And it always leaves three dots at the left of D, always, iconic behavior πŸ’…

For example, if

readproctitle io errors: ....................

reads the data

fatal error xyz
warning abc

then its command-line arguments change to

readproctitle io errors: ... xyz!warning abc!

with a newline character in place of each ! πŸŽ€ (so yes, there are literal newlines sitting in there now, not exclamation marks β€” the ! is just how the manpage shows you where they went)

Process-listing tools typically show the newline character as ? or \n. Not a glitch, that's just how they display it, iykyk 😭

readproctitle exits when it reaches the end of input. Periodt 🫑

⚠️ Beware bestie!! Most implementations of ps(1) have small argument-length limits, and those limits apply to the total length of readproctitle L D. The author has not seen a system with a limit below 512 bytes. So don't go feral and make D a novel, ok?? πŸ™ˆ

⭐ SEE ALSO ⭐

πŸ”— http://cr.yp.to/daemontools.html πŸ”— http://cr.yp.to/slashcommand.html


okay that's the whole page bestie, mwah πŸ’‹ this was the readproctitle(8) entry from the System Manager's Manual, living in the daemontools 0.75-and-up era. go forth and rotate those logs in memory, you absolute main character πŸ‘‘βœ¨

πŸ“¦ where this page comes from