ifplugstatus(8)

πŸ“¦
version 0.28 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

okay so this is the man page for ifplugstatus, straight out of the System Manager's Manual (section 8, iykyk). sit down, grab a snack, we're gonna vibe-check your ethernet cable together πŸ¦‹


✨ NAME ✨

ifplugstatus β€” a link beat detection tool πŸ’–


🌸 SYNOPSIS 🌸

ifplugstatus [options] [INTERFACE]

πŸŽ€ DESCRIPTION πŸŽ€

okay so ifplugstatus is this utility that detects the link status of a local Linux ethernet device, and it does it pretty much the same way mii-diag, mii-tool and ethtool do it. and here's the slay part β€” it supports all three of the different APIs those three tools use. not just that, bestie, it also does link checking with the IFF_RUNNING interface flag (which most modern drivers support, and not even just ethernet ones, periodt), plus association status checking with the wireless extension API for WLAN devices 🌈

the APIs get tried in this order, no cap:

  1. First the newest API: SIOCETHTOOL (aka the ethtool API) πŸ”₯
  2. Second the next older API: SIOCGMIIREG (aka the mii-diag API)
  3. Than the WLAN API: wireless extension (aka the iwconfig API) πŸ“Ά
  4. Followed by the cleanest API: IFF_RUNNING (aka the ifconfig API) ✨
the oldest API (SIOCPRIV aka the mii-tool API) is not tested, because it's obsolete. we don't do that here πŸ™ˆ

ifplugstatus can be used in shell scripts since it returns the current status as its return value. it's especially useful for detecting the available APIs on the network driver you're using β€” that's what option -v is for πŸ’…


πŸ’– OPTIONS πŸ’–

you may specify an ethernet device on the command line. otherwise ifplugstatus will check all available network interfaces. main character behaviour, honestly πŸ‘‘

  • -a | --auto β€” enable the interface automatically before querying (default: off)
  • -h | --help β€” show help 🫢
  • -q | --quiet β€” decrease verbosity by one. so if the verbosity is < 0, no text will be shown at all and only the return value matters; if the verbosity is = 0, you get a terse status; if the verbosity is > 0, you get detailed information about the used API. (by default the verbosity is 0) 🀫
  • -v | --verbose β€” increase verbosity by one. see option -q above, it's giving the same energy in reverse ✨
  • -V | --version β€” show version πŸ’«

πŸ¦‹ RETURN VALUES πŸ¦‹

  • 0 β€” Success ✨
  • 1 β€” Failure 😭
  • 2 β€” Link beat detected (only available when an interface is specified)
  • 3 β€” Unplugged (same here, still only when an interface is specified)

πŸ‘‘ AUTHOR πŸ‘‘

ifplugd was written by Lennart Poettering <mzvscyhtq (at) 0pointer (dot) de>. ifplugd is available at http://0pointer.de/lennart/projects/ifplugd/ 🌐


🌈 SEE ALSO 🌈

mii-diag(8), mii-tool(8), ethtool(8), ifplugd(8)

go read those too bestie, they're the extended universe 🫢


πŸ’¬ COMMENTS πŸ’¬

this man page was written using xml2man(1) by Oliver Kurth. iconic of him tbh πŸ’…


and that's the whole page, bestie!! this was pulled from the Manuals source, living in the User corner of the manual set, filed under ifplugstatus(8) β€” so if you ever forget where you found it, that's your vibe check done βœ… stay plugged in πŸ’œπŸ’–βœ¨

πŸ“¦ where this page comes from