snmp_standard_mib(3erl)

πŸ“¦
version 25.3.2.8 Β· 4 versions
, in ubuntu noble

πŸ’– NAME πŸ’–

okay so bestie, welcome to snmp_standard_mib β€” the Erlang Module Definition β€” and it is literally the Instrumentation Functions for STANDARD-MIB and SNMPv2-MIB ✨. that's the name, that's the vibe, vibe check passed, periodt.


🌸 DESCRIPTION 🌸

The module snmp_standard_mib implements the instrumentation functions for the STANDARD-MIB and SNMPv2-MIB, and functions for configuring the database. slay, it does both πŸ’….

The configuration files are described in the SNMP User's Manual. iykyk, that's where the config lore lives.


✨ EXPORTS ✨

🫢 configure(ConfDir) -> void()

Types:

  • ConfDir = string()

This function is called from the supervisor at system start-up. main character energy fr fr.

It inserts all data in the configuration files into the database and destroys all old rows with StorageType volatile. The rows created from the configuration file will have StorageType nonVolatile. the way that storage type switches up is lowkey iconic.

All snmp counters are set to zero. yes, every single one, no cap.

If an error is found in the configuration file, it is reported using the function config_err/2 of the error report module, and the function fails with the reason configuration_error. not the configuration_error jump-scare 😭.

ConfDir is a string which points to the directory where the configuration files are found.

The configuration file read is: standard.conf.


πŸ¦‹ inc(Name) -> void() / inc(Name, N) -> void()

inc(Name) -> void()
inc(Name, N) -> void()

Types:

  • Name = atom()
  • N = integer()

Increments a variable in the MIB with N, or one if N is not specified. ngl, this one is straightforward, lowkey simple, highkey useful ✨.


πŸŽ€ reconfigure(ConfDir) -> void()

Types:

  • ConfDir = string()

Inserts all data in the configuration files into the database and destroys all old data, including the rows with StorageType nonVolatile. The rows created from the configuration file will have StorageType nonVolatile. it's giving full redo but make it config-file fresh 🧚.

Thus, the data in the SNMP-STANDARD-MIB and SNMPv2-MIB, after this function has been called, is from the configuration files. facts.

All snmp counters are set to zero.

If an error is found in the configuration file, it is reported using the function config_err/2 of the error report module, and the function fails with the reason configuration_error. same error behavior, same dramatic fail 😭.

ConfDir is a string which points to the directory where the configuration files are found.

The configuration file read is: standard.conf.


⭐ reset() -> void()

Resets all snmp counters to 0. that's it. that's the function. clean, simple, obsessed πŸ‘‘.


🌈 sys_up_time() -> Time

Types:

  • Time = int()

Gets the system up time in hundredth of a second. timecheck bestie ⏱️.


mwah πŸ’‹ β€” Ericsson AB Β· snmp 5.13.5 Β· snmp_standard_mib(3erl) Β· date: not listed, bestie, so I'm not inventing one ✨.

πŸ“¦ where this page comes from