Skip to content
/ nodeinfo Public

A system for periodically saving all hardware, software, and config info for M-Lab nodes.

License

Notifications You must be signed in to change notification settings

m-lab/nodeinfo

Repository files navigation

nodeinfo

GoDoc Build Status Coverage Status Go Report Card

This collects data about the hardware, software, and configs on nodes on the M-Lab platform. Every hour (in expectation, with some randomization) the output of lspci, lshw, ifconfig, and others is written to disk. This allows us to track the configuration of fleet nodes over time.

Available as a container in measurementlab/nodeinfo on Docker Hub.

design

As simple as possible. This system is called nodeinfo. Every command produces its own type of data, and so is it own datatype. These two facts, together with M-Lab's unified naming scheme for data, and the best practices for Pusher mean that the directory structure for output is fully determined.

This program calls a series of other programs, and directs the output of each call to the appropriate output file. The set of programs to call is currently hard-coded in the binary. If any of the commands run unsuccessfully, this crashes. Every command is rerun every hour on average, with some randomness. The inter-run times are drawn from the exponential distribution to try and make sure the resulting series of measurements has the PASTA property.

example config file

[
  {
    "Datatype": "lshw",
    "Filename": "lshw.json",
    "Cmd":      ["lshw", "-json"]
  },
  {
    "Datatype": "lspci",
    "Filename": "lspci.txt",
    "Cmd":      ["lspci", "-mm", "-vv", "-k", "-nn"]
  },
  {
    "Datatype": "lsusb",
    "Filename": "lsusb.txt",
    "Cmd":      ["lsusb", "-v"]
  },
  {
    "Datatype": "ip-address",
    "Filename": "ip-address.txt",
    "Cmd":      ["ip", "address", "show"]
  },
  {
    "Datatype": "ip-route-4",
    "Filename": "ip-route-4.txt",
    "Cmd":      ["ip", "-4", "route", "show"]
  },
  {
    "Datatype": "ip-route-6",
    "Filename": "ip-route-6.txt",
    "Cmd":      ["ip", "-6", "route", "show"]
  },
  {
    "Datatype": "uname",
    "Filename": "uname.txt",
    "Cmd":      ["uname", "-a"]
  },
  {
    "Datatype": "os-release",
    "Filename": "os-release.txt",
    "Cmd":      ["cat", "/etc/os-release"]
  },
  {
    "Datatype": "bios_version",
    "Filename": "bios_version.txt",
    "Cmd":      ["cat", "/sys/class/dmi/id/bios_version"]
  },
  {
    "Datatype": "chassis_serial",
    "Filename": "chassis_serial.txt",
    "Cmd":      ["cat", "/sys/class/dmi/id/chassis_serial"]
  }
]

About

A system for periodically saving all hardware, software, and config info for M-Lab nodes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •