snmpc(1)

✨ NAME ✨

snmpc β€” the SNMP MIB compiler frontend, bestie πŸ’…


🌸 SYNOPSIS 🌸

snmpc [options] file.mib | file.bin

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so, <pink>snmpc</pink> is literally your backstage pass to running the SNMP MIB compiler of the Erlang system. It's giving "I do the heavy lifting so you don't have to." πŸ’–

snmpc compiles an SNMP MIB file. Wanna know more? Go peek at compile/1,2. πŸ”

It can also be your girl for generating a header file (.hrl) stuffed with definitions of Erlang constants for all the objects chilling in the MIB. That's a mib_to_hrl/1 situation, iykyk. ✨


πŸŽ€ Compiler options πŸŽ€

These are the options we support (heads up: most of them are about compiling the MIB file, no cap):

  • --help β€” prints help info. Your little "what do I do now" rescue. 🫢
  • --version β€” prints the application and mib format version.
  • --verbosity verbosity β€” print debug info. The verbosity value is one of trace, debug, log, info, silence. Defaults to silence. 🀫
  • --warnings | --W β€” print warning messages. Let her warn you, bestie.
  • --wae | --Werror β€” warnings as errors. This says "no, actually, we're treating those warnings as errors." So serious. πŸ’€
  • --o directory β€” the directory where the compiler should place the output files. If you don't specify it, the output files land in the current working directory. πŸ“
  • --i Directory β€” specifies the path to search for imported (compiled) MIB files. By default, the current working directory is always included. And plot twist: this option can show up several times, each one specifying a single path. πŸ‘‘
  • --il Directory β€” this one's the include_lib option: it specifies a list of directories to search for imported MIBs. It assumes the first element in the directory name corresponds to an OTP application, and the compiler will find the currently installed version. For example, the value ["snmp/mibs/"] gets replaced by ["snmp-3.1.1/mibs/"] (or whatever the current version may be on your system). And the current directory plus the "snmp-home"/priv/mibs/ are always listed last in the include path. ✨
  • --sgc β€” this option (skip group check), if present, disables the group check of the mib compiler. Like, should the OBJECT-GROUP and the NOTIFICATION-GROUP macro(s) be checked for correctness or not? This option says "nah, skip it." πŸ™ˆ
  • --dep β€” keep deprecated definition(s). If you don't specify it, the compiler will ignore deprecated definitions. Rip to the deprecated ones, they get ghosted by default. πŸ‘»
  • --desc β€” the DESCRIPTION field will be included.
  • --ref β€” the REFERENCE field will be included.
  • --imp β€” the IMPORTS field will be included.
  • --mi β€” the MODULE-IDENTITY field will be included.
  • --mc β€” the MODULE-COMPLIANCE field will be included.
  • --ac β€” the AGENT-CAPABILITIES field will be included.
  • --mod module β€” the module which implements all the instrumentation functions. And the name of all instrumentation functions has to be the same as the corresponding managed object it implements. Matching names only, it's giving coordinated fits. πŸŽ€
  • --nd β€” the default instrumentation functions will not be used if a managed object has no instrumentation function. Instead, this gets reported as an error, and the compilation aborts. Big yikes, do not recommend casually. ⚠️
  • --rrnac β€” if present, this option specifies that the row name assign check shall not be done strictly according to the SMI (which allows only the value 1). With this option, all values greater than zero are allowed (>= 1). This means the error will be converted to a warning. By default it is not included β€” but if this option is present, it will be. 🫑

πŸ’œ SEE ALSO πŸ’œ

erlc(1), compile, snmpc


Go compile something iconic, bestie. MIBs don't compile themselves. πŸ”₯

That's the whole vibe β€” snmpc(1) from the Erlang Module Definition crew. This one's brought to you by Ericsson AB, riding with snmp 5.20.5, and it's stamped snmpc(1). Periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from