pr_alert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ pr_alert(9) β€” Kernel API Manual, bestie edition πŸ’œ

Okay so we're doing the pr_alert page from the Kernel API Manual and honestly? It's a short one, so let's just get into it ✨


🌸 NAME 🌸

pr_alert β€” Print an alert-level message. That's it. That's the whole vibe check. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

pr_alert (fmt , ... );

Yes bestie, those spaces are real, keep them exactly like that, no cap πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fmt β€” the format string, aka the blueprint of whatever you're about to yell into the kernel log πŸ—£οΈ
  • ... β€” the arguments for the format string, i.e. all the little values that get slotted into your fmt πŸ’–

✨ DESCRIPTION ✨

So here's the tea β˜• β€” this macro literally expands to a printk with the KERN_ALERT loglevel. That's the whole flex. It uses pr_fmt to generate the format string, which is how your messages get that cute consistent prefix energy πŸŽ€

Lowkey iconic that a one-liner gets its own manpage, but we respect it 🫢


🌈 SEE ALSO 🌈

Kernel file ./include/linux/printk.h and its whole friend group:

Go read them, they're all slaying in their own way πŸ’…βœ¨


Fr fr though, pr_alert is a macro, so nothing is undefined here β€” just remember it's expanding to printk with KERN_ALERT and using pr_fmt. That's the entire plot πŸ˜­πŸ’–

And that's the page!! Signing off from ./include/linux, dated October 2026 πŸ—“οΈπŸ§š stay alert bestie, literally πŸ’œπŸ‘‘

πŸ“¦ where this page comes from