smiquery(1)

πŸ’… smiquery(1) β€” the SMI Tools one

okay so bestie, welcome to smiquery 😌 this is a page from SMI Tools, and it's genuinely one of those lil tools that does one thing and does it slayfully πŸŽ€

✨ NAME ✨

smiquery β€” query single information from SMI MIB modules πŸ¦‹

like, literally one item at a time. no cap.


🌸 SYNOPSIS 🌸

smiquery [ -Vh ] [ -p module ] command name

that's the whole vibe. short, iconic, to the point πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

okay so the smiquery program is used to query information on a single item from an MIB module πŸ’– for example module meta information, or a single type definition. that's it. that's the gig. lowkey perfect for when you're digging through MIBs and you just want one answer instead of the entire lore dump 🫢


✨ OPTIONS ✨

  • -V, --version β€” shows the smiquery version and then exits, bye πŸ‘‹
  • -h, --help β€” shows a help text and exits 🧚 the help text lists all available commands, so if you're lost, that's your girl fr fr
  • -p module, --preload module β€” preloads the module module before reading the main module πŸ‘€ this may be helpful if an incomplete main module misses to import some definitions. like giving it a little study guide before the exam πŸ“

πŸ¦‹ and then the actual command πŸ¦‹

  • command name β€” this specifies the kind of information to retrieve and the item to retrieve πŸ’œ the kinds are: module, imports, revisions, node, parent, compliance, index, members, children, type, or macro 🌈 and name is the item itself.

πŸ” where does it even look tho

the module in question is searched along a path 🌸 that path is initialized by the SMIPATH environment variable, or by /usr/share/libsmi/mibs if SMIPATH is not set ✨

and file extensions? bestie, they matter:

  • files with a .sming extension are expected to be (old-style!) SMIng module files πŸ’€ yes, old-style. we don't judge.
  • files with a .my extension or without any extension are expected to be SMIv1/v2 module files 🫢

πŸŽ€ EXAMPLE πŸŽ€

this example queries for information on the node ifNumber defined in the module IF-MIB πŸ¦‹ watch her work:

$ smiquery node IF-MIB::ifNumber
     MibNode: IF-MIB::ifNumber
      OID: 1.3.6.1.2.1.2.1
     Type: Integer32
 Declaration: OBJECT-TYPE
    NodeKind: scalar
   Access: read-only
   Status: current
 Description: The number of network interfaces (regardless of their
        current state) present on this system.

that output? ate. no crumbs. πŸ”₯


🌈 SEE ALSO 🌈

the libsmi(3) project is documented at http://www.ibr.cs.tu-bs.de/projects/libsmi/ πŸ’– go read it, iykyk πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

(C) 1999-2004 F. Strauss, TU Braunschweig, Germany <strauss@ibr.cs.tu-bs.de> β€” iconic behavior, honestly πŸ‘


and yes bestie, if you ever forget any of this, just hit -h and it'll list every command for you 😌 main character energy from a manpage, we love to see it.

okay that's the whole page!! 🌸 this one came from IBR and it's dated August 10, 2004 β€” yes she's vintage, and yes she still serves πŸ’…βœ¨ go query something, bestie 🫢

πŸ“¦ where this page comes from