[
  {
    "path": ".circleci/config.yml",
    "content": "---\nversion: 2.1\norbs:\n  prometheus: prometheus/prometheus@0.17.1\nexecutors:\n  # Whenever the Go version is updated here, .promu.yml and .promu-cgo.yml\n  # should also be updated.\n  golang:\n    docker:\n      - image: cimg/go:1.26\n  arm:\n    docker:\n      - image: cimg/go:1.26\n    resource_class: arm.medium\n\njobs:\n  test:\n    executor: golang\n    steps:\n      - prometheus/setup_environment\n      - run: go mod download\n      - run: make\n      - prometheus/store_artifact:\n          file: node_exporter\n  test-arm:\n    executor: arm\n    steps:\n      - prometheus/setup_environment\n      - run: uname -a\n      - run: make test-e2e\n  test_mixins:\n    executor: golang\n    steps:\n      - checkout\n      - run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest\n      - run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest\n      - run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest\n      - run: make promtool\n      - run: make -C docs/node-mixin clean\n      - run: make -C docs/node-mixin jb_install\n      - run: make -C docs/node-mixin\n      - run: git diff --exit-code\n  build:\n    machine:\n      image: ubuntu-2404:current\n    parallelism: 3\n    steps:\n      - prometheus/setup_environment\n      - run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97\n      - run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX\n      - run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX\n      # sign the darwin build so it doesn't get SIGKILLed on start, see: https://github.com/prometheus/node_exporter/issues/2539\n      - run:\n          command: |\n            if [[ -f \"$(pwd)/.build/darwin-arm64/node_exporter\" ]]; then\n                promu codesign \"$(pwd)/.build/darwin-arm64/node_exporter\"\n            fi\n\n            if [[ -f \"$(pwd)/.build/darwin-amd64/node_exporter\" ]]; then\n                promu codesign \"$(pwd)/.build/darwin-amd64/node_exporter\"                \n            fi\n      - persist_to_workspace:\n          root: .\n          paths:\n            - .build\n      - store_artifacts:\n          path: .build\n          destination: /build\n  test_docker:\n    machine:\n      image: ubuntu-2404:current\n    environment:\n      DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.26-base\n      REPO_PATH: github.com/prometheus/node_exporter\n    steps:\n      - prometheus/setup_environment\n      - attach_workspace:\n          at: .\n      - run:\n          command: |\n            if [ -n \"$CIRCLE_TAG\" ]; then\n              make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG\n            else\n              make docker\n            fi\n      - run: docker images\n      - run: docker run --rm -t -v \"$(pwd):/app\" \"${DOCKER_TEST_IMAGE_NAME}\" -i \"${REPO_PATH}\" -T\n      - run:\n          command: |\n            if [ -n \"$CIRCLE_TAG\" ]; then\n              make test-docker DOCKER_IMAGE_TAG=$CIRCLE_TAG\n            else\n              make test-docker\n            fi\nworkflows:\n  version: 2\n  node_exporter:\n    jobs:\n      - test:\n          filters:\n            tags:\n              only: /.*/\n      - test-arm:\n          filters:\n            tags:\n              only: /.*/\n      - build:\n          filters:\n            tags:\n              only: /.*/\n      - test_docker:\n          requires:\n            - test\n            - build\n          filters:\n            tags:\n              only: /.*/\n      - test_mixins:\n          filters:\n            tags:\n              only: /.*/\n      - prometheus/publish_master:\n          context: org-context\n          requires:\n            - test\n            - build\n          filters:\n            branches:\n              only: master\n      - prometheus/publish_release:\n          context: org-context\n          requires:\n            - test\n            - build\n          filters:\n            tags:\n              only: /^v.*/\n            branches:\n              ignore: /.*/\n"
  },
  {
    "path": ".dockerignore",
    "content": ".build/\n.tarballs/\n\n!.build/linux-amd64\n!.build/linux-armv7\n!.build/linux-arm64\n!.build/linux-ppc64le\n!.build/linux-s390x\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "<!--\n\tPlease note: GitHub issues should only be used for feature requests and\n\tbug reports. For general discussions, please refer to one of the community channels\n\tdescribed in https://prometheus.io/community/.\n\n\tBefore filing a bug report, note that running node_exporter in Docker is\n\tnot recommended, for the reasons detailed in the README:\n\n\thttps://github.com/prometheus/node_exporter#docker\n\n\tFinally, also note that node_exporter is focused on *NIX kernels, and the\n\tWMI exporter should be used instead on Windows.\n\n\tFor bug reports, please fill out the below fields and provide as much detail\n\tas possible about your issue.  For feature requests, you may omit the\n\tfollowing template.\n-->\n### Host operating system: output of `uname -a`\n\n### node_exporter version: output of `node_exporter --version`\n<!-- If building from source, run `make` first. -->\n\n### node_exporter command line flags\n<!-- Please list all of the command line flags -->\n\n### node_exporter log output\n\n### Are you running node_exporter in Docker?\n<!-- Please note the warning above. -->\n\n### What did you do that produced an error?\n\n### What did you expect to see?\n\n### What did you see instead?\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n  - package-ecosystem: \"gomod\"\n    directory: \"/\"\n    schedule:\n      interval: \"monthly\"\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"monthly\"\n"
  },
  {
    "path": ".github/workflows/bsd.yml",
    "content": "name: bsd\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - master\n\npermissions:\n  contents: read\n\nenv:\n  GNU_TAR_VERSION: \"1.35\"\n  GO_VERSION: \"1.26.0\"\n\n# To spin up one of the VMs below, see the \"Debug Shell\" section here: https://github.com/vmactions\njobs:\n  test_freebsd:\n    name: Run end-to-end tests on FreeBSD\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2\n      - name: test-e2e\n        uses: vmactions/freebsd-vm@c9f815bc7aa0d34c9fdd0619b034a32d6ca7b57e  # v1.4.2\n        with:\n          release: \"15.0\"\n          copyback: false\n          envs: 'GO_VERSION GNU_TAR_VERSION'\n          usesh: true\n          prepare: |\n            pkg update -f\n            pkg install -y \\\n              bash \\\n              git \\\n              gmake \\\n              gnugrep \\\n              gsed \\\n              gtar \\\n              python \\\n              wget\n          run: |\n            echo \"::group::Setup prerequisites\"\n            set -eu\n            mkdir bin\n            GOARCH=$(uname -m)\n            if [ \"${GOARCH}\" = \"x86_64\" ] ; then GOARCH=\"amd64\" ; fi\n            GOGZ=\"go${GO_VERSION}.freebsd-${GOARCH}.tar.gz\"\n            wget https://go.dev/dl/${GOGZ}\n            gtar xzf ${GOGZ}\n            ln -s $(pwd)/go/bin/go $(pwd)/bin/go\n            ln -s $(which ggrep) $(pwd)/bin/grep\n            ln -s $(which gmake) $(pwd)/bin/make\n            ln -s $(which gsed) $(pwd)/bin/sed\n            ln -s $(which gtar) $(pwd)/bin/tar\n            export PATH=$(pwd)/bin:$PATH\n            echo \"::endgroup::\"\n\n            echo \"::group::Print environment information\"\n            uname -a\n            echo \"GOOS: $(go env GOOS)\"\n            echo \"GOARCH: $(go env GOARCH)\"\n            echo \"::endgroup::\"\n\n            echo \"::group::Run End-to-End Tests\"\n            git config --global --add safe.directory $(pwd)\n            gmake test-e2e\n            echo \"::endgroup::\"\n\n  test_openbsd:\n    name: Run end-to-end tests on OpenBSD\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2\n      - name: test-e2e\n        uses: vmactions/openbsd-vm@7fd5a3e251db9d8bdff2f34aae11a43b6be5ad60  # v1.2.4\n        with:\n          copyback: false\n          envs: 'GO_VERSION GNU_TAR_VERSION'\n          usesh: true\n          prepare: |\n            pkg_add -u\n            pkg_add \\\n              bash \\\n              ggrep \\\n              git \\\n              gmake \\\n              gsed \\\n              gtar-${GNU_TAR_VERSION}p1-static \\\n              python \\\n              wget\n          run: |\n            echo \"::group::Setup prerequisites\"\n            set -eu\n            mkdir bin\n            GOARCH=$(uname -m)\n            if [ \"${GOARCH}\" = \"x86_64\" ] ; then GOARCH=\"amd64\" ; fi\n            GOGZ=\"go${GO_VERSION}.openbsd-${GOARCH}.tar.gz\"\n            wget https://go.dev/dl/${GOGZ}\n            gtar xzf ${GOGZ}\n            ln -s $(pwd)/go/bin/go $(pwd)/bin/go\n            ln -s $(which ggrep) $(pwd)/bin/grep\n            ln -s $(which gmake) $(pwd)/bin/make\n            ln -s $(which gsed) $(pwd)/bin/sed\n            ln -s $(which gtar) $(pwd)/bin/tar\n            export PATH=$(pwd)/bin:$PATH\n            echo \"::endgroup::\"\n\n            echo \"::group::Print environment information\"\n            uname -a\n            echo \"GOOS: $(go env GOOS)\"\n            echo \"GOARCH: $(go env GOARCH)\"\n            echo \"::endgroup::\"\n\n            echo \"::group::Run End-to-End Tests\"\n            git config --global --add safe.directory $(pwd)\n            make test-e2e\n            echo \"::endgroup::\"\n\n  test_netbsd:\n    name: Run end-to-end tests on NetBSD\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2\n      - name: test-e2e\n        uses: vmactions/netbsd-vm@e04aec09540429f9cebb0e7941f7cd0c0fc3b44f  # v1.3.6\n        with:\n          copyback: false\n          envs: 'GO_VERSION GNU_TAR_VERSION'\n          usesh: true\n          prepare: |\n            /usr/sbin/pkg_add -u \\\n              git \\\n              gmake \\\n              grep \\\n              gsed \\\n              gtar-base-${GNU_TAR_VERSION}\\\n              python312 \\\n              wget\n          run: |\n            echo \"::group::Setup prerequisites\"\n            set -eu\n            mkdir bin\n            GOARCH=$(uname -m)\n            if [ \"${GOARCH}\" = \"x86_64\" ] ; then GOARCH=\"amd64\" ; fi\n            GOGZ=\"go${GO_VERSION}.netbsd-${GOARCH}.tar.gz\"\n            wget https://go.dev/dl/${GOGZ}\n            gtar xzf ${GOGZ}\n            ln -s $(pwd)/go/bin/go $(pwd)/bin/go\n            ln -s $(which ggrep) $(pwd)/bin/grep\n            ln -s $(which gmake) $(pwd)/bin/make\n            ln -s $(which gsed) $(pwd)/bin/sed\n            ln -s $(which gtar) $(pwd)/bin/tar\n            export PATH=$(pwd)/bin:$PATH\n            echo \"::endgroup::\"\n\n            echo \"::group::Print environment information\"\n            uname -a\n            echo \"GOOS: $(go env GOOS)\"\n            echo \"GOARCH: $(go env GOARCH)\"\n            echo \"::endgroup::\"\n\n            echo \"::group::Run End-to-End Tests\"\n            git config --global --add safe.directory $(pwd)\n            make test-e2e\n            echo \"::endgroup::\"\n\n  test_dragonfly:\n    name: Run end-to-end tests on DragonFly\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2\n      - name: test-e2e\n        uses: vmactions/dragonflybsd-vm@04601322b25fa8eb14f0394e46e1103084ea0199  # v1.2.6\n        with:\n          copyback: false\n          envs: 'GO_VERSION'\n          usesh: true\n          prepare: |\n            pkg update && pkg upgrade -y\n            pkg install -y \\\n              bash \\\n              git \\\n              gmake \\\n              gnugrep \\\n              gsed \\\n              gtar \\\n              python3 \\\n              wget\n          run: |\n            echo \"::group::Setup prerequisites\"\n            set -eu\n            mkdir bin\n            GOARCH=$(uname -m)\n            if [ \"${GOARCH}\" = \"x86_64\" ] ; then GOARCH=\"amd64\" ; fi\n            GOGZ=\"go${GO_VERSION}.dragonfly-${GOARCH}.tar.gz\"\n            wget https://go.dev/dl/${GOGZ}\n            gtar xzf ${GOGZ}\n            ln -s $(pwd)/go/bin/go $(pwd)/bin/go\n            ln -s $(which ggrep) $(pwd)/bin/grep\n            ln -s $(which gmake) $(pwd)/bin/make\n            ln -s $(which gsed) $(pwd)/bin/sed\n            ln -s $(which gtar) $(pwd)/bin/tar\n            ln -s $(which python3) $(pwd)/bin/python\n            export PATH=$(pwd)/bin:$PATH\n            echo \"::endgroup::\"\n\n            echo \"::group::Print environment information\"\n            uname -a\n            echo \"GOOS: $(go env GOOS)\"\n            echo \"GOARCH: $(go env GOARCH)\"\n            echo \"::endgroup::\"\n\n            echo \"::group::Run End-to-End Tests\"\n            git config --global --add safe.directory $(pwd)\n            gmake test-e2e\n            echo \"::endgroup::\"\n\n  test_solaris:\n    name: Run end-to-end tests on Solaris\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2\n      - name: test-e2e\n        uses: vmactions/solaris-vm@69d382b4a775b25ea5955e6c1730e9d05047ca0d  # v1.3.1\n        with:\n          copyback: false\n          envs: 'GO_VERSION'\n          usesh: true\n          prepare: |\n            pkg install \\\n              bash \\\n              curl \\\n              gcc \\\n              git \\\n              gnu-grep \\\n              gnu-make \\\n              gnu-sed \\\n              gnu-tar\n          run: |\n            echo \"::group::Setup prerequisites\"\n            set -eu\n            mkdir bin\n            GOARCH=$(uname -m)\n            if [ \"${GOARCH}\" = \"i86pc\" ] ; then GOARCH=\"amd64\" ; fi\n            GOGZ=\"go${GO_VERSION}.solaris-${GOARCH}.tar.gz\"\n            wget https://go.dev/dl/${GOGZ}\n            gtar xzf ${GOGZ}\n            ln -s $(pwd)/go/bin/go $(pwd)/bin/go\n            ln -s $(which ggrep) $(pwd)/bin/grep\n            ln -s $(which gmake) $(pwd)/bin/make\n            ln -s $(which gsed) $(pwd)/bin/sed\n            ln -s $(which gtar) $(pwd)/bin/tar\n            export PATH=$(pwd)/bin:$PATH\n            \n            echo \">> building promu as it is not shipped for Solaris\"\n            git clone https://github.com/prometheus/promu.git\n            cd promu\n            go build .\n            cd -\n            \n            mkdir -p $(go env GOPATH)/bin\n            ln -s $(pwd)/promu/promu $(go env GOPATH)/bin/promu\n            export PATH=$(go env GOPATH)/bin:$PATH\n            echo \"::endgroup::\"\n\n            echo \"::group::Print environment information\"\n            uname -a\n            echo \"GOOS: $(go env GOOS)\"\n            echo \"GOARCH: $(go env GOARCH)\"\n            echo \"::endgroup::\"\n\n            echo \"::group::Run End-to-End Tests\"\n            git config --global --add safe.directory $(pwd)\n            make test-e2e\n            echo \"::endgroup::\"\n\n  test_macos:\n    name: Run end-to-end tests on Darwin/MacOS\n    runs-on: macos-latest\n    steps:\n      - name: Checkout the repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2\n      - name: Install dependencies\n        run: |\n          brew install \\\n            bash \\\n            curl \\\n            git \\\n            grep \\\n            make \\\n            gnu-sed \\\n            gnu-tar \\\n            python3\n      - name: test-e2e\n        run: |\n          echo \"::group::Setup prerequisites\"\n          set -eu\n          mkdir bin\n          GOARCH=$(uname -m)\n          if [ \"${GOARCH}\" = \"x86_64\" ] ; then GOARCH=\"amd64\" ; fi\n          GOGZ=\"go${GO_VERSION}.darwin-${GOARCH}.tar.gz\"\n          wget https://go.dev/dl/${GOGZ}\n          gtar xzf ${GOGZ}\n          ln -s $(pwd)/go/bin/go $(pwd)/bin/go\n          ln -s $(which ggrep) $(pwd)/bin/grep\n          ln -s $(which gmake) $(pwd)/bin/make\n          ln -s $(which gsed) $(pwd)/bin/sed\n          ln -s $(which gtar) $(pwd)/bin/tar\n          export PATH=$(pwd)/bin:$PATH\n          echo \"::endgroup::\"\n\n          echo \"::group::Print environment information\"\n          uname -a\n          echo \"GOOS: $(go env GOOS)\"\n          echo \"GOARCH: $(go env GOARCH)\"\n          echo \"::endgroup::\"\n\n          echo \"::group::Run End-to-End Tests\"\n          git config --global --add safe.directory $(pwd)\n          make test-e2e E2E_EXTRA_FLAGS='--collector.diskstats.device-include=disk[04]'\n          echo \"::endgroup::\"\n"
  },
  {
    "path": ".github/workflows/container_description.yml",
    "content": "---\nname: Push README to Docker Hub\non:\n  push:\n    paths:\n      - \"README.md\"\n      - \"README-containers.md\"\n      - \".github/workflows/container_description.yml\"\n    branches: [ main, master ]\n\npermissions:\n  contents: read\n\njobs:\n  PushDockerHubReadme:\n    runs-on: ubuntu-latest\n    name: Push README to Docker Hub\n    if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.\n    steps:\n      - name: git checkout\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n        with:\n          persist-credentials: false\n      - name: Set docker hub repo name\n        run: echo \"DOCKER_REPO_NAME=$(make docker-repo-name)\" >> $GITHUB_ENV\n      - name: Push README to Dockerhub\n        uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1\n        env:\n          DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }}\n          DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}\n        with:\n          destination_container_repo: ${{ env.DOCKER_REPO_NAME }}\n          provider: dockerhub\n          short_description: ${{ env.DOCKER_REPO_NAME }}\n          # Empty string results in README-containers.md being pushed if it\n          # exists. Otherwise, README.md is pushed.\n          readme_file: ''\n\n  PushQuayIoReadme:\n    runs-on: ubuntu-latest\n    name: Push README to quay.io\n    if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.\n    steps:\n      - name: git checkout\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n        with:\n          persist-credentials: false\n      - name: Set quay.io org name\n        run: echo \"DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')\" >> $GITHUB_ENV\n      - name: Set quay.io repo name\n        run: echo \"DOCKER_REPO_NAME=$(make docker-repo-name)\" >> $GITHUB_ENV\n      - name: Push README to quay.io\n        uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1\n        env:\n          DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }}\n        with:\n          destination_container_repo: ${{ env.DOCKER_REPO_NAME }}\n          provider: quay\n          # Empty string results in README-containers.md being pushed if it\n          # exists. Otherwise, README.md is pushed.\n          readme_file: ''\n"
  },
  {
    "path": ".github/workflows/golangci-lint.yml",
    "content": "---\n# This action is synced from https://github.com/prometheus/prometheus\nname: golangci-lint\non:\n  push:\n    branches: [main, master, 'release-*']\n    paths:\n      - \"go.sum\"\n      - \"go.mod\"\n      - \"**.go\"\n      - \"scripts/errcheck_excludes.txt\"\n      - \".github/workflows/golangci-lint.yml\"\n      - \".golangci.yml\"\n    tags: ['v*']\n  pull_request:\n\npermissions:  # added using https://github.com/step-security/secure-repo\n  contents: read\n\njobs:\n  golangci:\n    permissions:\n      contents: read  # for actions/checkout to fetch code\n      pull-requests: read  # for golangci/golangci-lint-action to fetch pull requests\n    name: lint\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2\n        with:\n          persist-credentials: false\n      - name: Install Go\n        uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0\n        with:\n          go-version: 1.26.x\n      - name: Install snmp_exporter/generator dependencies\n        run: sudo apt-get update && sudo apt-get -y install libsnmp-dev\n        if: github.repository == 'prometheus/snmp_exporter'\n      - name: Get golangci-lint version\n        id: golangci-lint-version\n        run: echo \"version=$(make print-golangci-lint-version)\" >> $GITHUB_OUTPUT\n      - name: Lint\n        uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0\n        with:\n          args: --verbose\n          version: ${{ steps.golangci-lint-version.outputs.version }}\n"
  },
  {
    "path": ".gitignore",
    "content": "# Compiled Object files, Static and Dynamic libs (Shared Objects)\n*.o\n*.a\n*.so\n\n# Folders\n_obj\n_test\n\n# Architecture specific extensions/prefixes\n*.[568vq]\n[568vq].out\n\n*.cgo1.go\n*.cgo2.c\n_cgo_defun.c\n_cgo_gotypes.go\n_cgo_export.*\n\n_testmain.go\n\n*.exe\ndependencies-stamp\n/node_exporter\n/.build\n/.deps\n/.release\n/.tarballs\n\ntools/tools\n\n# Intellij\n\n/.idea\n*.iml\n\n# Test files extracted from ttar\ncollector/fixtures/sys/\ncollector/fixtures/udev/\n\n/vendor\n"
  },
  {
    "path": ".golangci.yml",
    "content": "version: \"2\"\nlinters:\n  enable:\n    - depguard\n    - misspell\n    - revive\n  settings:\n    depguard:\n      rules:\n        no_exec_policy:\n          files:\n            - '!$test'\n          deny:\n            - pkg: os/exec\n              desc: Using os/exec to run sub processes it not allowed by policy\n    errcheck:\n      # Used in HTTP handlers, any error is handled by the server itself.\n      exclude-functions:\n        - (net/http.ResponseWriter).Write\n    revive:\n      rules:\n        - name: unused-parameter\n          severity: warning\n          disabled: true\n  exclusions:\n    generated: lax\n    presets:\n      - comments\n      - common-false-positives\n      - legacy\n      - std-error-handling\n    rules:\n      - linters:\n          - errcheck\n        path: _test.go\nformatters:\n  enable:\n    - goimports\n  exclusions:\n    generated: lax\n  settings:\n    goimports:\n      local-prefixes:\n        - github.com/prometheus/node_exporter\n"
  },
  {
    "path": ".promu-cgo.yml",
    "content": "go:\n    # Whenever the Go version is updated here, .circle/config.yml and\n    # .promu.yml should also be updated.\n    version: 1.25\n    cgo: true\nrepository:\n    path: github.com/prometheus/node_exporter\nbuild:\n    binaries:\n        - name: node_exporter\n    ldflags: |\n        -X github.com/prometheus/common/version.Version={{.Version}}\n        -X github.com/prometheus/common/version.Revision={{.Revision}}\n        -X github.com/prometheus/common/version.Branch={{.Branch}}\n        -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}\n        -X github.com/prometheus/common/version.BuildDate={{date \"20060102-15:04:05\"}}\ntarball:\n    files:\n        - LICENSE\n        - NOTICE\ncrossbuild:\n    platforms:\n        - darwin/amd64\n        - darwin/arm64\n        - netbsd/amd64\n        - netbsd/386\n"
  },
  {
    "path": ".promu.yml",
    "content": "go:\n    # Whenever the Go version is updated here, .circle/config.yml and\n    # .promu-cgo.yml should also be updated.\n    version: 1.26\nrepository:\n    path: github.com/prometheus/node_exporter\nbuild:\n    binaries:\n        - name: node_exporter\n    ldflags: |\n        -X github.com/prometheus/common/version.Version={{.Version}}\n        -X github.com/prometheus/common/version.Revision={{.Revision}}\n        -X github.com/prometheus/common/version.Branch={{.Branch}}\n        -X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}\n        -X github.com/prometheus/common/version.BuildDate={{date \"20060102-15:04:05\"}}\ntarball:\n    files:\n        - LICENSE\n        - NOTICE\ncrossbuild:\n    platforms:\n        - linux\n        - openbsd/amd64\n"
  },
  {
    "path": ".yamllint",
    "content": "---\nextends: default\nignore: |\n  **/node_modules\n  web/api/v1/testdata/openapi_*_golden.yaml\n\nrules:\n  braces:\n    max-spaces-inside: 1\n    level: error\n  brackets:\n    max-spaces-inside: 1\n    level: error\n  commas: disable\n  comments: disable\n  comments-indentation: disable\n  document-start: disable\n  indentation:\n    spaces: consistent\n    indent-sequences: consistent\n  key-duplicates:\n    ignore: |\n      config/testdata/section_key_dup.bad.yml\n  line-length: disable\n  truthy:\n    check-keys: false\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "## master / unreleased\n\n* [CHANGE]\n* [FEATURE]\n* [ENHANCEMENT]\n* [BUGFIX]\n\n## 1.10.2 / 2025-10-25\n\n* [BUGFIX] meminfo: Fix typo in Zswap metric name #3455\n\n## 1.10.1 / 2025-10-25\n\n* [BUGFIX] filesystem: Fix mount points being collected multiple times #3376\n* [BUGFIX] filesystem: Refactor mountinfo parsing #3452\n* [BUGFIX] meminfo: Add Zswap/Zswapped metrics #3453\n\n## 1.10.0 / 2025-10-24\n\n* [CHANGE] mdadm: Use sysfs for RAID metrics #3031\n* [CHANGE] filesystem: Add erofs in default excluded fs #3313\n* [CHANGE] tcpstat: Use std lib binary.NativeEndian #3386\n* [FEATURE] pcidevice: Add new collector for PCIe devices #3339\n* [FEATURE] AIX: Add more metrics #3338\n* [FEATURE] systemd: Add Virtualization metrics #3254\n* [FEATURE] swaps: Add new collector #3428\n* [ENHANCEMENT] wifi: Add packet received and transmitted metrics #3382\n* [ENHANCEMENT] filesystem: Take super options into account for read-only #3387\n* [ENHANCEMENT] pcidevice: Add additional metrics #3425\n* [ENHANCEMENT] perf: Add `tlb_data` metrics #3436\n* [BUGFIX] interrupts: Fix OpenBSD interrupt device parsing #3288\n* [BUGFIX] diskstats: Simplify condition #3290\n* [BUGFIX] thermal: Sanitize darwin thermal strings #3294\n* [BUGFIX] filesystem: Fix Darwin collector cgo memory leak #3315\n* [BUGFIX] cpufreq: Fix: collector enable #3318\n* [BUGFIX] ethtool: Fix returning 0 for sanitized metrics #3335\n* [BUGFIX] netdev: Fix Darwin netdev i/o bytes metric #3336\n* [BUGFIX] systemd: Fix logging race #3364\n* [BUGFIX] filesystem: Fix duplicate Darwin CGO import #3391\n\n## 1.9.1 / 2025-04-01\n\n* [BUGFIX] pressure: Fix missing IRQ on older kernels #3263\n* [BUGFIX] Fix Darwin memory leak #3277\n\n## 1.9.0 / 2025-02-17\n\n* [CHANGE] meminfo: Convert linux implementation to use procfs lib #3049\n* [CHANGE] Update logging to use Go log/slog #3097\n* [FEATURE] filesystem: Add `node_filesystem_mount_info` metric #2970\n* [FEATURE] btrfs: Add metrics for commit statistics #3010\n* [FEATURE] interrupts: Add collector include/exclude filtering #3028\n* [FEATURE] interrupts: Add \"exclude zeros\" filtering #3028\n* [FEATURE] slabinfo: Add filters for slab name. #3041\n* [FEATURE] pressure: add IRQ PSI metrics #3048\n* [FEATURE] hwmon: Add include and exclude filter for sensors #3072\n* [FEATURE] filesystem: Add NetBSD support #3082\n* [FEATURE] netdev: Add ifAlias label #3087\n* [FEATURE] hwmon: Add Support for GPU Clock Frequencies #3093\n* [FEATURE] Add `exclude[]` URL parameter #3116\n* [FEATURE] Add AIX support #3136\n* [FEATURE] filesystem: Add fs-types/mount-points include flags #3171\n* [FEATURE] netstat: Add collector for tcp packet counters for FreeBSD. #3177\n* [ENHANCEMENT] ethtool: Add logging for filtering flags #2979\n* [ENHANCEMENT] netstat: Add TCPRcvQDrop to default metrics #3021\n* [ENHANCEMENT] diskstats: Add block device rotational #3022\n* [ENHANCEMENT] cpu: Support CPU online status #3032\n* [ENHANCEMENT] arp: optimize interface name resolution #3133\n* [ENHANCEMENT] textfile: Allow specifiying multiple directory globs #3135\n* [ENHANCEMENT] filesystem: Add reporting of purgeable space on MacOS #3206\n* [ENHANCEMENT] ethtool: Skip full scan of NetClass directories #3239\n* [BUGFIX] zfs: Prevent `procfs` integer underflow #2961\n* [BUGFIX] pressure: Fix collection on systems that do not expose a full CPU stat #3054\n* [BUGFIX] cpu: Fix FreeBSD 32-bit host support and plug memory leak #3083\n* [BUGFIX] hwmon: Add safety check to hwmon read #3134\n* [BUGFIX] zfs: Allow space in dataset name #3186\n\n## 1.8.1 / 2024-05-16\n\n* [BUGFIX] Fix CPU seconds on Solaris #2963\n* [BUGFIX] Sign Darwin/MacOS binaries #3008\n* [BUGFIX] Fix pressure collector nil reference #3016\n\n## 1.8.0 / 2024-04-24\n\n* [CHANGE] exec_bsd: Fix labels for `vm.stats.sys.v_syscall` sysctl #2895\n* [CHANGE] diskstats: Ignore zram devices on linux systems #2898\n* [CHANGE] textfile: Avoid inconsistent help-texts  #2962\n* [CHANGE] os: Removed caching of modtime/filename of os-release file #2987\n* [FEATURE] xfrm: Add new collector #2866\n* [FEATURE] watchdog: Add new collector #2880\n* [ENHANCEMENT] cpu_vulnerabilities: Add mitigation information label #2806\n* [ENHANCEMENT] nfsd: Handle new `wdeleg_getattr` attribute #2810\n* [ENHANCEMENT] netstat: Add TCPOFOQueue to default netstat metrics #2867\n* [ENHANCEMENT] filesystem: surface device errors #2923\n* [ENHANCEMENT] os: Add support end parsing #2982\n* [ENHANCEMENT] zfs: Log mib when sysctl read fails on FreeBSD #2975\n* [ENHANCEMENT] fibre_channel: update procfs to take into account optional attributes #2933\n* [BUGFIX] cpu: Fix debug log in cpu collector #2857\n* [BUGFIX] hwmon: Fix hwmon nil ptr #2873\n* [BUGFIX] hwmon: Fix hwmon error capture #2915\n* [BUGFIX] zfs: Revert \"Add ZFS freebsd per dataset stats #2925\n* [BUGFIX] ethtool: Sanitize ethtool metric name keys #2940\n* [BUGFIX] fix: data race of NetClassCollector metrics initialization #2995\n\n## 1.7.0 / 2023-11-11\n\n* [FEATURE] Add ZFS freebsd per dataset stats #2753\n* [FEATURE] Add cpu vulnerabilities reporting from sysfs #2721\n* [ENHANCEMENT] Parallelize stat calls in Linux filesystem collector #1772\n* [ENHANCEMENT] Add missing linkspeeds to ethtool collector 2711\n* [ENHANCEMENT] Add CPU MHz as the value for `node_cpu_info` metric #2778\n* [ENHANCEMENT] Improve qdisc collector performance #2779\n* [ENHANCEMENT] Add include and exclude filter for hwmon collector #2699\n* [ENHANCEMENT] Optionally fetch ARP stats via rtnetlink instead of procfs #2777\n* [BUFFIX] Fix ZFS arcstats on FreeBSD 14.0+ 2754\n* [BUGFIX] Fallback to 32-bit stats in netdev #2757\n* [BUGFIX] Close btrfs.FS handle after use #2780\n* [BUGFIX] Move RO status before error return #2807\n* [BUFFIX] Fix `promhttp_metric_handler_errors_total` being always active #2808\n* [BUGFIX] Fix nfsd v4 index miss #2824\n\n## 1.6.1 / 2023-06-17\n\nRebuild with latest Go compiler bugfix release.\n\n## 1.6.0 / 2023-05-27\n\n* [CHANGE] Fix cpustat when some cpus are offline #2318\n* [CHANGE] Remove metrics of offline CPUs in CPU collector #2605\n* [CHANGE] Deprecate ntp collector #2603\n* [CHANGE] Remove bcache `cache_readaheads_totals` metrics #2583\n* [CHANGE] Deprecate supervisord collector #2685\n* [FEATURE] Enable uname collector on NetBSD #2559\n* [FEATURE] NetBSD support for the meminfo collector #2570\n* [FEATURE] NetBSD support for CPU collector #2626\n* [FEATURE] Add FreeBSD collector for netisr subsystem #2668\n* [FEATURE] Add softirqs collector #2669\n* [ENHANCEMENT] Add suspended as a `node_zfs_zpool_state` #2449\n* [ENHANCEMENT] Add administrative state of Linux network interfaces #2515\n* [ENHANCEMENT] Log current value of GOMAXPROCS #2537\n* [ENHANCEMENT] Add profiler options for perf collector #2542\n* [ENHANCEMENT] Allow root path as metrics path #2590\n* [ENHANCEMENT] Add cpu frequency governor metrics #2569\n* [ENHANCEMENT] Add new landing page #2622\n* [ENHANCEMENT] Reduce privileges needed for btrfs device stats #2634\n* [ENHANCEMENT] Add ZFS `memory_available_bytes` #2687\n* [ENHANCEMENT] Use `SCSI_IDENT_SERIAL` as serial in diskstats #2612\n* [ENHANCEMENT] Read missing from netlink netclass attributes from sysfs #2669\n* [BUGFIX] perf: fixes for automatically detecting the correct tracefs mountpoints #2553\n* [BUGFIX] Fix `thermal_zone` collector noise #2554\n* [BUGFIX] Fix a problem fetching the user wire count on FreeBSD #2584\n* [BUGFIX] interrupts: Fix fields on linux aarch64 #2631\n* [BUGFIX] Remove metrics of offline CPUs in CPU collector #2605\n* [BUGFIX] Fix OpenBSD filesystem collector string parsing #2637\n* [BUGFIX] Fix bad reporting of `node_cpu_seconds_total` in OpenBSD #2663\n\n## 1.5.0 / 2022-11-29\n\nNOTE: This changes the Go runtime \"GOMAXPROCS\" to 1. This is done to limit the\n  concurrency of the exporter to 1 CPU thread at a time in order to avoid a\n  race condition problem in the Linux kernel (#2500) and parallel IO issues\n  on nodes with high numbers of CPUs/CPU threads (#1880).\n\nNOTE: A command line arg has been changed from `--web.config` to `--web.config.file`.\n\n* [CHANGE] Default GOMAXPROCS to 1 #2530\n* [FEATURE] Add multiple listeners and systemd socket listener activation #2393\n* [ENHANCEMENT] Add RTNL version of netclass collector #2492, #2528\n* [BUGFIX] Fix diskstats exclude flags #2487\n* [BUGFIX] Bump go/x/crypt and go/x/net #2488\n* [BUGFIX] Fix hwmon label sanitizer #2504\n* [BUGFIX] Use native endianness when encoding InetDiagMsg #2508\n* [BUGFIX] Fix btrfs device stats always being zero #2516\n* [BUGFIX] Security: Update exporter-toolkit (CVE-2022-46146) #2531\n\n## 1.4.1 / 2022-11-29\n\n* [BUGFIX] Fix diskstats exclude flags #2487\n* [BUGFIX] Security: Update go/x/crypto and go/x/net (CVE-2022-27191 CVE-2022-27664) #2488\n* [BUGFIX] Security: Update exporter-toolkit (CVE-2022-46146) #2531\n\n## 1.4.0 / 2022-09-24\n\n* [CHANGE] Merge metrics descriptions in textfile collector #2475\n* [FEATURE] [node-mixin] Add darwin dashboard to mixin #2351\n* [FEATURE] Add \"isolated\" metric on cpu collector on linux #2251\n* [FEATURE] Add cgroup summary collector #2408\n* [FEATURE] Add selinux collector #2205\n* [FEATURE] Add slab info collector #2376\n* [FEATURE] Add sysctl collector #2425\n* [FEATURE] Also track the CPU Spin time for OpenBSD systems #1971\n* [FEATURE] Add support for MacOS version #2471\n* [ENHANCEMENT] [node-mixin] Add missing selectors #2426\n* [ENHANCEMENT] [node-mixin] Change current datasource to grafana's default #2281\n* [ENHANCEMENT] [node-mixin] Change disk graph to disk table #2364\n* [ENHANCEMENT] [node-mixin] Change io time units to %util #2375\n* [ENHANCEMENT] Ad user_wired_bytes and laundry_bytes on *bsd #2266\n* [ENHANCEMENT] Add additional vm_stat memory metrics for darwin #2240\n* [ENHANCEMENT] Add device filter flags to arp collector #2254\n* [ENHANCEMENT] Add diskstats include and exclude device flags #2417\n* [ENHANCEMENT] Add node_softirqs_total metric #2221\n* [ENHANCEMENT] Add rapl zone name label option #2401\n* [ENHANCEMENT] Add slabinfo collector #1799\n* [ENHANCEMENT] Allow user to select port on NTP server to query #2270\n* [ENHANCEMENT] collector/diskstats: Add labels and metrics from udev #2404\n* [ENHANCEMENT] Enable builds against older macOS SDK #2327\n* [ENHANCEMENT] qdisk-linux: Add exclude and include flags for interface name #2432\n* [ENHANCEMENT] systemd: Expose systemd minor version #2282\n* [ENHANCEMENT] Use netlink for tcpstat collector #2322\n* [ENHANCEMENT] Use netlink to get netdev stats #2074\n* [ENHANCEMENT] Add additional perf counters for stalled frontend/backend cycles #2191\n* [ENHANCEMENT] Add btrfs device error stats #2193\n* [BUGFIX] [node-mixin] Fix fsSpaceAvailableCriticalThreshold and fsSpaceAvailableWarning #2352\n* [BUGFIX] Fix concurrency issue in ethtool collector #2289\n* [BUGFIX] Fix concurrency issue in netdev collector #2267\n* [BUGFIX] Fix diskstat reads and write metrics for disks with different sector sizes #2311\n* [BUGFIX] Fix iostat on macos broken by deprecation warning #2292\n* [BUGFIX] Fix NodeFileDescriptorLimit alerts #2340\n* [BUGFIX] Sanitize rapl zone names #2299\n* [BUGFIX] Add file descriptor close safely in test #2447\n* [BUGFIX] Fix race condition in os_release.go #2454\n* [BUGFIX] Skip ZFS IO metrics if their paths are missing #2451\n\n## 1.3.1 / 2021-12-01\n\n* [BUGFIX] Handle nil CPU thermal power status on M1 #2218\n* [BUGFIX] bsd: Ignore filesystems flagged as MNT_IGNORE. #2227\n* [BUGFIX] Sanitize UTF-8 in dmi collector #2229\n\n## 1.3.0 / 2021-10-20\n\nNOTE: In order to support globs in the textfile collector path, filenames exposed by\n      `node_textfile_mtime_seconds` now contain the full path name.\n\n* [CHANGE] Add path label to rapl collector #2146\n* [CHANGE] Exclude filesystems under /run/credentials #2157\n* [CHANGE] Add TCPTimeouts to netstat default filter #2189\n* [FEATURE] Add lnstat collector for metrics from /proc/net/stat/ #1771\n* [FEATURE] Add darwin powersupply collector #1777\n* [FEATURE] Add support for monitoring GPUs on Linux #1998\n* [FEATURE] Add Darwin thermal collector #2032\n* [FEATURE] Add os release collector #2094\n* [FEATURE] Add netdev.address-info collector #2105\n* [FEATURE] Add clocksource metrics to time collector #2197\n* [ENHANCEMENT] Support glob textfile collector directories #1985\n* [ENHANCEMENT] ethtool: Expose node_ethtool_info metric #2080\n* [ENHANCEMENT] Use include/exclude flags for ethtool filtering #2165\n* [ENHANCEMENT] Add flag to disable guest CPU metrics #2123\n* [ENHANCEMENT] Add DMI collector #2131\n* [ENHANCEMENT] Add threads metrics to processes collector #2164\n* [ENHANCEMENT] Reduce timer GC delays in the Linux filesystem collector #2169\n* [ENHANCEMENT] Add TCPTimeouts to netstat default filter #2189\n* [ENHANCEMENT] Use SysctlTimeval for boottime collector on BSD #2208\n* [BUGFIX] ethtool: Sanitize metric names #2093\n* [BUGFIX] Fix ethtool collector for multiple interfaces #2126\n* [BUGFIX] Fix possible panic on macOS #2133\n* [BUGFIX] Collect flag_info and bug_info only for one core #2156\n* [BUGFIX] Prevent duplicate ethtool metric names #2187\n\n## 1.2.2 / 2021-08-06\n\n* [BUGFIX] Fix processes collector long int parsing #2112\n\n## 1.2.1 / 2021-07-23\n\n* [BUGFIX] Fix zoneinfo parsing prometheus/procfs#386\n* [BUGFIX] Fix nvme collector log noise #2091\n* [BUGFIX] Fix rapl collector log noise #2092\n\n## 1.2.0 / 2021-07-15\n\nNOTE: Ignoring invalid network speed will be the default in 2.x\nNOTE: Filesystem collector flags have been renamed. `--collector.filesystem.ignored-mount-points` is now `--collector.filesystem.mount-points-exclude` and `--collector.filesystem.ignored-fs-types` is now `--collector.filesystem.fs-types-exclude`. The old flags will be removed in 2.x.\n\n* [CHANGE] Rename filesystem collector flags to match other collectors #2012\n* [CHANGE] Make node_exporter print usage to STDOUT #2039\n* [FEATURE] Add conntrack statistics metrics #1155\n* [FEATURE] Add ethtool stats collector #1832\n* [FEATURE] Add flag to ignore network speed if it is unknown #1989\n* [FEATURE] Add tapestats collector for Linux #2044\n* [FEATURE] Add nvme collector #2062\n* [ENHANCEMENT] Add ErrorLog plumbing to promhttp #1887\n* [ENHANCEMENT] Add more Infiniband counters #2019\n* [ENHANCEMENT] netclass: retrieve interface names and filter before parsing #2033\n* [ENHANCEMENT] Add time zone offset metric #2060\n* [BUGFIX] Handle errors from disabled PSI subsystem #1983\n* [BUGFIX] Fix panic when using backwards compatible flags #2000\n* [BUGFIX] Fix wrong value for OpenBSD memory buffer cache #2015\n* [BUGFIX] Only initiate collectors once #2048\n* [BUGFIX] Handle small backwards jumps in CPU idle #2067\n\n## 1.1.2 / 2021-03-05\n\n* [BUGFIX] Handle errors from disabled PSI subsystem #1983\n* [BUGFIX] Sanitize strings from /sys/class/power_supply #1984\n* [BUGFIX] Silence missing netclass errors #1986\n\n## 1.1.1 / 2021-02-12\n\n* [BUGFIX] Fix ineffassign issue #1957\n* [BUGFIX] Fix some noisy log lines #1962\n\n## 1.1.0 / 2021-02-05\n\nNOTE: We have improved some of the flag naming conventions (PR #1743). The old names are\n      deprecated and will be removed in 2.0. They will continue to work for backwards\n      compatibility.\n\n* [CHANGE] Improve filter flag names #1743\n* [CHANGE] Add btrfs and powersupplyclass to list of exporters enabled by default #1897\n* [FEATURE] Add fibre channel collector #1786\n* [FEATURE] Expose cpu bugs and flags as info metrics. #1788\n* [FEATURE] Add network_route collector #1811\n* [FEATURE] Add zoneinfo collector #1922\n* [ENHANCEMENT] Add more InfiniBand counters #1694\n* [ENHANCEMENT] Add flag to aggr ipvs metrics to avoid high cardinality metrics #1709\n* [ENHANCEMENT] Adding backlog/current queue length to qdisc collector #1732\n* [ENHANCEMENT] Include TCP OutRsts in netstat metrics #1733\n* [ENHANCEMENT] Add pool size to entropy collector #1753\n* [ENHANCEMENT] Remove CGO dependencies for OpenBSD amd64 #1774\n* [ENHANCEMENT] bcache: add writeback_rate_debug stats #1658\n* [ENHANCEMENT] Add check state for mdadm arrays via node_md_state metric #1810\n* [ENHANCEMENT] Expose XFS inode statistics #1870\n* [ENHANCEMENT] Expose zfs zpool state #1878\n* [ENHANCEMENT] Added an ability to pass collector.supervisord.url via SUPERVISORD_URL environment variable #1947\n* [BUGFIX] filesystem_freebsd: Fix label values #1728\n* [BUGFIX] Fix various procfs parsing errors #1735\n* [BUGFIX] Handle no data from powersupplyclass #1747\n* [BUGFIX] udp_queues_linux.go: change upd to udp in two error strings #1769\n* [BUGFIX] Fix node_scrape_collector_success behaviour #1816\n* [BUGFIX] Fix NodeRAIDDegraded to not use a string rule expressions #1827\n* [BUGFIX] Fix node_md_disks state label from fail to failed #1862\n* [BUGFIX] Handle EPERM for syscall in timex collector #1938\n* [BUGFIX] bcache: fix typo in a metric name #1943\n* [BUGFIX] Fix XFS read/write stats (https://github.com/prometheus/procfs/pull/343)\n\n## 1.0.1 / 2020-06-15\n\n* [BUGFIX] filesystem_freebsd: Fix label values #1728\n* [BUGFIX] Update prometheus/procfs to fix log noise #1735\n* [BUGFIX] Fix build tags for collectors #1745\n* [BUGFIX] Handle no data from powersupplyclass #1747, #1749\n\n## 1.0.0 / 2020-05-25\n\n### **Breaking changes**\n\n* The netdev collector CLI argument `--collector.netdev.ignored-devices` was renamed to `--collector.netdev.device-blacklist` in order to conform with the systemd collector. #1279\n* The label named `state` on `node_systemd_service_restart_total` metrics was changed to `name` to better describe the metric. #1393\n* Refactoring of the mdadm collector changes several metrics\n    - `node_md_disks_active` is removed\n    - `node_md_disks` now has a `state` label for \"failed\", \"spare\", \"active\" disks.\n    - `node_md_is_active` is replaced by `node_md_state` with a state set of \"active\", \"inactive\", \"recovering\", \"resync\".\n* Additional label `mountaddr` added to NFS device metrics to distinguish mounts from the same URL, but different IP addresses. #1417\n* Metrics node_cpu_scaling_frequency_min_hrts and node_cpu_scaling_frequency_max_hrts of the cpufreq collector were renamed to node_cpu_scaling_frequency_min_hertz and node_cpu_scaling_frequency_max_hertz. #1510\n* Collectors that are enabled, but are unable to find data to collect, now return 0 for `node_scrape_collector_success`.\n\n### Changes\n\n* [CHANGE] Add `--collector.netdev.device-whitelist`. #1279\n* [CHANGE] Ignore iso9600 filesystem on Linux #1355\n* [CHANGE] Refactor mdadm collector #1403\n* [CHANGE] Add `mountaddr` label to NFS metrics. #1417\n* [CHANGE] Don't count empty collectors as success. #1613\n* [FEATURE] New flag to disable default collectors #1276\n* [FEATURE] Add experimental TLS support #1277, #1687, #1695\n* [FEATURE] Add collector for Power Supply Class #1280\n* [FEATURE] Add new schedstat collector #1389\n* [FEATURE] Add FreeBSD zfs support #1394\n* [FEATURE] Add uname support for Darwin and OpenBSD #1433\n* [FEATURE] Add new metric node_cpu_info #1489\n* [FEATURE] Add new thermal_zone collector #1425\n* [FEATURE] Add new cooling_device metrics to thermal zone collector #1445\n* [FEATURE] Add swap usage on darwin #1508\n* [FEATURE] Add Btrfs collector #1512\n* [FEATURE] Add RAPL collector #1523\n* [FEATURE] Add new softnet collector #1576\n* [FEATURE] Add new udp_queues collector #1503\n* [FEATURE] Add basic authentication #1673\n* [ENHANCEMENT] Log pid when there is a problem reading the process stats #1341\n* [ENHANCEMENT] Collect InfiniBand port state and physical state #1357\n* [ENHANCEMENT] Include additional XFS runtime statistics. #1423\n* [ENHANCEMENT] Report non-fatal collection errors in the exporter metric. #1439\n* [ENHANCEMENT] Expose IPVS firewall mark as a label #1455\n* [ENHANCEMENT] Add check for systemd version before attempting to query certain metrics. #1413\n* [ENHANCEMENT] Add a flag to adjust mount timeout #1486\n* [ENHANCEMENT] Add new counters for flush requests in Linux 5.5 #1548\n* [ENHANCEMENT] Add metrics and tests for UDP receive and send buffer errors #1534\n* [ENHANCEMENT] The sockstat collector now exposes IPv6 statistics in addition to the existing IPv4 support. #1552\n* [ENHANCEMENT] Add infiniband info metric #1563\n* [ENHANCEMENT] Add unix socket support for supervisord collector #1592\n* [ENHANCEMENT] Implement loadavg on all BSDs without cgo #1584\n* [ENHANCEMENT] Add model_name and stepping to node_cpu_info metric #1617\n* [ENHANCEMENT] Add `--collector.perf.cpus` to allow setting the CPU list for perf stats. #1561\n* [ENHANCEMENT] Add metrics for IO errors and retires on Darwin. #1636\n* [ENHANCEMENT] Add perf tracepoint collection flag #1664\n* [ENHANCEMENT] ZFS: read contents of objset file #1632\n* [ENHANCEMENT] Linux CPU: Cache CPU metrics to make them monotonically increasing #1711\n* [BUGFIX] Read /proc/net files with a single read syscall #1380\n* [BUGFIX] Renamed label `state` to `name` on `node_systemd_service_restart_total`. #1393\n* [BUGFIX] Fix netdev nil reference on Darwin #1414\n* [BUGFIX] Strip path.rootfs from mountpoint labels #1421\n* [BUGFIX] Fix seconds reported by schedstat #1426\n* [BUGFIX] Fix empty string in path.rootfs #1464\n* [BUGFIX] Fix typo in cpufreq metric names #1510\n* [BUGFIX] Read /proc/stat in one syscall #1538\n* [BUGFIX] Fix OpenBSD cache memory information #1542\n* [BUGFIX] Refactor textfile collector to avoid looping defer #1549\n* [BUGFIX] Fix network speed math #1580\n* [BUGFIX] collector/systemd: use regexp to extract systemd version #1647\n* [BUGFIX] Fix initialization in perf collector when using multiple CPUs #1665\n* [BUGFIX] Fix accidentally empty lines in meminfo_linux #1671\n\n## 0.18.1 / 2019-06-04\n\n### Changes\n* [BUGFIX] Fix incorrect sysctl call in BSD meminfo collector, resulting in broken swap metrics on FreeBSD #1345\n* [BUGFIX] Fix rollover bug in mountstats collector #1364\n\n## 0.18.0 / 2019-05-09\n\n### **Breaking changes**\n\n* Renamed `interface` label to `device` in netclass collector for consistency with\n  other network metrics #1224\n* The cpufreq metrics now separate the `cpufreq` and `scaling` data based on what the driver provides. #1248\n* The labels for the network_up metric have changed, see issue #1236\n* Bonding collector now uses `mii_status` instead of `operstatus` #1124\n* Several systemd metrics have been turned off by default to improve performance #1254\n  These include unit_tasks_current, unit_tasks_max, service_restart_total, and unit_start_time_seconds\n* The systemd collector blacklist now includes automount, device, mount, and slice units by default. #1255\n\n### Changes\n\n* [CHANGE] Bonding state uses mii_status #1124\n* [CHANGE] Add a limit to the number of in-flight requests #1166\n* [CHANGE] Renamed `interface` label to `device` in netclass collector #1224\n* [CHANGE] Add separate cpufreq and scaling metrics #1248\n* [CHANGE] Several systemd metrics have been turned off by default to improve performance #1254\n* [CHANGE] Expand systemd collector blacklist #1255\n* [CHANGE] Split cpufreq metrics into a separate collector #1253\n* [FEATURE] Add a flag to disable exporter metrics #1148\n* [FEATURE] Add kstat-based Solaris metrics for boottime, cpu and zfs collectors #1197\n* [FEATURE] Add uname collector for FreeBSD #1239\n* [FEATURE] Add diskstats collector for OpenBSD #1250\n* [FEATURE] Add pressure collector exposing pressure stall information for Linux #1174\n* [FEATURE] Add perf exporter for Linux #1274\n* [ENHANCEMENT] Add Infiniband counters #1120\n* [ENHANCEMENT] Add TCPSynRetrans to netstat default filter #1143\n* [ENHANCEMENT] Move network_up labels into new metric network_info #1236\n* [ENHANCEMENT] Use 64-bit counters for Darwin netstat\n* [BUGFIX] Add fallback for missing /proc/1/mounts #1172\n* [BUGFIX] Fix node_textfile_mtime_seconds to work properly on symlinks #1326\n\n## 0.17.0 / 2018-11-30\n\nBuild note: Linux builds can now be built without CGO.\n\n### **Breaking changes**\n\nsupvervisord collector reports `start_time_seconds` rather than `uptime` #952\n\nThe wifi collector is disabled by default due to suspected caching issues and goroutine leaks.\n* https://github.com/prometheus/node_exporter/issues/870\n* https://github.com/prometheus/node_exporter/issues/1008\n\nDarwin meminfo metrics have been renamed to match Prometheus conventions. #1060\n\n### Changes\n\n* [CHANGE] Use /proc/mounts instead of statfs(2) for ro state #1002\n* [CHANGE] Exclude only subdirectories of /var/lib/docker #1003\n* [CHANGE] Filter out non-installed units when collecting all systemd units #1011\n* [CHANGE] `service_restart_total` and `socket_refused_connections_total` will not be reported if you're running an older version of systemd\n* [CHANGE] collector/timex: remove cgo dependency #1079\n* [CHANGE] filesystem: Ignore Docker netns mounts #1047\n* [CHANGE] Ignore additional virtual filesystems #1104\n* [FEATURE] Add netclass collector #851\n* [FEATURE] Add processes collector #950\n* [FEATURE] Collect start time for systemd units #952\n* [FEATURE] Add socket unit stats to systemd collector #968\n* [FEATURE] Collect NRestarts property for systemd service units #992\n* [FEATURE] Collect NRefused property for systemd socket units (available as of systemd v239) #995\n* [FEATURE] Allow removal of rootfs prefix for run in docker #1058\n* [ENHANCEMENT] Support for octal characters in mountpoints #954\n* [ENHANCEMENT] Update wifi stats to support multiple stations #980\n* [ENHANCEMENT] Add transmit/receive bytes total for wifi stations #1150\n* [ENHANCEMENT] Handle stuck NFS mounts #997\n* [ENHANCEMENT] infiniband: Handle iWARP RDMA modules N/A #974\n* [ENHANCEMENT] Update diskstats for linux kernel 4.19 #1109\n* [ENHANCEMENT] Collect TasksCurrent, TasksMax per systemd unit #1098\n\n* [BUGFIX] Fix FreeBSD CPU temp #965\n* [BUGFIX] Fix goroutine leak in supervisord collector #978\n* [BUGFIX] Fix mdadm collector issues #985\n* [BUGFIX] Fix ntp collector thread safety #1014\n* [BUGFIX] Systemd units will not be ignored if you're running older versions of systemd #1039\n* [BUGFIX] Handle vanishing PIDs #1043\n* [BUGFIX] Correctly cast Darwin memory info #1060\n* [BUGFIX] Filter systemd units in Go for compatibility with older versions #1083\n* [BUGFIX] Update cpu collector for OpenBSD 6.4 #1094\n* [BUGFIX] Fix typo on HELP of `read_time_seconds_total` #1057\n* [BUGFIX] collector/diskstats: don't fail if there are extra stats #1125\n* [BUGFIX] collector/hwmon\\_linux: handle temperature sensor file #1123\n* [BUGFIX] collector/filesystem: add bounds check #1133\n* [BUGFIX] Fix dragonfly's CPU counting frequency #1140\n* [BUGFIX] Add fallback for missing /proc/1/mounts #1172\n\n## 0.16.0 / 2018-05-15\n\n**Breaking changes**\n\nThis release contains major breaking changes to metric names.  Many metrics have new names, labels, and label values in order to conform to current naming conventions.\n* Linux node_cpu metrics now break out `guest` values into separate metrics.  See Issue #737\n* Many counter metrics have been renamed to include `_total`.\n* Many metrics have been renamed/modified to include base units, for example `node_cpu` is now `node_cpu_seconds_total`.\n\nIn order to help with the transition we have an [upgrade guide](docs/V0_16_UPGRADE_GUIDE.md).\n\nOther breaking changes:\n* The megacli collector has been removed, is now replaced by the storcli.py textfile helper.\n* The gmond collector has been removed.\n* The textfile collector will now treat timestamps as errors.\n\n* [CHANGE] Split out guest cpu metrics on Linux. #744\n* [CHANGE] Exclude Linux proc from filesystem type regexp #774\n* [CHANGE] Ignore more virtual filesystems #775\n* [CHANGE] Remove obsolete megacli collector. #798\n* [CHANGE] Ignore /var/lib/docker by default. #814\n* [CHANGE] Cleanup NFS metrics #834\n* [CHANGE] Only report core throttles per core, not per cpu #836\n* [CHANGE] Treat custom textfile metric timestamps as errors #769\n* [CHANGE] Use lowercase cpu label name in interrupts #849\n* [CHANGE] Enable bonding collector by default. #872\n* [CHANGE] Greatly reduce the metrics vmstat returns by default. #874\n* [CHANGE] Greatly trim what netstat collector exposes by default #876\n* [CHANGE] Drop `exec_` prefix and move `node_boot_time_seconds` from `exec` to new `boottime` collector and enable for Darwin/Dragonfly/FreeBSD/NetBSD/OpenBSD. #839, #901\n* [CHANGE] Remove deprecated gmond collector #852\n* [CHANGE] align Darwin disk stat names with Linux #930\n* [FEATURE] Add `collect[]` parameter #699\n* [FEATURE] Add text collector conversion for ipmitool output. #746\n* [FEATURE] Add openbsd meminfo #724\n* [FEATURE] Add systemd summary metrics #765\n* [FEATURE] Add OpenBSD CPU collector #805\n* [FEATURE] Add NFS Server metrics collector. #803\n* [FEATURE] add sample directory size exporter #789\n* [ENHANCEMENT] added Wear_Leveling_Count attribute to smartmon.sh script #707\n* [ENHANCEMENT] Simplify Utsname string conversion #716\n* [ENHANCEMENT] apt.sh: handle multiple origins in apt-get output #757\n* [ENHANCEMENT] Export systemd timers last trigger seconds. #807\n* [ENHANCEMENT] updates for zfsonlinux 0.7.5 #779\n* [BUGFIX] Fix smartmon.sh textfile script #700\n* [BUGFIX] netdev: Change valueType to CounterValue #749\n* [BUGFIX] textfile: fix duplicate metrics error #738\n* [BUGFIX] Fix panic by updating github.com/ema/qdisc dependency #778\n* [BUGFIX] Use uint64 in the ZFS collector #714\n* [BUGFIX] multiply page size after float64 coercion to avoid signed integer overflow #780\n* [BUGFIX] smartmon: Escape double quotes in device model family #772\n* [BUGFIX] Fix log level regression in #533 #815\n* [BUGFIX] Correct the ClocksPerSec scaling factor on Darwin #846\n* [BUGFIX] Count core throttles per core and per package #871\n* [BUGFIX] Fix netdev collector for linux #890 #910\n* [BUGFIX] Fix memory corruption when number of filesystems > 16 on FreeBSD #900\n* [BUGFIX] Fix parsing of interface aliases in netdev linux #904\n\n## 0.15.2 / 2017-12-06\n\n* [BUGFIX]  cpu: Support processor-less (memory-only) NUMA nodes #734\n\n## 0.15.1 / 2017-11-07\n\n* [BUGFIX] xfs: expose correct fields, fix metric names #708\n* [BUGFIX] Correct buffer_bytes > INT_MAX on BSD/amd64. #712\n* [BUGFIX] netstat: return nothing when /proc/net/snmp6 not found #718\n* [BUGFIX] Fix off by one in Linux interrupts collector #721\n* [BUGFIX] Add and use sysReadFile in hwmon collector #728\n\n## 0.15.0 / 2017-10-06\n\n**Breaking changes**\n\nThis release contains major breaking changes to flag handling.\n* The flag library has been changed, all flags now require double-dashes. (`-foo` becomes `--foo`).\n* The collector selection flag has been replaced by individual boolean flags.\n* The `-collector.procfs` and `-collector.sysfs` flags have been renamed to `--path.procfs` and `--path.sysfs` respectively.\n\nThe `ntp` collector has been replaced with a new NTP-based check that is designed to expose the state of a localhost NTP server rather than provide the offset of the node to a remote NTP server.  By default the `ntp` collector is now locked to localhost.  This is to avoid accidental spamming of public internet NTP pools.\n\nWindows support is now removed, the [wmi_exporter](https://github.com/martinlindhe/wmi_exporter) is recommended as a replacement.\n\n* [CHANGE] `node_cpu` metrics moved from `stats` to `cpu` collector on linux (enabled by default). #548\n* [CHANGE] Blacklist systemd scope units #534\n* [CHANGE] Remove netbsd/arm #551\n* [CHANGE] Remove Windows support #549\n* [CHANGE] Enable IPVS collector by default #623\n* [CHANGE] Switch to kingpin flags #639\n* [CHANGE] Replace --collectors.enabled with per-collector flags #640\n* [FEATURE] Add ARP collector for Linux #540\n* [FEATURE] Add XFS collector for Linux #568, #575\n* [FEATURE] Add qdisc collector for Linux #580\n* [FEATURE] Add cpufreq stats for Linux #548\n* [FEATURE] Add diskstats for Darwin #593\n* [FEATURE] Add bcache collector for Linux #597\n* [FEATURE] Add parsing /proc/net/snmp6 file for Linux #615\n* [FEATURE] Add timex collector for Linux #664\n* [ENHANCEMENT] Include overall health status in smartmon.sh example script #546\n* [ENHANCEMENT] Include `guest_nice` in CPU collector #554\n* [ENHANCEMENT] Add exec_boot_time for freebsd, dragonfly #550\n* [ENHANCEMENT] Get full resolution for node_time #555\n* [ENHANCEMENT] infiniband: Multiply port data XMIT/RCV metrics by 4 #579\n* [ENHANCEMENT] cpu: Metric 'package_throttles_total' is per package. #657\n* [BUGFIX] Fix stale device error metrics #533\n* [BUGFIX] edac: Fix typo in node_edac_csrow_uncorrectable_errors_total #564\n* [BUGFIX] Use int64 throughout the ZFS collector #653\n* [BUGFIX] Silently ignore nonexisting bonding_masters file #569\n* [BUGFIX] Change raid0 status line regexp for mdadm collector (bug #618) #619\n* [BUGFIX] Ignore wifi collector permission errors #646\n* [BUGFIX] Always try to return smartmon_device_info metric #663\n\n## 0.14.0 / 2017-03-21\n\nNOTE: We are deprecating several collectors in this release.\n    * `gmond` - Out of scope.\n    * `megacli` - Requires forking, to be moved to textfile collection.\n    * `ntp` - Out of scope.\n\nBreaking changes:\n    * Collector errors are now a separate metric, `node_scrape_collector_success`, not a label on `node_exporter_scrape_duration_seconds` (#516)\n\n* [CHANGE] Report collector success/failure as a bool metric, not a label. #516\n* [FEATURE] Add loadavg collector for Solaris #311\n* [FEATURE] Add StorCli text collector example script #320\n* [FEATURE] Add collector for Linux EDAC #324\n* [FEATURE] Add text file utility for SMART metrics #354\n* [FEATURE] Add a collector for NFS client statistics. #360\n* [FEATURE] Add mountstats collector for detailed NFS statistics #367\n* [FEATURE] Add a collector for DRBD #365\n* [FEATURE] Add cpu collector for darwin #391\n* [FEATURE] Add netdev collector for darwin #393\n* [FEATURE] Collect CPU temperatures on FreeBSD #397\n* [FEATURE] Add ZFS collector #410\n* [FEATURE] Add initial wifi collector #413\n* [FEATURE] Add NFS event metrics to mountstats collector #415\n* [FEATURE] Add an example rules file #422\n* [FEATURE] infiniband: Add new collector for InfiniBand statistics #450\n* [FEATURE] buddyinfo: Add support for /proc/buddyinfo for linux free memory fragmentation. #454\n* [IMPROVEMENT] hwmon: Provide annotation metric to link chip sysfs paths to human-readable chip types #359\n* [IMPROVEMENT] Add node_filesystem_device_errors_total metric #374\n* [IMPROVEMENT] Add runit service dir flag #375\n* [IMPROVEMENT] Improve Docker documentation #376\n* [IMPROVEMENT] Ignore autofs filesystems on linux #384\n* [IMPROVEMENT] Replace some FreeBSD collectors with pure Go versions #385\n* [IMPROVEMENT] Use filename as label, move 'label' to own metric #411 (hwmon)\n* [BUGFIX] mips64 build fix #361\n* [BUGFIX] Update vendoring #372 (to fix #242)\n* [BUGFIX] Convert remaining collectors to use ConstMetrics #389\n* [BUGFIX] Check for errors in netdev scanner #398\n* [BUGFIX] Don't leak or race in FreeBSD devstat collector #396\n* [BUGFIX] Allow graceful failure in hwmon collector #427\n* [BUGFIX] Fix the reporting of active+total disk metrics for inactive raids. #522\n\n## 0.13.0 / 2016-11-26\n\nNOTE: We have disabled builds of linux/ppc64 and linux/ppc64le due to build bugs.\n\n* [FEATURE] Add flag to ignore certain filesystem types (Copy of #217) #241\n* [FEATURE] Add NTP stratum to NTP collector. #247\n* [FEATURE] Add ignored-units flag for systemd collector #286\n* [FEATURE] Compile netdev on dragonfly #314\n* [FEATURE] Compile meminfo for dfly #315\n* [FEATURE] Add hwmon /sensors support #278\n* [FEATURE] Add Linux NUMA \"numastat\" metrics #249\n* [FEATURE] export DragonFlyBSD CPU time #310\n* [FEATURE] Dragonfly devstat #323\n* [IMPROVEMENT] Use the offset calculation that includes round trip time in the ntp collector #250\n* [IMPROVEMENT] Enable `*bsd` collector on darwin #265\n* [IMPROVEMENT] Use meminfo_freebsd on darwin as well #266\n* [IMPROVEMENT] sockstat: add support for RHE4 #267\n* [IMPROVEMENT] Compile fs stats for dfly #302\n* [BUGFIX] Add support for raid0 devices in mdadm_linux collector. #253\n* [BUGFIX] Close file handler in textfile #263\n* [BUGFIX] Ignore partitions on NVME devices by default #268\n* [BUGFIX] Fix mdstat tabs parsing #275\n* [BUGFIX] Fix mdadm collector for resync=PENDING. #309\n* [BUGFIX] mdstat: Fix parsing of RAID0 lines that contain additional attributes. #341\n* [BUGFIX] Fix additional mdadm parsing cases #346\n\n## 0.12.0 / 2016-05-05\n\n* [CHANGE] Remove lastlogin collector.\n* [CHANGE] Remove -debug.memprofile-file flag.\n* [CHANGE] Sync BSD filesystem collector labels with Linux.\n* [CHANGE] Remove HTTP Basic Auth support.\n* [FEATURE] Add -version flag.\n* [FEATURE] Add Linux logind collector.\n* [FEATURE] Add Linux ksmd collector.\n* [FEATURE] Add Linux memory NUMA collector.\n* [FEATURE] Add Linux entropy collector.\n* [FEATURE] Add Linux vmstat collector.\n* [FEATURE] Add Linux conntrack collector.\n* [FEATURE] Add systemd collector.\n* [FEATURE] Add OpenBSD support for filesystem, interrupt and netdev collectors.\n* [FEATURE] Add supervisord collector.\n* [FEATURE] Add Linux /proc/mdstat collector.\n* [FEATURE] Add Linux uname collector.\n* [FEATURE] Add Linux /proc/sys/fs/file-nr collector.\n* [FEATURE] Add Linux /proc/net/sockstat collector.\n* [IMPROVEMENT] Provide statically linked Linux binaries.\n* [IMPROVEMENT] Remove root requirement for FreeBSD CPU metrics.\n* [IMPROVEMENT] Add node_exporter build info metric.\n* [IMPROVEMENT] Add disk bytes read/written metrics on Linux.\n* [IMPROVEMENT] Add filesystem read-only metric.\n* [IMPROVEMENT] Use common Prometheus log formatting.\n* [IMPROVEMENT] Add option to specify NTP protocol version.\n* [IMPROVEMENT] Handle statfs errors gracefully for individual filesystems.\n* [IMPROVEMENT] Add load5 and load15 metrics to loadavg collector.\n* [IMPROVEMENT] Add end-to-end tests.\n* [IMPROVEMENT] Export FreeBSD CPU metrics to seconds.\n* [IMPROVEMENT] Add flag to configure sysfs mountpoint.\n* [IMPROVEMENT] Add flag to configure procfs mountpoint.\n* [IMPROVEMENT] Add metric for last service state change to runit collector.\n* [BUGFIX] Fix FreeBSD netdev metrics on 64 bit systems.\n* [BUGFIX] Fix mdstat for devices in delayed resync state.\n* [BUGFIX] Fix Linux stat metrics on parallel scrapes.\n* [BUGFIX] Remove unavailable collectors from defaults.\n* [BUGFIX] Fix build errors on FreeBSD, OpenBSD, Darwin and Windows.\n* [BUGFIX] Fix build errors on 386, arm, arm64, ppc64 and ppc64le architectures.\n* [BUGFIX] Fix export of stale metrics for removed filesystem and network devices.\n* [BUGFIX] textfile: Fix mtime reporting.\n* [BUGFIX] megacli: prevent crash when drive temperature is N/A\n\n## 0.11.0 / 2015-07-27\n\n* [FEATURE] Add stats from /proc/net/snmp.\n* [FEATURE] Add support for FreeBSD.\n* [FEATURE] Allow netdev devices to be ignored.\n* [MAINTENANCE] New Dockerfile for unified way to dockerize Prometheus exporters.\n* [FEATURE] Add device,fstype collection to the filesystem exporter.\n* [IMPROVEMENT] Make logging of collector executions less verbose.\n\n## 0.10.0 / 2015-06-10\n\n* [CHANGE] Change logging output format and flags.\n\n## 0.9.0 / 2015-05-26\n\n* [BUGFIX] Fix `/proc/net/dev` parsing.\n* [CLEANUP] Remove the `attributes` collector, use `textfile` instead.\n* [CLEANUP] Replace last uses of the configuration file with flags.\n* [IMPROVEMENT] Remove cgo dependency.\n* [IMPROVEMENT] Sort collector names when printing.\n* [FEATURE] IPVS stats collector.\n\n## 0.8.1 / 2015-05-17\n\n* [MAINTENANCE] Use the common Prometheus build infrastructure.\n* [MAINTENANCE] Update former Google Code imports.\n* [IMPROVEMENT] Log the version at startup.\n* [FEATURE] TCP stats collector\n\n## 0.8.0 / 2015-03-09\n* [CLEANUP] Introduced semantic versioning and changelog. From now on,\n  changes will be reported in this file.\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Prometheus Community Code of Conduct\n\nPrometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nPrometheus uses GitHub to manage reviews of pull requests.\n\n* If you have a trivial fix or improvement, go ahead and create a pull request,\n  addressing (with `@...`) the maintainer of this repository (see\n  [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request.\n\n* If you plan to do something more involved, first discuss your ideas\n  on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers).\n  This will avoid unnecessary work and surely give you and us a good deal\n  of inspiration.\n\n* Relevant coding style guidelines are the [Go Code Review\n  Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments)\n  and the _Formatting and style_ section of Peter Bourgon's [Go: Best\n  Practices for Production\n  Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style).\n\n* Sign your work to certify that your changes were created by yourself or you\n  have the right to submit it under our license. Read\n  https://developercertificate.org/ for all details and append your sign-off to\n  every commit message like this:\n\n        Signed-off-by: Random J Developer <example@example.com>\n\n\n## Collector Implementation Guidelines\n\nThe Node Exporter is not a general monitoring agent. Its sole purpose is to\nexpose machine metrics, as oppose to service metrics, with the only exception\nbeing the textfile collector.\n\nThe metrics should not get transformed in a way that is hardware specific and\nwould require maintaining any form of vendor based mappings or conditions. If\nfor example a proc file contains the magic number 42 as some identifier, the\nNode Exporter should expose it as it is and not keep a mapping in code to make\nthis human readable. Instead, the textfile collector can be used to add a static\nmetric which can be joined with the metrics exposed by the exporter to get human\nreadable identifier.\n\nA Collector may only read `/proc` or `/sys` files, use system calls or local\nsockets to retrieve metrics. It may not require root privileges. Running\nexternal commands is not allowed for performance and reliability reasons. Use a\ndedicated exporter instead or gather the metrics via the textfile collector.\n\nThe Node Exporter tries to support the most common machine metrics. For more\nexotic metrics, use the textfile collector or a dedicated Exporter.\n"
  },
  {
    "path": "Dockerfile",
    "content": "ARG ARCH=\"amd64\"\nARG OS=\"linux\"\nFROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest\nLABEL maintainer=\"The Prometheus Authors <prometheus-developers@googlegroups.com>\"\n\nARG ARCH=\"amd64\"\nARG OS=\"linux\"\nCOPY .build/${OS}-${ARCH}/node_exporter /bin/node_exporter\n\nEXPOSE      9100\nUSER        nobody\nENTRYPOINT  [ \"/bin/node_exporter\" ]\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "MAINTAINERS.md",
    "content": "* Ben Kochie <superq@gmail.com> @SuperQ\n* Johannes 'fish' Ziemke <github@freigeist.org> @discordianfish\n"
  },
  {
    "path": "Makefile",
    "content": "# Copyright 2015 The Prometheus Authors\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Ensure that 'all' is the default target otherwise it will be the first target from Makefile.common.\nall::\n\n# Needs to be defined before including Makefile.common to auto-generate targets\nDOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le s390x\n\ninclude Makefile.common\n\nPROMTOOL_VERSION ?= 2.30.0\nPROMTOOL_URL     ?= https://github.com/prometheus/prometheus/releases/download/v$(PROMTOOL_VERSION)/prometheus-$(PROMTOOL_VERSION).$(GO_BUILD_PLATFORM).tar.gz\nPROMTOOL         ?= $(FIRST_GOPATH)/bin/promtool\nE2E_EXTRA_FLAGS  ?=\n\nDOCKER_IMAGE_NAME       ?= node-exporter\nMACH                    ?= $(shell uname -m)\n\nSTATICCHECK_IGNORE =\n\nifeq ($(GOHOSTOS), linux)\n\ttest-e2e := test-e2e\nelse\n\ttest-e2e := skip-test-e2e\nendif\n\n# Use CGO for non-Linux builds.\nifeq ($(GOOS), linux)\n\tPROMU_CONF ?= .promu.yml\nelse\n\tifndef GOOS\n\t\tifeq ($(GOHOSTOS), linux)\n\t\t\tPROMU_CONF ?= .promu.yml\n\t\telse\n\t\t\tPROMU_CONF ?= .promu-cgo.yml\n\t\tendif\n\telse\n\t\t# Do not use CGO for openbsd/amd64 builds\n\t\tifeq ($(GOOS), openbsd)\n\t\t\tifeq ($(GOARCH), amd64)\n\t\t\t\tPROMU_CONF ?= .promu.yml\n\t\t\telse\n\t\t\t\tPROMU_CONF ?= .promu-cgo.yml\n\t\t\tendif\n\t\telse\n\t\t\tPROMU_CONF ?= .promu-cgo.yml\n\t\tendif\n\tendif\nendif\n\nPROMU := $(FIRST_GOPATH)/bin/promu --config $(PROMU_CONF)\n\ne2e-out-64k-page = collector/fixtures/e2e-64k-page-output.txt\ne2e-out = collector/fixtures/e2e-output.txt\nifeq ($(MACH), ppc64le)\n\te2e-out = $(e2e-out-64k-page)\nendif\nifeq ($(MACH), aarch64)\n\te2e-out = $(e2e-out-64k-page)\nendif\n\n# 64bit -> 32bit mapping for cross-checking. At least for amd64/386, the 64bit CPU can execute 32bit code but not the other way around, so we don't support cross-testing upwards.\ncross-test = skip-test-32bit\ndefine goarch_pair\n\tifeq ($$(GOHOSTOS),linux)\n\t\tifeq ($$(GOHOSTARCH),$1)\n\t\t\tGOARCH_CROSS = $2\n\t\t\tcross-test = test-32bit\n\t\tendif\n\tendif\nendef\n\n# By default, \"cross\" test with ourselves to cover unknown pairings.\n$(eval $(call goarch_pair,amd64,386))\n$(eval $(call goarch_pair,mips64,mips))\n$(eval $(call goarch_pair,mips64el,mipsel))\n\nall:: vet checkmetrics checkrules common-all $(cross-test) $(test-e2e)\n\n.PHONY: test\ntest: collector/fixtures/sys/.unpacked collector/fixtures/udev/.unpacked\n\t@echo \">> running tests\"\n\t$(GO) test -short $(test-flags) $(pkgs)\n\n.PHONY: test-32bit\ntest-32bit: collector/fixtures/sys/.unpacked collector/fixtures/udev/.unpacked\n\t@echo \">> running tests in 32-bit mode\"\n\t@env GOARCH=$(GOARCH_CROSS) $(GO) test $(pkgs)\n\n.PHONY: skip-test-32bit\nskip-test-32bit:\n\t@echo \">> SKIP running tests in 32-bit mode: not supported on $(GOHOSTOS)/$(GOHOSTARCH)\"\n\n%/.unpacked: %.ttar\n\t@echo \">> extracting fixtures\"\n\tif [ -d $(dir $@) ] ; then rm -rf $(dir $@) ; fi\n\t./ttar -C $(dir $*) -x -f $*.ttar\n\ttouch $@\n\nupdate_fixtures:\n\trm -vf collector/fixtures/sys/.unpacked\n\t./ttar -C collector/fixtures -c -f collector/fixtures/sys.ttar sys\n\trm -vf collector/fixtures/udev/.unpacked\n\t./ttar -C collector/fixtures -c -f collector/fixtures/udev.ttar udev\n\n.PHONY: tools\ntools:\n\t@rm ./tools/tools >/dev/null 2>&1 || true\n\t@$(GO) build -o tools ./tools/...\n\n.PHONY: test-e2e\ntest-e2e: build collector/fixtures/sys/.unpacked collector/fixtures/udev/.unpacked tools\n\t@echo \">> running end-to-end tests\"\n\t./end-to-end-test.sh -e \"$(E2E_EXTRA_FLAGS)\"\n\n.PHONY: skip-test-e2e\nskip-test-e2e:\n\t@echo \">> SKIP running end-to-end tests on $(GOHOSTOS)\"\n\n.PHONY: checkmetrics\ncheckmetrics: $(PROMTOOL)\n\t@echo \">> checking metrics for correctness\"\n\t./checkmetrics.sh $(PROMTOOL) $(e2e-out)\n\t./checkmetrics.sh $(PROMTOOL) $(e2e-out-64k-page)\n\n.PHONY: checkrules\ncheckrules: $(PROMTOOL)\n\t@echo \">> checking rules for correctness\"\n\tfind . -name \"*rules*.yml\" | xargs -I {} $(PROMTOOL) check rules {}\n\n.PHONY: test-docker\ntest-docker:\n\t@echo \">> testing docker image\"\n\t./test_image.sh \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-amd64:$(DOCKER_IMAGE_TAG)\" 9100\n\n.PHONY: promtool\npromtool: $(PROMTOOL)\n\n$(PROMTOOL):\n\tmkdir -p $(FIRST_GOPATH)/bin\n\tcurl -fsS -L $(PROMTOOL_URL) | tar -xvzf - -C $(FIRST_GOPATH)/bin --strip 1 \"prometheus-$(PROMTOOL_VERSION).$(GO_BUILD_PLATFORM)/promtool\"\n"
  },
  {
    "path": "Makefile.common",
    "content": "# Copyright The Prometheus Authors\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# A common Makefile that includes rules to be reused in different prometheus projects.\n# !!! Open PRs only against the prometheus/prometheus/Makefile.common repository!\n\n# Example usage :\n# Create the main Makefile in the root project directory.\n# include Makefile.common\n# customTarget:\n# \t@echo \">> Running customTarget\"\n#\n\n# Ensure GOBIN is not set during build so that promu is installed to the correct path\nunexport GOBIN\n\nGO           ?= go\nGOFMT        ?= $(GO)fmt\nFIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH)))\nGOOPTS       ?=\nGOHOSTOS     ?= $(shell $(GO) env GOHOSTOS)\nGOHOSTARCH   ?= $(shell $(GO) env GOHOSTARCH)\n\nGO_VERSION        ?= $(shell $(GO) version)\nGO_VERSION_NUMBER ?= $(word 3, $(GO_VERSION))\nPRE_GO_111        ?= $(shell echo $(GO_VERSION_NUMBER) | grep -E 'go1\\.(10|[0-9])\\.')\n\nPROMU        := $(FIRST_GOPATH)/bin/promu\npkgs          = ./...\n\nifeq (arm, $(GOHOSTARCH))\n\tGOHOSTARM ?= $(shell GOARM= $(GO) env GOARM)\n\tGO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH)v$(GOHOSTARM)\nelse\n\tGO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH)\nendif\n\nGOTEST := $(GO) test\nGOTEST_DIR :=\nifneq ($(CIRCLE_JOB),)\nifneq ($(shell command -v gotestsum 2> /dev/null),)\n\tGOTEST_DIR := test-results\n\tGOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml --\nendif\nendif\n\nPROMU_VERSION ?= 0.18.0\nPROMU_URL     := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz\n\nSKIP_GOLANGCI_LINT :=\nGOLANGCI_LINT :=\nGOLANGCI_LINT_OPTS ?=\nGOLANGCI_LINT_VERSION ?= v2.10.1\nGOLANGCI_FMT_OPTS ?=\n# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.\n# windows isn't included here because of the path separator being different.\nifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))\n\tifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386 arm64))\n\t\t# If we're in CI and there is an Actions file, that means the linter\n\t\t# is being run in Actions, so we don't need to run it here.\n\t\tifneq (,$(SKIP_GOLANGCI_LINT))\n\t\t\tGOLANGCI_LINT :=\n\t\telse ifeq (,$(CIRCLE_JOB))\n\t\t\tGOLANGCI_LINT := $(FIRST_GOPATH)/bin/golangci-lint\n\t\telse ifeq (,$(wildcard .github/workflows/golangci-lint.yml))\n\t\t\tGOLANGCI_LINT := $(FIRST_GOPATH)/bin/golangci-lint\n\t\tendif\n\tendif\nendif\n\nPREFIX                  ?= $(shell pwd)\nBIN_DIR                 ?= $(shell pwd)\nDOCKER_IMAGE_TAG        ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))\nDOCKERBUILD_CONTEXT     ?= ./\nDOCKER_REPO             ?= prom\n\n# Check if deprecated DOCKERFILE_PATH is set\nifdef DOCKERFILE_PATH\n$(error DOCKERFILE_PATH is deprecated. Use DOCKERFILE_VARIANTS ?= $(DOCKERFILE_PATH) in the Makefile)\nendif\n\nDOCKER_ARCHS            ?= amd64\nDOCKERFILE_VARIANTS     ?= Dockerfile $(wildcard Dockerfile.*)\n\n# Function to extract variant from Dockerfile label.\n# Returns the variant name from io.prometheus.image.variant label, or \"default\" if not found.\ndefine dockerfile_variant\n$(strip $(or $(shell sed -n 's/.*io\\.prometheus\\.image\\.variant=\"\\([^\"]*\\)\".*/\\1/p' $(1)),default))\nendef\n\n# Check for duplicate variant names (including default for Dockerfiles without labels).\nDOCKERFILE_VARIANT_NAMES := $(foreach df,$(DOCKERFILE_VARIANTS),$(call dockerfile_variant,$(df)))\nDOCKERFILE_VARIANT_NAMES_SORTED := $(sort $(DOCKERFILE_VARIANT_NAMES))\nifneq ($(words $(DOCKERFILE_VARIANT_NAMES)),$(words $(DOCKERFILE_VARIANT_NAMES_SORTED)))\n$(error Duplicate variant names found. Each Dockerfile must have a unique io.prometheus.image.variant label, and only one can be without a label (default))\nendif\n\n# Build variant:dockerfile pairs for shell iteration.\nDOCKERFILE_VARIANTS_WITH_NAMES := $(foreach df,$(DOCKERFILE_VARIANTS),$(call dockerfile_variant,$(df)):$(df))\n\n# Shell helper to check whether a dockerfile/arch pair is excluded.\ndefine dockerfile_arch_is_excluded\ncase \" $(DOCKERFILE_ARCH_EXCLUSIONS) \" in \\\n\t*\" $$dockerfile:$(1) \"*) true ;; \\\n\t*) false ;; \\\nesac\nendef\n\n# Shell helper to check whether a registry/arch pair is excluded.\n# Extracts registry from DOCKER_REPO (e.g., quay.io/prometheus -> quay.io)\ndefine registry_arch_is_excluded\nregistry=$$(echo \"$(DOCKER_REPO)\" | cut -d'/' -f1); \\\ncase \" $(DOCKER_REGISTRY_ARCH_EXCLUSIONS) \" in \\\n\t*\" $$registry:$(1) \"*) true ;; \\\n\t*) false ;; \\\nesac\nendef\n\nBUILD_DOCKER_ARCHS = $(addprefix common-docker-,$(DOCKER_ARCHS))\nPUBLISH_DOCKER_ARCHS = $(addprefix common-docker-publish-,$(DOCKER_ARCHS))\nTAG_DOCKER_ARCHS = $(addprefix common-docker-tag-latest-,$(DOCKER_ARCHS))\n\nSANITIZED_DOCKER_IMAGE_TAG := $(subst +,-,$(DOCKER_IMAGE_TAG))\n\nifeq ($(GOHOSTARCH),amd64)\n        ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux freebsd darwin windows))\n                # Only supported on amd64\n                test-flags := -race\n        endif\nendif\n\n# This rule is used to forward a target like \"build\" to \"common-build\".  This\n# allows a new \"build\" target to be defined in a Makefile which includes this\n# one and override \"common-build\" without override warnings.\n%: common-% ;\n\n.PHONY: common-all\ncommon-all: precheck style check_license lint yamllint unused build test\n\n.PHONY: common-style\ncommon-style:\n\t@echo \">> checking code style\"\n\t@fmtRes=$$($(GOFMT) -d $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -name '*.go' -print)); \\\n\tif [ -n \"$${fmtRes}\" ]; then \\\n\t\techo \"gofmt checking failed!\"; echo \"$${fmtRes}\"; echo; \\\n\t\techo \"Please ensure you are using $$($(GO) version) for formatting code.\"; \\\n\t\texit 1; \\\n\tfi\n\n.PHONY: common-check_license\ncommon-check_license:\n\t@echo \">> checking license header\"\n\t@licRes=$$(for file in $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -type f -iname '*.go' -print) ; do \\\n               awk 'NR<=3' $$file | grep -Eq \"(Copyright|generated|GENERATED)\" || echo $$file; \\\n       done); \\\n       if [ -n \"$${licRes}\" ]; then \\\n               echo \"license header checking failed:\"; echo \"$${licRes}\"; \\\n               exit 1; \\\n       fi\n\t@echo \">> checking for copyright years 2026 or later\"\n\t@futureYearRes=$$(git grep -E 'Copyright (202[6-9]|20[3-9][0-9])' -- '*.go' ':!:vendor/*' || true); \\\n\tif [ -n \"$${futureYearRes}\" ]; then \\\n\t\techo \"Files with copyright year 2026 or later found (should use 'Copyright The Prometheus Authors'):\"; echo \"$${futureYearRes}\"; \\\n\t\texit 1; \\\n\tfi\n\n.PHONY: common-deps\ncommon-deps:\n\t@echo \">> getting dependencies\"\n\t$(GO) mod download\n\n.PHONY: update-go-deps\nupdate-go-deps:\n\t@echo \">> updating Go dependencies\"\n\t@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \\\n\t\t$(GO) get $$m; \\\n\tdone\n\t$(GO) mod tidy\n\n.PHONY: common-test-short\ncommon-test-short: $(GOTEST_DIR)\n\t@echo \">> running short tests\"\n\t$(GOTEST) -short $(GOOPTS) $(pkgs)\n\n.PHONY: common-test\ncommon-test: $(GOTEST_DIR)\n\t@echo \">> running all tests\"\n\t$(GOTEST) $(test-flags) $(GOOPTS) $(pkgs)\n\n$(GOTEST_DIR):\n\t@mkdir -p $@\n\n.PHONY: common-format\ncommon-format: $(GOLANGCI_LINT)\n\t@echo \">> formatting code\"\n\t$(GO) fmt $(pkgs)\nifdef GOLANGCI_LINT\n\t@echo \">> formatting code with golangci-lint\"\n\t$(GOLANGCI_LINT) fmt $(GOLANGCI_FMT_OPTS)\nendif\n\n.PHONY: common-vet\ncommon-vet:\n\t@echo \">> vetting code\"\n\t$(GO) vet $(GOOPTS) $(pkgs)\n\n.PHONY: common-lint\ncommon-lint: $(GOLANGCI_LINT)\nifdef GOLANGCI_LINT\n\t@echo \">> running golangci-lint\"\n\t$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)\nendif\n\n.PHONY: common-lint-fix\ncommon-lint-fix: $(GOLANGCI_LINT)\nifdef GOLANGCI_LINT\n\t@echo \">> running golangci-lint fix\"\n\t$(GOLANGCI_LINT) run --fix $(GOLANGCI_LINT_OPTS) $(pkgs)\nendif\n\n.PHONY: common-yamllint\ncommon-yamllint:\n\t@echo \">> running yamllint on all YAML files in the repository\"\nifeq (, $(shell command -v yamllint 2> /dev/null))\n\t@echo \"yamllint not installed so skipping\"\nelse\n\tyamllint .\nendif\n\n# For backward-compatibility.\n.PHONY: common-staticcheck\ncommon-staticcheck: lint\n\n.PHONY: common-unused\ncommon-unused:\n\t@echo \">> running check for unused/missing packages in go.mod\"\n\t$(GO) mod tidy\n\t@git diff --exit-code -- go.sum go.mod\n\n.PHONY: common-build\ncommon-build: promu\n\t@echo \">> building binaries\"\n\t$(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES)\n\n.PHONY: common-tarball\ncommon-tarball: promu\n\t@echo \">> building release tarball\"\n\t$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)\n\n.PHONY: common-docker-repo-name\ncommon-docker-repo-name:\n\t@echo \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)\"\n\n.PHONY: common-docker $(BUILD_DOCKER_ARCHS)\ncommon-docker: $(BUILD_DOCKER_ARCHS)\n$(BUILD_DOCKER_ARCHS): common-docker-%:\n\t@for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \\\n\t\tdockerfile=$${variant#*:}; \\\n\t\tvariant_name=$${variant%%:*}; \\\n\t\tif $(call dockerfile_arch_is_excluded,$*); then \\\n\t\t\techo \"Skipping $$variant_name variant for linux-$* (excluded by DOCKERFILE_ARCH_EXCLUSIONS)\"; \\\n\t\t\tcontinue; \\\n\t\tfi; \\\n\t\tdistroless_arch=\"$*\"; \\\n\t\tif [ \"$*\" = \"armv7\" ]; then \\\n\t\t\tdistroless_arch=\"arm\"; \\\n\t\tfi; \\\n\t\tif [ \"$$dockerfile\" = \"Dockerfile\" ]; then \\\n\t\t\techo \"Building default variant ($$variant_name) for linux-$* using $$dockerfile\"; \\\n\t\t\tdocker build -t \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)\" \\\n\t\t\t\t-f $$dockerfile \\\n\t\t\t\t--build-arg ARCH=\"$*\" \\\n\t\t\t\t--build-arg OS=\"linux\" \\\n\t\t\t\t--build-arg DISTROLESS_ARCH=\"$$distroless_arch\" \\\n\t\t\t\t$(DOCKERBUILD_CONTEXT); \\\n\t\t\tif [ \"$$variant_name\" != \"default\" ]; then \\\n\t\t\t\techo \"Tagging default variant with $$variant_name suffix\"; \\\n\t\t\t\tdocker tag \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)\" \\\n\t\t\t\t\t\"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name\"; \\\n\t\t\tfi; \\\n\t\telse \\\n\t\t\techo \"Building $$variant_name variant for linux-$* using $$dockerfile\"; \\\n\t\t\tdocker build -t \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name\" \\\n\t\t\t\t-f $$dockerfile \\\n\t\t\t\t--build-arg ARCH=\"$*\" \\\n\t\t\t\t--build-arg OS=\"linux\" \\\n\t\t\t\t--build-arg DISTROLESS_ARCH=\"$$distroless_arch\" \\\n\t\t\t\t$(DOCKERBUILD_CONTEXT); \\\n\t\tfi; \\\n\tdone\n\n.PHONY: common-docker-publish $(PUBLISH_DOCKER_ARCHS)\ncommon-docker-publish: $(PUBLISH_DOCKER_ARCHS)\n$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:\n\t@for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \\\n\t\tdockerfile=$${variant#*:}; \\\n\t\tvariant_name=$${variant%%:*}; \\\n\t\tif $(call dockerfile_arch_is_excluded,$*); then \\\n\t\t\techo \"Skipping push for $$variant_name variant on linux-$* (excluded by DOCKERFILE_ARCH_EXCLUSIONS)\"; \\\n\t\t\tcontinue; \\\n\t\tfi; \\\n\t\tif $(call registry_arch_is_excluded,$*); then \\\n\t\t\techo \"Skipping push for $$variant_name variant on linux-$* to $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)\"; \\\n\t\t\tcontinue; \\\n\t\tfi; \\\n\t\tif [ \"$$dockerfile\" != \"Dockerfile\" ] || [ \"$$variant_name\" != \"default\" ]; then \\\n\t\t\techo \"Pushing $$variant_name variant for linux-$*\"; \\\n\t\t\tdocker push \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name\"; \\\n\t\tfi; \\\n\t\tif [ \"$$dockerfile\" = \"Dockerfile\" ]; then \\\n\t\t\techo \"Pushing default variant ($$variant_name) for linux-$*\"; \\\n\t\t\tdocker push \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)\"; \\\n\t\tfi; \\\n\t\tif [ \"$(DOCKER_IMAGE_TAG)\" = \"latest\" ]; then \\\n\t\t\tif [ \"$$dockerfile\" != \"Dockerfile\" ] || [ \"$$variant_name\" != \"default\" ]; then \\\n\t\t\t\techo \"Pushing $$variant_name variant version tags for linux-$*\"; \\\n\t\t\t\tdocker push \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name\"; \\\n\t\t\tfi; \\\n\t\t\tif [ \"$$dockerfile\" = \"Dockerfile\" ]; then \\\n\t\t\t\techo \"Pushing default variant version tag for linux-$*\"; \\\n\t\t\t\tdocker push \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)\"; \\\n\t\t\tfi; \\\n\t\tfi; \\\n\tdone\n\nDOCKER_MAJOR_VERSION_TAG = $(firstword $(subst ., ,$(shell cat VERSION)))\n.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS)\ncommon-docker-tag-latest: $(TAG_DOCKER_ARCHS)\n$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%:\n\t@for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \\\n\t\tdockerfile=$${variant#*:}; \\\n\t\tvariant_name=$${variant%%:*}; \\\n\t\tif $(call dockerfile_arch_is_excluded,$*); then \\\n\t\t\techo \"Skipping tag for $$variant_name variant on linux-$* (excluded by DOCKERFILE_ARCH_EXCLUSIONS)\"; \\\n\t\t\tcontinue; \\\n\t\tfi; \\\n\t\tif $(call registry_arch_is_excluded,$*); then \\\n\t\t\techo \"Skipping tag for $$variant_name variant on linux-$* for $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)\"; \\\n\t\t\tcontinue; \\\n\t\tfi; \\\n\t\tif [ \"$$dockerfile\" != \"Dockerfile\" ] || [ \"$$variant_name\" != \"default\" ]; then \\\n\t\t\techo \"Tagging $$variant_name variant for linux-$* as latest\"; \\\n\t\t\tdocker tag \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name\" \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest-$$variant_name\"; \\\n\t\t\tdocker tag \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name\" \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name\"; \\\n\t\tfi; \\\n\t\tif [ \"$$dockerfile\" = \"Dockerfile\" ]; then \\\n\t\t\techo \"Tagging default variant ($$variant_name) for linux-$* as latest\"; \\\n\t\t\tdocker tag \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)\" \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest\"; \\\n\t\t\tdocker tag \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)\" \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)\"; \\\n\t\tfi; \\\n\tdone\n\n.PHONY: common-docker-manifest\ncommon-docker-manifest:\n\t@for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \\\n\t\tdockerfile=$${variant#*:}; \\\n\t\tvariant_name=$${variant%%:*}; \\\n\t\tif [ \"$$dockerfile\" != \"Dockerfile\" ] || [ \"$$variant_name\" != \"default\" ]; then \\\n\t\t\techo \"Creating manifest for $$variant_name variant\"; \\\n\t\t\trefs=\"\"; \\\n\t\t\tfor arch in $(DOCKER_ARCHS); do \\\n\t\t\t\tif $(call dockerfile_arch_is_excluded,$$arch); then \\\n\t\t\t\t\techo \"  Skipping $$arch for $$variant_name (excluded by DOCKERFILE_ARCH_EXCLUSIONS)\"; \\\n\t\t\t\t\tcontinue; \\\n\t\t\t\tfi; \\\n\t\t\t\tif $(call registry_arch_is_excluded,$$arch); then \\\n\t\t\t\t\techo \"  Skipping $$arch for $$variant_name on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)\"; \\\n\t\t\t\t\tcontinue; \\\n\t\t\t\tfi; \\\n\t\t\t\trefs=\"$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name\"; \\\n\t\t\tdone; \\\n\t\t\tif [ -z \"$$refs\" ]; then \\\n\t\t\t\techo \"Skipping manifest for $$variant_name variant (no supported architectures)\"; \\\n\t\t\t\tcontinue; \\\n\t\t\tfi; \\\n\t\t\tDOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name\" $$refs; \\\n\t\t\tDOCKER_CLI_EXPERIMENTAL=enabled docker manifest push \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name\"; \\\n\t\tfi; \\\n\t\tif [ \"$$dockerfile\" = \"Dockerfile\" ]; then \\\n\t\t\techo \"Creating default variant ($$variant_name) manifest\"; \\\n\t\t\trefs=\"\"; \\\n\t\t\tfor arch in $(DOCKER_ARCHS); do \\\n\t\t\t\tif $(call dockerfile_arch_is_excluded,$$arch); then \\\n\t\t\t\t\techo \"  Skipping $$arch for default variant (excluded by DOCKERFILE_ARCH_EXCLUSIONS)\"; \\\n\t\t\t\t\tcontinue; \\\n\t\t\t\tfi; \\\n\t\t\t\tif $(call registry_arch_is_excluded,$$arch); then \\\n\t\t\t\t\techo \"  Skipping $$arch for default variant on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)\"; \\\n\t\t\t\t\tcontinue; \\\n\t\t\t\tfi; \\\n\t\t\t\trefs=\"$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:$(SANITIZED_DOCKER_IMAGE_TAG)\"; \\\n\t\t\tdone; \\\n\t\t\tif [ -z \"$$refs\" ]; then \\\n\t\t\t\techo \"Skipping default variant manifest (no supported architectures)\"; \\\n\t\t\t\tcontinue; \\\n\t\t\tfi; \\\n\t\t\tDOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)\" $$refs; \\\n\t\t\tDOCKER_CLI_EXPERIMENTAL=enabled docker manifest push \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)\"; \\\n\t\tfi; \\\n\t\tif [ \"$(DOCKER_IMAGE_TAG)\" = \"latest\" ]; then \\\n\t\t\tif [ \"$$dockerfile\" != \"Dockerfile\" ] || [ \"$$variant_name\" != \"default\" ]; then \\\n\t\t\t\techo \"Creating manifest for $$variant_name variant version tag\"; \\\n\t\t\t\trefs=\"\"; \\\n\t\t\t\tfor arch in $(DOCKER_ARCHS); do \\\n\t\t\t\t\tif $(call dockerfile_arch_is_excluded,$$arch); then \\\n\t\t\t\t\t\techo \"  Skipping $$arch for $$variant_name version tag (excluded by DOCKERFILE_ARCH_EXCLUSIONS)\"; \\\n\t\t\t\t\t\tcontinue; \\\n\t\t\t\t\tfi; \\\n\t\t\t\t\tif $(call registry_arch_is_excluded,$$arch); then \\\n\t\t\t\t\t\techo \"  Skipping $$arch for $$variant_name version tag on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)\"; \\\n\t\t\t\t\t\tcontinue; \\\n\t\t\t\t\tfi; \\\n\t\t\t\t\trefs=\"$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name\"; \\\n\t\t\t\tdone; \\\n\t\t\t\tif [ -z \"$$refs\" ]; then \\\n\t\t\t\t\techo \"Skipping version-tag manifest for $$variant_name variant (no supported architectures)\"; \\\n\t\t\t\t\tcontinue; \\\n\t\t\t\tfi; \\\n\t\t\t\tDOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name\" $$refs; \\\n\t\t\t\tDOCKER_CLI_EXPERIMENTAL=enabled docker manifest push \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name\"; \\\n\t\t\tfi; \\\n\t\t\tif [ \"$$dockerfile\" = \"Dockerfile\" ]; then \\\n\t\t\t\techo \"Creating default variant version tag manifest\"; \\\n\t\t\t\trefs=\"\"; \\\n\t\t\t\tfor arch in $(DOCKER_ARCHS); do \\\n\t\t\t\t\tif $(call dockerfile_arch_is_excluded,$$arch); then \\\n\t\t\t\t\t\techo \"  Skipping $$arch for default variant version tag (excluded by DOCKERFILE_ARCH_EXCLUSIONS)\"; \\\n\t\t\t\t\t\tcontinue; \\\n\t\t\t\t\tfi; \\\n\t\t\t\t\tif $(call registry_arch_is_excluded,$$arch); then \\\n\t\t\t\t\t\techo \"  Skipping $$arch for default variant version tag on $(DOCKER_REPO) (excluded by DOCKER_REGISTRY_ARCH_EXCLUSIONS)\"; \\\n\t\t\t\t\t\tcontinue; \\\n\t\t\t\t\tfi; \\\n\t\t\t\t\trefs=\"$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:v$(DOCKER_MAJOR_VERSION_TAG)\"; \\\n\t\t\t\tdone; \\\n\t\t\t\tif [ -z \"$$refs\" ]; then \\\n\t\t\t\t\techo \"Skipping default variant version-tag manifest (no supported architectures)\"; \\\n\t\t\t\t\tcontinue; \\\n\t\t\t\tfi; \\\n\t\t\t\tDOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)\" $$refs; \\\n\t\t\t\tDOCKER_CLI_EXPERIMENTAL=enabled docker manifest push \"$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)\"; \\\n\t\t\tfi; \\\n\t\tfi; \\\n\tdone\n\n.PHONY: promu\npromu: $(PROMU)\n\n$(PROMU):\n\t$(eval PROMU_TMP := $(shell mktemp -d))\n\tcurl -s -L $(PROMU_URL) | tar -xvzf - -C $(PROMU_TMP)\n\tmkdir -p $(FIRST_GOPATH)/bin\n\tcp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu\n\trm -r $(PROMU_TMP)\n\n.PHONY: common-proto\ncommon-proto:\n\t@echo \">> generating code from proto files\"\n\t@./scripts/genproto.sh\n\nifdef GOLANGCI_LINT\n$(GOLANGCI_LINT):\n\tmkdir -p $(FIRST_GOPATH)/bin\n\tcurl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/$(GOLANGCI_LINT_VERSION)/install.sh \\\n\t\t| sed -e '/install -d/d' \\\n\t\t| sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)\nendif\n\n.PHONY: common-print-golangci-lint-version\ncommon-print-golangci-lint-version:\n\t@echo $(GOLANGCI_LINT_VERSION)\n\n.PHONY: precheck\nprecheck::\n\ndefine PRECHECK_COMMAND_template =\nprecheck:: $(1)_precheck\n\nPRECHECK_COMMAND_$(1) ?= $(1) $$(strip $$(PRECHECK_OPTIONS_$(1)))\n.PHONY: $(1)_precheck\n$(1)_precheck:\n\t@if ! $$(PRECHECK_COMMAND_$(1)) 1>/dev/null 2>&1; then \\\n\t\techo \"Execution of '$$(PRECHECK_COMMAND_$(1))' command failed. Is $(1) installed?\"; \\\n\t\texit 1; \\\n\tfi\nendef\n\ngovulncheck: install-govulncheck\n\tgovulncheck ./...\n\ninstall-govulncheck:\n\tcommand -v govulncheck > /dev/null || go install golang.org/x/vuln/cmd/govulncheck@latest\n"
  },
  {
    "path": "NOTICE",
    "content": "Configurable modular Prometheus exporter for various node metrics.\nCopyright 2013-2015 The Prometheus Authors\n\nThis product includes software developed at\nSoundCloud Ltd. (http://soundcloud.com/).\n\nThe following components are included in this product:\n\nwifi\nhttps://github.com/mdlayher/wifi\nCopyright 2016-2017 Matt Layher\nLicensed under the MIT License\n\nnetlink\nhttps://github.com/mdlayher/netlink\nCopyright 2016-2017 Matt Layher\nLicensed under the MIT License\n"
  },
  {
    "path": "README.md",
    "content": "# Node exporter\n\n[![CircleCI](https://circleci.com/gh/prometheus/node_exporter/tree/master.svg?style=shield)][circleci]\n![bsd workflow](https://github.com/prometheus/node_exporter/actions/workflows/bsd.yml/badge.svg)\n![golangci-lint workflow](https://github.com/prometheus/node_exporter/actions/workflows/golangci-lint.yml/badge.svg)\n[![Docker Repository on Quay](https://quay.io/repository/prometheus/node-exporter/status)][quay]\n[![Docker Pulls](https://img.shields.io/docker/pulls/prom/node-exporter.svg?maxAge=604800)][hub]\n[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/node_exporter)][goreportcard]\n\nPrometheus exporter for hardware and OS metrics exposed by \\*NIX kernels, written\nin Go with pluggable metric collectors.\n\nThe [Windows exporter](https://github.com/prometheus-community/windows_exporter) is recommended for Windows users.\nTo expose NVIDIA GPU metrics, [prometheus-dcgm\n](https://github.com/NVIDIA/dcgm-exporter)\ncan be used.\n\n## Installation and Usage\n\nIf you are new to Prometheus and `node_exporter` there is a [simple step-by-step guide](https://prometheus.io/docs/guides/node-exporter/).\n\nThe `node_exporter` listens on HTTP port 9100 by default. See the `--help` output for more options.\n\n### Ansible\n\nFor automated installs with [Ansible](https://www.ansible.com/), there is the [Prometheus Community role](https://github.com/prometheus-community/ansible).\n\n### Docker\n\nThe `node_exporter` is designed to monitor the host system. Deploying in containers requires\nextra care in order to avoid monitoring the container itself.\n\nFor situations where containerized deployment is needed, some extra flags must be used to allow\nthe `node_exporter` access to the host namespaces.\n\nBe aware that any non-root mount points you want to monitor will need to be bind-mounted\ninto the container.\n\nIf you start container for host monitoring, specify `path.rootfs` argument.\nThis argument must match path in bind-mount of host root. The node\\_exporter will use\n`path.rootfs` as prefix to access host filesystem.\n\n```bash\ndocker run -d \\\n  --net=\"host\" \\\n  --pid=\"host\" \\\n  -v \"/:/host:ro,rslave\" \\\n  quay.io/prometheus/node-exporter:latest \\\n  --path.rootfs=/host\n```\n\nFor Docker compose, similar flag changes are needed.\n\n```yaml\n---\nversion: '3.8'\n\nservices:\n  node_exporter:\n    image: quay.io/prometheus/node-exporter:latest\n    container_name: node_exporter\n    command:\n      - '--path.rootfs=/host'\n    network_mode: host\n    pid: host\n    restart: unless-stopped\n    volumes:\n      - '/:/host:ro,rslave'\n```\n\nOn some systems, the `timex` collector requires an additional Docker flag,\n`--cap-add=SYS_TIME`, in order to access the required syscalls.\n\n## Collectors\n\nThere is varying support for collectors on each operating system. The tables\nbelow list all existing collectors and the supported systems.\n\nCollectors are enabled by providing a `--collector.<name>` flag.\nCollectors that are enabled by default can be disabled by providing a `--no-collector.<name>` flag.\nTo enable only some specific collector(s), use `--collector.disable-defaults --collector.<name> ...`.\n\n### Include & Exclude flags\n\nA few collectors can be configured to include or exclude certain patterns using dedicated flags. The exclude flags are used to indicate \"all except\", while the include flags are used to say \"none except\". Note that these flags are mutually exclusive on collectors that support both.\n\nExample:\n\n```txt\n--collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)\n```\n\nList:\n\nCollector | Scope | Include Flag | Exclude Flag\n--- | --- | --- | ---\narp | device | --collector.arp.device-include | --collector.arp.device-exclude\ncpu | bugs | --collector.cpu.info.bugs-include | N/A\ncpu | flags | --collector.cpu.info.flags-include | N/A\ndiskstats | device | --collector.diskstats.device-include | --collector.diskstats.device-exclude\nethtool | device | --collector.ethtool.device-include | --collector.ethtool.device-exclude\nethtool | metrics | --collector.ethtool.metrics-include | N/A\nfilesystem | fs-types | --collector.filesystem.fs-types-include | --collector.filesystem.fs-types-exclude\nfilesystem | mount-points | --collector.filesystem.mount-points-include | --collector.filesystem.mount-points-exclude\nhwmon | chip | --collector.hwmon.chip-include | --collector.hwmon.chip-exclude\nhwmon | sensor | --collector.hwmon.sensor-include | --collector.hwmon.sensor-exclude\ninterrupts | name | --collector.interrupts.name-include | --collector.interrupts.name-exclude\nnetdev | device | --collector.netdev.device-include | --collector.netdev.device-exclude\nqdisk | device | --collector.qdisk.device-include | --collector.qdisk.device-exclude\nslabinfo | slab-names | --collector.slabinfo.slabs-include | --collector.slabinfo.slabs-exclude\nsysctl | all | --collector.sysctl.include | N/A\nsystemd | unit | --collector.systemd.unit-include | --collector.systemd.unit-exclude\n\n### Enabled by default\n\nName     | Description | OS\n---------|-------------|----\narp | Exposes ARP statistics from `/proc/net/arp`. | Linux\nbcache | Exposes bcache statistics from `/sys/fs/bcache/`. | Linux\nbonding | Exposes the number of configured and active slaves of Linux bonding interfaces. | Linux\nbtrfs | Exposes btrfs statistics | Linux\nboottime | Exposes system boot time derived from the `kern.boottime` sysctl. | Darwin, Dragonfly, FreeBSD, NetBSD, OpenBSD, Solaris\nconntrack | Shows conntrack statistics (does nothing if no `/proc/sys/net/netfilter/` present). | Linux\ncpu | Exposes CPU statistics | Darwin, Dragonfly, FreeBSD, Linux, Solaris, OpenBSD\ncpufreq | Exposes CPU frequency statistics | Linux, Solaris\ndiskstats | Exposes disk I/O statistics. | Darwin, Linux, OpenBSD\ndmi | Expose Desktop Management Interface (DMI) info from `/sys/class/dmi/id/` | Linux\nedac | Exposes error detection and correction statistics. | Linux\nentropy | Exposes available entropy. | Linux\nexec | Exposes execution statistics. | Dragonfly, FreeBSD\nfibrechannel | Exposes fibre channel information and statistics from `/sys/class/fc_host/`. | Linux\nfilefd | Exposes file descriptor statistics from `/proc/sys/fs/file-nr`. | Linux\nfilesystem | Exposes filesystem statistics, such as disk space used. | Darwin, Dragonfly, FreeBSD, Linux, OpenBSD\nhwmon | Expose hardware monitoring and sensor data from `/sys/class/hwmon/`. | Linux\ninfiniband | Exposes network statistics specific to InfiniBand and Intel OmniPath configurations. | Linux\nipvs | Exposes IPVS status from `/proc/net/ip_vs` and stats from `/proc/net/ip_vs_stats`. | Linux\nloadavg | Exposes load average. | Darwin, Dragonfly, FreeBSD, Linux, NetBSD, OpenBSD, Solaris\nmdadm | Exposes statistics about devices in `/proc/mdstat` (does nothing if no `/proc/mdstat` present). | Linux\nmeminfo | Exposes memory statistics. | Darwin, Dragonfly, FreeBSD, Linux, OpenBSD\nnetclass | Exposes network interface info from `/sys/class/net/` | Linux\nnetdev | Exposes network interface statistics such as bytes transferred. | Darwin, Dragonfly, FreeBSD, Linux, OpenBSD\nnetisr | Exposes netisr statistics | FreeBSD\nnetstat | Exposes network statistics from `/proc/net/netstat`. This is the same information as `netstat -s`. | Linux\nnfs | Exposes NFS client statistics from `/proc/net/rpc/nfs`. This is the same information as `nfsstat -c`. | Linux\nnfsd | Exposes NFS kernel server statistics from `/proc/net/rpc/nfsd`. This is the same information as `nfsstat -s`. | Linux\nnvme | Exposes NVMe info from `/sys/class/nvme/` | Linux\nos | Expose OS release info from `/etc/os-release` or `/usr/lib/os-release` | _any_\npowersupplyclass | Exposes Power Supply statistics from `/sys/class/power_supply` | Linux\npressure | Exposes pressure stall statistics from `/proc/pressure/`. | Linux (kernel 4.20+ and/or [CONFIG\\_PSI](https://www.kernel.org/doc/html/latest/accounting/psi.html))\nrapl | Exposes various statistics from `/sys/class/powercap`. | Linux\nschedstat | Exposes task scheduler statistics from `/proc/schedstat`. | Linux\nselinux | Exposes SELinux statistics. | Linux\nsockstat | Exposes various statistics from `/proc/net/sockstat`. | Linux\nsoftnet | Exposes statistics from `/proc/net/softnet_stat`. | Linux\nstat | Exposes various statistics from `/proc/stat`. This includes boot time, forks and interrupts. | Linux\ntapestats | Exposes statistics from `/sys/class/scsi_tape`. | Linux\ntextfile | Exposes statistics read from local disk. The `--collector.textfile.directory` flag must be set. | _any_\nthermal | Exposes thermal statistics like `pmset -g therm`. | Darwin\nthermal\\_zone | Exposes thermal zone & cooling device statistics from `/sys/class/thermal`. | Linux\ntime | Exposes the current system time. | _any_\ntimex | Exposes selected adjtimex(2) system call stats. | Linux\nudp_queues | Exposes UDP total lengths of the rx_queue and tx_queue from `/proc/net/udp` and `/proc/net/udp6`. | Linux\nuname | Exposes system information as provided by the uname system call. | Darwin, FreeBSD, Linux, OpenBSD\nvmstat | Exposes statistics from `/proc/vmstat`. | Linux\nwatchdog | Exposes statistics from `/sys/class/watchdog` | Linux\nxfs | Exposes XFS runtime statistics. | Linux (kernel 4.4+)\nzfs | Exposes [ZFS](http://open-zfs.org/) performance statistics. | FreeBSD, [Linux](http://zfsonlinux.org/), Solaris\n\n### Disabled by default\n\n`node_exporter` also implements a number of collectors that are disabled by default.  Reasons for this vary by\ncollector, and may include:\n* High cardinality\n* Prolonged runtime that exceeds the Prometheus `scrape_interval` or `scrape_timeout`\n* Significant resource demands on the host\n\nYou can enable additional collectors as desired by adding them to your\ninit system's or service supervisor's startup configuration for\n`node_exporter` but caution is advised.  Enable at most one at a time,\ntesting first on a non-production system, then by hand on a single\nproduction node.  When enabling additional collectors, you should\ncarefully monitor the change by observing the `\nscrape_duration_seconds` metric to ensure that collection completes\nand does not time out.  In addition, monitor the\n`scrape_samples_post_metric_relabeling` metric to see the changes in\ncardinality.\n\nName     | Description | OS\n---------|-------------|----\nbuddyinfo | Exposes statistics of memory fragments as reported by /proc/buddyinfo. | Linux\ncgroups | A summary of the number of active and enabled cgroups | Linux\ncpu\\_vulnerabilities | Exposes CPU vulnerability information from sysfs. | Linux\ndevstat | Exposes device statistics | Dragonfly, FreeBSD\ndrm | Expose GPU metrics using sysfs / DRM, `amdgpu` is the only driver which exposes this information through DRM | Linux\ndrbd | Exposes Distributed Replicated Block Device statistics (to version 8.4) | Linux\nethtool | Exposes network interface information and network driver statistics equivalent to `ethtool`, `ethtool -S`, and `ethtool -i`. | Linux\ninterrupts | Exposes detailed interrupts statistics. | Linux, OpenBSD\nkernel_hung | Exposes number of tasks that have been detected as hung from `/proc/sys/kernel/hung_task_detect_count`. | Linux\nksmd | Exposes kernel and system statistics from `/sys/kernel/mm/ksm`. | Linux\nlnstat | Exposes stats from `/proc/net/stat/`. | Linux\nlogind | Exposes session counts from [logind](http://www.freedesktop.org/wiki/Software/systemd/logind/). | Linux\nmeminfo\\_numa | Exposes memory statistics from `/sys/devices/system/node/node[0-9]*/meminfo`, `/sys/devices/system/node/node[0-9]*/numastat`. | Linux\nmountstats | Exposes filesystem statistics from `/proc/self/mountstats`. Exposes detailed NFS client statistics. | Linux\nnetwork_route | Exposes the routing table as metrics | Linux\npcidevice | Exposes pci devices' information including their link status and parent devices. | Linux\nperf | Exposes perf based metrics (Warning: Metrics are dependent on kernel configuration and settings). | Linux\nprocesses | Exposes aggregate process statistics from `/proc`. | Linux\nqdisc | Exposes [queuing discipline](https://en.wikipedia.org/wiki/Network_scheduler#Linux_kernel) statistics | Linux\nslabinfo | Exposes slab statistics from `/proc/slabinfo`. Note that permission of `/proc/slabinfo` is usually 0400, so set it appropriately. | Linux\nsoftirqs | Exposes detailed softirq statistics from `/proc/softirqs`. | Linux\nsysctl | Expose sysctl values from `/proc/sys`. Use `--collector.sysctl.include(-info)` to configure. | Linux\nswap | Expose swap information from `/proc/swaps`. | Linux\nsystemd | Exposes service and system status from [systemd](http://www.freedesktop.org/wiki/Software/systemd/). | Linux\ntcpstat | Exposes TCP connection status information from `/proc/net/tcp` and `/proc/net/tcp6`. (Warning: the current version has potential performance issues in high load situations.) | Linux\nwifi | Exposes WiFi device and station statistics. | Linux\nxfrm | Exposes statistics from `/proc/net/xfrm_stat` | Linux\nzoneinfo | Exposes NUMA memory zone metrics. | Linux\n\n### Deprecated\n\nThese collectors are deprecated and will be removed in the next major release.\n\nName     | Description | OS\n---------|-------------|----\nntp | Exposes local NTP daemon health to check [time](./docs/TIME.md) | _any_\nrunit | Exposes service status from [runit](http://smarden.org/runit/). | _any_\nsupervisord | Exposes service status from [supervisord](http://supervisord.org/). | _any_\n\n### Perf Collector\n\nThe `perf` collector may not work out of the box on some Linux systems due to kernel\nconfiguration and security settings. To allow access, set the following `sysctl`\nparameter:\n\n```\nsysctl -w kernel.perf_event_paranoid=X\n```\n\n- 2 allow only user-space measurements (default since Linux 4.6).\n- 1 allow both kernel and user measurements (default before Linux 4.6).\n- 0 allow access to CPU-specific data but not raw tracepoint samples.\n- -1 no restrictions.\n\nDepending on the configured value different metrics will be available, for most\ncases `0` will provide the most complete set. For more information see [`man 2\nperf_event_open`](http://man7.org/linux/man-pages/man2/perf_event_open.2.html).\n\nBy default, the `perf` collector will only collect metrics of the CPUs that\n`node_exporter` is running on (ie\n[`runtime.NumCPU`](https://golang.org/pkg/runtime/#NumCPU). If this is\ninsufficient (e.g. if you run `node_exporter` with its CPU affinity set to\nspecific CPUs), you can specify a list of alternate CPUs by using the\n`--collector.perf.cpus` flag. For example, to collect metrics on CPUs 2-6, you\nwould specify: `--collector.perf --collector.perf.cpus=2-6`. The CPU\nconfiguration is zero indexed and can also take a stride value; e.g.\n`--collector.perf --collector.perf.cpus=1-10:5` would collect on CPUs\n1, 5, and 10.\n\nThe `perf` collector is also able to collect\n[tracepoint](https://www.kernel.org/doc/html/latest/core-api/tracepoint.html)\ncounts when using the `--collector.perf.tracepoint` flag. Tracepoints can be\nfound using [`perf list`](http://man7.org/linux/man-pages/man1/perf.1.html) or\nfrom debugfs. And example usage of this would be\n`--collector.perf.tracepoint=\"sched:sched_process_exec\"`.\n\n### Sysctl Collector\n\nThe `sysctl` collector can be enabled with `--collector.sysctl`. It supports exposing numeric sysctl values\nas metrics using the `--collector.sysctl.include` flag and string values as info metrics by using the\n`--collector.sysctl.include-info` flag. The flags can be repeated. For sysctl with multiple numeric values,\nan optional mapping can be given to expose each value as its own metric. Otherwise an `index` label is used\nto identify the different fields.\n\n#### Examples\n##### Numeric values\n###### Single values\nUsing `--collector.sysctl.include=vm.user_reserve_kbytes`:\n`vm.user_reserve_kbytes = 131072` -> `node_sysctl_vm_user_reserve_kbytes 131072`\n\n###### Multiple values\nA sysctl can contain multiple values, for example:\n```\nnet.ipv4.tcp_rmem = 4096\t131072\t6291456\n```\nUsing `--collector.sysctl.include=net.ipv4.tcp_rmem` the collector will expose:\n```\nnode_sysctl_net_ipv4_tcp_rmem{index=\"0\"} 4096\nnode_sysctl_net_ipv4_tcp_rmem{index=\"1\"} 131072\nnode_sysctl_net_ipv4_tcp_rmem{index=\"2\"} 6291456\n```\nIf the indexes have defined meaning like in this case, the values can be mapped to multiple metrics by appending the mapping to the --collector.sysctl.include flag:\nUsing `--collector.sysctl.include=net.ipv4.tcp_rmem:min,default,max` the collector will expose:\n```\nnode_sysctl_net_ipv4_tcp_rmem_min 4096\nnode_sysctl_net_ipv4_tcp_rmem_default 131072\nnode_sysctl_net_ipv4_tcp_rmem_max 6291456\n```\n\n##### String values\nString values need to be exposed as info metric. The user selects them by using the `--collector.sysctl.include-info` flag.\n\n###### Single values\n`kernel.core_pattern = core` -> `node_sysctl_info{key=\"kernel.core_pattern_info\", value=\"core\"} 1`\n\n###### Multiple values\nGiven the following sysctl:\n```\nkernel.seccomp.actions_avail = kill_process kill_thread trap errno trace log allow\n```\nSetting `--collector.sysctl.include-info=kernel.seccomp.actions_avail` will yield:\n```\nnode_sysctl_info{key=\"kernel.seccomp.actions_avail\", index=\"0\", value=\"kill_process\"} 1\nnode_sysctl_info{key=\"kernel.seccomp.actions_avail\", index=\"1\", value=\"kill_thread\"} 1\n...\n```\n\n### Textfile Collector\n\nThe `textfile` collector is similar to the [Pushgateway](https://github.com/prometheus/pushgateway),\nin that it allows exporting of statistics from batch jobs. It can also be used\nto export static metrics, such as what role a machine has. The Pushgateway\nshould be used for service-level metrics. The `textfile` module is for metrics\nthat are tied to a machine.\n\nTo use it, set the `--collector.textfile.directory` flag on the `node_exporter` commandline. The\ncollector will parse all files in that directory matching the glob `*.prom`\nusing the [text\nformat](http://prometheus.io/docs/instrumenting/exposition_formats/). **Note:** Timestamps are not supported.\n\nTo atomically push completion time for a cron job:\n```\necho my_batch_job_completion_time $(date +%s) > /path/to/directory/my_batch_job.prom.$$\nmv /path/to/directory/my_batch_job.prom.$$ /path/to/directory/my_batch_job.prom\n```\n\nTo statically set roles for a machine using labels:\n```\necho 'role{role=\"application_server\"} 1' > /path/to/directory/role.prom.$$\nmv /path/to/directory/role.prom.$$ /path/to/directory/role.prom\n```\n\n### Filtering enabled collectors\n\nThe `node_exporter` will expose all metrics from enabled collectors by default.  This is the recommended way to collect metrics to avoid errors when comparing metrics of different families.\n\nFor advanced use the `node_exporter` can be passed an optional list of collectors to filter metrics. The parameters `collect[]` and `exclude[]` can be used multiple times (but cannot be combined).  In Prometheus configuration you can use this syntax under the [scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<scrape_config>).\n\nCollect only `cpu` and `meminfo` collector metrics:\n```\n  params:\n    collect[]:\n      - cpu\n      - meminfo\n```\n\nCollect all enabled collector metrics but exclude `netdev`:\n```\n  params:\n    exclude[]:\n      - netdev\n```\n\nThis can be useful for having different Prometheus servers collect specific metrics from nodes.\n\n## Development building and running\n\nPrerequisites:\n\n* [Go compiler](https://golang.org/dl/)\n* RHEL/CentOS: `glibc-static` package.\n\nBuilding:\n\n    git clone https://github.com/prometheus/node_exporter.git\n    cd node_exporter\n    make build\n    ./node_exporter <flags>\n\nTo see all available configuration flags:\n\n    ./node_exporter -h\n\n## Running tests\n\n    make test\n\n## TLS endpoint\n\n**EXPERIMENTAL**\n\nThe exporter supports TLS via a new web configuration file.\n\n```console\n./node_exporter --web.config.file=web-config.yml\n```\n\nSee the [exporter-toolkit web-configuration](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md) for more details.\n\n[travis]: https://travis-ci.org/prometheus/node_exporter\n[hub]: https://hub.docker.com/r/prom/node-exporter/\n[circleci]: https://circleci.com/gh/prometheus/node_exporter\n[quay]: https://quay.io/repository/prometheus/node-exporter\n[goreportcard]: https://goreportcard.com/report/github.com/prometheus/node_exporter\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Reporting a security issue\n\nThe Prometheus security policy, including how to report vulnerabilities, can be\nfound here:\n\n<https://prometheus.io/docs/operating/security/>\n"
  },
  {
    "path": "VERSION",
    "content": "1.10.2\n"
  },
  {
    "path": "checkmetrics.sh",
    "content": "#!/usr/bin/env bash\n\nif [[ ( -z \"$1\" ) || ( -z \"$2\" ) ]]; then\n    echo \"usage: ./checkmetrics.sh /usr/bin/promtool e2e-output.txt\"\n    exit 1\nfi\n\n# Ignore known issues in auto-generated and network specific collectors.\nlint=$($1 check metrics < \"$2\" 2>&1 | grep -v -E \"^node_(entropy|memory|netstat|wifi_station)_\")\n\nif [[ -n $lint ]]; then\n    echo -e \"Some Prometheus metrics do not follow best practices:\\n\"\n    echo \"$lint\"\n\n    exit 1\nfi\n"
  },
  {
    "path": "collector/arp_linux.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noarp\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/jsimonetti/rtnetlink/v2/rtnl\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n\t\"golang.org/x/sys/unix\"\n)\n\nvar (\n\tarpDeviceInclude = kingpin.Flag(\"collector.arp.device-include\", \"Regexp of arp devices to include (mutually exclusive to device-exclude).\").String()\n\tarpDeviceExclude = kingpin.Flag(\"collector.arp.device-exclude\", \"Regexp of arp devices to exclude (mutually exclusive to device-include).\").String()\n\tarpNetlink       = kingpin.Flag(\"collector.arp.netlink\", \"Use netlink to gather stats instead of /proc/net/arp.\").Default(\"true\").Bool()\n)\n\ntype arpCollector struct {\n\tfs           procfs.FS\n\tdeviceFilter deviceFilter\n\tentries      *prometheus.Desc\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"arp\", defaultEnabled, NewARPCollector)\n}\n\n// NewARPCollector returns a new Collector exposing ARP stats.\nfunc NewARPCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &arpCollector{\n\t\tfs:           fs,\n\t\tdeviceFilter: newDeviceFilter(*arpDeviceExclude, *arpDeviceInclude),\n\t\tentries: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"arp\", \"entries\"),\n\t\t\t\"ARP entries by device\",\n\t\t\t[]string{\"device\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc getTotalArpEntries(deviceEntries []procfs.ARPEntry) map[string]uint32 {\n\tentries := make(map[string]uint32)\n\n\tfor _, device := range deviceEntries {\n\t\tentries[device.Device]++\n\t}\n\n\treturn entries\n}\n\nfunc getTotalArpEntriesRTNL() (map[string]uint32, error) {\n\tconn, err := rtnl.Dial(nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer conn.Close()\n\n\t// Neighbors will also contain IPv6 neighbors, but since this is purely an ARP collector,\n\t// restrict to AF_INET.\n\tneighbors, err := conn.Neighbours(nil, unix.AF_INET)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Map of interface name to ARP neighbor count.\n\tentries := make(map[string]uint32)\n\n\tfor _, n := range neighbors {\n\t\t// Skip entries which have state NUD_NOARP to conform to output of /proc/net/arp.\n\t\tif n.State&unix.NUD_NOARP == 0 {\n\t\t\tentries[n.Interface.Name]++\n\t\t}\n\t}\n\n\treturn entries, nil\n}\n\nfunc (c *arpCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar enumeratedEntry map[string]uint32\n\n\tif *arpNetlink {\n\t\tvar err error\n\n\t\tenumeratedEntry, err = getTotalArpEntriesRTNL()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not get ARP entries: %w\", err)\n\t\t}\n\t} else {\n\t\tentries, err := c.fs.GatherARPEntries()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not get ARP entries: %w\", err)\n\t\t}\n\n\t\tenumeratedEntry = getTotalArpEntries(entries)\n\t}\n\n\tfor device, entryCount := range enumeratedEntry {\n\t\tif c.deviceFilter.ignored(device) {\n\t\t\tcontinue\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.entries, prometheus.GaugeValue, float64(entryCount), device)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/bcache_linux.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nobcache\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/bcache\"\n)\n\nvar (\n\tpriorityStats = kingpin.Flag(\"collector.bcache.priorityStats\", \"Expose expensive priority stats.\").Bool()\n)\n\nfunc init() {\n\tregisterCollector(\"bcache\", defaultEnabled, NewBcacheCollector)\n}\n\n// A bcacheCollector is a Collector which gathers metrics from Linux bcache.\ntype bcacheCollector struct {\n\tfs     bcache.FS\n\tlogger *slog.Logger\n}\n\n// NewBcacheCollector returns a newly allocated bcacheCollector.\n// It exposes a number of Linux bcache statistics.\nfunc NewBcacheCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := bcache.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\treturn &bcacheCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update reads and exposes bcache stats.\n// It implements the Collector interface.\nfunc (c *bcacheCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar stats []*bcache.Stats\n\tvar err error\n\tif *priorityStats {\n\t\tstats, err = c.fs.Stats()\n\t} else {\n\t\tstats, err = c.fs.StatsWithoutPriority()\n\t}\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to retrieve bcache stats: %w\", err)\n\t}\n\n\tfor _, s := range stats {\n\t\tc.updateBcacheStats(ch, s)\n\t}\n\treturn nil\n}\n\ntype bcacheMetric struct {\n\tname            string\n\tdesc            string\n\tvalue           float64\n\tmetricType      prometheus.ValueType\n\textraLabel      []string\n\textraLabelValue string\n}\n\nfunc bcachePeriodStatsToMetric(ps *bcache.PeriodStats, labelValue string) []bcacheMetric {\n\tlabel := []string{\"backing_device\"}\n\n\tmetrics := []bcacheMetric{\n\t\t{\n\t\t\tname:            \"bypassed_bytes_total\",\n\t\t\tdesc:            \"Amount of IO (both reads and writes) that has bypassed the cache.\",\n\t\t\tvalue:           float64(ps.Bypassed),\n\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\textraLabel:      label,\n\t\t\textraLabelValue: labelValue,\n\t\t},\n\t\t{\n\t\t\tname:            \"cache_hits_total\",\n\t\t\tdesc:            \"Hits counted per individual IO as bcache sees them.\",\n\t\t\tvalue:           float64(ps.CacheHits),\n\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\textraLabel:      label,\n\t\t\textraLabelValue: labelValue,\n\t\t},\n\t\t{\n\t\t\tname:            \"cache_misses_total\",\n\t\t\tdesc:            \"Misses counted per individual IO as bcache sees them.\",\n\t\t\tvalue:           float64(ps.CacheMisses),\n\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\textraLabel:      label,\n\t\t\textraLabelValue: labelValue,\n\t\t},\n\t\t{\n\t\t\tname:            \"cache_bypass_hits_total\",\n\t\t\tdesc:            \"Hits for IO intended to skip the cache.\",\n\t\t\tvalue:           float64(ps.CacheBypassHits),\n\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\textraLabel:      label,\n\t\t\textraLabelValue: labelValue,\n\t\t},\n\t\t{\n\t\t\tname:            \"cache_bypass_misses_total\",\n\t\t\tdesc:            \"Misses for IO intended to skip the cache.\",\n\t\t\tvalue:           float64(ps.CacheBypassMisses),\n\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\textraLabel:      label,\n\t\t\textraLabelValue: labelValue,\n\t\t},\n\t\t{\n\t\t\tname:            \"cache_miss_collisions_total\",\n\t\t\tdesc:            \"Instances where data insertion from cache miss raced with write (data already present).\",\n\t\t\tvalue:           float64(ps.CacheMissCollisions),\n\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\textraLabel:      label,\n\t\t\textraLabelValue: labelValue,\n\t\t},\n\t}\n\tif ps.CacheReadaheads != 0 {\n\t\tbcacheReadaheadMetrics := []bcacheMetric{\n\t\t\t{\n\t\t\t\tname:            \"cache_readaheads_total\",\n\t\t\t\tdesc:            \"Count of times readahead occurred.\",\n\t\t\t\tvalue:           float64(ps.CacheReadaheads),\n\t\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\t\textraLabel:      label,\n\t\t\t\textraLabelValue: labelValue,\n\t\t\t},\n\t\t}\n\t\tmetrics = append(metrics, bcacheReadaheadMetrics...)\n\t}\n\treturn metrics\n}\n\n// UpdateBcacheStats collects statistics for one bcache ID.\nfunc (c *bcacheCollector) updateBcacheStats(ch chan<- prometheus.Metric, s *bcache.Stats) {\n\n\tconst (\n\t\tsubsystem = \"bcache\"\n\t)\n\n\tvar (\n\t\tdevLabel   = []string{\"uuid\"}\n\t\tallMetrics []bcacheMetric\n\t\tmetrics    []bcacheMetric\n\t)\n\n\tallMetrics = []bcacheMetric{\n\t\t// metrics in /sys/fs/bcache/<uuid>/\n\t\t{\n\t\t\tname:       \"average_key_size_sectors\",\n\t\t\tdesc:       \"Average data per key in the btree (sectors).\",\n\t\t\tvalue:      float64(s.Bcache.AverageKeySize),\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t{\n\t\t\tname:       \"btree_cache_size_bytes\",\n\t\t\tdesc:       \"Amount of memory currently used by the btree cache.\",\n\t\t\tvalue:      float64(s.Bcache.BtreeCacheSize),\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t{\n\t\t\tname:       \"cache_available_percent\",\n\t\t\tdesc:       \"Percentage of cache device without dirty data, usable for writeback (may contain clean cached data).\",\n\t\t\tvalue:      float64(s.Bcache.CacheAvailablePercent),\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t{\n\t\t\tname:       \"congested\",\n\t\t\tdesc:       \"Congestion.\",\n\t\t\tvalue:      float64(s.Bcache.Congested),\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t{\n\t\t\tname:       \"root_usage_percent\",\n\t\t\tdesc:       \"Percentage of the root btree node in use (tree depth increases if too high).\",\n\t\t\tvalue:      float64(s.Bcache.RootUsagePercent),\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t{\n\t\t\tname:       \"tree_depth\",\n\t\t\tdesc:       \"Depth of the btree.\",\n\t\t\tvalue:      float64(s.Bcache.TreeDepth),\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t// metrics in /sys/fs/bcache/<uuid>/internal/\n\t\t{\n\t\t\tname:       \"active_journal_entries\",\n\t\t\tdesc:       \"Number of journal entries that are newer than the index.\",\n\t\t\tvalue:      float64(s.Bcache.Internal.ActiveJournalEntries),\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t{\n\t\t\tname:       \"btree_nodes\",\n\t\t\tdesc:       \"Total nodes in the btree.\",\n\t\t\tvalue:      float64(s.Bcache.Internal.BtreeNodes),\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t{\n\t\t\tname:       \"btree_read_average_duration_seconds\",\n\t\t\tdesc:       \"Average btree read duration.\",\n\t\t\tvalue:      float64(s.Bcache.Internal.BtreeReadAverageDurationNanoSeconds) * 1e-9,\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t},\n\t\t{\n\t\t\tname:       \"cache_read_races_total\",\n\t\t\tdesc:       \"Counts instances where while data was being read from the cache, the bucket was reused and invalidated - i.e. where the pointer was stale after the read completed.\",\n\t\t\tvalue:      float64(s.Bcache.Internal.CacheReadRaces),\n\t\t\tmetricType: prometheus.CounterValue,\n\t\t},\n\t}\n\n\tfor _, bdev := range s.Bdevs {\n\t\t// metrics in /sys/fs/bcache/<uuid>/<bdev>/\n\t\tmetrics = []bcacheMetric{\n\t\t\t{\n\t\t\t\tname:            \"dirty_data_bytes\",\n\t\t\t\tdesc:            \"Amount of dirty data for this backing device in the cache.\",\n\t\t\t\tvalue:           float64(bdev.DirtyData),\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\textraLabel:      []string{\"backing_device\"},\n\t\t\t\textraLabelValue: bdev.Name,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:            \"dirty_target_bytes\",\n\t\t\t\tdesc:            \"Current dirty data target threshold for this backing device in bytes.\",\n\t\t\t\tvalue:           float64(bdev.WritebackRateDebug.Target),\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\textraLabel:      []string{\"backing_device\"},\n\t\t\t\textraLabelValue: bdev.Name,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:            \"writeback_rate\",\n\t\t\t\tdesc:            \"Current writeback rate for this backing device in bytes.\",\n\t\t\t\tvalue:           float64(bdev.WritebackRateDebug.Rate),\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\textraLabel:      []string{\"backing_device\"},\n\t\t\t\textraLabelValue: bdev.Name,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:            \"writeback_rate_proportional_term\",\n\t\t\t\tdesc:            \"Current result of proportional controller, part of writeback rate\",\n\t\t\t\tvalue:           float64(bdev.WritebackRateDebug.Proportional),\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\textraLabel:      []string{\"backing_device\"},\n\t\t\t\textraLabelValue: bdev.Name,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:            \"writeback_rate_integral_term\",\n\t\t\t\tdesc:            \"Current result of integral controller, part of writeback rate\",\n\t\t\t\tvalue:           float64(bdev.WritebackRateDebug.Integral),\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\textraLabel:      []string{\"backing_device\"},\n\t\t\t\textraLabelValue: bdev.Name,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:            \"writeback_change\",\n\t\t\t\tdesc:            \"Last writeback rate change step for this backing device.\",\n\t\t\t\tvalue:           float64(bdev.WritebackRateDebug.Change),\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\textraLabel:      []string{\"backing_device\"},\n\t\t\t\textraLabelValue: bdev.Name,\n\t\t\t},\n\t\t}\n\t\tallMetrics = append(allMetrics, metrics...)\n\n\t\t// metrics in /sys/fs/bcache/<uuid>/<bdev>/stats_total\n\t\tmetrics := bcachePeriodStatsToMetric(&bdev.Total, bdev.Name)\n\t\tallMetrics = append(allMetrics, metrics...)\n\n\t}\n\n\tfor _, cache := range s.Caches {\n\t\tmetrics = []bcacheMetric{\n\t\t\t// metrics in /sys/fs/bcache/<uuid>/<cache>/\n\t\t\t{\n\t\t\t\tname:            \"io_errors\",\n\t\t\t\tdesc:            \"Number of errors that have occurred, decayed by io_error_halflife.\",\n\t\t\t\tvalue:           float64(cache.IOErrors),\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\textraLabel:      []string{\"cache_device\"},\n\t\t\t\textraLabelValue: cache.Name,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:            \"metadata_written_bytes_total\",\n\t\t\t\tdesc:            \"Sum of all non data writes (btree writes and all other metadata).\",\n\t\t\t\tvalue:           float64(cache.MetadataWritten),\n\t\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\t\textraLabel:      []string{\"cache_device\"},\n\t\t\t\textraLabelValue: cache.Name,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:            \"written_bytes_total\",\n\t\t\t\tdesc:            \"Sum of all data that has been written to the cache.\",\n\t\t\t\tvalue:           float64(cache.Written),\n\t\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\t\textraLabel:      []string{\"cache_device\"},\n\t\t\t\textraLabelValue: cache.Name,\n\t\t\t},\n\t\t}\n\t\tif *priorityStats {\n\t\t\t// metrics in /sys/fs/bcache/<uuid>/<cache>/priority_stats\n\t\t\tpriorityStatsMetrics := []bcacheMetric{\n\t\t\t\t{\n\t\t\t\t\tname:            \"priority_stats_unused_percent\",\n\t\t\t\t\tdesc:            \"The percentage of the cache that doesn't contain any data.\",\n\t\t\t\t\tvalue:           float64(cache.Priority.UnusedPercent),\n\t\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\t\textraLabel:      []string{\"cache_device\"},\n\t\t\t\t\textraLabelValue: cache.Name,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname:            \"priority_stats_metadata_percent\",\n\t\t\t\t\tdesc:            \"Bcache's metadata overhead.\",\n\t\t\t\t\tvalue:           float64(cache.Priority.MetadataPercent),\n\t\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\t\textraLabel:      []string{\"cache_device\"},\n\t\t\t\t\textraLabelValue: cache.Name,\n\t\t\t\t},\n\t\t\t}\n\t\t\tmetrics = append(metrics, priorityStatsMetrics...)\n\t\t}\n\t\tallMetrics = append(allMetrics, metrics...)\n\t}\n\n\tfor _, m := range allMetrics {\n\t\tlabels := append(devLabel, m.extraLabel...)\n\n\t\tdesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, m.name),\n\t\t\tm.desc,\n\t\t\tlabels,\n\t\t\tnil,\n\t\t)\n\n\t\tlabelValues := []string{s.Name}\n\t\tif m.extraLabelValue != \"\" {\n\t\t\tlabelValues = append(labelValues, m.extraLabelValue)\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tdesc,\n\t\t\tm.metricType,\n\t\t\tm.value,\n\t\t\tlabelValues...,\n\t\t)\n\t}\n}\n"
  },
  {
    "path": "collector/bcachefs_linux.go",
    "content": "// Copyright The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nobcachefs\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/bcachefs\"\n)\n\nconst subsystem = \"bcachefs\"\n\nvar (\n\tbcachefsInfoDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"info\"),\n\t\t\"Filesystem information.\",\n\t\t[]string{\"uuid\"},\n\t\tnil,\n\t)\n\tbcachefsBtreeCacheSizeBytes = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"btree_cache_size_bytes\"),\n\t\t\"Btree cache memory usage in bytes.\",\n\t\t[]string{\"uuid\"},\n\t\tnil,\n\t)\n\tbcachefsCompressionCompressedBytesDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"compression_compressed_bytes\"),\n\t\t\"Compressed size by algorithm.\",\n\t\t[]string{\"uuid\", \"algorithm\"},\n\t\tnil,\n\t)\n\tbcachefsCompressionUncompressedBytesDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"compression_uncompressed_bytes\"),\n\t\t\"Uncompressed size by algorithm.\",\n\t\t[]string{\"uuid\", \"algorithm\"},\n\t\tnil,\n\t)\n\tbcachefsErrorsTotalDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"errors_total\"),\n\t\t\"Error count by error type.\",\n\t\t[]string{\"uuid\", \"error_type\"},\n\t\tnil,\n\t)\n\tbcachefsBtreeWritesTotalDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"btree_writes_total\"),\n\t\t\"Number of btree writes by type.\",\n\t\t[]string{\"uuid\", \"type\"},\n\t\tnil,\n\t)\n\tbcachefsBtreeWriteAverageSizeBytesDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"btree_write_average_size_bytes\"),\n\t\t\"Average btree write size by type.\",\n\t\t[]string{\"uuid\", \"type\"},\n\t\tnil,\n\t)\n\tbcachefsDeviceInfoDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"device_info\"),\n\t\t\"Device information.\",\n\t\t[]string{\"uuid\", \"device\", \"label\", \"state\"},\n\t\tnil,\n\t)\n\tbcachefsDeviceBucketSizeBytesDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"device_bucket_size_bytes\"),\n\t\t\"Bucket size in bytes.\",\n\t\t[]string{\"uuid\", \"device\"},\n\t\tnil,\n\t)\n\tbcachefsDeviceBucketsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"device_buckets\"),\n\t\t\"Total number of buckets.\",\n\t\t[]string{\"uuid\", \"device\"},\n\t\tnil,\n\t)\n\tbcachefsDeviceDurabilityDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"device_durability\"),\n\t\t\"Device durability setting.\",\n\t\t[]string{\"uuid\", \"device\"},\n\t\tnil,\n\t)\n\tbcachefsDeviceIODoneBytesTotalDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"device_io_done_bytes_total\"),\n\t\t\"IO bytes by operation type and data type.\",\n\t\t[]string{\"uuid\", \"device\", \"operation\", \"data_type\"},\n\t\tnil,\n\t)\n\tbcachefsDeviceIOErrorsTotalDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"device_io_errors_total\"),\n\t\t\"IO errors by error type.\",\n\t\t[]string{\"uuid\", \"device\", \"type\"},\n\t\tnil,\n\t)\n)\n\nfunc init() {\n\tregisterCollector(subsystem, defaultEnabled, NewBcachefsCollector)\n}\n\n// bcachefsCollector collects metrics from bcachefs filesystems.\ntype bcachefsCollector struct {\n\tfs     bcachefs.FS\n\tlogger *slog.Logger\n}\n\n// NewBcachefsCollector returns a new Collector exposing bcachefs statistics.\nfunc NewBcachefsCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := bcachefs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\treturn &bcachefsCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update retrieves and exports bcachefs statistics.\nfunc (c *bcachefsCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.fs.Stats()\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tc.logger.Debug(\"bcachefs sysfs path does not exist\", \"path\", sysFilePath(\"fs/bcachefs\"))\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"failed to retrieve bcachefs stats: %w\", err)\n\t}\n\n\tif len(stats) == 0 {\n\t\treturn ErrNoData\n\t}\n\n\tfor _, s := range stats {\n\t\tuuid := s.UUID\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tbcachefsInfoDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\t1,\n\t\t\tuuid,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tbcachefsBtreeCacheSizeBytes,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(s.BtreeCacheSizeBytes),\n\t\t\tuuid,\n\t\t)\n\n\t\tfor algorithm, comp := range s.Compression {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsCompressionCompressedBytesDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(comp.CompressedBytes),\n\t\t\t\tuuid, algorithm,\n\t\t\t)\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsCompressionUncompressedBytesDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(comp.UncompressedBytes),\n\t\t\t\tuuid, algorithm,\n\t\t\t)\n\t\t}\n\n\t\tfor errorType, errStats := range s.Errors {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsErrorsTotalDesc,\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\tfloat64(errStats.Count),\n\t\t\t\tuuid, errorType,\n\t\t\t)\n\t\t}\n\n\t\tfor counterName, counterStats := range s.Counters {\n\t\t\tmetricName := SanitizeMetricName(counterName) + \"_total\"\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tprometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, subsystem, metricName),\n\t\t\t\t\tfmt.Sprintf(\"Bcachefs counter %s since filesystem creation.\", counterName),\n\t\t\t\t\t[]string{\"uuid\"},\n\t\t\t\t\tnil,\n\t\t\t\t),\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\tfloat64(counterStats.SinceFilesystemCreation),\n\t\t\t\tuuid,\n\t\t\t)\n\t\t}\n\n\t\tfor writeType, writeStats := range s.BtreeWrites {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsBtreeWritesTotalDesc,\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\tfloat64(writeStats.Count),\n\t\t\t\tuuid, writeType,\n\t\t\t)\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsBtreeWriteAverageSizeBytesDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(writeStats.SizeBytes),\n\t\t\t\tuuid, writeType,\n\t\t\t)\n\t\t}\n\n\t\tfor device, devStats := range s.Devices {\n\t\t\tif devStats == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsDeviceInfoDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t1,\n\t\t\t\tuuid, device, devStats.Label, devStats.State,\n\t\t\t)\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsDeviceBucketSizeBytesDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(devStats.BucketSizeBytes),\n\t\t\t\tuuid, device,\n\t\t\t)\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsDeviceBucketsDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(devStats.Buckets),\n\t\t\t\tuuid, device,\n\t\t\t)\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tbcachefsDeviceDurabilityDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(devStats.Durability),\n\t\t\t\tuuid, device,\n\t\t\t)\n\n\t\t\tfor op, dataTypes := range devStats.IODone {\n\t\t\t\tfor dataType, value := range dataTypes {\n\t\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\t\tbcachefsDeviceIODoneBytesTotalDesc,\n\t\t\t\t\t\tprometheus.CounterValue,\n\t\t\t\t\t\tfloat64(value),\n\t\t\t\t\t\tuuid, device, op, dataType,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor errorType, value := range devStats.IOErrors {\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tbcachefsDeviceIOErrorsTotalDesc,\n\t\t\t\t\tprometheus.CounterValue,\n\t\t\t\t\tfloat64(value),\n\t\t\t\t\tuuid, device, errorType,\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/bonding_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nobonding\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype bondingCollector struct {\n\tslaves, active typedDesc\n\tlogger         *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"bonding\", defaultEnabled, NewBondingCollector)\n}\n\n// NewBondingCollector returns a newly allocated bondingCollector.\n// It exposes the number of configured and active slave of linux bonding interfaces.\nfunc NewBondingCollector(logger *slog.Logger) (Collector, error) {\n\treturn &bondingCollector{\n\t\tslaves: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"bonding\", \"slaves\"),\n\t\t\t\"Number of configured slaves per bonding interface.\",\n\t\t\t[]string{\"master\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tactive: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"bonding\", \"active\"),\n\t\t\t\"Number of active slaves per bonding interface.\",\n\t\t\t[]string{\"master\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update reads and exposes bonding states, implements Collector interface. Caution: This works only on linux.\nfunc (c *bondingCollector) Update(ch chan<- prometheus.Metric) error {\n\tstatusfile := sysFilePath(\"class/net\")\n\tbondingStats, err := readBondingStats(statusfile)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"Not collecting bonding, file does not exist\", \"file\", statusfile)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn err\n\t}\n\tfor master, status := range bondingStats {\n\t\tch <- c.slaves.mustNewConstMetric(float64(status[0]), master)\n\t\tch <- c.active.mustNewConstMetric(float64(status[1]), master)\n\t}\n\treturn nil\n}\n\nfunc readBondingStats(root string) (status map[string][2]int, err error) {\n\tstatus = map[string][2]int{}\n\tmasters, err := os.ReadFile(filepath.Join(root, \"bonding_masters\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor master := range strings.FieldsSeq(string(masters)) {\n\t\tslaves, err := os.ReadFile(filepath.Join(root, master, \"bonding\", \"slaves\"))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tsstat := [2]int{0, 0}\n\t\tfor slave := range strings.FieldsSeq(string(slaves)) {\n\t\t\tstate, err := os.ReadFile(filepath.Join(root, master, fmt.Sprintf(\"lower_%s\", slave), \"bonding_slave\", \"mii_status\"))\n\t\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\t\t// some older? kernels use slave_ prefix\n\t\t\t\tstate, err = os.ReadFile(filepath.Join(root, master, fmt.Sprintf(\"slave_%s\", slave), \"bonding_slave\", \"mii_status\"))\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tsstat[0]++\n\t\t\tif strings.TrimSpace(string(state)) == \"up\" {\n\t\t\t\tsstat[1]++\n\t\t\t}\n\t\t}\n\t\tstatus[master] = sstat\n\t}\n\treturn status, err\n}\n"
  },
  {
    "path": "collector/bonding_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nobonding\n\npackage collector\n\nimport (\n\t\"testing\"\n)\n\nfunc TestBonding(t *testing.T) {\n\tbondingStats, err := readBondingStats(\"fixtures/sys/class/net\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif bondingStats[\"bond0\"][0] != 0 || bondingStats[\"bond0\"][1] != 0 {\n\t\tt.Fatal(\"bond0 in unexpected state\")\n\t}\n\n\tif bondingStats[\"int\"][0] != 2 || bondingStats[\"int\"][1] != 1 {\n\t\tt.Fatal(\"int in unexpected state\")\n\t}\n\n\tif bondingStats[\"dmz\"][0] != 2 || bondingStats[\"dmz\"][1] != 2 {\n\t\tt.Fatal(\"dmz in unexpected state\")\n\t}\n}\n"
  },
  {
    "path": "collector/boot_time_bsd.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (freebsd || dragonfly || openbsd || netbsd || darwin) && !noboottime\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\ntype bootTimeCollector struct {\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"boottime\", defaultEnabled, newBootTimeCollector)\n}\n\n// newBootTimeCollector returns a new Collector exposing system boot time on BSD systems.\nfunc newBootTimeCollector(logger *slog.Logger) (Collector, error) {\n\treturn &bootTimeCollector{\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update pushes boot time onto ch\nfunc (c *bootTimeCollector) Update(ch chan<- prometheus.Metric) error {\n\ttv, err := unix.SysctlTimeval(\"kern.boottime\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// This conversion maintains the usec precision.  Using the time\n\t// package did not.\n\tv := float64(tv.Sec) + (float64(tv.Usec) / float64(1000*1000))\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"boot_time_seconds\"),\n\t\t\t\"Unix time of last boot, including microseconds.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue, v)\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/boot_time_solaris.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noboottime\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/illumos/go-kstat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype bootTimeCollector struct {\n\tboottime typedDesc\n\tlogger   *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"boottime\", defaultEnabled, newBootTimeCollector)\n}\n\nfunc newBootTimeCollector(logger *slog.Logger) (Collector, error) {\n\treturn &bootTimeCollector{\n\t\tboottime: typedDesc{\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"\", \"boot_time_seconds\"),\n\t\t\t\t\"Unix time of last boot, including microseconds.\",\n\t\t\t\tnil, nil,\n\t\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\n// newBootTimeCollector returns a new Collector exposing system boot time on Solaris systems.\n// Update pushes boot time onto ch\nfunc (c *bootTimeCollector) Update(ch chan<- prometheus.Metric) error {\n\ttok, err := kstat.Open()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer tok.Close()\n\n\tks, err := tok.Lookup(\"unix\", 0, \"system_misc\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tv, err := ks.GetNamed(\"boot_time\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tch <- c.boottime.mustNewConstMetric(float64(v.UintVal))\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/btrfs_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nobtrfs\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"path\"\n\t\"strings\"\n\t\"syscall\"\n\n\tdennwc \"github.com/dennwc/btrfs\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/btrfs\"\n)\n\n// A btrfsCollector is a Collector which gathers metrics from Btrfs filesystems.\ntype btrfsCollector struct {\n\tfs     btrfs.FS\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"btrfs\", defaultEnabled, NewBtrfsCollector)\n}\n\n// NewBtrfsCollector returns a new Collector exposing Btrfs statistics.\nfunc NewBtrfsCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := btrfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\treturn &btrfsCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update retrieves and exports Btrfs statistics.\n// It implements Collector.\nfunc (c *btrfsCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.fs.Stats()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to retrieve Btrfs stats from procfs: %w\", err)\n\t}\n\n\tioctlStatsMap, err := c.getIoctlStats()\n\tif err != nil {\n\t\tc.logger.Debug(\n\t\t\t\"Error querying btrfs device stats with ioctl\",\n\t\t\t\"err\", err)\n\t\tioctlStatsMap = make(map[string]*btrfsIoctlFsStats)\n\t}\n\n\tfor _, s := range stats {\n\t\t// match up procfs and ioctl info by filesystem UUID (without dashes)\n\t\tvar fsUUID = strings.ReplaceAll(s.UUID, \"-\", \"\")\n\t\tioctlStats := ioctlStatsMap[fsUUID]\n\t\tc.updateBtrfsStats(ch, s, ioctlStats)\n\t}\n\n\treturn nil\n}\n\ntype btrfsIoctlFsDevStats struct {\n\tpath string\n\tuuid string\n\n\tbytesUsed  uint64\n\ttotalBytes uint64\n\n\t// The error stats below match the following upstream lists:\n\t// https://github.com/dennwc/btrfs/blob/b3db0b2dedac3bf580f412034d77e0bf4b420167/btrfs.go#L132-L140\n\t// https://github.com/torvalds/linux/blob/70d605cbeecb408dd884b1f0cd3963eeeaac144c/include/uapi/linux/btrfs.h#L680-L692\n\twriteErrs      uint64\n\treadErrs       uint64\n\tflushErrs      uint64\n\tcorruptionErrs uint64\n\tgenerationErrs uint64\n}\n\ntype btrfsIoctlFsStats struct {\n\tuuid    string\n\tdevices []btrfsIoctlFsDevStats\n}\n\nfunc (c *btrfsCollector) getIoctlStats() (map[string]*btrfsIoctlFsStats, error) {\n\t// Instead of introducing more ioctl calls to scan for all btrfs\n\t// filesystems re-use our mount point utils to find known mounts\n\tmountsList, err := mountPointDetails(c.logger)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Track devices we have successfully scanned, by device path.\n\tdevicesDone := make(map[string]struct{})\n\t// Filesystems scann results by UUID.\n\tfsStats := make(map[string]*btrfsIoctlFsStats)\n\n\tfor _, mount := range mountsList {\n\t\tif mount.fsType != \"btrfs\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tif _, found := devicesDone[mount.device]; found {\n\t\t\t// We already found this filesystem by another mount point.\n\t\t\tcontinue\n\t\t}\n\n\t\tmountPath := rootfsFilePath(mount.mountPoint)\n\n\t\tfs, err := dennwc.Open(mountPath, true)\n\t\tif err != nil {\n\t\t\t// Failed to open this mount point, maybe we didn't have permission\n\t\t\t// maybe we'll find another mount point for this FS later.\n\t\t\tc.logger.Debug(\n\t\t\t\t\"Error inspecting btrfs mountpoint\",\n\t\t\t\t\"mountPoint\", mountPath,\n\t\t\t\t\"err\", err)\n\t\t\tcontinue\n\t\t}\n\t\tdefer fs.Close()\n\n\t\tfsInfo, err := fs.Info()\n\t\tif err != nil {\n\t\t\t// Failed to get the FS info for some reason,\n\t\t\t// perhaps it'll work with a different mount point\n\t\t\tc.logger.Debug(\n\t\t\t\t\"Error querying btrfs filesystem\",\n\t\t\t\t\"mountPoint\", mountPath,\n\t\t\t\t\"err\", err)\n\t\t\tcontinue\n\t\t}\n\n\t\tfsID := fsInfo.FSID.String()\n\t\tif _, found := fsStats[fsID]; found {\n\t\t\t// We already found this filesystem by another mount point\n\t\t\tcontinue\n\t\t}\n\n\t\tdeviceStats, err := c.getIoctlDeviceStats(fs, &fsInfo)\n\t\tif err != nil {\n\t\t\tc.logger.Debug(\n\t\t\t\t\"Error querying btrfs device stats\",\n\t\t\t\t\"mountPoint\", mountPath,\n\t\t\t\t\"err\", err)\n\t\t\tcontinue\n\t\t}\n\n\t\tdevicesDone[mount.device] = struct{}{}\n\t\tfsStats[fsID] = &btrfsIoctlFsStats{\n\t\t\tuuid:    fsID,\n\t\t\tdevices: deviceStats,\n\t\t}\n\t}\n\n\treturn fsStats, nil\n}\n\nfunc (c *btrfsCollector) getIoctlDeviceStats(fs *dennwc.FS, fsInfo *dennwc.Info) ([]btrfsIoctlFsDevStats, error) {\n\tdevices := make([]btrfsIoctlFsDevStats, 0, fsInfo.NumDevices)\n\n\tfor i := uint64(0); i <= fsInfo.MaxID; i++ {\n\t\tdeviceInfo, err := fs.GetDevInfo(i)\n\n\t\tif err != nil {\n\t\t\tif errno, ok := err.(syscall.Errno); ok && errno == syscall.ENODEV {\n\t\t\t\t// Device IDs do not consistently start at 0, nor are ranges contiguous, so we expect this.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn nil, err\n\t\t}\n\n\t\tdeviceStats, err := fs.GetDevStats(i)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tdevices = append(devices, btrfsIoctlFsDevStats{\n\t\t\tpath:       deviceInfo.Path,\n\t\t\tuuid:       deviceInfo.UUID.String(),\n\t\t\tbytesUsed:  deviceInfo.BytesUsed,\n\t\t\ttotalBytes: deviceInfo.TotalBytes,\n\n\t\t\twriteErrs:      deviceStats.WriteErrs,\n\t\t\treadErrs:       deviceStats.ReadErrs,\n\t\t\tflushErrs:      deviceStats.FlushErrs,\n\t\t\tcorruptionErrs: deviceStats.CorruptionErrs,\n\t\t\tgenerationErrs: deviceStats.GenerationErrs,\n\t\t})\n\n\t\tif uint64(len(devices)) == fsInfo.NumDevices {\n\t\t\tbreak\n\t\t}\n\t}\n\n\treturn devices, nil\n}\n\n// btrfsMetric represents a single Btrfs metric that is converted into a Prometheus Metric.\ntype btrfsMetric struct {\n\tname            string\n\tmetricType      prometheus.ValueType\n\tdesc            string\n\tvalue           float64\n\textraLabel      []string\n\textraLabelValue []string\n}\n\n// updateBtrfsStats collects statistics for one bcache ID.\nfunc (c *btrfsCollector) updateBtrfsStats(ch chan<- prometheus.Metric, s *btrfs.Stats, ioctlStats *btrfsIoctlFsStats) {\n\tconst subsystem = \"btrfs\"\n\n\t// Basic information about the filesystem.\n\tdevLabels := []string{\"uuid\"}\n\n\t// Retrieve the metrics.\n\tmetrics := c.getMetrics(s, ioctlStats)\n\n\t// Convert all gathered metrics to Prometheus Metrics and add to channel.\n\tfor _, m := range metrics {\n\t\tlabels := append(devLabels, m.extraLabel...)\n\n\t\tdesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, m.name),\n\t\t\tm.desc,\n\t\t\tlabels,\n\t\t\tnil,\n\t\t)\n\n\t\tlabelValues := []string{s.UUID}\n\t\tif len(m.extraLabelValue) > 0 {\n\t\t\tlabelValues = append(labelValues, m.extraLabelValue...)\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tdesc,\n\t\t\tm.metricType,\n\t\t\tm.value,\n\t\t\tlabelValues...,\n\t\t)\n\t}\n}\n\n// getMetrics returns metrics for the given Btrfs statistics.\nfunc (c *btrfsCollector) getMetrics(s *btrfs.Stats, ioctlStats *btrfsIoctlFsStats) []btrfsMetric {\n\tmetrics := []btrfsMetric{\n\t\t{\n\t\t\tname:            \"info\",\n\t\t\tdesc:            \"Filesystem information\",\n\t\t\tvalue:           1,\n\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\textraLabel:      []string{\"label\"},\n\t\t\textraLabelValue: []string{s.Label},\n\t\t},\n\t\t{\n\t\t\tname:       \"global_rsv_size_bytes\",\n\t\t\tdesc:       \"Size of global reserve.\",\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t\tvalue:      float64(s.Allocation.GlobalRsvSize),\n\t\t},\n\t\t{\n\t\t\tname:       \"commits_total\",\n\t\t\tdesc:       \"The total number of commits that have occurred.\",\n\t\t\tmetricType: prometheus.CounterValue,\n\t\t\tvalue:      float64(s.CommitStats.Commits),\n\t\t},\n\t\t{\n\t\t\tname:       \"last_commit_seconds\",\n\t\t\tdesc:       \"Duration of the most recent commit, in seconds.\",\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t\tvalue:      float64(s.CommitStats.LastCommitMs) / 1000,\n\t\t},\n\t\t{\n\t\t\tname:       \"max_commit_seconds\",\n\t\t\tdesc:       \"Duration of the slowest commit, in seconds.\",\n\t\t\tmetricType: prometheus.GaugeValue,\n\t\t\tvalue:      float64(s.CommitStats.MaxCommitMs) / 1000,\n\t\t},\n\t\t{\n\t\t\tname:       \"commit_seconds_total\",\n\t\t\tdesc:       \"Sum of the duration of all commits, in seconds.\",\n\t\t\tmetricType: prometheus.CounterValue,\n\t\t\tvalue:      float64(s.CommitStats.TotalCommitMs) / 1000,\n\t\t},\n\t}\n\n\t// Information about data, metadata and system data.\n\tmetrics = append(metrics, c.getAllocationStats(\"data\", s.Allocation.Data)...)\n\tmetrics = append(metrics, c.getAllocationStats(\"metadata\", s.Allocation.Metadata)...)\n\tmetrics = append(metrics, c.getAllocationStats(\"system\", s.Allocation.System)...)\n\n\t// Information about devices.\n\tif ioctlStats == nil {\n\t\tfor n, dev := range s.Devices {\n\t\t\tmetrics = append(metrics, btrfsMetric{\n\t\t\t\tname:            \"device_size_bytes\",\n\t\t\t\tdesc:            \"Size of a device that is part of the filesystem.\",\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\tvalue:           float64(dev.Size),\n\t\t\t\textraLabel:      []string{\"device\"},\n\t\t\t\textraLabelValue: []string{n},\n\t\t\t})\n\t\t}\n\t\treturn metrics\n\t}\n\n\tfor _, dev := range ioctlStats.devices {\n\t\t// trim the path prefix from the device name so the value should match\n\t\t// the value used in the fallback branch above.\n\t\t// e.g. /dev/sda -> sda, /rootfs/dev/md1 -> md1\n\t\t_, device := path.Split(dev.path)\n\n\t\textraLabels := []string{\"device\", \"btrfs_dev_uuid\"}\n\t\textraLabelValues := []string{device, dev.uuid}\n\n\t\tmetrics = append(metrics,\n\t\t\tbtrfsMetric{\n\t\t\t\tname:            \"device_size_bytes\",\n\t\t\t\tdesc:            \"Size of a device that is part of the filesystem.\",\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\tvalue:           float64(dev.totalBytes),\n\t\t\t\textraLabel:      extraLabels,\n\t\t\t\textraLabelValue: extraLabelValues,\n\t\t\t},\n\t\t\t// A bytes available metric is probably more useful than a\n\t\t\t// bytes used metric, because large numbers of bytes will\n\t\t\t// suffer from floating point representation issues\n\t\t\t// and we probably care more about the number when it's low anyway\n\t\t\tbtrfsMetric{\n\t\t\t\tname:            \"device_unused_bytes\",\n\t\t\t\tdesc:            \"Unused bytes unused on a device that is part of the filesystem.\",\n\t\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\t\tvalue:           float64(dev.totalBytes - dev.bytesUsed),\n\t\t\t\textraLabel:      extraLabels,\n\t\t\t\textraLabelValue: extraLabelValues,\n\t\t\t})\n\n\t\terrorLabels := append([]string{\"type\"}, extraLabels...)\n\t\tvalues := []uint64{\n\t\t\tdev.writeErrs,\n\t\t\tdev.readErrs,\n\t\t\tdev.flushErrs,\n\t\t\tdev.corruptionErrs,\n\t\t\tdev.generationErrs,\n\t\t}\n\t\tbtrfsErrorTypeNames := []string{\n\t\t\t\"write\",\n\t\t\t\"read\",\n\t\t\t\"flush\",\n\t\t\t\"corruption\",\n\t\t\t\"generation\",\n\t\t}\n\n\t\tfor i, errorType := range btrfsErrorTypeNames {\n\t\t\tmetrics = append(metrics,\n\t\t\t\tbtrfsMetric{\n\t\t\t\t\tname:            \"device_errors_total\",\n\t\t\t\t\tdesc:            \"Errors reported for the device\",\n\t\t\t\t\tmetricType:      prometheus.CounterValue,\n\t\t\t\t\tvalue:           float64(values[i]),\n\t\t\t\t\textraLabel:      errorLabels,\n\t\t\t\t\textraLabelValue: append([]string{errorType}, extraLabelValues...),\n\t\t\t\t})\n\t\t}\n\t}\n\n\treturn metrics\n}\n\n// getAllocationStats returns allocation metrics for the given Btrfs Allocation statistics.\nfunc (c *btrfsCollector) getAllocationStats(a string, s *btrfs.AllocationStats) []btrfsMetric {\n\tmetrics := []btrfsMetric{\n\t\t{\n\t\t\tname:            \"reserved_bytes\",\n\t\t\tdesc:            \"Amount of space reserved for a data type\",\n\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\tvalue:           float64(s.ReservedBytes),\n\t\t\textraLabel:      []string{\"block_group_type\"},\n\t\t\textraLabelValue: []string{a},\n\t\t},\n\t}\n\n\t// Add all layout statistics.\n\tfor layout, stats := range s.Layouts {\n\t\tmetrics = append(metrics, c.getLayoutStats(a, layout, stats)...)\n\t}\n\n\treturn metrics\n}\n\n// getLayoutStats returns metrics for a data layout.\nfunc (c *btrfsCollector) getLayoutStats(a, l string, s *btrfs.LayoutUsage) []btrfsMetric {\n\treturn []btrfsMetric{\n\t\t{\n\t\t\tname:            \"used_bytes\",\n\t\t\tdesc:            \"Amount of used space by a layout/data type\",\n\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\tvalue:           float64(s.UsedBytes),\n\t\t\textraLabel:      []string{\"block_group_type\", \"mode\"},\n\t\t\textraLabelValue: []string{a, l},\n\t\t},\n\t\t{\n\t\t\tname:            \"size_bytes\",\n\t\t\tdesc:            \"Amount of space allocated for a layout/data type\",\n\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\tvalue:           float64(s.TotalBytes),\n\t\t\textraLabel:      []string{\"block_group_type\", \"mode\"},\n\t\t\textraLabelValue: []string{a, l},\n\t\t},\n\t\t{\n\t\t\tname:            \"allocation_ratio\",\n\t\t\tdesc:            \"Data allocation ratio for a layout/data type\",\n\t\t\tmetricType:      prometheus.GaugeValue,\n\t\t\tvalue:           s.Ratio,\n\t\t\textraLabel:      []string{\"block_group_type\", \"mode\"},\n\t\t\textraLabelValue: []string{a, l},\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "collector/btrfs_linux_test.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nobtrfs\n\npackage collector\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/prometheus/procfs/btrfs\"\n)\n\nvar expectedBtrfsMetrics = [][]btrfsMetric{\n\t{\n\t\t{name: \"info\", value: 1, extraLabel: []string{\"label\"}, extraLabelValue: []string{\"fixture\"}},\n\t\t{name: \"global_rsv_size_bytes\", value: 1.6777216e+07},\n\t\t{name: \"commits_total\", value: 258051, metricType: 1},\n\t\t{name: \"last_commit_seconds\", value: 1.0},\n\t\t{name: \"max_commit_seconds\", value: 51.462},\n\t\t{name: \"commit_seconds_total\", value: 47836.090, metricType: 1},\n\t\t{name: \"reserved_bytes\", value: 0, extraLabel: []string{\"block_group_type\"}, extraLabelValue: []string{\"data\"}},\n\t\t{name: \"used_bytes\", value: 8.08189952e+08, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"data\", \"raid0\"}},\n\t\t{name: \"size_bytes\", value: 2.147483648e+09, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"data\", \"raid0\"}},\n\t\t{name: \"allocation_ratio\", value: 1, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"data\", \"raid0\"}},\n\t\t{name: \"reserved_bytes\", value: 0, extraLabel: []string{\"block_group_type\"}, extraLabelValue: []string{\"metadata\"}},\n\t\t{name: \"used_bytes\", value: 933888, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"metadata\", \"raid1\"}},\n\t\t{name: \"size_bytes\", value: 1.073741824e+09, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"metadata\", \"raid1\"}},\n\t\t{name: \"allocation_ratio\", value: 2, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"metadata\", \"raid1\"}},\n\t\t{name: \"reserved_bytes\", value: 0, extraLabel: []string{\"block_group_type\"}, extraLabelValue: []string{\"system\"}},\n\t\t{name: \"used_bytes\", value: 16384, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"system\", \"raid1\"}},\n\t\t{name: \"size_bytes\", value: 8.388608e+06, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"system\", \"raid1\"}},\n\t\t{name: \"allocation_ratio\", value: 2, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"system\", \"raid1\"}},\n\t\t{name: \"device_size_bytes\", value: 1.073741824e+10, extraLabel: []string{\"device\"}, extraLabelValue: []string{\"loop25\"}},\n\t\t{name: \"device_size_bytes\", value: 1.073741824e+10, extraLabel: []string{\"device\"}, extraLabelValue: []string{\"loop26\"}},\n\t},\n\t{\n\t\t{name: \"info\", value: 1, extraLabel: []string{\"label\"}, extraLabelValue: []string{\"\"}},\n\t\t{name: \"global_rsv_size_bytes\", value: 1.6777216e+07},\n\t\t{name: \"commits_total\", value: 0, metricType: 1},\n\t\t{name: \"last_commit_seconds\", value: 0},\n\t\t{name: \"max_commit_seconds\", value: 0},\n\t\t{name: \"commit_seconds_total\", value: 0, metricType: 1},\n\t\t{name: \"reserved_bytes\", value: 0, extraLabel: []string{\"block_group_type\"}, extraLabelValue: []string{\"data\"}},\n\t\t{name: \"used_bytes\", value: 0, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"data\", \"raid5\"}},\n\t\t{name: \"size_bytes\", value: 6.44087808e+08, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"data\", \"raid5\"}},\n\t\t{name: \"allocation_ratio\", value: 1.3333333333333333, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"data\", \"raid5\"}},\n\t\t{name: \"reserved_bytes\", value: 0, extraLabel: []string{\"block_group_type\"}, extraLabelValue: []string{\"metadata\"}},\n\t\t{name: \"used_bytes\", value: 114688, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"metadata\", \"raid6\"}},\n\t\t{name: \"size_bytes\", value: 4.29391872e+08, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"metadata\", \"raid6\"}},\n\t\t{name: \"allocation_ratio\", value: 2, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"metadata\", \"raid6\"}},\n\t\t{name: \"reserved_bytes\", value: 0, extraLabel: []string{\"block_group_type\"}, extraLabelValue: []string{\"system\"}},\n\t\t{name: \"used_bytes\", value: 16384, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"system\", \"raid6\"}},\n\t\t{name: \"size_bytes\", value: 1.6777216e+07, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"system\", \"raid6\"}},\n\t\t{name: \"allocation_ratio\", value: 2, extraLabel: []string{\"block_group_type\", \"mode\"}, extraLabelValue: []string{\"system\", \"raid6\"}},\n\t\t{name: \"device_size_bytes\", value: 1.073741824e+10, extraLabel: []string{\"device\"}, extraLabelValue: []string{\"loop22\"}},\n\t\t{name: \"device_size_bytes\", value: 1.073741824e+10, extraLabel: []string{\"device\"}, extraLabelValue: []string{\"loop23\"}},\n\t\t{name: \"device_size_bytes\", value: 1.073741824e+10, extraLabel: []string{\"device\"}, extraLabelValue: []string{\"loop24\"}},\n\t\t{name: \"device_size_bytes\", value: 1.073741824e+10, extraLabel: []string{\"device\"}, extraLabelValue: []string{\"loop25\"}},\n\t},\n}\n\nfunc checkMetric(exp, got *btrfsMetric) bool {\n\tif exp.name != got.name ||\n\t\texp.value != got.value ||\n\t\tlen(exp.extraLabel) != len(got.extraLabel) ||\n\t\tlen(exp.extraLabelValue) != len(got.extraLabelValue) {\n\t\treturn false\n\t}\n\n\tfor i := range exp.extraLabel {\n\t\tif exp.extraLabel[i] != got.extraLabel[i] {\n\t\t\treturn false\n\t\t}\n\n\t\t// Devices (loopXX) can appear in random order, so just check the first 4 characters.\n\t\tif strings.HasPrefix(got.extraLabelValue[i], \"loop\") &&\n\t\t\texp.extraLabelValue[i][:4] == got.extraLabelValue[i][:4] {\n\t\t\tcontinue\n\t\t}\n\n\t\tif exp.extraLabelValue[i] != got.extraLabelValue[i] {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}\n\nfunc TestBtrfs(t *testing.T) {\n\tfs, err := btrfs.NewFS(\"fixtures/sys\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tcollector := &btrfsCollector{fs: fs}\n\n\tstats, err := collector.fs.Stats()\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to retrieve Btrfs stats: %v\", err)\n\t}\n\tif len(stats) != len(expectedBtrfsMetrics) {\n\t\tt.Fatalf(\"Unexpected number of Btrfs stats: expected %v, got %v\", len(expectedBtrfsMetrics), len(stats))\n\t}\n\n\tfor i, s := range stats {\n\t\tmetrics := collector.getMetrics(s, nil)\n\t\tif len(metrics) != len(expectedBtrfsMetrics[i]) {\n\t\t\tt.Fatalf(\"Unexpected number of Btrfs metrics: expected %v, got %v\", len(expectedBtrfsMetrics[i]), len(metrics))\n\t\t}\n\n\t\tfor j, m := range metrics {\n\t\t\texp := expectedBtrfsMetrics[i][j]\n\t\t\tif !checkMetric(&exp, &m) {\n\t\t\t\tt.Errorf(\"Incorrect btrfs metric: expected %#v, got: %#v\", exp, m)\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "collector/buddyinfo.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nobuddyinfo && !netbsd\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nconst (\n\tbuddyInfoSubsystem = \"buddyinfo\"\n)\n\ntype buddyinfoCollector struct {\n\tfs     procfs.FS\n\tdesc   *prometheus.Desc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"buddyinfo\", defaultDisabled, NewBuddyinfoCollector)\n}\n\n// NewBuddyinfoCollector returns a new Collector exposing buddyinfo stats.\nfunc NewBuddyinfoCollector(logger *slog.Logger) (Collector, error) {\n\tdesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, buddyInfoSubsystem, \"blocks\"),\n\t\t\"Count of free blocks according to size.\",\n\t\t[]string{\"node\", \"zone\", \"size\"}, nil,\n\t)\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\treturn &buddyinfoCollector{fs, desc, logger}, nil\n}\n\n// Update calls (*buddyinfoCollector).getBuddyInfo to get the platform specific\n// buddyinfo metrics.\nfunc (c *buddyinfoCollector) Update(ch chan<- prometheus.Metric) error {\n\tbuddyInfo, err := c.fs.BuddyInfo()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get buddyinfo: %w\", err)\n\t}\n\n\tc.logger.Debug(\"Set node_buddy\", \"buddyInfo\", buddyInfo)\n\tfor _, entry := range buddyInfo {\n\t\tfor size, value := range entry.Sizes {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc,\n\t\t\t\tprometheus.GaugeValue, value,\n\t\t\t\tentry.Node, entry.Zone, strconv.Itoa(size),\n\t\t\t)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/cgroups_linux.go",
    "content": "// Copyright 2022 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nostat\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nconst cgroupsCollectorSubsystem = \"cgroups\"\n\ntype cgroupSummaryCollector struct {\n\tfs      procfs.FS\n\tcgroups *prometheus.Desc\n\tenabled *prometheus.Desc\n\tlogger  *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(cgroupsCollectorSubsystem, defaultDisabled, NewCgroupSummaryCollector)\n}\n\n// NewCgroupSummaryCollector returns a new Collector exposing a summary of cgroups.\nfunc NewCgroupSummaryCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\treturn &cgroupSummaryCollector{\n\t\tfs: fs,\n\t\tcgroups: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cgroupsCollectorSubsystem, \"cgroups\"),\n\t\t\t\"Current cgroup number of the subsystem.\",\n\t\t\t[]string{\"subsys_name\"}, nil,\n\t\t),\n\t\tenabled: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cgroupsCollectorSubsystem, \"enabled\"),\n\t\t\t\"Current cgroup number of the subsystem.\",\n\t\t\t[]string{\"subsys_name\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update implements Collector and exposes cgroup statistics.\nfunc (c *cgroupSummaryCollector) Update(ch chan<- prometheus.Metric) error {\n\tcgroupSummarys, err := c.fs.CgroupSummarys()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, cs := range cgroupSummarys {\n\t\tch <- prometheus.MustNewConstMetric(c.cgroups, prometheus.GaugeValue, float64(cs.Cgroups), cs.SubsysName)\n\t\tch <- prometheus.MustNewConstMetric(c.enabled, prometheus.GaugeValue, float64(cs.Enabled), cs.SubsysName)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/collector.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Package collector includes all individual collectors to gather and export system metrics.\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// Namespace defines the common namespace to be used by all metrics.\nconst namespace = \"node\"\n\nvar (\n\tscrapeDurationDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"scrape\", \"collector_duration_seconds\"),\n\t\t\"node_exporter: Duration of a collector scrape.\",\n\t\t[]string{\"collector\"},\n\t\tnil,\n\t)\n\tscrapeSuccessDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"scrape\", \"collector_success\"),\n\t\t\"node_exporter: Whether a collector succeeded.\",\n\t\t[]string{\"collector\"},\n\t\tnil,\n\t)\n)\n\nconst (\n\tdefaultEnabled  = true\n\tdefaultDisabled = false\n)\n\nvar (\n\tfactories              = make(map[string]func(logger *slog.Logger) (Collector, error))\n\tinitiatedCollectorsMtx = sync.Mutex{}\n\tinitiatedCollectors    = make(map[string]Collector)\n\tcollectorState         = make(map[string]*bool)\n\tforcedCollectors       = map[string]bool{} // collectors which have been explicitly enabled or disabled\n)\n\nfunc registerCollector(collector string, isDefaultEnabled bool, factory func(logger *slog.Logger) (Collector, error)) {\n\tvar helpDefaultState string\n\tif isDefaultEnabled {\n\t\thelpDefaultState = \"enabled\"\n\t} else {\n\t\thelpDefaultState = \"disabled\"\n\t}\n\n\tflagName := fmt.Sprintf(\"collector.%s\", collector)\n\tflagHelp := fmt.Sprintf(\"Enable the %s collector (default: %s).\", collector, helpDefaultState)\n\tdefaultValue := fmt.Sprintf(\"%v\", isDefaultEnabled)\n\n\tflag := kingpin.Flag(flagName, flagHelp).Default(defaultValue).Action(collectorFlagAction(collector)).Bool()\n\tcollectorState[collector] = flag\n\n\tfactories[collector] = factory\n}\n\n// NodeCollector implements the prometheus.Collector interface.\ntype NodeCollector struct {\n\tCollectors map[string]Collector\n\tlogger     *slog.Logger\n}\n\n// DisableDefaultCollectors sets the collector state to false for all collectors which\n// have not been explicitly enabled on the command line.\nfunc DisableDefaultCollectors() {\n\tfor c := range collectorState {\n\t\tif _, ok := forcedCollectors[c]; !ok {\n\t\t\t*collectorState[c] = false\n\t\t}\n\t}\n}\n\n// collectorFlagAction generates a new action function for the given collector\n// to track whether it has been explicitly enabled or disabled from the command line.\n// A new action function is needed for each collector flag because the ParseContext\n// does not contain information about which flag called the action.\n// See: https://github.com/alecthomas/kingpin/issues/294\nfunc collectorFlagAction(collector string) func(ctx *kingpin.ParseContext) error {\n\treturn func(ctx *kingpin.ParseContext) error {\n\t\tforcedCollectors[collector] = true\n\t\treturn nil\n\t}\n}\n\n// NewNodeCollector creates a new NodeCollector.\nfunc NewNodeCollector(logger *slog.Logger, filters ...string) (*NodeCollector, error) {\n\tf := make(map[string]bool)\n\tfor _, filter := range filters {\n\t\tenabled, exist := collectorState[filter]\n\t\tif !exist {\n\t\t\treturn nil, fmt.Errorf(\"missing collector: %s\", filter)\n\t\t}\n\t\tif !*enabled {\n\t\t\treturn nil, fmt.Errorf(\"disabled collector: %s\", filter)\n\t\t}\n\t\tf[filter] = true\n\t}\n\tcollectors := make(map[string]Collector)\n\tinitiatedCollectorsMtx.Lock()\n\tdefer initiatedCollectorsMtx.Unlock()\n\tfor key, enabled := range collectorState {\n\t\tif !*enabled || (len(f) > 0 && !f[key]) {\n\t\t\tcontinue\n\t\t}\n\t\tif collector, ok := initiatedCollectors[key]; ok {\n\t\t\tcollectors[key] = collector\n\t\t} else {\n\t\t\tcollector, err := factories[key](logger.With(\"collector\", key))\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcollectors[key] = collector\n\t\t\tinitiatedCollectors[key] = collector\n\t\t}\n\t}\n\treturn &NodeCollector{Collectors: collectors, logger: logger}, nil\n}\n\n// Describe implements the prometheus.Collector interface.\nfunc (n NodeCollector) Describe(ch chan<- *prometheus.Desc) {\n\tch <- scrapeDurationDesc\n\tch <- scrapeSuccessDesc\n}\n\n// Collect implements the prometheus.Collector interface.\nfunc (n NodeCollector) Collect(ch chan<- prometheus.Metric) {\n\twg := sync.WaitGroup{}\n\twg.Add(len(n.Collectors))\n\tfor name, c := range n.Collectors {\n\t\tgo func(name string, c Collector) {\n\t\t\texecute(name, c, ch, n.logger)\n\t\t\twg.Done()\n\t\t}(name, c)\n\t}\n\twg.Wait()\n}\n\nfunc execute(name string, c Collector, ch chan<- prometheus.Metric, logger *slog.Logger) {\n\tbegin := time.Now()\n\terr := c.Update(ch)\n\tduration := time.Since(begin)\n\tvar success float64\n\n\tif err != nil {\n\t\tif IsNoDataError(err) {\n\t\t\tlogger.Debug(\"collector returned no data\", \"name\", name, \"duration_seconds\", duration.Seconds(), \"err\", err)\n\t\t} else {\n\t\t\tlogger.Error(\"collector failed\", \"name\", name, \"duration_seconds\", duration.Seconds(), \"err\", err)\n\t\t}\n\t\tsuccess = 0\n\t} else {\n\t\tlogger.Debug(\"collector succeeded\", \"name\", name, \"duration_seconds\", duration.Seconds())\n\t\tsuccess = 1\n\t}\n\tch <- prometheus.MustNewConstMetric(scrapeDurationDesc, prometheus.GaugeValue, duration.Seconds(), name)\n\tch <- prometheus.MustNewConstMetric(scrapeSuccessDesc, prometheus.GaugeValue, success, name)\n}\n\n// Collector is the interface a collector has to implement.\ntype Collector interface {\n\t// Get new metrics and expose them via prometheus registry.\n\tUpdate(ch chan<- prometheus.Metric) error\n}\n\ntype typedDesc struct {\n\tdesc      *prometheus.Desc\n\tvalueType prometheus.ValueType\n}\n\nfunc (d *typedDesc) mustNewConstMetric(value float64, labels ...string) prometheus.Metric {\n\treturn prometheus.MustNewConstMetric(d.desc, d.valueType, value, labels...)\n}\n\n// ErrNoData indicates the collector found no data to collect, but had no other error.\nvar ErrNoData = errors.New(\"collector returned no data\")\n\nfunc IsNoDataError(err error) bool {\n\treturn err == ErrNoData\n}\n\n// pushMetric helps construct and convert a variety of value types into Prometheus float64 metrics.\nfunc pushMetric(ch chan<- prometheus.Metric, fieldDesc *prometheus.Desc, name string, value any, valueType prometheus.ValueType, labelValues ...string) {\n\tvar fVal float64\n\tswitch val := value.(type) {\n\tcase uint8:\n\t\tfVal = float64(val)\n\tcase uint16:\n\t\tfVal = float64(val)\n\tcase uint32:\n\t\tfVal = float64(val)\n\tcase uint64:\n\t\tfVal = float64(val)\n\tcase int64:\n\t\tfVal = float64(val)\n\tcase *uint8:\n\t\tif val == nil {\n\t\t\treturn\n\t\t}\n\t\tfVal = float64(*val)\n\tcase *uint16:\n\t\tif val == nil {\n\t\t\treturn\n\t\t}\n\t\tfVal = float64(*val)\n\tcase *uint32:\n\t\tif val == nil {\n\t\t\treturn\n\t\t}\n\t\tfVal = float64(*val)\n\tcase *uint64:\n\t\tif val == nil {\n\t\t\treturn\n\t\t}\n\t\tfVal = float64(*val)\n\tcase *int64:\n\t\tif val == nil {\n\t\t\treturn\n\t\t}\n\t\tfVal = float64(*val)\n\tdefault:\n\t\treturn\n\t}\n\n\tch <- prometheus.MustNewConstMetric(fieldDesc, valueType, fVal, labelValues...)\n}\n"
  },
  {
    "path": "collector/conntrack_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noconntrack\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype conntrackCollector struct {\n\tcurrent       *prometheus.Desc\n\tlimit         *prometheus.Desc\n\tfound         *prometheus.Desc\n\tinvalid       *prometheus.Desc\n\tignore        *prometheus.Desc\n\tinsert        *prometheus.Desc\n\tinsertFailed  *prometheus.Desc\n\tdrop          *prometheus.Desc\n\tearlyDrop     *prometheus.Desc\n\tsearchRestart *prometheus.Desc\n\tlogger        *slog.Logger\n}\n\ntype conntrackStatistics struct {\n\tfound         uint64 // Number of searched entries which were successful\n\tinvalid       uint64 // Number of packets seen which can not be tracked\n\tignore        uint64 // Number of packets seen which are already connected to a conntrack entry\n\tinsert        uint64 // Number of entries inserted into the list\n\tinsertFailed  uint64 // Number of entries for which list insertion was attempted but failed (happens if the same entry is already present)\n\tdrop          uint64 // Number of packets dropped due to conntrack failure. Either new conntrack entry allocation failed, or protocol helper dropped the packet\n\tearlyDrop     uint64 // Number of dropped conntrack entries to make room for new ones, if maximum table size was reached\n\tsearchRestart uint64 // Number of conntrack table lookups which had to be restarted due to hashtable resizes\n}\n\nfunc init() {\n\tregisterCollector(\"conntrack\", defaultEnabled, NewConntrackCollector)\n}\n\n// NewConntrackCollector returns a new Collector exposing conntrack stats.\nfunc NewConntrackCollector(logger *slog.Logger) (Collector, error) {\n\treturn &conntrackCollector{\n\t\tcurrent: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_entries\"),\n\t\t\t\"Number of currently allocated flow entries for connection tracking.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tlimit: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_entries_limit\"),\n\t\t\t\"Maximum size of connection tracking table.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tfound: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_stat_found\"),\n\t\t\t\"Number of searched entries which were successful.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tinvalid: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_stat_invalid\"),\n\t\t\t\"Number of packets seen which can not be tracked.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tignore: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_stat_ignore\"),\n\t\t\t\"Number of packets seen which are already connected to a conntrack entry.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tinsert: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_stat_insert\"),\n\t\t\t\"Number of entries inserted into the list.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tinsertFailed: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_stat_insert_failed\"),\n\t\t\t\"Number of entries for which list insertion was attempted but failed.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tdrop: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_stat_drop\"),\n\t\t\t\"Number of packets dropped due to conntrack failure.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tearlyDrop: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_stat_early_drop\"),\n\t\t\t\"Number of dropped conntrack entries to make room for new ones, if maximum table size was reached.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tsearchRestart: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"nf_conntrack_stat_search_restart\"),\n\t\t\t\"Number of conntrack table lookups which had to be restarted due to hashtable resizes.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *conntrackCollector) Update(ch chan<- prometheus.Metric) error {\n\tvalue, err := readUintFromFile(procFilePath(\"sys/net/netfilter/nf_conntrack_count\"))\n\tif err != nil {\n\t\treturn c.handleErr(err)\n\t}\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.current, prometheus.GaugeValue, float64(value))\n\n\tvalue, err = readUintFromFile(procFilePath(\"sys/net/netfilter/nf_conntrack_max\"))\n\tif err != nil {\n\t\treturn c.handleErr(err)\n\t}\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.limit, prometheus.GaugeValue, float64(value))\n\n\tconntrackStats, err := getConntrackStatistics()\n\tif err != nil {\n\t\treturn c.handleErr(err)\n\t}\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.found, prometheus.GaugeValue, float64(conntrackStats.found))\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.invalid, prometheus.GaugeValue, float64(conntrackStats.invalid))\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.ignore, prometheus.GaugeValue, float64(conntrackStats.ignore))\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.insert, prometheus.GaugeValue, float64(conntrackStats.insert))\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.insertFailed, prometheus.GaugeValue, float64(conntrackStats.insertFailed))\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.drop, prometheus.GaugeValue, float64(conntrackStats.drop))\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.earlyDrop, prometheus.GaugeValue, float64(conntrackStats.earlyDrop))\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.searchRestart, prometheus.GaugeValue, float64(conntrackStats.searchRestart))\n\treturn nil\n}\n\nfunc (c *conntrackCollector) handleErr(err error) error {\n\tif errors.Is(err, os.ErrNotExist) {\n\t\tc.logger.Debug(\"conntrack probably not loaded\")\n\t\treturn ErrNoData\n\t}\n\treturn fmt.Errorf(\"failed to retrieve conntrack stats: %w\", err)\n}\n\nfunc getConntrackStatistics() (*conntrackStatistics, error) {\n\tc := conntrackStatistics{}\n\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\tconnStats, err := fs.ConntrackStat()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, connStat := range connStats {\n\t\tc.found += connStat.Found\n\t\tc.invalid += connStat.Invalid\n\t\tc.ignore += connStat.Ignore\n\t\tc.insert += connStat.Insert\n\t\tc.insertFailed += connStat.InsertFailed\n\t\tc.drop += connStat.Drop\n\t\tc.earlyDrop += connStat.EarlyDrop\n\t\tc.searchRestart += connStat.SearchRestart\n\t}\n\n\treturn &c, nil\n}\n"
  },
  {
    "path": "collector/cpu_aix.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\n/*\n#include <unistd.h>  // Include the standard Unix header\n#include <errno.h>   // For errno\n*/\nimport \"C\"\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\n\t\"github.com/power-devops/perfstat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tnodeCPUPhysicalSecondsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"physical_seconds_total\"),\n\t\t\"Seconds the physical CPUs spent in each mode.\",\n\t\t[]string{\"cpu\", \"mode\"}, nil,\n\t)\n\tnodeCPUSRunQueueDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"runqueue\"),\n\t\t\"Length of the run queue.\", []string{\"cpu\"}, nil,\n\t)\n\tnodeCPUFlagsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"flags\"),\n\t\t\"CPU flags.\",\n\t\t[]string{\"cpu\", \"flag\"}, nil,\n\t)\n\tnodeCPUContextSwitchDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"context_switches_total\"),\n\t\t\"Number of context switches.\",\n\t\t[]string{\"cpu\"}, nil,\n\t)\n)\n\ntype cpuCollector struct {\n\tcpu              typedDesc\n\tcpuPhysical      typedDesc\n\tcpuRunQueue      typedDesc\n\tcpuFlags         typedDesc\n\tcpuContextSwitch typedDesc\n\n\tlogger             *slog.Logger\n\ttickPerSecond      float64\n\tpurrTicksPerSecond float64\n}\n\nfunc init() {\n\tregisterCollector(\"cpu\", defaultEnabled, NewCpuCollector)\n}\n\nfunc tickPerSecond() (float64, error) {\n\tticks, err := C.sysconf(C._SC_CLK_TCK)\n\tif ticks == -1 || err != nil {\n\t\treturn 0, fmt.Errorf(\"failed to get clock ticks per second: %v\", err)\n\t}\n\treturn float64(ticks), nil\n}\n\nfunc NewCpuCollector(logger *slog.Logger) (Collector, error) {\n\tticks, err := tickPerSecond()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpconfig, err := perfstat.PartitionStat()\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &cpuCollector{\n\t\tcpu:                typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},\n\t\tcpuPhysical:        typedDesc{nodeCPUPhysicalSecondsDesc, prometheus.CounterValue},\n\t\tcpuRunQueue:        typedDesc{nodeCPUSRunQueueDesc, prometheus.GaugeValue},\n\t\tcpuFlags:           typedDesc{nodeCPUFlagsDesc, prometheus.GaugeValue},\n\t\tcpuContextSwitch:   typedDesc{nodeCPUContextSwitchDesc, prometheus.CounterValue},\n\t\tlogger:             logger,\n\t\ttickPerSecond:      ticks,\n\t\tpurrTicksPerSecond: float64(pconfig.ProcessorMhz * 1e6),\n\t}, nil\n}\n\nfunc (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := perfstat.CpuStat()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor n, stat := range stats {\n\t\t// LPAR metrics\n\t\tch <- c.cpu.mustNewConstMetric(float64(stat.User)/c.tickPerSecond, strconv.Itoa(n), \"user\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(stat.Sys)/c.tickPerSecond, strconv.Itoa(n), \"system\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(stat.Idle)/c.tickPerSecond, strconv.Itoa(n), \"idle\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(stat.Wait)/c.tickPerSecond, strconv.Itoa(n), \"wait\")\n\n\t\t// Physical CPU metrics\n\t\tch <- c.cpuPhysical.mustNewConstMetric(float64(stat.PIdle)/c.purrTicksPerSecond, strconv.Itoa(n), \"pidle\")\n\t\tch <- c.cpuPhysical.mustNewConstMetric(float64(stat.PUser)/c.purrTicksPerSecond, strconv.Itoa(n), \"puser\")\n\t\tch <- c.cpuPhysical.mustNewConstMetric(float64(stat.PSys)/c.purrTicksPerSecond, strconv.Itoa(n), \"psys\")\n\t\tch <- c.cpuPhysical.mustNewConstMetric(float64(stat.PWait)/c.purrTicksPerSecond, strconv.Itoa(n), \"pwait\")\n\n\t\t// Run queue length\n\t\tch <- c.cpuRunQueue.mustNewConstMetric(float64(stat.RunQueue), strconv.Itoa(n))\n\n\t\t// Flags\n\t\tch <- c.cpuFlags.mustNewConstMetric(float64(stat.SpurrFlag), strconv.Itoa(n), \"spurr\")\n\n\t\t// Context switches\n\t\tch <- c.cpuContextSwitch.mustNewConstMetric(float64(stat.CSwitches), strconv.Itoa(n))\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/cpu_common.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tcpuCollectorSubsystem = \"cpu\"\n)\n\nvar (\n\tnodeCPUSecondsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"seconds_total\"),\n\t\t\"Seconds the CPUs spent in each mode.\",\n\t\t[]string{\"cpu\", \"mode\"}, nil,\n\t)\n)\n"
  },
  {
    "path": "collector/cpu_darwin.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Based on gopsutil/cpu/cpu_darwin_cgo.go @ ae251eb which is licensed under\n// BSD. See https://github.com/shirou/gopsutil/blob/master/LICENSE for details.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n/*\n#cgo LDFLAGS:\n#include <stdlib.h>\n#include <limits.h>\n#include <sys/sysctl.h>\n#include <sys/mount.h>\n#include <mach/mach_init.h>\n#include <mach/mach_host.h>\n#include <mach/host_info.h>\n#include <TargetConditionals.h>\n#if TARGET_OS_MAC\n#include <libproc.h>\n#endif\n#include <mach/processor_info.h>\n#include <mach/vm_map.h>\n*/\nimport \"C\"\n\n// ClocksPerSec default value. from time.h\nconst ClocksPerSec = float64(C.CLK_TCK)\n\ntype statCollector struct {\n\tcpu    *prometheus.Desc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"cpu\", defaultEnabled, NewCPUCollector)\n}\n\n// NewCPUCollector returns a new Collector exposing CPU stats.\nfunc NewCPUCollector(logger *slog.Logger) (Collector, error) {\n\treturn &statCollector{\n\t\tcpu:    nodeCPUSecondsDesc,\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *statCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar (\n\t\tcount   C.mach_msg_type_number_t\n\t\tcpuload *C.processor_cpu_load_info_data_t\n\t\tncpu    C.natural_t\n\t)\n\n\tstatus := C.host_processor_info(C.host_t(C.mach_host_self()),\n\t\tC.PROCESSOR_CPU_LOAD_INFO,\n\t\t&ncpu,\n\t\t(*C.processor_info_array_t)(unsafe.Pointer(&cpuload)),\n\t\t&count)\n\n\tif status != C.KERN_SUCCESS {\n\t\treturn fmt.Errorf(\"host_processor_info error=%d\", status)\n\t}\n\n\t// jump through some cgo casting hoops and ensure we properly free\n\t// the memory that cpuload points to\n\ttarget := C.vm_map_t(C.mach_task_self_)\n\taddress := C.vm_address_t(uintptr(unsafe.Pointer(cpuload)))\n\tdefer C.vm_deallocate(target, address, C.vm_size_t(ncpu))\n\n\t// the body of struct processor_cpu_load_info\n\t// aka processor_cpu_load_info_data_t\n\tvar cpuTicks [C.CPU_STATE_MAX]uint32\n\n\t// copy the cpuload array to a []byte buffer\n\t// where we can binary.Read the data\n\tsize := int(ncpu) * binary.Size(cpuTicks)\n\tbuf := (*[1 << 30]byte)(unsafe.Pointer(cpuload))[:size:size]\n\n\tbbuf := bytes.NewBuffer(buf)\n\n\tfor i := 0; i < int(ncpu); i++ {\n\t\terr := binary.Read(bbuf, binary.LittleEndian, &cpuTicks)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor k, v := range map[string]int{\n\t\t\t\"user\":   C.CPU_STATE_USER,\n\t\t\t\"system\": C.CPU_STATE_SYSTEM,\n\t\t\t\"nice\":   C.CPU_STATE_NICE,\n\t\t\t\"idle\":   C.CPU_STATE_IDLE,\n\t\t} {\n\t\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, float64(cpuTicks[v])/ClocksPerSec, strconv.Itoa(i), k)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/cpu_dragonfly.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"log/slog\"\n\t\"strconv\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n/*\n#cgo LDFLAGS:\n#include <sys/sysctl.h>\n#include <kinfo.h>\n#include <stdlib.h>\n#include <stdio.h>\n\nint\ngetCPUTimes(uint64_t **cputime, size_t *cpu_times_len) {\n\tsize_t len;\n\n\t// Get number of cpu cores.\n\tint mib[2];\n\tint ncpu;\n\tmib[0] = CTL_HW;\n\tmib[1] = HW_NCPU;\n\tlen = sizeof(ncpu);\n\tif (sysctl(mib, 2, &ncpu, &len, NULL, 0)) {\n\t\treturn -1;\n\t}\n\n\t// Get the cpu times.\n\tstruct kinfo_cputime cp_t[ncpu];\n\tbzero(cp_t, sizeof(struct kinfo_cputime)*ncpu);\n\tlen = sizeof(cp_t[0])*ncpu;\n\tif (sysctlbyname(\"kern.cputime\", &cp_t, &len, NULL, 0)) {\n\t\treturn -1;\n\t}\n\n\t*cpu_times_len = ncpu*CPUSTATES;\n\n\tuint64_t user, nice, sys, intr, idle;\n\tuser = nice = sys = intr = idle = 0;\n\t*cputime = (uint64_t *) malloc(sizeof(uint64_t)*(*cpu_times_len));\n\tfor (int i = 0; i < ncpu; ++i) {\n\t\tint offset = CPUSTATES * i;\n\t\t(*cputime)[offset] = cp_t[i].cp_user;\n\t\t(*cputime)[offset+1] = cp_t[i].cp_nice;\n\t\t(*cputime)[offset+2] = cp_t[i].cp_sys;\n\t\t(*cputime)[offset+3] = cp_t[i].cp_intr;\n\t\t(*cputime)[offset+4] = cp_t[i].cp_idle;\n\t}\n\n\treturn 0;\n\n}\n*/\nimport \"C\"\n\nconst maxCPUTimesLen = C.MAXCPU * C.CPUSTATES\n\ntype statCollector struct {\n\tcpu    *prometheus.Desc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"cpu\", defaultEnabled, NewStatCollector)\n}\n\n// NewStatCollector returns a new Collector exposing CPU stats.\nfunc NewStatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &statCollector{\n\t\tcpu:    nodeCPUSecondsDesc,\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc getDragonFlyCPUTimes() ([]float64, error) {\n\t// We want time spent per-CPU per CPUSTATE.\n\t// CPUSTATES (number of CPUSTATES) is defined as 5U.\n\t// States: CP_USER | CP_NICE | CP_SYS | CP_IDLE | CP_INTR\n\t//\n\t// Each value is in microseconds\n\t//\n\t// Look into sys/kern/kern_clock.c for details.\n\n\tvar (\n\t\tcpuTimesC      *C.uint64_t\n\t\tcpuTimesLength C.size_t\n\t)\n\n\tif C.getCPUTimes(&cpuTimesC, &cpuTimesLength) == -1 {\n\t\treturn nil, errors.New(\"could not retrieve CPU times\")\n\t}\n\tdefer C.free(unsafe.Pointer(cpuTimesC))\n\n\tcput := (*[maxCPUTimesLen]C.uint64_t)(unsafe.Pointer(cpuTimesC))[:cpuTimesLength:cpuTimesLength]\n\n\tcpuTimes := make([]float64, cpuTimesLength)\n\tfor i, value := range cput {\n\t\tcpuTimes[i] = float64(value) / float64(1000000)\n\t}\n\treturn cpuTimes, nil\n}\n\n// Expose CPU stats using sysctl.\nfunc (c *statCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar fieldsCount = 5\n\tcpuTimes, err := getDragonFlyCPUTimes()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Export order: user nice sys intr idle\n\tcpuFields := []string{\"user\", \"nice\", \"sys\", \"interrupt\", \"idle\"}\n\tfor i, value := range cpuTimes {\n\t\tcpux := strconv.Itoa(i / fieldsCount)\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, value, cpux, cpuFields[i%fieldsCount])\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/cpu_dragonfly_test.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"runtime\"\n\t\"testing\"\n)\n\nfunc TestCPU(t *testing.T) {\n\tvar (\n\t\tfieldsCount = 5\n\t\ttimes, err  = getDragonFlyCPUTimes()\n\t)\n\n\tif err != nil {\n\t\tt.Fatalf(\"expected no error, got %v\", err)\n\t}\n\n\tif len(times) == 0 {\n\t\tt.Fatalf(\"no cputimes found\")\n\t}\n\n\twant := runtime.NumCPU() * fieldsCount\n\tif len(times) != want {\n\t\tt.Fatalf(\"should have %d cpuTimes: got %d\", want, len(times))\n\t}\n}\n"
  },
  {
    "path": "collector/cpu_freebsd.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"math\"\n\t\"strconv\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\ntype clockinfo struct {\n\thz     int32 // clock frequency\n\ttick   int32 // micro-seconds per hz tick\n\tspare  int32\n\tstathz int32 // statistics clock frequency\n\tprofhz int32 // profiling clock frequency\n}\n\ntype cputime struct {\n\tuser float64\n\tnice float64\n\tsys  float64\n\tintr float64\n\tidle float64\n}\n\nfunc getCPUTimes() ([]cputime, error) {\n\tconst states = 5\n\n\tclockb, err := unix.SysctlRaw(\"kern.clockrate\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclock := *(*clockinfo)(unsafe.Pointer(&clockb[0]))\n\tcpb, err := unix.SysctlRaw(\"kern.cp_times\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar cpufreq float64\n\tif clock.stathz > 0 {\n\t\tcpufreq = float64(clock.stathz)\n\t} else {\n\t\tcpufreq = float64(clock.hz)\n\t}\n\tvar times []float64\n\tfor len(cpb) >= int(unsafe.Sizeof(int(0))) {\n\t\tt := *(*int)(unsafe.Pointer(&cpb[0]))\n\t\ttimes = append(times, float64(t)/cpufreq)\n\t\tcpb = cpb[unsafe.Sizeof(int(0)):]\n\t}\n\n\tcpus := make([]cputime, len(times)/states)\n\tfor i := 0; i < len(times); i += states {\n\t\tcpu := &cpus[i/states]\n\t\tcpu.user = times[i]\n\t\tcpu.nice = times[i+1]\n\t\tcpu.sys = times[i+2]\n\t\tcpu.intr = times[i+3]\n\t\tcpu.idle = times[i+4]\n\t}\n\treturn cpus, nil\n}\n\ntype statCollector struct {\n\tcpu    typedDesc\n\ttemp   typedDesc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"cpu\", defaultEnabled, NewStatCollector)\n}\n\n// NewStatCollector returns a new Collector exposing CPU stats.\nfunc NewStatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &statCollector{\n\t\tcpu: typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},\n\t\ttemp: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"temperature_celsius\"),\n\t\t\t\"CPU temperature\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Expose CPU stats using sysctl.\nfunc (c *statCollector) Update(ch chan<- prometheus.Metric) error {\n\t// We want time spent per-cpu per CPUSTATE.\n\t// CPUSTATES (number of CPUSTATES) is defined as 5U.\n\t// Order: CP_USER | CP_NICE | CP_SYS | CP_IDLE | CP_INTR\n\t// sysctl kern.cp_times provides hw.ncpu * CPUSTATES long integers:\n\t//   hw.ncpu * (space-separated list of the above variables)\n\t//\n\t// Each value is a counter incremented at frequency\n\t//   kern.clockrate.(stathz | hz)\n\t//\n\t// Look into sys/kern/kern_clock.c for details.\n\n\tcpuTimes, err := getCPUTimes()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor cpu, t := range cpuTimes {\n\t\tlcpu := strconv.Itoa(cpu)\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.user), lcpu, \"user\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.nice), lcpu, \"nice\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.sys), lcpu, \"system\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.intr), lcpu, \"interrupt\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.idle), lcpu, \"idle\")\n\n\t\ttemp, err := unix.SysctlUint32(fmt.Sprintf(\"dev.cpu.%d.temperature\", cpu))\n\t\tif err != nil {\n\t\t\tif err == unix.ENOENT {\n\t\t\t\t// No temperature information for this CPU\n\t\t\t\tc.logger.Debug(\"no temperature information for CPU\", \"cpu\", cpu)\n\t\t\t} else {\n\t\t\t\t// Unexpected error\n\t\t\t\tch <- c.temp.mustNewConstMetric(math.NaN(), lcpu)\n\t\t\t\tc.logger.Error(\"failed to query CPU temperature for CPU\", \"cpu\", cpu, \"err\", err)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// Temp is a signed integer in deci-degrees Kelvin.\n\t\t// Cast uint32 to int32 and convert to float64 degrees Celsius.\n\t\t//\n\t\t// 2732 is used as the conversion constant for deci-degrees\n\t\t// Kelvin, in multiple places in the kernel that feed into this\n\t\t// sysctl, so we want to maintain consistency:\n\t\t//\n\t\t// sys/dev/amdtemp/amdtemp.c\n\t\t//   #define AMDTEMP_ZERO_C_TO_K 2732\n\t\t//\n\t\t// sys/dev/acpica/acpi_thermal.c\n\t\t//   #define TZ_ZEROC            2732\n\t\t//\n\t\t// sys/dev/coretemp/coretemp.c\n\t\t//   #define TZ_ZEROC            2732\n\t\tch <- c.temp.mustNewConstMetric(float64(int32(temp)-2732)/10, lcpu)\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "collector/cpu_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"maps\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"slices\"\n\t\"strconv\"\n\t\"sync\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\ntype cpuCollector struct {\n\tprocfs             procfs.FS\n\tsysfs              sysfs.FS\n\tcpu                *prometheus.Desc\n\tcpuInfo            *prometheus.Desc\n\tcpuFrequencyHz     *prometheus.Desc\n\tcpuFlagsInfo       *prometheus.Desc\n\tcpuBugsInfo        *prometheus.Desc\n\tcpuGuest           *prometheus.Desc\n\tcpuCoreThrottle    *prometheus.Desc\n\tcpuPackageThrottle *prometheus.Desc\n\tcpuIsolated        *prometheus.Desc\n\tlogger             *slog.Logger\n\tcpuOnline          *prometheus.Desc\n\tcpuStats           map[int64]procfs.CPUStat\n\tcpuStatsMutex      sync.Mutex\n\tisolatedCpus       []uint16\n\n\tcpuFlagsIncludeRegexp *regexp.Regexp\n\tcpuBugsIncludeRegexp  *regexp.Regexp\n}\n\n// Idle jump back limit in seconds.\nconst jumpBackSeconds = 3.0\n\nvar (\n\tenableCPUGuest       = kingpin.Flag(\"collector.cpu.guest\", \"Enables metric node_cpu_guest_seconds_total\").Default(\"true\").Bool()\n\tenableCPUInfo        = kingpin.Flag(\"collector.cpu.info\", \"Enables metric cpu_info\").Bool()\n\tflagsInclude         = kingpin.Flag(\"collector.cpu.info.flags-include\", \"Filter the `flags` field in cpuInfo with a value that must be a regular expression\").String()\n\tbugsInclude          = kingpin.Flag(\"collector.cpu.info.bugs-include\", \"Filter the `bugs` field in cpuInfo with a value that must be a regular expression\").String()\n\tjumpBackDebugMessage = fmt.Sprintf(\"CPU Idle counter jumped backwards more than %f seconds, possible hotplug event, resetting CPU stats\", jumpBackSeconds)\n)\n\nfunc init() {\n\tregisterCollector(\"cpu\", defaultEnabled, NewCPUCollector)\n}\n\n// NewCPUCollector returns a new Collector exposing kernel/system statistics.\nfunc NewCPUCollector(logger *slog.Logger) (Collector, error) {\n\tpfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\tsfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\tisolcpus, err := sfs.IsolatedCPUs()\n\tif err != nil {\n\t\tif !os.IsNotExist(err) {\n\t\t\treturn nil, fmt.Errorf(\"unable to get isolated cpus: %w\", err)\n\t\t}\n\t\tlogger.Debug(\"couldn't open isolated file\", \"error\", err)\n\t}\n\n\tc := &cpuCollector{\n\t\tprocfs: pfs,\n\t\tsysfs:  sfs,\n\t\tcpu:    nodeCPUSecondsDesc,\n\t\tcpuInfo: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"info\"),\n\t\t\t\"CPU information from /proc/cpuinfo.\",\n\t\t\t[]string{\"package\", \"core\", \"cpu\", \"vendor\", \"family\", \"model\", \"model_name\", \"microcode\", \"stepping\", \"cachesize\"}, nil,\n\t\t),\n\t\tcpuFrequencyHz: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"frequency_hertz\"),\n\t\t\t\"CPU frequency in hertz from /proc/cpuinfo.\",\n\t\t\t[]string{\"package\", \"core\", \"cpu\"}, nil,\n\t\t),\n\t\tcpuFlagsInfo: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"flag_info\"),\n\t\t\t\"The `flags` field of CPU information from /proc/cpuinfo taken from the first core.\",\n\t\t\t[]string{\"flag\"}, nil,\n\t\t),\n\t\tcpuBugsInfo: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"bug_info\"),\n\t\t\t\"The `bugs` field of CPU information from /proc/cpuinfo taken from the first core.\",\n\t\t\t[]string{\"bug\"}, nil,\n\t\t),\n\t\tcpuGuest: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"guest_seconds_total\"),\n\t\t\t\"Seconds the CPUs spent in guests (VMs) for each mode.\",\n\t\t\t[]string{\"cpu\", \"mode\"}, nil,\n\t\t),\n\t\tcpuCoreThrottle: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"core_throttles_total\"),\n\t\t\t\"Number of times this CPU core has been throttled.\",\n\t\t\t[]string{\"package\", \"core\"}, nil,\n\t\t),\n\t\tcpuPackageThrottle: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"package_throttles_total\"),\n\t\t\t\"Number of times this CPU package has been throttled.\",\n\t\t\t[]string{\"package\"}, nil,\n\t\t),\n\t\tcpuIsolated: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"isolated\"),\n\t\t\t\"Whether each core is isolated, information from /sys/devices/system/cpu/isolated.\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tcpuOnline: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"online\"),\n\t\t\t\"CPUs that are online and being scheduled.\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tlogger:       logger,\n\t\tisolatedCpus: isolcpus,\n\t\tcpuStats:     make(map[int64]procfs.CPUStat),\n\t}\n\terr = c.compileIncludeFlags(flagsInclude, bugsInclude)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"fail to compile --collector.cpu.info.flags-include and --collector.cpu.info.bugs-include, the values of them must be regular expressions: %w\", err)\n\t}\n\treturn c, nil\n}\n\nfunc (c *cpuCollector) compileIncludeFlags(flagsIncludeFlag, bugsIncludeFlag *string) error {\n\tif (*flagsIncludeFlag != \"\" || *bugsIncludeFlag != \"\") && !*enableCPUInfo {\n\t\t*enableCPUInfo = true\n\t\tc.logger.Info(\"--collector.cpu.info has been set to `true` because you set the following flags, like --collector.cpu.info.flags-include and --collector.cpu.info.bugs-include\")\n\t}\n\n\tvar err error\n\tif *flagsIncludeFlag != \"\" {\n\t\tc.cpuFlagsIncludeRegexp, err = regexp.Compile(*flagsIncludeFlag)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif *bugsIncludeFlag != \"\" {\n\t\tc.cpuBugsIncludeRegexp, err = regexp.Compile(*bugsIncludeFlag)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Update implements Collector and exposes cpu related metrics from /proc/stat and /sys/.../cpu/.\nfunc (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {\n\tif *enableCPUInfo {\n\t\tif err := c.updateInfo(ch); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tif err := c.updateStat(ch); err != nil {\n\t\treturn err\n\t}\n\tif c.isolatedCpus != nil {\n\t\tc.updateIsolated(ch)\n\t}\n\terr := c.updateThermalThrottle(ch)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = c.updateOnline(ch)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// updateInfo reads /proc/cpuinfo\nfunc (c *cpuCollector) updateInfo(ch chan<- prometheus.Metric) error {\n\tinfo, err := c.procfs.CPUInfo()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, cpu := range info {\n\t\tch <- prometheus.MustNewConstMetric(c.cpuInfo,\n\t\t\tprometheus.GaugeValue,\n\t\t\t1,\n\t\t\tcpu.PhysicalID,\n\t\t\tcpu.CoreID,\n\t\t\tstrconv.Itoa(int(cpu.Processor)),\n\t\t\tcpu.VendorID,\n\t\t\tcpu.CPUFamily,\n\t\t\tcpu.Model,\n\t\t\tcpu.ModelName,\n\t\t\tcpu.Microcode,\n\t\t\tcpu.Stepping,\n\t\t\tcpu.CacheSize)\n\t}\n\n\tcpuFreqEnabled, ok := collectorState[\"cpufreq\"]\n\tif !ok || cpuFreqEnabled == nil {\n\t\tc.logger.Debug(\"cpufreq key missing or nil value in collectorState map\")\n\t} else if *cpuFreqEnabled {\n\t\tfor _, cpu := range info {\n\t\t\tch <- prometheus.MustNewConstMetric(c.cpuFrequencyHz,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tcpu.CPUMHz*1e6,\n\t\t\t\tcpu.PhysicalID,\n\t\t\t\tcpu.CoreID,\n\t\t\t\tstrconv.Itoa(int(cpu.Processor)))\n\t\t}\n\t}\n\n\tif len(info) != 0 {\n\t\tcpu := info[0]\n\t\tif err := updateFieldInfo(cpu.Flags, c.cpuFlagsIncludeRegexp, c.cpuFlagsInfo, ch); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := updateFieldInfo(cpu.Bugs, c.cpuBugsIncludeRegexp, c.cpuBugsInfo, ch); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc updateFieldInfo(valueList []string, filter *regexp.Regexp, desc *prometheus.Desc, ch chan<- prometheus.Metric) error {\n\tif filter == nil {\n\t\treturn nil\n\t}\n\n\tfor _, val := range valueList {\n\t\tif !filter.MatchString(val) {\n\t\t\tcontinue\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(desc,\n\t\t\tprometheus.GaugeValue,\n\t\t\t1,\n\t\t\tval,\n\t\t)\n\t}\n\treturn nil\n}\n\n// updateThermalThrottle reads /sys/devices/system/cpu/cpu* and expose thermal throttle statistics.\nfunc (c *cpuCollector) updateThermalThrottle(ch chan<- prometheus.Metric) error {\n\tcpus, err := filepath.Glob(sysFilePath(\"devices/system/cpu/cpu[0-9]*\"))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tpackageThrottles := make(map[uint64]uint64)\n\tpackageCoreThrottles := make(map[uint64]map[uint64]uint64)\n\n\t// cpu loop\n\tfor _, cpu := range cpus {\n\t\t// See\n\t\t// https://www.kernel.org/doc/Documentation/x86/topology.txt\n\t\t// https://www.kernel.org/doc/Documentation/cputopology.txt\n\t\t// https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-system-cpu\n\t\tvar err error\n\t\tvar physicalPackageID, coreID uint64\n\n\t\t// topology/physical_package_id\n\t\tif physicalPackageID, err = readUintFromFile(filepath.Join(cpu, \"topology\", \"physical_package_id\")); err != nil {\n\t\t\tc.logger.Debug(\"CPU is missing physical_package_id\", \"cpu\", cpu)\n\t\t\tcontinue\n\t\t}\n\t\t// topology/core_id\n\t\tif coreID, err = readUintFromFile(filepath.Join(cpu, \"topology\", \"core_id\")); err != nil {\n\t\t\tc.logger.Debug(\"CPU is missing core_id\", \"cpu\", cpu)\n\t\t\tcontinue\n\t\t}\n\n\t\t// metric node_cpu_core_throttles_total\n\t\t//\n\t\t// We process this metric before the package throttles as there\n\t\t// are CPU+kernel combinations that only present core throttles\n\t\t// but no package throttles.\n\t\t// Seen e.g. on an Intel Xeon E5472 system with RHEL 6.9 kernel.\n\t\tif _, present := packageCoreThrottles[physicalPackageID]; !present {\n\t\t\tpackageCoreThrottles[physicalPackageID] = make(map[uint64]uint64)\n\t\t}\n\t\tif _, present := packageCoreThrottles[physicalPackageID][coreID]; !present {\n\t\t\t// Read thermal_throttle/core_throttle_count only once\n\t\t\tif coreThrottleCount, err := readUintFromFile(filepath.Join(cpu, \"thermal_throttle\", \"core_throttle_count\")); err == nil {\n\t\t\t\tpackageCoreThrottles[physicalPackageID][coreID] = coreThrottleCount\n\t\t\t} else {\n\t\t\t\tc.logger.Debug(\"CPU is missing core_throttle_count\", \"cpu\", cpu)\n\t\t\t}\n\t\t}\n\n\t\t// metric node_cpu_package_throttles_total\n\t\tif _, present := packageThrottles[physicalPackageID]; !present {\n\t\t\t// Read thermal_throttle/package_throttle_count only once\n\t\t\tif packageThrottleCount, err := readUintFromFile(filepath.Join(cpu, \"thermal_throttle\", \"package_throttle_count\")); err == nil {\n\t\t\t\tpackageThrottles[physicalPackageID] = packageThrottleCount\n\t\t\t} else {\n\t\t\t\tc.logger.Debug(\"CPU is missing package_throttle_count\", \"cpu\", cpu)\n\t\t\t}\n\t\t}\n\t}\n\n\tfor physicalPackageID, packageThrottleCount := range packageThrottles {\n\t\tch <- prometheus.MustNewConstMetric(c.cpuPackageThrottle,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(packageThrottleCount),\n\t\t\tstrconv.FormatUint(physicalPackageID, 10))\n\t}\n\n\tfor physicalPackageID, coreMap := range packageCoreThrottles {\n\t\tfor coreID, coreThrottleCount := range coreMap {\n\t\t\tch <- prometheus.MustNewConstMetric(c.cpuCoreThrottle,\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\tfloat64(coreThrottleCount),\n\t\t\t\tstrconv.FormatUint(physicalPackageID, 10),\n\t\t\t\tstrconv.FormatUint(coreID, 10))\n\t\t}\n\t}\n\treturn nil\n}\n\n// updateIsolated reads /sys/devices/system/cpu/isolated through sysfs and exports isolation level metrics.\nfunc (c *cpuCollector) updateIsolated(ch chan<- prometheus.Metric) {\n\tfor _, cpu := range c.isolatedCpus {\n\t\tcpuNum := strconv.Itoa(int(cpu))\n\t\tch <- prometheus.MustNewConstMetric(c.cpuIsolated, prometheus.GaugeValue, 1.0, cpuNum)\n\t}\n}\n\n// updateOnline reads /sys/devices/system/cpu/cpu*/online through sysfs and exports online status metrics.\nfunc (c *cpuCollector) updateOnline(ch chan<- prometheus.Metric) error {\n\tcpus, err := c.sysfs.CPUs()\n\tif err != nil {\n\t\treturn err\n\t}\n\t// No-op if the system does not support CPU online stats.\n\tcpu0 := cpus[0]\n\tif _, err := cpu0.Online(); err != nil && errors.Is(err, os.ErrNotExist) {\n\t\treturn nil\n\t}\n\tfor _, cpu := range cpus {\n\t\tsetOnline := float64(0)\n\t\tif online, _ := cpu.Online(); online {\n\t\t\tsetOnline = 1\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(c.cpuOnline, prometheus.GaugeValue, setOnline, cpu.Number())\n\t}\n\n\treturn nil\n}\n\n// updateStat reads /proc/stat through procfs and exports CPU-related metrics.\nfunc (c *cpuCollector) updateStat(ch chan<- prometheus.Metric) error {\n\tstats, err := c.procfs.Stat()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tc.updateCPUStats(stats.CPU)\n\n\t// Acquire a lock to read the stats.\n\tc.cpuStatsMutex.Lock()\n\tdefer c.cpuStatsMutex.Unlock()\n\tfor cpuID, cpuStat := range c.cpuStats {\n\t\tcpuNum := strconv.Itoa(int(cpuID))\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, cpuStat.User, cpuNum, \"user\")\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, cpuStat.Nice, cpuNum, \"nice\")\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, cpuStat.System, cpuNum, \"system\")\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, cpuStat.Idle, cpuNum, \"idle\")\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, cpuStat.Iowait, cpuNum, \"iowait\")\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, cpuStat.IRQ, cpuNum, \"irq\")\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, cpuStat.SoftIRQ, cpuNum, \"softirq\")\n\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, cpuStat.Steal, cpuNum, \"steal\")\n\n\t\tif *enableCPUGuest {\n\t\t\t// Guest CPU is also accounted for in cpuStat.User and cpuStat.Nice, expose these as separate metrics.\n\t\t\tch <- prometheus.MustNewConstMetric(c.cpuGuest, prometheus.CounterValue, cpuStat.Guest, cpuNum, \"user\")\n\t\t\tch <- prometheus.MustNewConstMetric(c.cpuGuest, prometheus.CounterValue, cpuStat.GuestNice, cpuNum, \"nice\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// updateCPUStats updates the internal cache of CPU stats.\nfunc (c *cpuCollector) updateCPUStats(newStats map[int64]procfs.CPUStat) {\n\n\t// Acquire a lock to update the stats.\n\tc.cpuStatsMutex.Lock()\n\tdefer c.cpuStatsMutex.Unlock()\n\n\t// Reset the cache if the list of CPUs has changed.\n\tfor i, n := range newStats {\n\t\tcpuStats := c.cpuStats[i]\n\n\t\t// If idle jumps backwards by more than X seconds, assume we had a hotplug event and reset the stats for this CPU.\n\t\tif (cpuStats.Idle - n.Idle) >= jumpBackSeconds {\n\t\t\tc.logger.Debug(jumpBackDebugMessage, \"cpu\", i, \"old_value\", cpuStats.Idle, \"new_value\", n.Idle)\n\t\t\tcpuStats = procfs.CPUStat{}\n\t\t}\n\n\t\tif n.Idle >= cpuStats.Idle {\n\t\t\tcpuStats.Idle = n.Idle\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU Idle counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.Idle, \"new_value\", n.Idle)\n\t\t}\n\n\t\tif n.User >= cpuStats.User {\n\t\t\tcpuStats.User = n.User\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU User counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.User, \"new_value\", n.User)\n\t\t}\n\n\t\tif n.Nice >= cpuStats.Nice {\n\t\t\tcpuStats.Nice = n.Nice\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU Nice counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.Nice, \"new_value\", n.Nice)\n\t\t}\n\n\t\tif n.System >= cpuStats.System {\n\t\t\tcpuStats.System = n.System\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU System counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.System, \"new_value\", n.System)\n\t\t}\n\n\t\tif n.Iowait >= cpuStats.Iowait {\n\t\t\tcpuStats.Iowait = n.Iowait\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU Iowait counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.Iowait, \"new_value\", n.Iowait)\n\t\t}\n\n\t\tif n.IRQ >= cpuStats.IRQ {\n\t\t\tcpuStats.IRQ = n.IRQ\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU IRQ counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.IRQ, \"new_value\", n.IRQ)\n\t\t}\n\n\t\tif n.SoftIRQ >= cpuStats.SoftIRQ {\n\t\t\tcpuStats.SoftIRQ = n.SoftIRQ\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU SoftIRQ counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.SoftIRQ, \"new_value\", n.SoftIRQ)\n\t\t}\n\n\t\tif n.Steal >= cpuStats.Steal {\n\t\t\tcpuStats.Steal = n.Steal\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU Steal counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.Steal, \"new_value\", n.Steal)\n\t\t}\n\n\t\tif n.Guest >= cpuStats.Guest {\n\t\t\tcpuStats.Guest = n.Guest\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU Guest counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.Guest, \"new_value\", n.Guest)\n\t\t}\n\n\t\tif n.GuestNice >= cpuStats.GuestNice {\n\t\t\tcpuStats.GuestNice = n.GuestNice\n\t\t} else {\n\t\t\tc.logger.Debug(\"CPU GuestNice counter jumped backwards\", \"cpu\", i, \"old_value\", cpuStats.GuestNice, \"new_value\", n.GuestNice)\n\t\t}\n\n\t\tc.cpuStats[i] = cpuStats\n\t}\n\n\t// Remove offline CPUs.\n\tif len(newStats) != len(c.cpuStats) {\n\t\tonlineCPUIds := slices.Collect(maps.Keys(newStats))\n\t\tmaps.DeleteFunc(c.cpuStats, func(key int64, item procfs.CPUStat) bool {\n\t\t\treturn !slices.Contains(onlineCPUIds, key)\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "collector/cpu_linux_test.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/prometheus/procfs\"\n)\n\nfunc copyStats(d, s map[int64]procfs.CPUStat) {\n\tfor k := range s {\n\t\tv := s[k]\n\t\td[k] = v\n\t}\n}\n\nfunc makeTestCPUCollector(s map[int64]procfs.CPUStat) *cpuCollector {\n\tdup := make(map[int64]procfs.CPUStat, len(s))\n\tcopyStats(dup, s)\n\treturn &cpuCollector{\n\t\tlogger:   slog.New(slog.NewTextHandler(io.Discard, nil)),\n\t\tcpuStats: dup,\n\t}\n}\n\nfunc TestCPU(t *testing.T) {\n\tfirstCPUStat := map[int64]procfs.CPUStat{\n\t\t0: {\n\t\t\tUser:      100.0,\n\t\t\tNice:      100.0,\n\t\t\tSystem:    100.0,\n\t\t\tIdle:      100.0,\n\t\t\tIowait:    100.0,\n\t\t\tIRQ:       100.0,\n\t\t\tSoftIRQ:   100.0,\n\t\t\tSteal:     100.0,\n\t\t\tGuest:     100.0,\n\t\t\tGuestNice: 100.0,\n\t\t}}\n\n\tc := makeTestCPUCollector(firstCPUStat)\n\twant := map[int64]procfs.CPUStat{\n\t\t0: {\n\t\t\tUser:      101.0,\n\t\t\tNice:      101.0,\n\t\t\tSystem:    101.0,\n\t\t\tIdle:      101.0,\n\t\t\tIowait:    101.0,\n\t\t\tIRQ:       101.0,\n\t\t\tSoftIRQ:   101.0,\n\t\t\tSteal:     101.0,\n\t\t\tGuest:     101.0,\n\t\t\tGuestNice: 101.0,\n\t\t}}\n\tc.updateCPUStats(want)\n\tgot := c.cpuStats\n\tif !reflect.DeepEqual(want, got) {\n\t\tt.Fatalf(\"should have %v CPU Stat: got %v\", want, got)\n\t}\n\n\tc = makeTestCPUCollector(firstCPUStat)\n\tjumpBack := map[int64]procfs.CPUStat{\n\t\t0: {\n\t\t\tUser:      99.9,\n\t\t\tNice:      99.9,\n\t\t\tSystem:    99.9,\n\t\t\tIdle:      99.9,\n\t\t\tIowait:    99.9,\n\t\t\tIRQ:       99.9,\n\t\t\tSoftIRQ:   99.9,\n\t\t\tSteal:     99.9,\n\t\t\tGuest:     99.9,\n\t\t\tGuestNice: 99.9,\n\t\t}}\n\tc.updateCPUStats(jumpBack)\n\tgot = c.cpuStats\n\tif reflect.DeepEqual(jumpBack, got) {\n\t\tt.Fatalf(\"should have %v CPU Stat: got %v\", firstCPUStat, got)\n\t}\n\n\tc = makeTestCPUCollector(firstCPUStat)\n\tresetIdle := map[int64]procfs.CPUStat{\n\t\t0: {\n\t\t\tUser:      102.0,\n\t\t\tNice:      102.0,\n\t\t\tSystem:    102.0,\n\t\t\tIdle:      1.0,\n\t\t\tIowait:    102.0,\n\t\t\tIRQ:       102.0,\n\t\t\tSoftIRQ:   102.0,\n\t\t\tSteal:     102.0,\n\t\t\tGuest:     102.0,\n\t\t\tGuestNice: 102.0,\n\t\t}}\n\tc.updateCPUStats(resetIdle)\n\tgot = c.cpuStats\n\tif !reflect.DeepEqual(resetIdle, got) {\n\t\tt.Fatalf(\"should have %v CPU Stat: got %v\", resetIdle, got)\n\t}\n}\n\nfunc TestCPUOffline(t *testing.T) {\n\t// CPU 1 goes offline.\n\tfirstCPUStat := map[int64]procfs.CPUStat{\n\t\t0: {\n\t\t\tUser:      100.0,\n\t\t\tNice:      100.0,\n\t\t\tSystem:    100.0,\n\t\t\tIdle:      100.0,\n\t\t\tIowait:    100.0,\n\t\t\tIRQ:       100.0,\n\t\t\tSoftIRQ:   100.0,\n\t\t\tSteal:     100.0,\n\t\t\tGuest:     100.0,\n\t\t\tGuestNice: 100.0,\n\t\t},\n\t\t1: {\n\t\t\tUser:      101.0,\n\t\t\tNice:      101.0,\n\t\t\tSystem:    101.0,\n\t\t\tIdle:      101.0,\n\t\t\tIowait:    101.0,\n\t\t\tIRQ:       101.0,\n\t\t\tSoftIRQ:   101.0,\n\t\t\tSteal:     101.0,\n\t\t\tGuest:     101.0,\n\t\t\tGuestNice: 101.0,\n\t\t},\n\t}\n\n\tc := makeTestCPUCollector(firstCPUStat)\n\twant := map[int64]procfs.CPUStat{\n\t\t0: {\n\t\t\tUser:      100.0,\n\t\t\tNice:      100.0,\n\t\t\tSystem:    100.0,\n\t\t\tIdle:      100.0,\n\t\t\tIowait:    100.0,\n\t\t\tIRQ:       100.0,\n\t\t\tSoftIRQ:   100.0,\n\t\t\tSteal:     100.0,\n\t\t\tGuest:     100.0,\n\t\t\tGuestNice: 100.0,\n\t\t},\n\t}\n\tc.updateCPUStats(want)\n\tgot := c.cpuStats\n\tif !reflect.DeepEqual(want, got) {\n\t\tt.Fatalf(\"should have %v CPU Stat: got %v\", want, got)\n\t}\n\n\t// CPU 1 comes back online.\n\twant = map[int64]procfs.CPUStat{\n\t\t0: {\n\t\t\tUser:      100.0,\n\t\t\tNice:      100.0,\n\t\t\tSystem:    100.0,\n\t\t\tIdle:      100.0,\n\t\t\tIowait:    100.0,\n\t\t\tIRQ:       100.0,\n\t\t\tSoftIRQ:   100.0,\n\t\t\tSteal:     100.0,\n\t\t\tGuest:     100.0,\n\t\t\tGuestNice: 100.0,\n\t\t},\n\t\t1: {\n\t\t\tUser:      101.0,\n\t\t\tNice:      101.0,\n\t\t\tSystem:    101.0,\n\t\t\tIdle:      101.0,\n\t\t\tIowait:    101.0,\n\t\t\tIRQ:       101.0,\n\t\t\tSoftIRQ:   101.0,\n\t\t\tSteal:     101.0,\n\t\t\tGuest:     101.0,\n\t\t\tGuestNice: 101.0,\n\t\t},\n\t}\n\tc.updateCPUStats(want)\n\tgot = c.cpuStats\n\tif !reflect.DeepEqual(want, got) {\n\t\tt.Fatalf(\"should have %v CPU Stat: got %v\", want, got)\n\t}\n\n}\n"
  },
  {
    "path": "collector/cpu_netbsd.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"log/slog\"\n\t\"math\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n\n\t\"howett.net/plist\"\n)\n\nconst (\n\t_IOC_OUT        = uint(0x40000000)\n\t_IOC_IN         = uint(0x80000000)\n\t_IOC_INOUT      = (_IOC_IN | _IOC_OUT)\n\t_IOCPARM_MASK   = uint(0x1fff)\n\t_IOCPARM_SHIFT  = uint(16)\n\t_IOCGROUP_SHIFT = uint(8)\n)\n\ntype clockinfo struct {\n\thz     int32 // clock frequency\n\ttick   int32 // micro-seconds per hz tick\n\tspare  int32\n\tstathz int32 // statistics clock frequency\n\tprofhz int32 // profiling clock frequency\n}\n\ntype cputime struct {\n\tuser float64\n\tnice float64\n\tsys  float64\n\tintr float64\n\tidle float64\n}\n\ntype plistref struct {\n\tpref_plist unsafe.Pointer\n\tpref_len   uint\n}\n\ntype sysmonValues struct {\n\tCurValue    int    `plist:\"cur-value\"`\n\tDescription string `plist:\"description\"`\n\tState       string `plist:\"state\"`\n\tType        string `plist:\"type\"`\n}\n\ntype sysmonProperty []sysmonValues\n\ntype sysmonProperties map[string]sysmonProperty\n\nfunc _IOC(inout uint, group byte, num uint, len uintptr) uint {\n\treturn ((inout) | ((uint(len) & _IOCPARM_MASK) << _IOCPARM_SHIFT) | (uint(group) << _IOCGROUP_SHIFT) | (num))\n}\n\nfunc _IOWR(group byte, num uint, len uintptr) uint {\n\treturn _IOC(_IOC_INOUT, group, num, len)\n}\n\nfunc ioctl(fd int, nr uint, typ byte, size uintptr, retptr unsafe.Pointer) error {\n\t_, _, errno := unix.Syscall(\n\t\tunix.SYS_IOCTL,\n\t\tuintptr(fd),\n\t\tuintptr(_IOWR(typ, nr, size)),\n\t\tuintptr(retptr),\n\t)\n\tif errno != 0 {\n\t\treturn errno\n\t}\n\treturn nil\n}\n\nfunc readSysmonProperties() (sysmonProperties, error) {\n\tfd, err := unix.Open(rootfsFilePath(\"/dev/sysmon\"), unix.O_RDONLY, 0)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer unix.Close(fd)\n\n\tvar retptr plistref\n\n\tif err = ioctl(fd, 0, 'E', unsafe.Sizeof(retptr), unsafe.Pointer(&retptr)); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer unix.Syscall(unix.SYS_MUNMAP, uintptr(retptr.pref_plist), uintptr(retptr.pref_len), uintptr(0))\n\tbytes := unsafe.Slice((*byte)(unsafe.Pointer(retptr.pref_plist)), retptr.pref_len-1)\n\n\tvar props sysmonProperties\n\tif _, err = plist.Unmarshal(bytes, &props); err != nil {\n\t\treturn nil, err\n\t}\n\treturn props, nil\n}\n\nfunc sortFilterSysmonProperties(props sysmonProperties, prefix string) []string {\n\tvar keys []string\n\tfor key := range props {\n\t\tif !strings.HasPrefix(key, prefix) {\n\t\t\tcontinue\n\t\t}\n\t\tkeys = append(keys, key)\n\t}\n\tsort.Strings(keys)\n\treturn keys\n}\n\nfunc convertTemperatures(prop sysmonProperty, res map[int]float64) error {\n\n\tfor _, val := range prop {\n\t\tif val.State == \"invalid\" || val.State == \"unknown\" || val.State == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tre := regexp.MustCompile(\"^cpu([0-9]+) temperature$\")\n\t\tcore := re.FindStringSubmatch(val.Description)[1]\n\t\tncore, _ := strconv.Atoi(core)\n\t\ttemperature := ((float64(uint64(val.CurValue))) / 1000000) - 273.15\n\t\tres[ncore] = temperature\n\t}\n\treturn nil\n}\n\nfunc getCPUTemperatures() (map[int]float64, error) {\n\n\tres := make(map[int]float64)\n\n\t// Read all properties\n\tprops, err := readSysmonProperties()\n\tif err != nil {\n\t\treturn res, err\n\t}\n\n\tkeys := sortFilterSysmonProperties(props, \"coretemp\")\n\tfor idx := range keys {\n\t\tconvertTemperatures(props[keys[idx]], res)\n\t}\n\n\treturn res, nil\n}\n\nfunc getCPUTimes() ([]cputime, error) {\n\tconst states = 5\n\n\tclockb, err := unix.SysctlRaw(\"kern.clockrate\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclock := *(*clockinfo)(unsafe.Pointer(&clockb[0]))\n\n\tvar cpufreq float64\n\tif clock.stathz > 0 {\n\t\tcpufreq = float64(clock.stathz)\n\t} else {\n\t\tcpufreq = float64(clock.hz)\n\t}\n\n\tncpusb, err := unix.SysctlRaw(\"hw.ncpu\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tncpus := int(*(*uint32)(unsafe.Pointer(&ncpusb[0])))\n\n\tif ncpus < 1 {\n\t\treturn nil, errors.New(\"Invalid cpu number\")\n\t}\n\n\tvar times []float64\n\tfor ncpu := 0; ncpu < ncpus; ncpu++ {\n\t\tcpb, err := unix.SysctlRaw(\"kern.cp_time\", ncpu)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor len(cpb) >= int(unsafe.Sizeof(uint64(0))) {\n\t\t\tt := *(*uint64)(unsafe.Pointer(&cpb[0]))\n\t\t\ttimes = append(times, float64(t)/cpufreq)\n\t\t\tcpb = cpb[unsafe.Sizeof(uint64(0)):]\n\t\t}\n\t}\n\n\tcpus := make([]cputime, len(times)/states)\n\tfor i := 0; i < len(times); i += states {\n\t\tcpu := &cpus[i/states]\n\t\tcpu.user = times[i]\n\t\tcpu.nice = times[i+1]\n\t\tcpu.sys = times[i+2]\n\t\tcpu.intr = times[i+3]\n\t\tcpu.idle = times[i+4]\n\t}\n\treturn cpus, nil\n}\n\ntype statCollector struct {\n\tcpu    typedDesc\n\ttemp   typedDesc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"cpu\", defaultEnabled, NewStatCollector)\n}\n\n// NewStatCollector returns a new Collector exposing CPU stats.\nfunc NewStatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &statCollector{\n\t\tcpu: typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},\n\t\ttemp: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"temperature_celsius\"),\n\t\t\t\"CPU temperature\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Expose CPU stats using sysctl.\nfunc (c *statCollector) Update(ch chan<- prometheus.Metric) error {\n\t// We want time spent per-cpu per CPUSTATE.\n\t// CPUSTATES (number of CPUSTATES) is defined as 5U.\n\t// Order: CP_USER | CP_NICE | CP_SYS | CP_IDLE | CP_INTR\n\t// sysctl kern.cp_time.x provides CPUSTATES long integers:\n\t//  (space-separated list of the above variables, where\n\t//   x stands for the number of the CPU core)\n\t//\n\t// Each value is a counter incremented at frequency\n\t//   kern.clockrate.(stathz | hz)\n\t//\n\t// Look into sys/kern/kern_clock.c for details.\n\n\tcpuTimes, err := getCPUTimes()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tcpuTemperatures, err := getCPUTemperatures()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor cpu, t := range cpuTimes {\n\t\tlcpu := strconv.Itoa(cpu)\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.user), lcpu, \"user\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.nice), lcpu, \"nice\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.sys), lcpu, \"system\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.intr), lcpu, \"interrupt\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(t.idle), lcpu, \"idle\")\n\n\t\tif temp, ok := cpuTemperatures[cpu]; ok {\n\t\t\tch <- c.temp.mustNewConstMetric(temp, lcpu)\n\t\t} else {\n\t\t\tc.logger.Debug(\"no temperature information for CPU\", \"cpu\", cpu)\n\t\t\tch <- c.temp.mustNewConstMetric(math.NaN(), lcpu)\n\t\t}\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "collector/cpu_netbsd_test.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"runtime\"\n\t\"testing\"\n)\n\nfunc TestCPUTimes(t *testing.T) {\n\ttimes, err := getCPUTimes()\n\tif err != nil {\n\t\tt.Fatalf(\"getCPUTimes returned error: %v\", err)\n\t}\n\n\tif len(times) == 0 {\n\t\tt.Fatalf(\"no CPU times found\")\n\t}\n\n\tif got, want := len(times), runtime.NumCPU(); got != want {\n\t\tt.Fatalf(\"unexpected # of CPU times; got %d want %d\", got, want)\n\t}\n}\n\nfunc TestCPUTemperatures(t *testing.T) {\n\t_, err := getCPUTemperatures()\n\tif err != nil {\n\t\tt.Fatalf(\"getCPUTemperatures returned error: %v\", err)\n\t}\n}\n"
  },
  {
    "path": "collector/cpu_openbsd.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\t\"strconv\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tCP_USER = iota\n\tCP_NICE\n\tCP_SYS\n\tCP_SPIN\n\tCP_INTR\n\tCP_IDLE\n\tCPUSTATES\n)\nconst (\n\tCP_USER_O63 = iota\n\tCP_NICE_O63\n\tCP_SYS_O63\n\tCP_INTR_O63\n\tCP_IDLE_O63\n\tCPUSTATES_O63\n)\n\ntype cpuCollector struct {\n\tcpu    typedDesc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"cpu\", defaultEnabled, NewCPUCollector)\n}\n\nfunc NewCPUCollector(logger *slog.Logger) (Collector, error) {\n\treturn &cpuCollector{\n\t\tcpu:    typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *cpuCollector) Update(ch chan<- prometheus.Metric) (err error) {\n\tclockb, err := unix.SysctlRaw(\"kern.clockrate\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tclock := *(*unix.Clockinfo)(unsafe.Pointer(&clockb[0]))\n\thz := float64(clock.Stathz)\n\n\tncpus, err := unix.SysctlUint32(\"hw.ncpu\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar cpTime [][CPUSTATES]uint64\n\tfor i := 0; i < int(ncpus); i++ {\n\t\tcpb, err := unix.SysctlRaw(\"kern.cp_time2\", i)\n\t\tif err != nil && err != unix.ENODEV {\n\t\t\treturn err\n\t\t}\n\t\tif err != unix.ENODEV {\n\t\t\tvar times [CPUSTATES]uint64\n\t\t\tfor n := 0; n < len(cpb); n += 8 {\n\t\t\t\ttimes[n/8] = *(*uint64)(unsafe.Pointer(&cpb[n]))\n\t\t\t}\n\t\t\tif len(cpb)/8 == CPUSTATES_O63 {\n\t\t\t\tcopy(times[CP_INTR:], times[CP_INTR_O63:])\n\t\t\t\ttimes[CP_SPIN] = 0\n\t\t\t}\n\t\t\tcpTime = append(cpTime, times)\n\t\t}\n\t}\n\n\tfor cpu, time := range cpTime {\n\t\tlcpu := strconv.Itoa(cpu)\n\t\tch <- c.cpu.mustNewConstMetric(float64(time[CP_USER])/hz, lcpu, \"user\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(time[CP_NICE])/hz, lcpu, \"nice\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(time[CP_SYS])/hz, lcpu, \"system\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(time[CP_SPIN])/hz, lcpu, \"spin\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(time[CP_INTR])/hz, lcpu, \"interrupt\")\n\t\tch <- c.cpu.mustNewConstMetric(float64(time[CP_IDLE])/hz, lcpu, \"idle\")\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "collector/cpu_solaris.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\t\"strconv\"\n\n\t\"github.com/illumos/go-kstat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// #include <unistd.h>\nimport \"C\"\n\ntype cpuCollector struct {\n\tcpu    typedDesc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"cpu\", defaultEnabled, NewCpuCollector)\n}\n\nfunc NewCpuCollector(logger *slog.Logger) (Collector, error) {\n\treturn &cpuCollector{\n\t\tcpu:    typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {\n\tncpus := C.sysconf(C._SC_NPROCESSORS_ONLN)\n\n\ttok, err := kstat.Open()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer tok.Close()\n\n\tfor cpu := 0; cpu < int(ncpus); cpu++ {\n\t\tksCPU, err := tok.Lookup(\"cpu\", cpu, \"sys\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfor k, v := range map[string]string{\n\t\t\t\"idle\":   \"cpu_nsec_idle\",\n\t\t\t\"kernel\": \"cpu_nsec_kernel\",\n\t\t\t\"user\":   \"cpu_nsec_user\",\n\t\t\t\"wait\":   \"cpu_nsec_wait\",\n\t\t} {\n\t\t\tkstatValue, err := ksCPU.GetNamed(v)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tch <- c.cpu.mustNewConstMetric(float64(kstatValue.UintVal)/1e9, strconv.Itoa(cpu), k)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/cpu_vulnerabilities_linux.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nconst (\n\tcpuVulnerabilitiesCollectorSubsystem = \"cpu_vulnerabilities\"\n)\n\nvar (\n\tvulnerabilityDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuVulnerabilitiesCollectorSubsystem, \"info\"),\n\t\t\"Details of each CPU vulnerability reported by sysfs. The value of the series is an int encoded state of the vulnerability. The same state is stored as a string in the label\",\n\t\t[]string{\"codename\", \"state\", \"mitigation\"},\n\t\tnil,\n\t)\n)\n\ntype cpuVulnerabilitiesCollector struct{}\n\nfunc init() {\n\tregisterCollector(cpuVulnerabilitiesCollectorSubsystem, defaultDisabled, NewVulnerabilitySysfsCollector)\n}\n\nfunc NewVulnerabilitySysfsCollector(logger *slog.Logger) (Collector, error) {\n\treturn &cpuVulnerabilitiesCollector{}, nil\n}\n\nfunc (v *cpuVulnerabilitiesCollector) Update(ch chan<- prometheus.Metric) error {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\tvulnerabilities, err := fs.CPUVulnerabilities()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get vulnerabilities: %w\", err)\n\t}\n\n\tfor _, vulnerability := range vulnerabilities {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tvulnerabilityDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\t1.0,\n\t\t\tvulnerability.CodeName,\n\t\t\tsysfs.VulnerabilityHumanEncoding[vulnerability.State],\n\t\t\tvulnerability.Mitigation,\n\t\t)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/cpufreq_common.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tcpuFreqHertzDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"frequency_hertz\"),\n\t\t\"Current CPU thread frequency in hertz.\",\n\t\t[]string{\"cpu\"}, nil,\n\t)\n\tcpuFreqMinDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"frequency_min_hertz\"),\n\t\t\"Minimum CPU thread frequency in hertz.\",\n\t\t[]string{\"cpu\"}, nil,\n\t)\n\tcpuFreqMaxDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"frequency_max_hertz\"),\n\t\t\"Maximum CPU thread frequency in hertz.\",\n\t\t[]string{\"cpu\"}, nil,\n\t)\n\tcpuFreqScalingFreqDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"scaling_frequency_hertz\"),\n\t\t\"Current scaled CPU thread frequency in hertz.\",\n\t\t[]string{\"cpu\"}, nil,\n\t)\n\tcpuFreqScalingFreqMinDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"scaling_frequency_min_hertz\"),\n\t\t\"Minimum scaled CPU thread frequency in hertz.\",\n\t\t[]string{\"cpu\"}, nil,\n\t)\n\tcpuFreqScalingFreqMaxDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"scaling_frequency_max_hertz\"),\n\t\t\"Maximum scaled CPU thread frequency in hertz.\",\n\t\t[]string{\"cpu\"}, nil,\n\t)\n\tcpuFreqScalingGovernorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, cpuCollectorSubsystem, \"scaling_governor\"),\n\t\t\"Current enabled CPU frequency governor.\",\n\t\t[]string{\"cpu\", \"governor\"}, nil,\n\t)\n)\n"
  },
  {
    "path": "collector/cpufreq_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\ntype cpuFreqCollector struct {\n\tfs     sysfs.FS\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"cpufreq\", defaultEnabled, NewCPUFreqCollector)\n}\n\n// NewCPUFreqCollector returns a new Collector exposing kernel/system statistics.\nfunc NewCPUFreqCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\treturn &cpuFreqCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update implements Collector and exposes cpu related metrics from /proc/stat and /sys/.../cpu/.\nfunc (c *cpuFreqCollector) Update(ch chan<- prometheus.Metric) error {\n\tcpuFreqs, err := c.fs.SystemCpufreq()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// sysfs cpufreq values are kHz, thus multiply by 1000 to export base units (hz).\n\t// See https://www.kernel.org/doc/Documentation/cpu-freq/user-guide.txt\n\tfor _, stats := range cpuFreqs {\n\t\tif stats.CpuinfoCurrentFrequency != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tcpuFreqHertzDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(*stats.CpuinfoCurrentFrequency)*1000.0,\n\t\t\t\tstats.Name,\n\t\t\t)\n\t\t}\n\t\tif stats.CpuinfoMinimumFrequency != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tcpuFreqMinDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(*stats.CpuinfoMinimumFrequency)*1000.0,\n\t\t\t\tstats.Name,\n\t\t\t)\n\t\t}\n\t\tif stats.CpuinfoMaximumFrequency != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tcpuFreqMaxDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(*stats.CpuinfoMaximumFrequency)*1000.0,\n\t\t\t\tstats.Name,\n\t\t\t)\n\t\t}\n\t\tif stats.ScalingCurrentFrequency != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tcpuFreqScalingFreqDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(*stats.ScalingCurrentFrequency)*1000.0,\n\t\t\t\tstats.Name,\n\t\t\t)\n\t\t}\n\t\tif stats.ScalingMinimumFrequency != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tcpuFreqScalingFreqMinDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(*stats.ScalingMinimumFrequency)*1000.0,\n\t\t\t\tstats.Name,\n\t\t\t)\n\t\t}\n\t\tif stats.ScalingMaximumFrequency != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tcpuFreqScalingFreqMaxDesc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(*stats.ScalingMaximumFrequency)*1000.0,\n\t\t\t\tstats.Name,\n\t\t\t)\n\t\t}\n\t\tif stats.Governor != \"\" {\n\t\t\tavailableGovernors := strings.SplitSeq(stats.AvailableGovernors, \" \")\n\t\t\tfor g := range availableGovernors {\n\t\t\t\tstate := 0\n\t\t\t\tif g == stats.Governor {\n\t\t\t\t\tstate = 1\n\t\t\t\t}\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tcpuFreqScalingGovernorDesc,\n\t\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t\tfloat64(state),\n\t\t\t\t\tstats.Name,\n\t\t\t\t\tg,\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/cpufreq_solaris.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nocpu\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\n\t\"github.com/illumos/go-kstat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// #include <unistd.h>\nimport \"C\"\n\ntype cpuFreqCollector struct {\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"cpufreq\", defaultEnabled, NewCpuFreqCollector)\n}\n\nfunc NewCpuFreqCollector(logger *slog.Logger) (Collector, error) {\n\treturn &cpuFreqCollector{\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *cpuFreqCollector) Update(ch chan<- prometheus.Metric) error {\n\tncpus := C.sysconf(C._SC_NPROCESSORS_ONLN)\n\n\ttok, err := kstat.Open()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer tok.Close()\n\n\tfor cpu := 0; cpu < int(ncpus); cpu++ {\n\t\tksCPUInfo, err := tok.Lookup(\"cpu_info\", cpu, fmt.Sprintf(\"cpu_info%d\", cpu))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcpuFreqV, err := ksCPUInfo.GetNamed(\"current_clock_Hz\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tcpuFreqMaxV, err := ksCPUInfo.GetNamed(\"clock_MHz\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tlcpu := strconv.Itoa(cpu)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tcpuFreqHertzDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(cpuFreqV.UintVal),\n\t\t\tlcpu,\n\t\t)\n\t\t// Multiply by 1e+6 to convert MHz to Hz.\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tcpuFreqMaxDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(cpuFreqMaxV.IntVal)*1e+6,\n\t\t\tlcpu,\n\t\t)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/device_filter.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"regexp\"\n)\n\ntype deviceFilter struct {\n\tignorePattern *regexp.Regexp\n\tacceptPattern *regexp.Regexp\n}\n\nfunc newDeviceFilter(ignoredPattern, acceptPattern string) (f deviceFilter) {\n\tif ignoredPattern != \"\" {\n\t\tf.ignorePattern = regexp.MustCompile(ignoredPattern)\n\t}\n\n\tif acceptPattern != \"\" {\n\t\tf.acceptPattern = regexp.MustCompile(acceptPattern)\n\t}\n\n\treturn\n}\n\n// ignored returns whether the device should be ignored\nfunc (f *deviceFilter) ignored(name string) bool {\n\treturn (f.ignorePattern != nil && f.ignorePattern.MatchString(name)) ||\n\t\t(f.acceptPattern != nil && !f.acceptPattern.MatchString(name))\n}\n"
  },
  {
    "path": "collector/device_filter_test.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"testing\"\n)\n\nfunc TestDeviceFilter(t *testing.T) {\n\ttests := []struct {\n\t\tignore         string\n\t\taccept         string\n\t\tname           string\n\t\texpectedResult bool\n\t}{\n\t\t{\"\", \"\", \"eth0\", false},\n\t\t{\"\", \"^💩0$\", \"💩0\", false},\n\t\t{\"\", \"^💩0$\", \"💩1\", true},\n\t\t{\"\", \"^💩0$\", \"veth0\", true},\n\t\t{\"^💩\", \"\", \"💩3\", true},\n\t\t{\"^💩\", \"\", \"veth0\", false},\n\t}\n\n\tfor _, test := range tests {\n\t\tfilter := newDeviceFilter(test.ignore, test.accept)\n\t\tresult := filter.ignored(test.name)\n\n\t\tif result != test.expectedResult {\n\t\t\tt.Errorf(\"ignorePattern=%v acceptPattern=%v ifname=%v expected=%v result=%v\", test.ignore, test.accept, test.name, test.expectedResult, result)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "collector/devstat_dragonfly.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodevstat\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n/*\n#cgo LDFLAGS: -ldevstat\n#include <devstat.h>\n#include <stdlib.h>\n#include <string.h>\n\ntypedef struct {\n\tchar\t\tdevice[DEVSTAT_NAME_LEN];\n\tint\t\tunit;\n\tuint64_t\tbytes;\n\tuint64_t\ttransfers;\n\tuint64_t\tblocks;\n} Stats;\n\nint _get_ndevs() {\n\tstruct statinfo current;\n\tint num_devices;\n\n\tcurrent.dinfo = (struct devinfo *)calloc(1, sizeof(struct devinfo));\n\tif (current.dinfo == NULL)\n\t\treturn -2;\n\n\tcheckversion();\n\n\tif (getdevs(&current) == -1)\n\t\treturn -1;\n\n\treturn current.dinfo->numdevs;\n}\n\nStats _get_stats(int i) {\n\tstruct statinfo current;\n\tint num_devices;\n\n\tcurrent.dinfo = (struct devinfo *)calloc(1, sizeof(struct devinfo));\n\tgetdevs(&current);\n\n\tnum_devices = current.dinfo->numdevs;\n\tStats stats;\n\n\tuint64_t total_bytes, total_transfers, total_blocks;\n\tlong double kb_per_transfer, transfers_per_second, mb_per_second, blocks_per_second, ms_per_transaction;\n\n\tstrcpy(stats.device, current.dinfo->devices[i].device_name);\n\tstats.unit = current.dinfo->devices[i].unit_number;\n\tcompute_stats(&current.dinfo->devices[i],\n\t\tNULL,\n\t\t1.0,\n\t\t&total_bytes,\n\t\t&total_transfers,\n\t\t&total_blocks,\n\t\t&kb_per_transfer,\n\t\t&transfers_per_second,\n\t\t&mb_per_second,\n\t\t&blocks_per_second,\n\t\t&ms_per_transaction);\n\n\tstats.bytes = total_bytes;\n\tstats.transfers = total_transfers;\n\tstats.blocks = total_blocks;\n\n        return stats;\n}\n*/\nimport \"C\"\n\nconst (\n\tdevstatSubsystem = \"devstat\"\n)\n\ntype devstatCollector struct {\n\tbytesDesc     *prometheus.Desc\n\ttransfersDesc *prometheus.Desc\n\tblocksDesc    *prometheus.Desc\n\tlogger        *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"devstat\", defaultDisabled, NewDevstatCollector)\n}\n\n// NewDevstatCollector returns a new Collector exposing Device stats.\nfunc NewDevstatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &devstatCollector{\n\t\tbytesDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, devstatSubsystem, \"bytes_total\"),\n\t\t\t\"The total number of bytes transferred for reads and writes on the device.\",\n\t\t\t[]string{\"device\"}, nil,\n\t\t),\n\t\ttransfersDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, devstatSubsystem, \"transfers_total\"),\n\t\t\t\"The total number of transactions completed.\",\n\t\t\t[]string{\"device\"}, nil,\n\t\t),\n\t\tblocksDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, devstatSubsystem, \"blocks_total\"),\n\t\t\t\"The total number of bytes given in terms of the devices blocksize.\",\n\t\t\t[]string{\"device\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *devstatCollector) Update(ch chan<- prometheus.Metric) error {\n\tcount := C._get_ndevs()\n\tif count == -1 {\n\t\treturn errors.New(\"getdevs() failed\")\n\t}\n\tif count == -2 {\n\t\treturn errors.New(\"calloc() failed\")\n\t}\n\n\tfor i := C.int(0); i < count; i++ {\n\t\tstats := C._get_stats(i)\n\t\tdevice := fmt.Sprintf(\"%s%d\", C.GoString(&stats.device[0]), stats.unit)\n\n\t\tch <- prometheus.MustNewConstMetric(c.bytesDesc, prometheus.CounterValue, float64(stats.bytes), device)\n\t\tch <- prometheus.MustNewConstMetric(c.transfersDesc, prometheus.CounterValue, float64(stats.transfers), device)\n\t\tch <- prometheus.MustNewConstMetric(c.blocksDesc, prometheus.CounterValue, float64(stats.blocks), device)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/devstat_freebsd.c",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// +build !nodevstat\n\n#include <devstat.h>\n#include <fcntl.h>\n#include <libgeom.h>\n#include <limits.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <devstat_freebsd.h>\n\n\nint _get_stats(struct devinfo *info, Stats **stats) {\n\tstruct statinfo current;\n\tcurrent.dinfo = info;\n\n\tif (devstat_getdevs(NULL, &current) == -1) {\n\t\treturn -1;\n\t}\n\n\tStats *p = (Stats*)calloc(current.dinfo->numdevs, sizeof(Stats));\n\tfor (int i = 0; i < current.dinfo->numdevs; i++) {\n\t\tuint64_t bytes_read, bytes_write, bytes_free;\n\t\tuint64_t transfers_other, transfers_read, transfers_write, transfers_free;\n\t\tlong double duration_other, duration_read, duration_write, duration_free;\n\t\tlong double busy_time;\n\t\tuint64_t blocks;\n\n\t\tstrcpy(p[i].device, current.dinfo->devices[i].device_name);\n\t\tp[i].unit = current.dinfo->devices[i].unit_number;\n\t\tdevstat_compute_statistics(&current.dinfo->devices[i],\n\t\t\t\tNULL,\n\t\t\t\t1.0,\n\t\t\t\tDSM_TOTAL_BYTES_READ, &bytes_read,\n\t\t\t\tDSM_TOTAL_BYTES_WRITE, &bytes_write,\n\t\t\t\tDSM_TOTAL_BYTES_FREE, &bytes_free,\n\t\t\t\tDSM_TOTAL_TRANSFERS_OTHER, &transfers_other,\n\t\t\t\tDSM_TOTAL_TRANSFERS_READ, &transfers_read,\n\t\t\t\tDSM_TOTAL_TRANSFERS_WRITE, &transfers_write,\n\t\t\t\tDSM_TOTAL_TRANSFERS_FREE, &transfers_free,\n\t\t\t\tDSM_TOTAL_DURATION_OTHER, &duration_other,\n\t\t\t\tDSM_TOTAL_DURATION_READ, &duration_read,\n\t\t\t\tDSM_TOTAL_DURATION_WRITE, &duration_write,\n\t\t\t\tDSM_TOTAL_DURATION_FREE, &duration_free,\n\t\t\t\tDSM_TOTAL_BUSY_TIME, &busy_time,\n\t\t\t\tDSM_TOTAL_BLOCKS, &blocks,\n\t\t\t\tDSM_NONE);\n\n\t\tp[i].bytes.read = bytes_read;\n\t\tp[i].bytes.write = bytes_write;\n\t\tp[i].bytes.free = bytes_free;\n\t\tp[i].transfers.other = transfers_other;\n\t\tp[i].transfers.read = transfers_read;\n\t\tp[i].transfers.write = transfers_write;\n\t\tp[i].transfers.free = transfers_free;\n\t\tp[i].duration.other = duration_other;\n\t\tp[i].duration.read = duration_read;\n\t\tp[i].duration.write = duration_write;\n\t\tp[i].duration.free = duration_free;\n\t\tp[i].busyTime = busy_time;\n\t\tp[i].blocks = blocks;\n\t}\n\n\t*stats = p;\n\treturn current.dinfo->numdevs;\n}\n"
  },
  {
    "path": "collector/devstat_freebsd.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodevstat\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"sync\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// #cgo LDFLAGS: -ldevstat -lkvm -lelf\n// #include \"devstat_freebsd.h\"\nimport \"C\"\n\nconst (\n\tdevstatSubsystem = \"devstat\"\n)\n\ntype devstatCollector struct {\n\tmu      sync.Mutex\n\tdevinfo *C.struct_devinfo\n\n\tbytes     typedDesc\n\ttransfers typedDesc\n\tduration  typedDesc\n\tbusyTime  typedDesc\n\tblocks    typedDesc\n\tlogger    *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"devstat\", defaultDisabled, NewDevstatCollector)\n}\n\n// NewDevstatCollector returns a new Collector exposing Device stats.\nfunc NewDevstatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &devstatCollector{\n\t\tdevinfo: &C.struct_devinfo{},\n\t\tbytes: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, devstatSubsystem, \"bytes_total\"),\n\t\t\t\"The total number of bytes in transactions.\",\n\t\t\t[]string{\"device\", \"type\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\ttransfers: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, devstatSubsystem, \"transfers_total\"),\n\t\t\t\"The total number of transactions.\",\n\t\t\t[]string{\"device\", \"type\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\tduration: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, devstatSubsystem, \"duration_seconds_total\"),\n\t\t\t\"The total duration of transactions in seconds.\",\n\t\t\t[]string{\"device\", \"type\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\tbusyTime: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, devstatSubsystem, \"busy_time_seconds_total\"),\n\t\t\t\"Total time the device had one or more transactions outstanding in seconds.\",\n\t\t\t[]string{\"device\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\tblocks: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, devstatSubsystem, \"blocks_transferred_total\"),\n\t\t\t\"The total number of blocks transferred.\",\n\t\t\t[]string{\"device\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *devstatCollector) Update(ch chan<- prometheus.Metric) error {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\n\tvar stats *C.Stats\n\tn := C._get_stats(c.devinfo, &stats)\n\tif n == -1 {\n\t\treturn errors.New(\"devstat_getdevs failed\")\n\t}\n\n\tbase := unsafe.Pointer(stats)\n\tfor i := C.int(0); i < n; i++ {\n\t\toffset := i * C.int(C.sizeof_Stats)\n\t\tstat := (*C.Stats)(unsafe.Pointer(uintptr(base) + uintptr(offset)))\n\n\t\tdevice := fmt.Sprintf(\"%s%d\", C.GoString(&stat.device[0]), stat.unit)\n\t\tch <- c.bytes.mustNewConstMetric(float64(stat.bytes.read), device, \"read\")\n\t\tch <- c.bytes.mustNewConstMetric(float64(stat.bytes.write), device, \"write\")\n\t\tch <- c.transfers.mustNewConstMetric(float64(stat.transfers.other), device, \"other\")\n\t\tch <- c.transfers.mustNewConstMetric(float64(stat.transfers.read), device, \"read\")\n\t\tch <- c.transfers.mustNewConstMetric(float64(stat.transfers.write), device, \"write\")\n\t\tch <- c.duration.mustNewConstMetric(float64(stat.duration.other), device, \"other\")\n\t\tch <- c.duration.mustNewConstMetric(float64(stat.duration.read), device, \"read\")\n\t\tch <- c.duration.mustNewConstMetric(float64(stat.duration.write), device, \"write\")\n\t\tch <- c.busyTime.mustNewConstMetric(float64(stat.busyTime), device)\n\t\tch <- c.blocks.mustNewConstMetric(float64(stat.blocks), device)\n\t}\n\tC.free(unsafe.Pointer(stats))\n\treturn nil\n}\n"
  },
  {
    "path": "collector/devstat_freebsd.h",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n#include <devstat.h>\n#include <fcntl.h>\n#include <libgeom.h>\n#include <limits.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\ntypedef struct {\n\tuint64_t\tread;\n\tuint64_t\twrite;\n\tuint64_t\tfree;\n} Bytes;\n\ntypedef struct {\n\tuint64_t\tother;\n\tuint64_t\tread;\n\tuint64_t\twrite;\n\tuint64_t\tfree;\n} Transfers;\n\ntypedef struct {\n\tdouble\t\tother;\n\tdouble\t\tread;\n\tdouble\t\twrite;\n\tdouble\t\tfree;\n} Duration;\n\ntypedef struct {\n\tchar\t\tdevice[DEVSTAT_NAME_LEN];\n\tint\t\tunit;\n\tBytes\t\tbytes;\n\tTransfers\ttransfers;\n\tDuration\tduration;\n\tlong\t\tbusyTime;\n\tuint64_t\tblocks;\n} Stats;\n\n\nint _get_ndevs();\nint _get_stats(struct devinfo *info, Stats **stats);\n"
  },
  {
    "path": "collector/diskstats_aix.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodiskstats\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/power-devops/perfstat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst diskstatsDefaultIgnoredDevices = \"\"\n\ntype diskstatsCollector struct {\n\trbytes typedDesc\n\twbytes typedDesc\n\ttime   typedDesc\n\tbsize  typedDesc\n\tqdepth typedDesc\n\n\trserv typedDesc\n\twserv typedDesc\n\n\txfers typedDesc\n\txrate typedDesc\n\n\tdeviceFilter deviceFilter\n\tlogger       *slog.Logger\n\n\ttickPerSecond float64\n}\n\nfunc init() {\n\tregisterCollector(\"diskstats\", defaultEnabled, NewDiskstatsCollector)\n}\n\n// NewDiskstatsCollector returns a new Collector exposing disk device stats.\nfunc NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {\n\tticks, err := tickPerSecond()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdeviceFilter, err := newDiskstatsDeviceFilter(logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse device filter flags: %w\", err)\n\t}\n\n\treturn &diskstatsCollector{\n\t\trbytes: typedDesc{readBytesDesc, prometheus.CounterValue},\n\t\twbytes: typedDesc{writtenBytesDesc, prometheus.CounterValue},\n\t\ttime:   typedDesc{ioTimeSecondsDesc, prometheus.CounterValue},\n\n\t\tbsize: typedDesc{\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"block_size_bytes\"),\n\t\t\t\t\"Size of the block device in bytes.\",\n\t\t\t\tdiskLabelNames, nil,\n\t\t\t),\n\t\t\tprometheus.GaugeValue,\n\t\t},\n\t\tqdepth: typedDesc{\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"queue_depth\"),\n\t\t\t\t\"Number of requests in the queue.\",\n\t\t\t\tdiskLabelNames, nil,\n\t\t\t),\n\t\t\tprometheus.GaugeValue,\n\t\t},\n\t\trserv: typedDesc{\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"read_time_seconds_total\"),\n\t\t\t\t\"The total time spent servicing read requests.\",\n\t\t\t\tdiskLabelNames, nil,\n\t\t\t),\n\t\t\tprometheus.CounterValue,\n\t\t},\n\t\twserv: typedDesc{\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"write_time_seconds_total\"),\n\t\t\t\t\"The total time spent servicing write requests.\",\n\t\t\t\tdiskLabelNames, nil,\n\t\t\t),\n\t\t\tprometheus.CounterValue,\n\t\t},\n\t\txfers: typedDesc{\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"transfers_total\"),\n\t\t\t\t\"The total number of transfers to/from disk.\",\n\t\t\t\tdiskLabelNames, nil,\n\t\t\t),\n\t\t\tprometheus.CounterValue,\n\t\t},\n\t\txrate: typedDesc{\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"transfers_to_disk_total\"),\n\t\t\t\t\"The total number of transfers from disk.\",\n\t\t\t\tdiskLabelNames, nil,\n\t\t\t),\n\t\t\tprometheus.CounterValue,\n\t\t},\n\t\tdeviceFilter: deviceFilter,\n\t\tlogger:       logger,\n\n\t\ttickPerSecond: ticks,\n\t}, nil\n}\n\nfunc (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := perfstat.DiskStat()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, stat := range stats {\n\t\tif c.deviceFilter.ignored(stat.Name) {\n\t\t\tcontinue\n\t\t}\n\t\tch <- c.rbytes.mustNewConstMetric(float64(stat.Rblks*512), stat.Name)\n\t\tch <- c.wbytes.mustNewConstMetric(float64(stat.Wblks*512), stat.Name)\n\t\tch <- c.time.mustNewConstMetric(float64(stat.Time)/float64(c.tickPerSecond), stat.Name)\n\n\t\tch <- c.bsize.mustNewConstMetric(float64(stat.BSize), stat.Name)\n\t\tch <- c.qdepth.mustNewConstMetric(float64(stat.QDepth), stat.Name)\n\t\tch <- c.rserv.mustNewConstMetric(float64(stat.Rserv)/1e9, stat.Name)\n\t\tch <- c.wserv.mustNewConstMetric(float64(stat.Wserv)/1e9, stat.Name)\n\t\tch <- c.xfers.mustNewConstMetric(float64(stat.Xfers), stat.Name)\n\t\tch <- c.xrate.mustNewConstMetric(float64(stat.XRate), stat.Name)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/diskstats_common.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodiskstats && (openbsd || linux || darwin || aix)\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tdiskSubsystem = \"disk\"\n)\n\nvar (\n\tdiskLabelNames = []string{\"device\"}\n\n\tdiskstatsDeviceExcludeSet bool\n\tdiskstatsDeviceExclude    = kingpin.Flag(\n\t\t\"collector.diskstats.device-exclude\",\n\t\t\"Regexp of diskstats devices to exclude (mutually exclusive to device-include).\",\n\t).Default(diskstatsDefaultIgnoredDevices).PreAction(func(c *kingpin.ParseContext) error {\n\t\tdiskstatsDeviceExcludeSet = true\n\t\treturn nil\n\t}).String()\n\toldDiskstatsDeviceExclude = kingpin.Flag(\n\t\t\"collector.diskstats.ignored-devices\",\n\t\t\"DEPRECATED: Use collector.diskstats.device-exclude\",\n\t).Hidden().String()\n\n\tdiskstatsDeviceInclude = kingpin.Flag(\"collector.diskstats.device-include\", \"Regexp of diskstats devices to include (mutually exclusive to device-exclude).\").String()\n\n\treadsCompletedDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"reads_completed_total\"),\n\t\t\"The total number of reads completed successfully.\",\n\t\tdiskLabelNames, nil,\n\t)\n\n\treadBytesDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"read_bytes_total\"),\n\t\t\"The total number of bytes read successfully.\",\n\t\tdiskLabelNames, nil,\n\t)\n\n\twritesCompletedDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"writes_completed_total\"),\n\t\t\"The total number of writes completed successfully.\",\n\t\tdiskLabelNames, nil,\n\t)\n\n\twrittenBytesDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"written_bytes_total\"),\n\t\t\"The total number of bytes written successfully.\",\n\t\tdiskLabelNames, nil,\n\t)\n\n\tioTimeSecondsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"io_time_seconds_total\"),\n\t\t\"Total seconds spent doing I/Os.\",\n\t\tdiskLabelNames, nil,\n\t)\n\n\treadTimeSecondsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"read_time_seconds_total\"),\n\t\t\"The total number of seconds spent by all reads.\",\n\t\tdiskLabelNames,\n\t\tnil,\n\t)\n\n\twriteTimeSecondsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"write_time_seconds_total\"),\n\t\t\"This is the total number of seconds spent by all writes.\",\n\t\tdiskLabelNames,\n\t\tnil,\n\t)\n)\n\nfunc newDiskstatsDeviceFilter(logger *slog.Logger) (deviceFilter, error) {\n\tif *oldDiskstatsDeviceExclude != \"\" {\n\t\tif !diskstatsDeviceExcludeSet {\n\t\t\tlogger.Warn(\"--collector.diskstats.ignored-devices is DEPRECATED and will be removed in 2.0.0, use --collector.diskstats.device-exclude\")\n\t\t\t*diskstatsDeviceExclude = *oldDiskstatsDeviceExclude\n\t\t} else {\n\t\t\treturn deviceFilter{}, errors.New(\"--collector.diskstats.ignored-devices and --collector.diskstats.device-exclude are mutually exclusive\")\n\t\t}\n\t}\n\n\tif *diskstatsDeviceExclude != \"\" && *diskstatsDeviceInclude != \"\" {\n\t\treturn deviceFilter{}, errors.New(\"device-exclude & device-include are mutually exclusive\")\n\t}\n\n\tif *diskstatsDeviceExclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.diskstats.device-exclude\", \"flag\", *diskstatsDeviceExclude)\n\t}\n\n\tif *diskstatsDeviceInclude != \"\" {\n\t\tlogger.Info(\"Parsed Flag --collector.diskstats.device-include\", \"flag\", *diskstatsDeviceInclude)\n\t}\n\n\treturn newDeviceFilter(*diskstatsDeviceExclude, *diskstatsDeviceInclude), nil\n}\n"
  },
  {
    "path": "collector/diskstats_darwin.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodiskstats\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/lufia/iostat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst diskstatsDefaultIgnoredDevices = \"\"\n\ntype typedDescFunc struct {\n\ttypedDesc\n\tvalue func(stat *iostat.DriveStats) float64\n}\n\ntype diskstatsCollector struct {\n\tdescs []typedDescFunc\n\n\tdeviceFilter deviceFilter\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"diskstats\", defaultEnabled, NewDiskstatsCollector)\n}\n\n// NewDiskstatsCollector returns a new Collector exposing disk device stats.\nfunc NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {\n\tvar diskLabelNames = []string{\"device\"}\n\n\tdeviceFilter, err := newDiskstatsDeviceFilter(logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse device filter flags: %w\", err)\n\t}\n\n\treturn &diskstatsCollector{\n\t\tdescs: []typedDescFunc{\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc:      readsCompletedDesc,\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.NumRead)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"read_sectors_total\"),\n\t\t\t\t\t\t\"The total number of sectors read successfully.\",\n\t\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\t\tnil,\n\t\t\t\t\t),\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.NumRead) / float64(stat.BlockSize)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc:      readTimeSecondsDesc,\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn stat.TotalReadTime.Seconds()\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc:      writesCompletedDesc,\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.NumWrite)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"written_sectors_total\"),\n\t\t\t\t\t\t\"The total number of sectors written successfully.\",\n\t\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\t\tnil,\n\t\t\t\t\t),\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.NumWrite) / float64(stat.BlockSize)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc:      writeTimeSecondsDesc,\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn stat.TotalWriteTime.Seconds()\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc:      readBytesDesc,\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.BytesRead)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc:      writtenBytesDesc,\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.BytesWritten)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"read_errors_total\"),\n\t\t\t\t\t\t\"The total number of read errors.\",\n\t\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\t\tnil,\n\t\t\t\t\t),\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.ReadErrors)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"write_errors_total\"),\n\t\t\t\t\t\t\"The total number of write errors.\",\n\t\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\t\tnil,\n\t\t\t\t\t),\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.WriteErrors)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"read_retries_total\"),\n\t\t\t\t\t\t\"The total number of read retries.\",\n\t\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\t\tnil,\n\t\t\t\t\t),\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.ReadRetries)\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttypedDesc: typedDesc{\n\t\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"write_retries_total\"),\n\t\t\t\t\t\t\"The total number of write retries.\",\n\t\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\t\tnil,\n\t\t\t\t\t),\n\t\t\t\t\tvalueType: prometheus.CounterValue,\n\t\t\t\t},\n\t\t\t\tvalue: func(stat *iostat.DriveStats) float64 {\n\t\t\t\t\treturn float64(stat.WriteRetries)\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\tdeviceFilter: deviceFilter,\n\t\tlogger:       logger,\n\t}, nil\n}\n\nfunc (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {\n\tdiskStats, err := iostat.ReadDriveStats()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get diskstats: %w\", err)\n\t}\n\n\tfor _, stats := range diskStats {\n\t\tif c.deviceFilter.ignored(stats.Name) {\n\t\t\tcontinue\n\t\t}\n\t\tfor _, desc := range c.descs {\n\t\t\tv := desc.value(stats)\n\t\t\tch <- desc.mustNewConstMetric(v, stats.Name)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/diskstats_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodiskstats\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/blockdevice\"\n)\n\nconst (\n\tsecondsPerTick = 1.0 / 1000.0\n\n\t// Read sectors and write sectors are the \"standard UNIX 512-byte sectors, not any device- or filesystem-specific block size.\"\n\t// See also https://www.kernel.org/doc/Documentation/block/stat.txt\n\tunixSectorSize = 512.0\n\n\tdiskstatsDefaultIgnoredDevices = \"^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\\\d+n\\\\d+p)\\\\d+$\"\n\n\t// See udevadm(8).\n\tudevDevicePropertyPrefix = \"E:\"\n\n\t// Udev device properties.\n\tudevDMLVLayer               = \"DM_LV_LAYER\"\n\tudevDMLVName                = \"DM_LV_NAME\"\n\tudevDMName                  = \"DM_NAME\"\n\tudevDMUUID                  = \"DM_UUID\"\n\tudevDMVGName                = \"DM_VG_NAME\"\n\tudevIDATA                   = \"ID_ATA\"\n\tudevIDATARotationRateRPM    = \"ID_ATA_ROTATION_RATE_RPM\"\n\tudevIDATASATA               = \"ID_ATA_SATA\"\n\tudevIDATASATASignalRateGen1 = \"ID_ATA_SATA_SIGNAL_RATE_GEN1\"\n\tudevIDATASATASignalRateGen2 = \"ID_ATA_SATA_SIGNAL_RATE_GEN2\"\n\tudevIDATAWriteCache         = \"ID_ATA_WRITE_CACHE\"\n\tudevIDATAWriteCacheEnabled  = \"ID_ATA_WRITE_CACHE_ENABLED\"\n\tudevIDFSType                = \"ID_FS_TYPE\"\n\tudevIDFSUsage               = \"ID_FS_USAGE\"\n\tudevIDFSUUID                = \"ID_FS_UUID\"\n\tudevIDFSVersion             = \"ID_FS_VERSION\"\n\tudevIDModel                 = \"ID_MODEL\"\n\tudevIDPath                  = \"ID_PATH\"\n\tudevIDRevision              = \"ID_REVISION\"\n\tudevIDSerial                = \"ID_SERIAL\"\n\tudevIDSerialShort           = \"ID_SERIAL_SHORT\"\n\tudevIDWWN                   = \"ID_WWN\"\n\tudevSCSIIdentSerial         = \"SCSI_IDENT_SERIAL\"\n)\n\ntype udevInfo map[string]string\n\ntype diskstatsCollector struct {\n\tdeviceFilter            deviceFilter\n\tfs                      blockdevice.FS\n\tinfoDesc                typedDesc\n\tdescs                   []typedDesc\n\tfilesystemInfoDesc      typedDesc\n\tdeviceMapperInfoDesc    typedDesc\n\tataDescs                map[string]typedDesc\n\tlogger                  *slog.Logger\n\tgetUdevDeviceProperties func(uint32, uint32) (udevInfo, error)\n}\n\nfunc init() {\n\tregisterCollector(\"diskstats\", defaultEnabled, NewDiskstatsCollector)\n}\n\n// NewDiskstatsCollector returns a new Collector exposing disk device stats.\n// Docs from https://www.kernel.org/doc/Documentation/iostats.txt\nfunc NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {\n\tvar diskLabelNames = []string{\"device\"}\n\tfs, err := blockdevice.NewFS(*procPath, *sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\tdeviceFilter, err := newDiskstatsDeviceFilter(logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse device filter flags: %w\", err)\n\t}\n\n\tcollector := diskstatsCollector{\n\t\tdeviceFilter: deviceFilter,\n\t\tfs:           fs,\n\t\tinfoDesc: typedDesc{\n\t\t\tdesc: prometheus.NewDesc(prometheus.BuildFQName(namespace, diskSubsystem, \"info\"),\n\t\t\t\t\"Info of /sys/block/<block_device>.\",\n\t\t\t\t[]string{\"device\", \"major\", \"minor\", \"path\", \"wwn\", \"model\", \"serial\", \"revision\", \"rotational\"},\n\t\t\t\tnil,\n\t\t\t), valueType: prometheus.GaugeValue,\n\t\t},\n\t\tdescs: []typedDesc{\n\t\t\t{\n\t\t\t\tdesc: readsCompletedDesc, valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"reads_merged_total\"),\n\t\t\t\t\t\"The total number of reads merged.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: readBytesDesc, valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: readTimeSecondsDesc, valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: writesCompletedDesc, valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"writes_merged_total\"),\n\t\t\t\t\t\"The number of writes merged.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: writtenBytesDesc, valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: writeTimeSecondsDesc, valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"io_now\"),\n\t\t\t\t\t\"The number of I/Os currently in progress.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: ioTimeSecondsDesc, valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"io_time_weighted_seconds_total\"),\n\t\t\t\t\t\"The weighted # of seconds spent doing I/Os.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"discards_completed_total\"),\n\t\t\t\t\t\"The total number of discards completed successfully.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"discards_merged_total\"),\n\t\t\t\t\t\"The total number of discards merged.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"discarded_sectors_total\"),\n\t\t\t\t\t\"The total number of sectors discarded successfully.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"discard_time_seconds_total\"),\n\t\t\t\t\t\"This is the total number of seconds spent by all discards.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"flush_requests_total\"),\n\t\t\t\t\t\"The total number of flush requests completed successfully\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, diskSubsystem, \"flush_requests_time_seconds_total\"),\n\t\t\t\t\t\"This is the total number of seconds spent by all flush requests.\",\n\t\t\t\t\tdiskLabelNames,\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.CounterValue,\n\t\t\t},\n\t\t},\n\t\tfilesystemInfoDesc: typedDesc{\n\t\t\tdesc: prometheus.NewDesc(prometheus.BuildFQName(namespace, diskSubsystem, \"filesystem_info\"),\n\t\t\t\t\"Info about disk filesystem.\",\n\t\t\t\t[]string{\"device\", \"type\", \"usage\", \"uuid\", \"version\"},\n\t\t\t\tnil,\n\t\t\t), valueType: prometheus.GaugeValue,\n\t\t},\n\t\tdeviceMapperInfoDesc: typedDesc{\n\t\t\tdesc: prometheus.NewDesc(prometheus.BuildFQName(namespace, diskSubsystem, \"device_mapper_info\"),\n\t\t\t\t\"Info about disk device mapper.\",\n\t\t\t\t[]string{\"device\", \"name\", \"uuid\", \"vg_name\", \"lv_name\", \"lv_layer\"},\n\t\t\t\tnil,\n\t\t\t), valueType: prometheus.GaugeValue,\n\t\t},\n\t\tataDescs: map[string]typedDesc{\n\t\t\tudevIDATAWriteCache: {\n\t\t\t\tdesc: prometheus.NewDesc(prometheus.BuildFQName(namespace, diskSubsystem, \"ata_write_cache\"),\n\t\t\t\t\t\"ATA disk has a write cache.\",\n\t\t\t\t\t[]string{\"device\"},\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.GaugeValue,\n\t\t\t},\n\t\t\tudevIDATAWriteCacheEnabled: {\n\t\t\t\tdesc: prometheus.NewDesc(prometheus.BuildFQName(namespace, diskSubsystem, \"ata_write_cache_enabled\"),\n\t\t\t\t\t\"ATA disk has its write cache enabled.\",\n\t\t\t\t\t[]string{\"device\"},\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.GaugeValue,\n\t\t\t},\n\t\t\tudevIDATARotationRateRPM: {\n\t\t\t\tdesc: prometheus.NewDesc(prometheus.BuildFQName(namespace, diskSubsystem, \"ata_rotation_rate_rpm\"),\n\t\t\t\t\t\"ATA disk rotation rate in RPMs (0 for SSDs).\",\n\t\t\t\t\t[]string{\"device\"},\n\t\t\t\t\tnil,\n\t\t\t\t), valueType: prometheus.GaugeValue,\n\t\t\t},\n\t\t},\n\t\tlogger: logger,\n\t}\n\n\t// Only enable getting device properties from udev if the directory is readable.\n\tif stat, err := os.Stat(*udevDataPath); err != nil || !stat.IsDir() {\n\t\tlogger.Error(\"Failed to open directory, disabling udev device properties\", \"path\", *udevDataPath)\n\t} else {\n\t\tcollector.getUdevDeviceProperties = getUdevDeviceProperties\n\t}\n\n\treturn &collector, nil\n}\n\nfunc (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {\n\tdiskStats, err := c.fs.ProcDiskstats()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get diskstats: %w\", err)\n\t}\n\n\tfor _, stats := range diskStats {\n\t\tdev := stats.DeviceName\n\t\tif c.deviceFilter.ignored(dev) {\n\t\t\tcontinue\n\t\t}\n\n\t\tinfo, err := getUdevDeviceProperties(stats.MajorNumber, stats.MinorNumber)\n\t\tif err != nil {\n\t\t\tc.logger.Debug(\"Failed to parse udev info\", \"err\", err)\n\t\t}\n\n\t\t// This is usually the serial printed on the disk label.\n\t\tserial := info[udevSCSIIdentSerial]\n\n\t\t// If it's undefined, fallback to ID_SERIAL_SHORT instead.\n\t\tif serial == \"\" {\n\t\t\tserial = info[udevIDSerialShort]\n\t\t}\n\n\t\t// If still undefined, fallback to ID_SERIAL (used by virtio devices).\n\t\tif serial == \"\" {\n\t\t\tserial = info[udevIDSerial]\n\t\t}\n\n\t\tqueueStats, err := c.fs.SysBlockDeviceQueueStats(dev)\n\t\t// Block Device Queue stats may not exist for all devices.\n\t\tif err != nil && !os.IsNotExist(err) {\n\t\t\tc.logger.Debug(\"Failed to get block device queue stats\", \"device\", dev, \"err\", err)\n\t\t}\n\n\t\tch <- c.infoDesc.mustNewConstMetric(1.0, dev,\n\t\t\tfmt.Sprint(stats.MajorNumber),\n\t\t\tfmt.Sprint(stats.MinorNumber),\n\t\t\tinfo[udevIDPath],\n\t\t\tinfo[udevIDWWN],\n\t\t\tinfo[udevIDModel],\n\t\t\tserial,\n\t\t\tinfo[udevIDRevision],\n\t\t\tstrconv.FormatUint(queueStats.Rotational, 2),\n\t\t)\n\n\t\tstatCount := stats.IoStatsCount - 3 // Total diskstats record count, less MajorNumber, MinorNumber and DeviceName\n\n\t\tfor i, val := range []float64{\n\t\t\tfloat64(stats.ReadIOs),\n\t\t\tfloat64(stats.ReadMerges),\n\t\t\tfloat64(stats.ReadSectors) * unixSectorSize,\n\t\t\tfloat64(stats.ReadTicks) * secondsPerTick,\n\t\t\tfloat64(stats.WriteIOs),\n\t\t\tfloat64(stats.WriteMerges),\n\t\t\tfloat64(stats.WriteSectors) * unixSectorSize,\n\t\t\tfloat64(stats.WriteTicks) * secondsPerTick,\n\t\t\tfloat64(stats.IOsInProgress),\n\t\t\tfloat64(stats.IOsTotalTicks) * secondsPerTick,\n\t\t\tfloat64(stats.WeightedIOTicks) * secondsPerTick,\n\t\t\tfloat64(stats.DiscardIOs),\n\t\t\tfloat64(stats.DiscardMerges),\n\t\t\tfloat64(stats.DiscardSectors),\n\t\t\tfloat64(stats.DiscardTicks) * secondsPerTick,\n\t\t\tfloat64(stats.FlushRequestsCompleted),\n\t\t\tfloat64(stats.TimeSpentFlushing) * secondsPerTick,\n\t\t} {\n\t\t\tif i >= statCount {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tch <- c.descs[i].mustNewConstMetric(val, dev)\n\t\t}\n\n\t\tif fsType := info[udevIDFSType]; fsType != \"\" {\n\t\t\tch <- c.filesystemInfoDesc.mustNewConstMetric(1.0, dev,\n\t\t\t\tfsType,\n\t\t\t\tinfo[udevIDFSUsage],\n\t\t\t\tinfo[udevIDFSUUID],\n\t\t\t\tinfo[udevIDFSVersion],\n\t\t\t)\n\t\t}\n\n\t\tif name := info[udevDMName]; name != \"\" {\n\t\t\tch <- c.deviceMapperInfoDesc.mustNewConstMetric(1.0, dev,\n\t\t\t\tname,\n\t\t\t\tinfo[udevDMUUID],\n\t\t\t\tinfo[udevDMVGName],\n\t\t\t\tinfo[udevDMLVName],\n\t\t\t\tinfo[udevDMLVLayer],\n\t\t\t)\n\t\t}\n\n\t\tif ata := info[udevIDATA]; ata != \"\" {\n\t\t\tfor attr, desc := range c.ataDescs {\n\t\t\t\tstr, ok := info[attr]\n\t\t\t\tif !ok {\n\t\t\t\t\tc.logger.Debug(\"Udev attribute does not exist\", \"attribute\", attr)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tif value, err := strconv.ParseFloat(str, 64); err == nil {\n\t\t\t\t\tch <- desc.mustNewConstMetric(value, dev)\n\t\t\t\t} else {\n\t\t\t\t\tc.logger.Error(\"Failed to parse ATA value\", \"err\", err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc getUdevDeviceProperties(major, minor uint32) (udevInfo, error) {\n\tfilename := udevDataFilePath(fmt.Sprintf(\"b%d:%d\", major, minor))\n\n\tdata, err := os.Open(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer data.Close()\n\n\tinfo := make(udevInfo)\n\n\tscanner := bufio.NewScanner(data)\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\n\t\t// We're only interested in device properties.\n\t\tif !strings.HasPrefix(line, udevDevicePropertyPrefix) {\n\t\t\tcontinue\n\t\t}\n\n\t\tline = strings.TrimPrefix(line, udevDevicePropertyPrefix)\n\n\t\tif name, value, found := strings.Cut(line, \"=\"); found {\n\t\t\tinfo[name] = value\n\t\t}\n\t}\n\n\treturn info, nil\n}\n"
  },
  {
    "path": "collector/diskstats_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodiskstats\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/client_golang/prometheus/testutil\"\n)\n\ntype testDiskStatsCollector struct {\n\tdsc Collector\n}\n\nfunc (c testDiskStatsCollector) Collect(ch chan<- prometheus.Metric) {\n\tc.dsc.Update(ch)\n}\n\nfunc (c testDiskStatsCollector) Describe(ch chan<- *prometheus.Desc) {\n\tprometheus.DescribeByCollect(c, ch)\n}\n\nfunc NewTestDiskStatsCollector(logger *slog.Logger) (prometheus.Collector, error) {\n\tdsc, err := NewDiskstatsCollector(logger)\n\tif err != nil {\n\t\treturn testDiskStatsCollector{}, err\n\t}\n\treturn testDiskStatsCollector{\n\t\tdsc: dsc,\n\t}, err\n}\n\nfunc TestDiskStats(t *testing.T) {\n\t*sysPath = \"fixtures/sys\"\n\t*procPath = \"fixtures/proc\"\n\t*udevDataPath = \"fixtures/udev/data\"\n\t*diskstatsDeviceExclude = \"^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\\\d+n\\\\d+p)\\\\d+$\"\n\ttestcase := `# HELP node_disk_ata_rotation_rate_rpm ATA disk rotation rate in RPMs (0 for SSDs).\n# TYPE node_disk_ata_rotation_rate_rpm gauge\nnode_disk_ata_rotation_rate_rpm{device=\"sda\"} 7200\nnode_disk_ata_rotation_rate_rpm{device=\"sdb\"} 0\nnode_disk_ata_rotation_rate_rpm{device=\"sdc\"} 0\n# HELP node_disk_ata_write_cache ATA disk has a write cache.\n# TYPE node_disk_ata_write_cache gauge\nnode_disk_ata_write_cache{device=\"sda\"} 1\nnode_disk_ata_write_cache{device=\"sdb\"} 1\nnode_disk_ata_write_cache{device=\"sdc\"} 1\n# HELP node_disk_ata_write_cache_enabled ATA disk has its write cache enabled.\n# TYPE node_disk_ata_write_cache_enabled gauge\nnode_disk_ata_write_cache_enabled{device=\"sda\"} 0\nnode_disk_ata_write_cache_enabled{device=\"sdb\"} 1\nnode_disk_ata_write_cache_enabled{device=\"sdc\"} 0\n# HELP node_disk_device_mapper_info Info about disk device mapper.\n# TYPE node_disk_device_mapper_info gauge\nnode_disk_device_mapper_info{device=\"dm-0\",lv_layer=\"\",lv_name=\"\",name=\"nvme0n1_crypt\",uuid=\"CRYPT-LUKS2-jolaulot80fy9zsiobkxyxo7y2dqeho2-nvme0n1_crypt\",vg_name=\"\"} 1\nnode_disk_device_mapper_info{device=\"dm-1\",lv_layer=\"\",lv_name=\"swap_1\",name=\"system-swap_1\",uuid=\"LVM-wbGqQEBL9SxrW2DLntJwgg8fAv946hw3Tvjqh0v31fWgxEtD4BoHO0lROWFUY65T\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-2\",lv_layer=\"\",lv_name=\"root\",name=\"system-root\",uuid=\"LVM-NWEDo8q5ABDyJuC3F8veKNyWfYmeIBfFMS4MF3HakzUhkk7ekDm6fJTHkl2fYHe7\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-3\",lv_layer=\"\",lv_name=\"var\",name=\"system-var\",uuid=\"LVM-hrxHo0rlZ6U95ku5841Lpd17bS1Z7V7lrtEE60DVgE6YEOCdS9gcDGyonWim4hGP\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-4\",lv_layer=\"\",lv_name=\"tmp\",name=\"system-tmp\",uuid=\"LVM-XTNGOHjPWLHcxmJmVu5cWTXEtuzqDeBkdEHAZW5q9LxWQ2d4mb5CchUQzUPJpl8H\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-5\",lv_layer=\"\",lv_name=\"home\",name=\"system-home\",uuid=\"LVM-MtoJaWTpjWRXlUnNFlpxZauTEuYlMvGFutigEzCCrfj8CNh6jCRi5LQJXZCpLjPf\",vg_name=\"system\"} 1\n# HELP node_disk_discard_time_seconds_total This is the total number of seconds spent by all discards.\n# TYPE node_disk_discard_time_seconds_total counter\nnode_disk_discard_time_seconds_total{device=\"sdb\"} 11.13\nnode_disk_discard_time_seconds_total{device=\"sdc\"} 11.13\n# HELP node_disk_discarded_sectors_total The total number of sectors discarded successfully.\n# TYPE node_disk_discarded_sectors_total counter\nnode_disk_discarded_sectors_total{device=\"sdb\"} 1.925173784e+09\nnode_disk_discarded_sectors_total{device=\"sdc\"} 1.25173784e+08\n# HELP node_disk_discards_completed_total The total number of discards completed successfully.\n# TYPE node_disk_discards_completed_total counter\nnode_disk_discards_completed_total{device=\"sdb\"} 68851\nnode_disk_discards_completed_total{device=\"sdc\"} 18851\n# HELP node_disk_discards_merged_total The total number of discards merged.\n# TYPE node_disk_discards_merged_total counter\nnode_disk_discards_merged_total{device=\"sdb\"} 0\nnode_disk_discards_merged_total{device=\"sdc\"} 0\n# HELP node_disk_filesystem_info Info about disk filesystem.\n# TYPE node_disk_filesystem_info gauge\nnode_disk_filesystem_info{device=\"dm-0\",type=\"LVM2_member\",usage=\"raid\",uuid=\"c3C3uW-gD96-Yw69-c1CJ-5MwT-6ysM-mST0vB\",version=\"LVM2 001\"} 1\nnode_disk_filesystem_info{device=\"dm-1\",type=\"swap\",usage=\"other\",uuid=\"5272bb60-04b5-49cd-b730-be57c7604450\",version=\"1\"} 1\nnode_disk_filesystem_info{device=\"dm-2\",type=\"ext4\",usage=\"filesystem\",uuid=\"3deafd0d-faff-4695-8d15-51061ae1f51b\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-3\",type=\"ext4\",usage=\"filesystem\",uuid=\"5c772222-f7d4-4c8e-87e8-e97df6b7a45e\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-4\",type=\"ext4\",usage=\"filesystem\",uuid=\"a9479d44-60e1-4015-a1e5-bb065e6dd11b\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-5\",type=\"ext4\",usage=\"filesystem\",uuid=\"b05b726a-c718-4c4d-8641-7c73a7696d83\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"mmcblk0p1\",type=\"vfat\",usage=\"filesystem\",uuid=\"6284-658D\",version=\"FAT32\"} 1\nnode_disk_filesystem_info{device=\"mmcblk0p2\",type=\"ext4\",usage=\"filesystem\",uuid=\"83324ce8-a6f3-4e35-ad64-dbb3d6b87a32\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"sda\",type=\"LVM2_member\",usage=\"raid\",uuid=\"cVVv6j-HSA2-IY33-1Jmj-dO2H-YL7w-b4Oxqw\",version=\"LVM2 001\"} 1\nnode_disk_filesystem_info{device=\"sdc\",type=\"LVM2_member\",usage=\"raid\",uuid=\"QFy9W7-Brj3-hQ6v-AF8i-3Zqg-n3Vs-kGY4vb\",version=\"LVM2 001\"} 1\n# HELP node_disk_flush_requests_time_seconds_total This is the total number of seconds spent by all flush requests.\n# TYPE node_disk_flush_requests_time_seconds_total counter\nnode_disk_flush_requests_time_seconds_total{device=\"sdc\"} 1.944\n# HELP node_disk_flush_requests_total The total number of flush requests completed successfully\n# TYPE node_disk_flush_requests_total counter\nnode_disk_flush_requests_total{device=\"sdc\"} 1555\n# HELP node_disk_info Info of /sys/block/<block_device>.\n# TYPE node_disk_info gauge\nnode_disk_info{device=\"dm-0\",major=\"252\",minor=\"0\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-1\",major=\"252\",minor=\"1\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-2\",major=\"252\",minor=\"2\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-3\",major=\"252\",minor=\"3\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-4\",major=\"252\",minor=\"4\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-5\",major=\"252\",minor=\"5\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0\",major=\"179\",minor=\"0\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0p1\",major=\"179\",minor=\"1\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0p2\",major=\"179\",minor=\"2\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"nvme0n1\",major=\"259\",minor=\"0\",model=\"SAMSUNG EHFTF55LURSY-000Y9\",path=\"pci-0000:02:00.0-nvme-1\",revision=\"4NBTUY95\",rotational=\"0\",serial=\"S252B6CU1HG3M1\",wwn=\"eui.p3vbbiejx5aae2r3\"} 1\nnode_disk_info{device=\"sda\",major=\"8\",minor=\"0\",model=\"TOSHIBA_KSDB4U86\",path=\"pci-0000:3b:00.0-sas-phy7-lun-0\",revision=\"0102\",rotational=\"1\",serial=\"2160A0D5FVGG\",wwn=\"0x7c72382b8de36a64\"} 1\nnode_disk_info{device=\"sdb\",major=\"8\",minor=\"16\",model=\"SuperMicro_SSD\",path=\"pci-0000:00:1f.2-ata-1\",revision=\"0R\",rotational=\"0\",serial=\"SMC0E1B87ABBB16BD84E\",wwn=\"0xe1b87abbb16bd84e\"} 1\nnode_disk_info{device=\"sdc\",major=\"8\",minor=\"32\",model=\"INTEL_SSDS9X9SI0\",path=\"pci-0000:00:1f.2-ata-4\",revision=\"0100\",rotational=\"0\",serial=\"3EWB5Y25CWQWA7EH1U\",wwn=\"0x58907ddc573a5de\"} 1\nnode_disk_info{device=\"sr0\",major=\"11\",minor=\"0\",model=\"Virtual_CDROM0\",path=\"pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0\",revision=\"1.00\",rotational=\"0\",serial=\"AAAABBBBCCCC1\",wwn=\"\"} 1\nnode_disk_info{device=\"vda\",major=\"254\",minor=\"0\",model=\"\",path=\"pci-0000:00:06.0\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\n# HELP node_disk_io_now The number of I/Os currently in progress.\n# TYPE node_disk_io_now gauge\nnode_disk_io_now{device=\"dm-0\"} 0\nnode_disk_io_now{device=\"dm-1\"} 0\nnode_disk_io_now{device=\"dm-2\"} 0\nnode_disk_io_now{device=\"dm-3\"} 0\nnode_disk_io_now{device=\"dm-4\"} 0\nnode_disk_io_now{device=\"dm-5\"} 0\nnode_disk_io_now{device=\"mmcblk0\"} 0\nnode_disk_io_now{device=\"mmcblk0p1\"} 0\nnode_disk_io_now{device=\"mmcblk0p2\"} 0\nnode_disk_io_now{device=\"nvme0n1\"} 0\nnode_disk_io_now{device=\"sda\"} 0\nnode_disk_io_now{device=\"sdb\"} 0\nnode_disk_io_now{device=\"sdc\"} 0\nnode_disk_io_now{device=\"sr0\"} 0\nnode_disk_io_now{device=\"vda\"} 0\n# HELP node_disk_io_time_seconds_total Total seconds spent doing I/Os.\n# TYPE node_disk_io_time_seconds_total counter\nnode_disk_io_time_seconds_total{device=\"dm-0\"} 11325.968\nnode_disk_io_time_seconds_total{device=\"dm-1\"} 0.076\nnode_disk_io_time_seconds_total{device=\"dm-2\"} 65.4\nnode_disk_io_time_seconds_total{device=\"dm-3\"} 0.016\nnode_disk_io_time_seconds_total{device=\"dm-4\"} 0.024\nnode_disk_io_time_seconds_total{device=\"dm-5\"} 58.848\nnode_disk_io_time_seconds_total{device=\"mmcblk0\"} 0.136\nnode_disk_io_time_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_io_time_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_io_time_seconds_total{device=\"nvme0n1\"} 222.766\nnode_disk_io_time_seconds_total{device=\"sda\"} 9653.880000000001\nnode_disk_io_time_seconds_total{device=\"sdb\"} 60.730000000000004\nnode_disk_io_time_seconds_total{device=\"sdc\"} 10.73\nnode_disk_io_time_seconds_total{device=\"sr0\"} 0\nnode_disk_io_time_seconds_total{device=\"vda\"} 41614.592000000004\n# HELP node_disk_io_time_weighted_seconds_total The weighted # of seconds spent doing I/Os.\n# TYPE node_disk_io_time_weighted_seconds_total counter\nnode_disk_io_time_weighted_seconds_total{device=\"dm-0\"} 1.206301256e+06\nnode_disk_io_time_weighted_seconds_total{device=\"dm-1\"} 0.084\nnode_disk_io_time_weighted_seconds_total{device=\"dm-2\"} 129.416\nnode_disk_io_time_weighted_seconds_total{device=\"dm-3\"} 0.10400000000000001\nnode_disk_io_time_weighted_seconds_total{device=\"dm-4\"} 0.044\nnode_disk_io_time_weighted_seconds_total{device=\"dm-5\"} 105.632\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0\"} 0.156\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_io_time_weighted_seconds_total{device=\"nvme0n1\"} 1032.546\nnode_disk_io_time_weighted_seconds_total{device=\"sda\"} 82621.804\nnode_disk_io_time_weighted_seconds_total{device=\"sdb\"} 67.07000000000001\nnode_disk_io_time_weighted_seconds_total{device=\"sdc\"} 17.07\nnode_disk_io_time_weighted_seconds_total{device=\"sr0\"} 0\nnode_disk_io_time_weighted_seconds_total{device=\"vda\"} 2.0778722280000001e+06\n# HELP node_disk_read_bytes_total The total number of bytes read successfully.\n# TYPE node_disk_read_bytes_total counter\nnode_disk_read_bytes_total{device=\"dm-0\"} 5.13708655616e+11\nnode_disk_read_bytes_total{device=\"dm-1\"} 1.589248e+06\nnode_disk_read_bytes_total{device=\"dm-2\"} 1.578752e+08\nnode_disk_read_bytes_total{device=\"dm-3\"} 1.98144e+06\nnode_disk_read_bytes_total{device=\"dm-4\"} 529408\nnode_disk_read_bytes_total{device=\"dm-5\"} 4.3150848e+07\nnode_disk_read_bytes_total{device=\"mmcblk0\"} 798720\nnode_disk_read_bytes_total{device=\"mmcblk0p1\"} 81920\nnode_disk_read_bytes_total{device=\"mmcblk0p2\"} 389120\nnode_disk_read_bytes_total{device=\"nvme0n1\"} 2.377714176e+09\nnode_disk_read_bytes_total{device=\"sda\"} 5.13713216512e+11\nnode_disk_read_bytes_total{device=\"sdb\"} 4.944782848e+09\nnode_disk_read_bytes_total{device=\"sdc\"} 8.48782848e+08\nnode_disk_read_bytes_total{device=\"sr0\"} 0\nnode_disk_read_bytes_total{device=\"vda\"} 1.6727491584e+10\n# HELP node_disk_read_time_seconds_total The total number of seconds spent by all reads.\n# TYPE node_disk_read_time_seconds_total counter\nnode_disk_read_time_seconds_total{device=\"dm-0\"} 46229.572\nnode_disk_read_time_seconds_total{device=\"dm-1\"} 0.084\nnode_disk_read_time_seconds_total{device=\"dm-2\"} 6.5360000000000005\nnode_disk_read_time_seconds_total{device=\"dm-3\"} 0.10400000000000001\nnode_disk_read_time_seconds_total{device=\"dm-4\"} 0.028\nnode_disk_read_time_seconds_total{device=\"dm-5\"} 0.924\nnode_disk_read_time_seconds_total{device=\"mmcblk0\"} 0.156\nnode_disk_read_time_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_read_time_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_read_time_seconds_total{device=\"nvme0n1\"} 21.650000000000002\nnode_disk_read_time_seconds_total{device=\"sda\"} 18492.372\nnode_disk_read_time_seconds_total{device=\"sdb\"} 0.084\nnode_disk_read_time_seconds_total{device=\"sdc\"} 0.014\nnode_disk_read_time_seconds_total{device=\"sr0\"} 0\nnode_disk_read_time_seconds_total{device=\"vda\"} 8655.768\n# HELP node_disk_reads_completed_total The total number of reads completed successfully.\n# TYPE node_disk_reads_completed_total counter\nnode_disk_reads_completed_total{device=\"dm-0\"} 5.9910002e+07\nnode_disk_reads_completed_total{device=\"dm-1\"} 388\nnode_disk_reads_completed_total{device=\"dm-2\"} 11571\nnode_disk_reads_completed_total{device=\"dm-3\"} 3870\nnode_disk_reads_completed_total{device=\"dm-4\"} 392\nnode_disk_reads_completed_total{device=\"dm-5\"} 3729\nnode_disk_reads_completed_total{device=\"mmcblk0\"} 192\nnode_disk_reads_completed_total{device=\"mmcblk0p1\"} 17\nnode_disk_reads_completed_total{device=\"mmcblk0p2\"} 95\nnode_disk_reads_completed_total{device=\"nvme0n1\"} 47114\nnode_disk_reads_completed_total{device=\"sda\"} 2.5354637e+07\nnode_disk_reads_completed_total{device=\"sdb\"} 326552\nnode_disk_reads_completed_total{device=\"sdc\"} 126552\nnode_disk_reads_completed_total{device=\"sr0\"} 0\nnode_disk_reads_completed_total{device=\"vda\"} 1.775784e+06\n# HELP node_disk_reads_merged_total The total number of reads merged.\n# TYPE node_disk_reads_merged_total counter\nnode_disk_reads_merged_total{device=\"dm-0\"} 0\nnode_disk_reads_merged_total{device=\"dm-1\"} 0\nnode_disk_reads_merged_total{device=\"dm-2\"} 0\nnode_disk_reads_merged_total{device=\"dm-3\"} 0\nnode_disk_reads_merged_total{device=\"dm-4\"} 0\nnode_disk_reads_merged_total{device=\"dm-5\"} 0\nnode_disk_reads_merged_total{device=\"mmcblk0\"} 3\nnode_disk_reads_merged_total{device=\"mmcblk0p1\"} 3\nnode_disk_reads_merged_total{device=\"mmcblk0p2\"} 0\nnode_disk_reads_merged_total{device=\"nvme0n1\"} 4\nnode_disk_reads_merged_total{device=\"sda\"} 3.4367663e+07\nnode_disk_reads_merged_total{device=\"sdb\"} 841\nnode_disk_reads_merged_total{device=\"sdc\"} 141\nnode_disk_reads_merged_total{device=\"sr0\"} 0\nnode_disk_reads_merged_total{device=\"vda\"} 15386\n# HELP node_disk_write_time_seconds_total This is the total number of seconds spent by all writes.\n# TYPE node_disk_write_time_seconds_total counter\nnode_disk_write_time_seconds_total{device=\"dm-0\"} 1.1585578e+06\nnode_disk_write_time_seconds_total{device=\"dm-1\"} 0\nnode_disk_write_time_seconds_total{device=\"dm-2\"} 122.884\nnode_disk_write_time_seconds_total{device=\"dm-3\"} 0\nnode_disk_write_time_seconds_total{device=\"dm-4\"} 0.016\nnode_disk_write_time_seconds_total{device=\"dm-5\"} 104.684\nnode_disk_write_time_seconds_total{device=\"mmcblk0\"} 0\nnode_disk_write_time_seconds_total{device=\"mmcblk0p1\"} 0\nnode_disk_write_time_seconds_total{device=\"mmcblk0p2\"} 0\nnode_disk_write_time_seconds_total{device=\"nvme0n1\"} 1011.053\nnode_disk_write_time_seconds_total{device=\"sda\"} 63877.96\nnode_disk_write_time_seconds_total{device=\"sdb\"} 5.007\nnode_disk_write_time_seconds_total{device=\"sdc\"} 1.0070000000000001\nnode_disk_write_time_seconds_total{device=\"sr0\"} 0\nnode_disk_write_time_seconds_total{device=\"vda\"} 2.069221364e+06\n# HELP node_disk_writes_completed_total The total number of writes completed successfully.\n# TYPE node_disk_writes_completed_total counter\nnode_disk_writes_completed_total{device=\"dm-0\"} 3.9231014e+07\nnode_disk_writes_completed_total{device=\"dm-1\"} 74\nnode_disk_writes_completed_total{device=\"dm-2\"} 153522\nnode_disk_writes_completed_total{device=\"dm-3\"} 0\nnode_disk_writes_completed_total{device=\"dm-4\"} 38\nnode_disk_writes_completed_total{device=\"dm-5\"} 98918\nnode_disk_writes_completed_total{device=\"mmcblk0\"} 0\nnode_disk_writes_completed_total{device=\"mmcblk0p1\"} 0\nnode_disk_writes_completed_total{device=\"mmcblk0p2\"} 0\nnode_disk_writes_completed_total{device=\"nvme0n1\"} 1.07832e+06\nnode_disk_writes_completed_total{device=\"sda\"} 2.8444756e+07\nnode_disk_writes_completed_total{device=\"sdb\"} 41822\nnode_disk_writes_completed_total{device=\"sdc\"} 11822\nnode_disk_writes_completed_total{device=\"sr0\"} 0\nnode_disk_writes_completed_total{device=\"vda\"} 6.038856e+06\n# HELP node_disk_writes_merged_total The number of writes merged.\n# TYPE node_disk_writes_merged_total counter\nnode_disk_writes_merged_total{device=\"dm-0\"} 0\nnode_disk_writes_merged_total{device=\"dm-1\"} 0\nnode_disk_writes_merged_total{device=\"dm-2\"} 0\nnode_disk_writes_merged_total{device=\"dm-3\"} 0\nnode_disk_writes_merged_total{device=\"dm-4\"} 0\nnode_disk_writes_merged_total{device=\"dm-5\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0p1\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0p2\"} 0\nnode_disk_writes_merged_total{device=\"nvme0n1\"} 43950\nnode_disk_writes_merged_total{device=\"sda\"} 1.1134226e+07\nnode_disk_writes_merged_total{device=\"sdb\"} 2895\nnode_disk_writes_merged_total{device=\"sdc\"} 1895\nnode_disk_writes_merged_total{device=\"sr0\"} 0\nnode_disk_writes_merged_total{device=\"vda\"} 2.0711856e+07\n# HELP node_disk_written_bytes_total The total number of bytes written successfully.\n# TYPE node_disk_written_bytes_total counter\nnode_disk_written_bytes_total{device=\"dm-0\"} 2.5891680256e+11\nnode_disk_written_bytes_total{device=\"dm-1\"} 303104\nnode_disk_written_bytes_total{device=\"dm-2\"} 2.607828992e+09\nnode_disk_written_bytes_total{device=\"dm-3\"} 0\nnode_disk_written_bytes_total{device=\"dm-4\"} 70144\nnode_disk_written_bytes_total{device=\"dm-5\"} 5.89664256e+08\nnode_disk_written_bytes_total{device=\"mmcblk0\"} 0\nnode_disk_written_bytes_total{device=\"mmcblk0p1\"} 0\nnode_disk_written_bytes_total{device=\"mmcblk0p2\"} 0\nnode_disk_written_bytes_total{device=\"nvme0n1\"} 2.0199236096e+10\nnode_disk_written_bytes_total{device=\"sda\"} 2.58916880384e+11\nnode_disk_written_bytes_total{device=\"sdb\"} 1.01012736e+09\nnode_disk_written_bytes_total{device=\"sdc\"} 8.852736e+07\nnode_disk_written_bytes_total{device=\"sr0\"} 0\nnode_disk_written_bytes_total{device=\"vda\"} 1.0938236928e+11\n`\n\n\tlogger := slog.New(slog.NewTextHandler(io.Discard, nil))\n\tcollector, err := NewDiskstatsCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tc, err := NewTestDiskStatsCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\treg := prometheus.NewRegistry()\n\treg.MustRegister(c)\n\n\tsink := make(chan prometheus.Metric)\n\tgo func() {\n\t\terr = collector.Update(sink)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"failed to update collector: %s\", err))\n\t\t}\n\t\tclose(sink)\n\t}()\n\n\terr = testutil.GatherAndCompare(reg, strings.NewReader(testcase))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n"
  },
  {
    "path": "collector/diskstats_openbsd.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodiskstats && !amd64\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\n/*\n#include <sys/types.h>\n#include <sys/disk.h>\n*/\nimport \"C\"\n\nconst diskstatsDefaultIgnoredDevices = \"\"\n\ntype diskstatsCollector struct {\n\trxfer  typedDesc\n\trbytes typedDesc\n\twxfer  typedDesc\n\twbytes typedDesc\n\ttime   typedDesc\n\n\tdeviceFilter deviceFilter\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"diskstats\", defaultEnabled, NewDiskstatsCollector)\n}\n\n// NewDiskstatsCollector returns a new Collector exposing disk device stats.\nfunc NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {\n\tdeviceFilter, err := newDiskstatsDeviceFilter(logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse device filter flags: %w\", err)\n\t}\n\n\treturn &diskstatsCollector{\n\t\trxfer:  typedDesc{readsCompletedDesc, prometheus.CounterValue},\n\t\trbytes: typedDesc{readBytesDesc, prometheus.CounterValue},\n\t\twxfer:  typedDesc{writesCompletedDesc, prometheus.CounterValue},\n\t\twbytes: typedDesc{writtenBytesDesc, prometheus.CounterValue},\n\t\ttime:   typedDesc{ioTimeSecondsDesc, prometheus.CounterValue},\n\n\t\tdeviceFilter: deviceFilter,\n\t\tlogger:       logger,\n\t}, nil\n}\n\nfunc (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) (err error) {\n\tdiskstatsb, err := unix.SysctlRaw(\"hw.diskstats\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tndisks := len(diskstatsb) / C.sizeof_struct_diskstats\n\tdiskstats := *(*[]C.struct_diskstats)(unsafe.Pointer(&diskstatsb))\n\n\tfor i := 0; i < ndisks; i++ {\n\t\tdiskname := C.GoString(&diskstats[i].ds_name[0])\n\t\tif c.deviceFilter.ignored(diskname) {\n\t\t\tcontinue\n\t\t}\n\n\t\tch <- c.rxfer.mustNewConstMetric(float64(diskstats[i].ds_rxfer), diskname)\n\t\tch <- c.rbytes.mustNewConstMetric(float64(diskstats[i].ds_rbytes), diskname)\n\t\tch <- c.wxfer.mustNewConstMetric(float64(diskstats[i].ds_wxfer), diskname)\n\t\tch <- c.wbytes.mustNewConstMetric(float64(diskstats[i].ds_wbytes), diskname)\n\t\ttime := float64(diskstats[i].ds_time.tv_sec) + float64(diskstats[i].ds_time.tv_usec)/1000000\n\t\tch <- c.time.mustNewConstMetric(time, diskname)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/diskstats_openbsd_amd64.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodiskstats\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tDS_DISKNAMELEN = 16\n\n\tdiskstatsDefaultIgnoredDevices = \"\"\n)\n\ntype DiskStats struct {\n\tName       [DS_DISKNAMELEN]int8\n\tBusy       int32\n\tRxfer      uint64\n\tWxfer      uint64\n\tSeek       uint64\n\tRbytes     uint64\n\tWbytes     uint64\n\tAttachtime unix.Timeval\n\tTimestamp  unix.Timeval\n\tTime       unix.Timeval\n}\n\ntype diskstatsCollector struct {\n\trxfer  typedDesc\n\trbytes typedDesc\n\twxfer  typedDesc\n\twbytes typedDesc\n\ttime   typedDesc\n\n\tdeviceFilter deviceFilter\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"diskstats\", defaultEnabled, NewDiskstatsCollector)\n}\n\n// NewDiskstatsCollector returns a new Collector exposing disk device stats.\nfunc NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {\n\tdeviceFilter, err := newDiskstatsDeviceFilter(logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse device filter flags: %w\", err)\n\t}\n\n\treturn &diskstatsCollector{\n\t\trxfer:  typedDesc{readsCompletedDesc, prometheus.CounterValue},\n\t\trbytes: typedDesc{readBytesDesc, prometheus.CounterValue},\n\t\twxfer:  typedDesc{writesCompletedDesc, prometheus.CounterValue},\n\t\twbytes: typedDesc{writtenBytesDesc, prometheus.CounterValue},\n\t\ttime:   typedDesc{ioTimeSecondsDesc, prometheus.CounterValue},\n\n\t\tdeviceFilter: deviceFilter,\n\t\tlogger:       logger,\n\t}, nil\n}\n\nfunc (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) (err error) {\n\tdiskstatsb, err := unix.SysctlRaw(\"hw.diskstats\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tndisks := len(diskstatsb) / int(unsafe.Sizeof(DiskStats{}))\n\tdiskstats := *(*[]DiskStats)(unsafe.Pointer(&diskstatsb))\n\n\tfor i := 0; i < ndisks; i++ {\n\t\tdn := *(*[DS_DISKNAMELEN]int8)(unsafe.Pointer(&diskstats[i].Name[0]))\n\t\tdiskname := int8ToString(dn[:])\n\t\tif c.deviceFilter.ignored(diskname) {\n\t\t\tcontinue\n\t\t}\n\n\t\tch <- c.rxfer.mustNewConstMetric(float64(diskstats[i].Rxfer), diskname)\n\t\tch <- c.rbytes.mustNewConstMetric(float64(diskstats[i].Rbytes), diskname)\n\t\tch <- c.wxfer.mustNewConstMetric(float64(diskstats[i].Wxfer), diskname)\n\t\tch <- c.wbytes.mustNewConstMetric(float64(diskstats[i].Wbytes), diskname)\n\t\ttime := float64(diskstats[i].Time.Sec) + float64(diskstats[i].Time.Usec)/1000000\n\t\tch <- c.time.mustNewConstMetric(time, diskname)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/dmi.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build linux && !nodmi\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\ntype dmiCollector struct {\n\tinfoDesc *prometheus.Desc\n\tvalues   []string\n}\n\nfunc init() {\n\tregisterCollector(\"dmi\", defaultEnabled, NewDMICollector)\n}\n\n// NewDMICollector returns a new Collector exposing DMI information.\nfunc NewDMICollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\tdmi, err := fs.DMIClass()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tlogger.Debug(\"Platform does not support Desktop Management Interface (DMI) information\", \"err\", err)\n\t\t\tdmi = &sysfs.DMIClass{}\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"failed to read Desktop Management Interface (DMI) information: %w\", err)\n\t\t}\n\t}\n\n\tvar labels, values []string\n\tfor label, value := range map[string]*string{\n\t\t\"bios_date\":         dmi.BiosDate,\n\t\t\"bios_release\":      dmi.BiosRelease,\n\t\t\"bios_vendor\":       dmi.BiosVendor,\n\t\t\"bios_version\":      dmi.BiosVersion,\n\t\t\"board_asset_tag\":   dmi.BoardAssetTag,\n\t\t\"board_name\":        dmi.BoardName,\n\t\t\"board_serial\":      dmi.BoardSerial,\n\t\t\"board_vendor\":      dmi.BoardVendor,\n\t\t\"board_version\":     dmi.BoardVersion,\n\t\t\"chassis_asset_tag\": dmi.ChassisAssetTag,\n\t\t\"chassis_serial\":    dmi.ChassisSerial,\n\t\t\"chassis_vendor\":    dmi.ChassisVendor,\n\t\t\"chassis_version\":   dmi.ChassisVersion,\n\t\t\"product_family\":    dmi.ProductFamily,\n\t\t\"product_name\":      dmi.ProductName,\n\t\t\"product_serial\":    dmi.ProductSerial,\n\t\t\"product_sku\":       dmi.ProductSKU,\n\t\t\"product_uuid\":      dmi.ProductUUID,\n\t\t\"product_version\":   dmi.ProductVersion,\n\t\t\"system_vendor\":     dmi.SystemVendor,\n\t} {\n\t\tif value != nil {\n\t\t\tlabels = append(labels, label)\n\t\t\tvalues = append(values, strings.ToValidUTF8(*value, \"�\"))\n\t\t}\n\t}\n\n\t// Construct DMI metric only once since it will not change until the next reboot.\n\treturn &dmiCollector{\n\t\tinfoDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"dmi\", \"info\"),\n\t\t\t\"A metric with a constant '1' value labeled by bios_date, bios_release, bios_vendor, bios_version, \"+\n\t\t\t\t\"board_asset_tag, board_name, board_serial, board_vendor, board_version, chassis_asset_tag, \"+\n\t\t\t\t\"chassis_serial, chassis_vendor, chassis_version, product_family, product_name, product_serial, \"+\n\t\t\t\t\"product_sku, product_uuid, product_version, system_vendor if provided by DMI.\",\n\t\t\tlabels, nil,\n\t\t),\n\t\tvalues: values,\n\t}, nil\n}\n\nfunc (c *dmiCollector) Update(ch chan<- prometheus.Metric) error {\n\tif len(c.values) == 0 {\n\t\treturn ErrNoData\n\t}\n\tch <- prometheus.MustNewConstMetric(c.infoDesc, prometheus.GaugeValue, 1.0, c.values...)\n\treturn nil\n}\n"
  },
  {
    "path": "collector/drbd_linux.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nodrbd\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// Numerical metric provided by /proc/drbd.\ntype drbdNumericalMetric struct {\n\tdesc       *prometheus.Desc\n\tvalueType  prometheus.ValueType\n\tmultiplier float64\n}\n\nfunc newDRBDNumericalMetric(name, desc string, valueType prometheus.ValueType, multiplier float64) drbdNumericalMetric {\n\treturn drbdNumericalMetric{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"drbd\", name),\n\t\t\tdesc,\n\t\t\t[]string{\"device\"},\n\t\t\tnil,\n\t\t),\n\t\tvalueType:  valueType,\n\t\tmultiplier: multiplier,\n\t}\n}\n\n// String pair metric provided by /proc/drbd.\ntype drbdStringPairMetric struct {\n\tdesc    *prometheus.Desc\n\tvalueOK string\n}\n\nfunc (m *drbdStringPairMetric) isOkay(v string) float64 {\n\tif v == m.valueOK {\n\t\treturn 1\n\t}\n\n\treturn 0\n}\n\nfunc newDRBDStringPairMetric(name, desc, valueOK string) drbdStringPairMetric {\n\treturn drbdStringPairMetric{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"drbd\", name),\n\t\t\tdesc,\n\t\t\t[]string{\"device\", \"node\"},\n\t\t\tnil,\n\t\t),\n\t\tvalueOK: valueOK,\n\t}\n}\n\ntype drbdCollector struct {\n\tnumerical  map[string]drbdNumericalMetric\n\tstringPair map[string]drbdStringPairMetric\n\tconnected  *prometheus.Desc\n\tlogger     *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"drbd\", defaultDisabled, newDRBDCollector)\n}\n\nfunc newDRBDCollector(logger *slog.Logger) (Collector, error) {\n\treturn &drbdCollector{\n\t\tnumerical: map[string]drbdNumericalMetric{\n\t\t\t\"ns\": newDRBDNumericalMetric(\n\t\t\t\t\"network_sent_bytes_total\",\n\t\t\t\t\"Total number of bytes sent via the network.\",\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\t1024,\n\t\t\t),\n\t\t\t\"nr\": newDRBDNumericalMetric(\n\t\t\t\t\"network_received_bytes_total\",\n\t\t\t\t\"Total number of bytes received via the network.\",\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\t1,\n\t\t\t),\n\t\t\t\"dw\": newDRBDNumericalMetric(\n\t\t\t\t\"disk_written_bytes_total\",\n\t\t\t\t\"Net data written on local hard disk; in bytes.\",\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\t1024,\n\t\t\t),\n\t\t\t\"dr\": newDRBDNumericalMetric(\n\t\t\t\t\"disk_read_bytes_total\",\n\t\t\t\t\"Net data read from local hard disk; in bytes.\",\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\t1024,\n\t\t\t),\n\t\t\t\"al\": newDRBDNumericalMetric(\n\t\t\t\t\"activitylog_writes_total\",\n\t\t\t\t\"Number of updates of the activity log area of the meta data.\",\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\t1,\n\t\t\t),\n\t\t\t\"bm\": newDRBDNumericalMetric(\n\t\t\t\t\"bitmap_writes_total\",\n\t\t\t\t\"Number of updates of the bitmap area of the meta data.\",\n\t\t\t\tprometheus.CounterValue,\n\t\t\t\t1,\n\t\t\t),\n\t\t\t\"lo\": newDRBDNumericalMetric(\n\t\t\t\t\"local_pending\",\n\t\t\t\t\"Number of open requests to the local I/O sub-system.\",\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t1,\n\t\t\t),\n\t\t\t\"pe\": newDRBDNumericalMetric(\n\t\t\t\t\"remote_pending\",\n\t\t\t\t\"Number of requests sent to the peer, but that have not yet been answered by the latter.\",\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t1,\n\t\t\t),\n\t\t\t\"ua\": newDRBDNumericalMetric(\n\t\t\t\t\"remote_unacknowledged\",\n\t\t\t\t\"Number of requests received by the peer via the network connection, but that have not yet been answered.\",\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t1,\n\t\t\t),\n\t\t\t\"ap\": newDRBDNumericalMetric(\n\t\t\t\t\"application_pending\",\n\t\t\t\t\"Number of block I/O requests forwarded to DRBD, but not yet answered by DRBD.\",\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t1,\n\t\t\t),\n\t\t\t\"ep\": newDRBDNumericalMetric(\n\t\t\t\t\"epochs\",\n\t\t\t\t\"Number of Epochs currently on the fly.\",\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t1,\n\t\t\t),\n\t\t\t\"oos\": newDRBDNumericalMetric(\n\t\t\t\t\"out_of_sync_bytes\",\n\t\t\t\t\"Amount of data known to be out of sync; in bytes.\",\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t1024,\n\t\t\t),\n\t\t},\n\n\t\tstringPair: map[string]drbdStringPairMetric{\n\t\t\t\"ro\": newDRBDStringPairMetric(\n\t\t\t\t\"node_role_is_primary\",\n\t\t\t\t\"Whether the role of the node is in the primary state.\",\n\t\t\t\t\"Primary\",\n\t\t\t),\n\t\t\t\"ds\": newDRBDStringPairMetric(\n\t\t\t\t\"disk_state_is_up_to_date\",\n\t\t\t\t\"Whether the disk of the node is up to date.\",\n\t\t\t\t\"UpToDate\",\n\t\t\t),\n\t\t},\n\n\t\tconnected: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"drbd\", \"connected\"),\n\t\t\t\"Whether DRBD is connected to the peer.\",\n\t\t\t[]string{\"device\"},\n\t\t\tnil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *drbdCollector) Update(ch chan<- prometheus.Metric) error {\n\tstatsFile := procFilePath(\"drbd\")\n\tfile, err := os.Open(statsFile)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"stats file does not exist, skipping\", \"file\", statsFile, \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\n\t\treturn err\n\t}\n\tdefer file.Close()\n\n\tscanner := bufio.NewScanner(file)\n\tscanner.Split(bufio.ScanWords)\n\tdevice := \"unknown\"\n\n\tfor scanner.Scan() {\n\t\tfield := scanner.Text()\n\n\t\tkv := strings.Split(field, \":\")\n\t\tif len(kv) != 2 {\n\t\t\tc.logger.Debug(\"skipping invalid key:value pair\", \"field\", field)\n\t\t\tcontinue\n\t\t}\n\n\t\tif id, err := strconv.ParseUint(kv[0], 10, 64); err == nil && kv[1] == \"\" {\n\t\t\t// New DRBD device encountered.\n\t\t\tdevice = fmt.Sprintf(\"drbd%d\", id)\n\t\t\tcontinue\n\t\t}\n\n\t\tif m, ok := c.numerical[kv[0]]; ok {\n\t\t\t// Numerical value.\n\t\t\tv, err := strconv.ParseFloat(kv[1], 64)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tm.desc,\n\t\t\t\tm.valueType,\n\t\t\t\tv*m.multiplier,\n\t\t\t\tdevice,\n\t\t\t)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif m, ok := c.stringPair[kv[0]]; ok {\n\t\t\t// String pair value.\n\t\t\tvalues := strings.Split(kv[1], \"/\")\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tm.desc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tm.isOkay(values[0]),\n\t\t\t\tdevice,\n\t\t\t\t\"local\",\n\t\t\t)\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tm.desc,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tm.isOkay(values[1]),\n\t\t\t\tdevice,\n\t\t\t\t\"remote\",\n\t\t\t)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tif kv[0] == \"cs\" {\n\t\t\t// Connection state.\n\t\t\tvar connected float64\n\t\t\tif kv[1] == \"Connected\" {\n\t\t\t\tconnected = 1\n\t\t\t}\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.connected,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tconnected,\n\t\t\t\tdevice,\n\t\t\t)\n\n\t\t\tcontinue\n\t\t}\n\n\t\tc.logger.Debug(\"unhandled key-value pair\", \"key\", kv[0], \"value\", kv[1])\n\t}\n\n\treturn scanner.Err()\n}\n"
  },
  {
    "path": "collector/drm_linux.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nogpu\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nconst (\n\tdrmCollectorSubsystem = \"drm\"\n)\n\ntype drmCollector struct {\n\tfs                    sysfs.FS\n\tlogger                *slog.Logger\n\tCardInfo              *prometheus.Desc\n\tGPUBusyPercent        *prometheus.Desc\n\tMemoryGTTSize         *prometheus.Desc\n\tMemoryGTTUsed         *prometheus.Desc\n\tMemoryVisibleVRAMSize *prometheus.Desc\n\tMemoryVisibleVRAMUsed *prometheus.Desc\n\tMemoryVRAMSize        *prometheus.Desc\n\tMemoryVRAMUsed        *prometheus.Desc\n}\n\nfunc init() {\n\tregisterCollector(\"drm\", defaultDisabled, NewDrmCollector)\n}\n\n// NewDrmCollector returns a new Collector exposing /sys/class/drm/card?/device stats.\nfunc NewDrmCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\treturn &drmCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t\tCardInfo: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, drmCollectorSubsystem, \"card_info\"),\n\t\t\t\"Card information\",\n\t\t\t[]string{\"card\", \"memory_vendor\", \"power_performance_level\", \"unique_id\", \"vendor\"}, nil,\n\t\t),\n\t\tGPUBusyPercent: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, drmCollectorSubsystem, \"gpu_busy_percent\"),\n\t\t\t\"How busy the GPU is as a percentage.\",\n\t\t\t[]string{\"card\"}, nil,\n\t\t),\n\t\tMemoryGTTSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, drmCollectorSubsystem, \"memory_gtt_size_bytes\"),\n\t\t\t\"The size of the graphics translation table (GTT) block in bytes.\",\n\t\t\t[]string{\"card\"}, nil,\n\t\t),\n\t\tMemoryGTTUsed: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, drmCollectorSubsystem, \"memory_gtt_used_bytes\"),\n\t\t\t\"The used amount of the graphics translation table (GTT) block in bytes.\",\n\t\t\t[]string{\"card\"}, nil,\n\t\t),\n\t\tMemoryVisibleVRAMSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, drmCollectorSubsystem, \"memory_vis_vram_size_bytes\"),\n\t\t\t\"The size of visible VRAM in bytes.\",\n\t\t\t[]string{\"card\"}, nil,\n\t\t),\n\t\tMemoryVisibleVRAMUsed: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, drmCollectorSubsystem, \"memory_vis_vram_used_bytes\"),\n\t\t\t\"The used amount of visible VRAM in bytes.\",\n\t\t\t[]string{\"card\"}, nil,\n\t\t),\n\t\tMemoryVRAMSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, drmCollectorSubsystem, \"memory_vram_size_bytes\"),\n\t\t\t\"The size of VRAM in bytes.\",\n\t\t\t[]string{\"card\"}, nil,\n\t\t),\n\t\tMemoryVRAMUsed: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, drmCollectorSubsystem, \"memory_vram_used_bytes\"),\n\t\t\t\"The used amount of VRAM in bytes.\",\n\t\t\t[]string{\"card\"}, nil,\n\t\t),\n\t}, nil\n}\n\nfunc (c *drmCollector) Update(ch chan<- prometheus.Metric) error {\n\treturn c.updateAMDCards(ch)\n}\n\nfunc (c *drmCollector) updateAMDCards(ch chan<- prometheus.Metric) error {\n\tvendor := \"amd\"\n\tstats, err := c.fs.ClassDRMCardAMDGPUStats()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, s := range stats {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.CardInfo, prometheus.GaugeValue, 1,\n\t\t\ts.Name, s.MemoryVRAMVendor, s.PowerDPMForcePerformanceLevel, s.UniqueID, vendor)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.GPUBusyPercent, prometheus.GaugeValue, float64(s.GPUBusyPercent), s.Name)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.MemoryGTTSize, prometheus.GaugeValue, float64(s.MemoryGTTSize), s.Name)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.MemoryGTTUsed, prometheus.GaugeValue, float64(s.MemoryGTTUsed), s.Name)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.MemoryVRAMSize, prometheus.GaugeValue, float64(s.MemoryVRAMSize), s.Name)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.MemoryVRAMUsed, prometheus.GaugeValue, float64(s.MemoryVRAMUsed), s.Name)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.MemoryVisibleVRAMSize, prometheus.GaugeValue, float64(s.MemoryVisibleVRAMSize), s.Name)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.MemoryVisibleVRAMUsed, prometheus.GaugeValue, float64(s.MemoryVisibleVRAMUsed), s.Name)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/edac_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noedac\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"path/filepath\"\n\t\"regexp\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tedacSubsystem = \"edac\"\n)\n\nvar (\n\tedacMemControllerRE = regexp.MustCompile(`.*devices/system/edac/mc/mc([0-9]*)`)\n\tedacMemCsrowRE      = regexp.MustCompile(`.*devices/system/edac/mc/mc[0-9]*/csrow([0-9]*)`)\n)\n\ntype edacCollector struct {\n\tceCount      *prometheus.Desc\n\tueCount      *prometheus.Desc\n\tcsRowCECount *prometheus.Desc\n\tcsRowUECount *prometheus.Desc\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"edac\", defaultEnabled, NewEdacCollector)\n}\n\n// NewEdacCollector returns a new Collector exposing edac stats.\nfunc NewEdacCollector(logger *slog.Logger) (Collector, error) {\n\treturn &edacCollector{\n\t\tceCount: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, edacSubsystem, \"correctable_errors_total\"),\n\t\t\t\"Total correctable memory errors.\",\n\t\t\t[]string{\"controller\"}, nil,\n\t\t),\n\t\tueCount: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, edacSubsystem, \"uncorrectable_errors_total\"),\n\t\t\t\"Total uncorrectable memory errors.\",\n\t\t\t[]string{\"controller\"}, nil,\n\t\t),\n\t\tcsRowCECount: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, edacSubsystem, \"csrow_correctable_errors_total\"),\n\t\t\t\"Total correctable memory errors for this csrow.\",\n\t\t\t[]string{\"controller\", \"csrow\"}, nil,\n\t\t),\n\t\tcsRowUECount: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, edacSubsystem, \"csrow_uncorrectable_errors_total\"),\n\t\t\t\"Total uncorrectable memory errors for this csrow.\",\n\t\t\t[]string{\"controller\", \"csrow\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *edacCollector) Update(ch chan<- prometheus.Metric) error {\n\tmemControllers, err := filepath.Glob(sysFilePath(\"devices/system/edac/mc/mc[0-9]*\"))\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, controller := range memControllers {\n\t\tcontrollerMatch := edacMemControllerRE.FindStringSubmatch(controller)\n\t\tif controllerMatch == nil {\n\t\t\treturn fmt.Errorf(\"controller string didn't match regexp: %s\", controller)\n\t\t}\n\t\tcontrollerNumber := controllerMatch[1]\n\n\t\tvalue, err := readUintFromFile(filepath.Join(controller, \"ce_count\"))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"couldn't get ce_count for controller %s: %w\", controllerNumber, err)\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.ceCount, prometheus.CounterValue, float64(value), controllerNumber)\n\n\t\tvalue, err = readUintFromFile(filepath.Join(controller, \"ce_noinfo_count\"))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"couldn't get ce_noinfo_count for controller %s: %w\", controllerNumber, err)\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.csRowCECount, prometheus.CounterValue, float64(value), controllerNumber, \"unknown\")\n\n\t\tvalue, err = readUintFromFile(filepath.Join(controller, \"ue_count\"))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"couldn't get ue_count for controller %s: %w\", controllerNumber, err)\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.ueCount, prometheus.CounterValue, float64(value), controllerNumber)\n\n\t\tvalue, err = readUintFromFile(filepath.Join(controller, \"ue_noinfo_count\"))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"couldn't get ue_noinfo_count for controller %s: %w\", controllerNumber, err)\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.csRowUECount, prometheus.CounterValue, float64(value), controllerNumber, \"unknown\")\n\n\t\t// For each controller, walk the csrow directories.\n\t\tcsrows, err := filepath.Glob(controller + \"/csrow[0-9]*\")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor _, csrow := range csrows {\n\t\t\tcsrowMatch := edacMemCsrowRE.FindStringSubmatch(csrow)\n\t\t\tif csrowMatch == nil {\n\t\t\t\treturn fmt.Errorf(\"csrow string didn't match regexp: %s\", csrow)\n\t\t\t}\n\t\t\tcsrowNumber := csrowMatch[1]\n\n\t\t\tvalue, err = readUintFromFile(filepath.Join(csrow, \"ce_count\"))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"couldn't get ce_count for controller/csrow %s/%s: %w\", controllerNumber, csrowNumber, err)\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.csRowCECount, prometheus.CounterValue, float64(value), controllerNumber, csrowNumber)\n\n\t\t\tvalue, err = readUintFromFile(filepath.Join(csrow, \"ue_count\"))\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"couldn't get ue_count for controller/csrow %s/%s: %w\", controllerNumber, csrowNumber, err)\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.csRowUECount, prometheus.CounterValue, float64(value), controllerNumber, csrowNumber)\n\t\t}\n\t}\n\n\treturn err\n}\n"
  },
  {
    "path": "collector/entropy_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noentropy\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype entropyCollector struct {\n\tfs              procfs.FS\n\tentropyAvail    *prometheus.Desc\n\tentropyPoolSize *prometheus.Desc\n\tlogger          *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"entropy\", defaultEnabled, NewEntropyCollector)\n}\n\n// NewEntropyCollector returns a new Collector exposing entropy stats.\nfunc NewEntropyCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &entropyCollector{\n\t\tfs: fs,\n\t\tentropyAvail: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"entropy_available_bits\"),\n\t\t\t\"Bits of available entropy.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tentropyPoolSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"entropy_pool_size_bits\"),\n\t\t\t\"Bits of entropy pool.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *entropyCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.fs.KernelRandom()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get kernel random stats: %w\", err)\n\t}\n\n\tif stats.EntropyAvaliable == nil {\n\t\treturn fmt.Errorf(\"couldn't get entropy_avail\")\n\t}\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.entropyAvail, prometheus.GaugeValue, float64(*stats.EntropyAvaliable))\n\n\tif stats.PoolSize == nil {\n\t\treturn fmt.Errorf(\"couldn't get entropy poolsize\")\n\t}\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.entropyPoolSize, prometheus.GaugeValue, float64(*stats.PoolSize))\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/ethtool_linux.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noethtool\n\n// The hard work of collecting data from the kernel via the ethtool interfaces is done by\n// https://github.com/safchain/ethtool/\n// by Sylvain Afchain. Used under the Apache license.\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n\t\"sync\"\n\t\"syscall\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n\t\"github.com/safchain/ethtool\"\n\t\"golang.org/x/sys/unix\"\n)\n\nvar (\n\tethtoolDeviceInclude   = kingpin.Flag(\"collector.ethtool.device-include\", \"Regexp of ethtool devices to include (mutually exclusive to device-exclude).\").String()\n\tethtoolDeviceExclude   = kingpin.Flag(\"collector.ethtool.device-exclude\", \"Regexp of ethtool devices to exclude (mutually exclusive to device-include).\").String()\n\tethtoolIncludedMetrics = kingpin.Flag(\"collector.ethtool.metrics-include\", \"Regexp of ethtool stats to include.\").Default(\".*\").String()\n\tethtoolReceivedRegex   = regexp.MustCompile(`(^|_)rx(_|$)`)\n\tethtoolTransmitRegex   = regexp.MustCompile(`(^|_)tx(_|$)`)\n)\n\ntype Ethtool interface {\n\tDriverInfo(string) (ethtool.DrvInfo, error)\n\tStats(string) (map[string]uint64, error)\n\tLinkInfo(string) (ethtool.EthtoolCmd, error)\n}\n\ntype ethtoolLibrary struct {\n\tethtool *ethtool.Ethtool\n}\n\nfunc (e *ethtoolLibrary) DriverInfo(intf string) (ethtool.DrvInfo, error) {\n\treturn e.ethtool.DriverInfo(intf)\n}\n\nfunc (e *ethtoolLibrary) Stats(intf string) (map[string]uint64, error) {\n\treturn e.ethtool.Stats(intf)\n}\n\nfunc (e *ethtoolLibrary) LinkInfo(intf string) (ethtool.EthtoolCmd, error) {\n\tvar ethtoolCmd ethtool.EthtoolCmd\n\t_, err := ethtoolCmd.CmdGet(intf)\n\treturn ethtoolCmd, err\n}\n\ntype ethtoolCollector struct {\n\tfs             sysfs.FS\n\tentries        map[string]*prometheus.Desc\n\tentriesMutex   sync.Mutex\n\tethtool        Ethtool\n\tdeviceFilter   deviceFilter\n\tinfoDesc       *prometheus.Desc\n\tmetricsPattern *regexp.Regexp\n\tlogger         *slog.Logger\n}\n\n// makeEthtoolCollector is the internal constructor for EthtoolCollector.\n// This allows NewEthtoolTestCollector to override its .ethtool interface\n// for testing.\nfunc makeEthtoolCollector(logger *slog.Logger) (*ethtoolCollector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\te, err := ethtool.NewEthtool()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to initialize ethtool library: %w\", err)\n\t}\n\n\tif *ethtoolDeviceInclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.ethtool.device-include\", \"flag\", *ethtoolDeviceInclude)\n\t}\n\tif *ethtoolDeviceExclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.ethtool.device-exclude\", \"flag\", *ethtoolDeviceExclude)\n\t}\n\tif *ethtoolIncludedMetrics != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.ethtool.metrics-include\", \"flag\", *ethtoolIncludedMetrics)\n\t}\n\n\t// Pre-populate some common ethtool metrics.\n\treturn &ethtoolCollector{\n\t\tfs:             fs,\n\t\tethtool:        &ethtoolLibrary{e},\n\t\tdeviceFilter:   newDeviceFilter(*ethtoolDeviceExclude, *ethtoolDeviceInclude),\n\t\tmetricsPattern: regexp.MustCompile(*ethtoolIncludedMetrics),\n\t\tlogger:         logger,\n\t\tentries: map[string]*prometheus.Desc{\n\t\t\t\"rx_bytes\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"ethtool\", \"received_bytes_total\"),\n\t\t\t\t\"Network interface bytes received\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"rx_dropped\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"ethtool\", \"received_dropped_total\"),\n\t\t\t\t\"Number of received frames dropped\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"rx_errors\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"ethtool\", \"received_errors_total\"),\n\t\t\t\t\"Number of received frames with errors\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"rx_packets\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"ethtool\", \"received_packets_total\"),\n\t\t\t\t\"Network interface packets received\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"tx_bytes\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"ethtool\", \"transmitted_bytes_total\"),\n\t\t\t\t\"Network interface bytes sent\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"tx_errors\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"ethtool\", \"transmitted_errors_total\"),\n\t\t\t\t\"Number of sent frames with errors\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"tx_packets\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"ethtool\", \"transmitted_packets_total\"),\n\t\t\t\t\"Network interface packets sent\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\n\t\t\t// link info\n\t\t\t\"supported_port\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"supported_port_info\"),\n\t\t\t\t\"Type of ports or PHYs supported by network device\",\n\t\t\t\t[]string{\"device\", \"type\"}, nil,\n\t\t\t),\n\t\t\t\"supported_speed\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"supported_speed_bytes\"),\n\t\t\t\t\"Combination of speeds and features supported by network device\",\n\t\t\t\t[]string{\"device\", \"duplex\", \"mode\"}, nil,\n\t\t\t),\n\t\t\t\"supported_autonegotiate\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"autonegotiate_supported\"),\n\t\t\t\t\"If this port device supports autonegotiate\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"supported_pause\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"pause_supported\"),\n\t\t\t\t\"If this port device supports pause frames\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"supported_asymmetricpause\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"asymmetricpause_supported\"),\n\t\t\t\t\"If this port device supports asymmetric pause frames\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"advertised_speed\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"advertised_speed_bytes\"),\n\t\t\t\t\"Combination of speeds and features offered by network device\",\n\t\t\t\t[]string{\"device\", \"duplex\", \"mode\"}, nil,\n\t\t\t),\n\t\t\t\"advertised_autonegotiate\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"autonegotiate_advertised\"),\n\t\t\t\t\"If this port device offers autonegotiate\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"advertised_pause\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"pause_advertised\"),\n\t\t\t\t\"If this port device offers pause capability\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"advertised_asymmetricpause\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"asymmetricpause_advertised\"),\n\t\t\t\t\"If this port device offers asymmetric pause capability\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t\t\"autonegotiate\": prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"network\", \"autonegotiate\"),\n\t\t\t\t\"If this port is using autonegotiate\",\n\t\t\t\t[]string{\"device\"}, nil,\n\t\t\t),\n\t\t},\n\t\tinfoDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"ethtool\", \"info\"),\n\t\t\t\"A metric with a constant '1' value labeled by bus_info, device, driver, expansion_rom_version, firmware_version, version.\",\n\t\t\t[]string{\"bus_info\", \"device\", \"driver\", \"expansion_rom_version\", \"firmware_version\", \"version\"}, nil,\n\t\t),\n\t}, nil\n}\n\nfunc init() {\n\tregisterCollector(\"ethtool\", defaultDisabled, NewEthtoolCollector)\n}\n\n// Generate the fully-qualified metric name for the ethool metric.\nfunc buildEthtoolFQName(metric string) string {\n\tmetricName := strings.TrimLeft(strings.ToLower(SanitizeMetricName(metric)), \"_\")\n\tmetricName = ethtoolReceivedRegex.ReplaceAllString(metricName, \"${1}received${2}\")\n\tmetricName = ethtoolTransmitRegex.ReplaceAllString(metricName, \"${1}transmitted${2}\")\n\treturn prometheus.BuildFQName(namespace, \"ethtool\", metricName)\n}\n\n// NewEthtoolCollector returns a new Collector exposing ethtool stats.\nfunc NewEthtoolCollector(logger *slog.Logger) (Collector, error) {\n\treturn makeEthtoolCollector(logger)\n}\n\n// updatePortCapabilities generates metrics for autonegotiate, pause and asymmetricpause.\n// The bit offsets here correspond to ethtool_link_mode_bit_indices in linux/include/uapi/linux/ethtool.h\n// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ethtool.h\nfunc (c *ethtoolCollector) updatePortCapabilities(ch chan<- prometheus.Metric, prefix string, device string, linkModes uint32) {\n\tvar (\n\t\tautonegotiate   = 0.0\n\t\tpause           = 0.0\n\t\tasymmetricPause = 0.0\n\t)\n\tif linkModes&(1<<unix.ETHTOOL_LINK_MODE_Autoneg_BIT) != 0 {\n\t\tautonegotiate = 1.0\n\t}\n\tif linkModes&(1<<unix.ETHTOOL_LINK_MODE_Pause_BIT) != 0 {\n\t\tpause = 1.0\n\t}\n\tif linkModes&(1<<unix.ETHTOOL_LINK_MODE_Asym_Pause_BIT) != 0 {\n\t\tasymmetricPause = 1.0\n\t}\n\tch <- prometheus.MustNewConstMetric(c.entry(fmt.Sprintf(\"%s_autonegotiate\", prefix)), prometheus.GaugeValue, autonegotiate, device)\n\tch <- prometheus.MustNewConstMetric(c.entry(fmt.Sprintf(\"%s_pause\", prefix)), prometheus.GaugeValue, pause, device)\n\tch <- prometheus.MustNewConstMetric(c.entry(fmt.Sprintf(\"%s_asymmetricpause\", prefix)), prometheus.GaugeValue, asymmetricPause, device)\n}\n\n// updatePortInfo generates port type metrics to indicate if the network devices supports Twisted Pair, optical fiber, etc.\n// The bit offsets here correspond to ethtool_link_mode_bit_indices in linux/include/uapi/linux/ethtool.h\n// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ethtool.h\nfunc (c *ethtoolCollector) updatePortInfo(ch chan<- prometheus.Metric, device string, linkModes uint32) {\n\tfor name, bit := range map[string]int{\n\t\t\"TP\":        unix.ETHTOOL_LINK_MODE_TP_BIT,\n\t\t\"AUI\":       unix.ETHTOOL_LINK_MODE_AUI_BIT,\n\t\t\"MII\":       unix.ETHTOOL_LINK_MODE_MII_BIT,\n\t\t\"FIBRE\":     unix.ETHTOOL_LINK_MODE_FIBRE_BIT,\n\t\t\"BNC\":       unix.ETHTOOL_LINK_MODE_BNC_BIT,\n\t\t\"Backplane\": unix.ETHTOOL_LINK_MODE_Backplane_BIT,\n\t} {\n\t\tif linkModes&(1<<bit) != 0 {\n\t\t\tch <- prometheus.MustNewConstMetric(c.entry(\"supported_port\"), prometheus.GaugeValue, 1.0, device, name)\n\t\t}\n\n\t}\n}\n\n// updateSpeeds generates metrics corresponding to the speeds and duplex modes supported or advertised by the network device.\n// The bit offsets here correspond to ethtool_link_mode_bit_indices in linux/include/uapi/linux/ethtool.h\n// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ethtool.h\nfunc (c *ethtoolCollector) updateSpeeds(ch chan<- prometheus.Metric, prefix string, device string, linkModes uint32) {\n\tlinkMode := fmt.Sprintf(\"%s_speed\", prefix)\n\tconst (\n\t\tfull = \"full\"\n\t\thalf = \"half\"\n\t\t// This is in _bytes_ to match bytes-per-second speeds from netclass.\n\t\tMbps = 1000000.0 / 8.0\n\t)\n\n\tfor bit, labels := range map[int]struct {\n\t\tspeed  int\n\t\tduplex string\n\t\tphy    string\n\t}{\n\t\tunix.ETHTOOL_LINK_MODE_10baseT_Half_BIT:               {10, half, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_10baseT_Full_BIT:               {10, full, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_100baseT_Half_BIT:              {100, half, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_100baseT_Full_BIT:              {100, full, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_1000baseT_Half_BIT:             {1000, half, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_1000baseT_Full_BIT:             {1000, full, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseT_Full_BIT:            {10000, full, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_2500baseT_Full_BIT:             {2500, full, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_1000baseKX_Full_BIT:            {1000, full, \"KX\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT:          {10000, full, \"KX4\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseKR_Full_BIT:           {10000, full, \"KR\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseR_FEC_BIT:             {10000, full, \"R_FEC\"},\n\t\tunix.ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT:         {20000, full, \"MLD2\"},\n\t\tunix.ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT:          {20000, full, \"KR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT:          {40000, full, \"KR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT:          {40000, full, \"CR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT:          {40000, full, \"SR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT:          {40000, full, \"LR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT:          {56000, full, \"KR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT:          {56000, full, \"CR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT:          {56000, full, \"SR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT:          {56000, full, \"LR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_25000baseCR_Full_BIT:           {25000, full, \"CR\"},\n\t\tunix.ETHTOOL_LINK_MODE_25000baseKR_Full_BIT:           {25000, full, \"KR\"},\n\t\tunix.ETHTOOL_LINK_MODE_25000baseSR_Full_BIT:           {25000, full, \"SR\"},\n\t\tunix.ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT:          {50000, full, \"CR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT:          {50000, full, \"KR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT:         {100000, full, \"KR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT:         {100000, full, \"SR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT:         {100000, full, \"CR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT:     {100000, full, \"R4_ER4\"},\n\t\tunix.ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT:          {50000, full, \"SR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_1000baseX_Full_BIT:             {1000, full, \"X\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseCR_Full_BIT:           {10000, full, \"CR\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseSR_Full_BIT:           {10000, full, \"SR\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseLR_Full_BIT:           {10000, full, \"LR\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT:          {10000, full, \"LRM\"},\n\t\tunix.ETHTOOL_LINK_MODE_10000baseER_Full_BIT:           {10000, full, \"ER\"},\n\t\tunix.ETHTOOL_LINK_MODE_5000baseT_Full_BIT:             {5000, full, \"T\"},\n\t\tunix.ETHTOOL_LINK_MODE_50000baseKR_Full_BIT:           {50000, full, \"KR\"},\n\t\tunix.ETHTOOL_LINK_MODE_50000baseSR_Full_BIT:           {50000, full, \"SR\"},\n\t\tunix.ETHTOOL_LINK_MODE_50000baseCR_Full_BIT:           {50000, full, \"CR\"},\n\t\tunix.ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT:     {50000, full, \"LR_ER_FR\"},\n\t\tunix.ETHTOOL_LINK_MODE_50000baseDR_Full_BIT:           {50000, full, \"DR\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT:         {100000, full, \"KR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT:         {100000, full, \"SR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT:         {100000, full, \"CR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT: {100000, full, \"LR2_ER2_FR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT:         {100000, full, \"DR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT:         {200000, full, \"KR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT:         {200000, full, \"SR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT: {200000, full, \"LR4_ER4_FR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT:         {200000, full, \"DR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT:         {200000, full, \"CR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_100baseT1_Full_BIT:             {100, full, \"T1\"},\n\t\tunix.ETHTOOL_LINK_MODE_1000baseT1_Full_BIT:            {1000, full, \"T1\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT:         {400000, full, \"KR8\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT:         {400000, full, \"SR8\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT: {400000, full, \"LR8_ER8_FR8\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT:         {400000, full, \"DR8\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT:         {400000, full, \"CR8\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseKR_Full_BIT:          {100000, full, \"KR\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseSR_Full_BIT:          {100000, full, \"SR\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT:    {100000, full, \"LR_ER_FR\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseCR_Full_BIT:          {100000, full, \"CR\"},\n\t\tunix.ETHTOOL_LINK_MODE_100000baseDR_Full_BIT:          {100000, full, \"DR\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT:         {200000, full, \"KR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT:         {200000, full, \"SR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT: {200000, full, \"LR2_ER2_FR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT:         {200000, full, \"DR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT:         {200000, full, \"CR2\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT:         {400000, full, \"KR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT:         {400000, full, \"SR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT: {400000, full, \"LR4_ER4_FR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT:         {400000, full, \"DR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT:         {400000, full, \"CR4\"},\n\t\tunix.ETHTOOL_LINK_MODE_100baseFX_Half_BIT:             {100, half, \"FX\"},\n\t\tunix.ETHTOOL_LINK_MODE_100baseFX_Full_BIT:             {100, full, \"FX\"},\n\t} {\n\t\tif linkModes&(1<<bit) != 0 {\n\t\t\tch <- prometheus.MustNewConstMetric(c.entry(linkMode), prometheus.GaugeValue,\n\t\t\t\tfloat64(labels.speed)*Mbps, device, labels.duplex, fmt.Sprintf(\"%dbase%s\", labels.speed, labels.phy))\n\t\t}\n\t}\n}\n\nfunc (c *ethtoolCollector) Update(ch chan<- prometheus.Metric) error {\n\tnetClass, err := c.fs.NetClassDevices()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) || errors.Is(err, os.ErrPermission) {\n\t\t\tc.logger.Debug(\"Could not read netclass file\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"could not get net class info: %w\", err)\n\t}\n\n\tif len(netClass) == 0 {\n\t\treturn fmt.Errorf(\"no network devices found\")\n\t}\n\n\tfor _, device := range netClass {\n\t\tvar stats map[string]uint64\n\t\tvar err error\n\n\t\tif c.deviceFilter.ignored(device) {\n\t\t\tcontinue\n\t\t}\n\n\t\tlinkInfo, err := c.ethtool.LinkInfo(device)\n\t\tif err == nil {\n\t\t\tc.updateSpeeds(ch, \"supported\", device, linkInfo.Supported)\n\t\t\tc.updatePortInfo(ch, device, linkInfo.Supported)\n\t\t\tc.updatePortCapabilities(ch, \"supported\", device, linkInfo.Supported)\n\t\t\tc.updateSpeeds(ch, \"advertised\", device, linkInfo.Advertising)\n\t\t\tc.updatePortCapabilities(ch, \"advertised\", device, linkInfo.Advertising)\n\t\t\tch <- prometheus.MustNewConstMetric(c.entry(\"autonegotiate\"), prometheus.GaugeValue, float64(linkInfo.Autoneg), device)\n\t\t} else {\n\t\t\tif errno, ok := err.(syscall.Errno); ok {\n\t\t\t\tif err == unix.EOPNOTSUPP {\n\t\t\t\t\tc.logger.Debug(\"ethtool link info error\", \"err\", err, \"device\", device, \"errno\", uint(errno))\n\t\t\t\t} else if errno != 0 {\n\t\t\t\t\tc.logger.Error(\"ethtool link info error\", \"err\", err, \"device\", device, \"errno\", uint(errno))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tc.logger.Error(\"ethtool link info error\", \"err\", err, \"device\", device)\n\t\t\t}\n\t\t}\n\n\t\tdrvInfo, err := c.ethtool.DriverInfo(device)\n\n\t\tif err == nil {\n\t\t\tch <- prometheus.MustNewConstMetric(c.infoDesc, prometheus.GaugeValue, 1.0,\n\t\t\t\tdrvInfo.BusInfo, device, drvInfo.Driver, drvInfo.EromVersion, drvInfo.FwVersion, drvInfo.Version)\n\t\t} else {\n\t\t\tif errno, ok := err.(syscall.Errno); ok {\n\t\t\t\tif err == unix.EOPNOTSUPP {\n\t\t\t\t\tc.logger.Debug(\"ethtool driver info error\", \"err\", err, \"device\", device, \"errno\", uint(errno))\n\t\t\t\t} else if errno != 0 {\n\t\t\t\t\tc.logger.Error(\"ethtool driver info error\", \"err\", err, \"device\", device, \"errno\", uint(errno))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tc.logger.Error(\"ethtool driver info error\", \"err\", err, \"device\", device)\n\t\t\t}\n\t\t}\n\n\t\tstats, err = c.ethtool.Stats(device)\n\n\t\t// If Stats() returns EOPNOTSUPP it doesn't support ethtool stats. Log that only at Debug level.\n\t\t// Otherwise log it at Error level.\n\t\tif err != nil {\n\t\t\tif errno, ok := err.(syscall.Errno); ok {\n\t\t\t\tif err == unix.EOPNOTSUPP {\n\t\t\t\t\tc.logger.Debug(\"ethtool stats error\", \"err\", err, \"device\", device, \"errno\", uint(errno))\n\t\t\t\t} else if errno != 0 {\n\t\t\t\t\tc.logger.Error(\"ethtool stats error\", \"err\", err, \"device\", device, \"errno\", uint(errno))\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tc.logger.Error(\"ethtool stats error\", \"err\", err, \"device\", device)\n\t\t\t}\n\t\t}\n\n\t\tif len(stats) == 0 {\n\t\t\t// No stats returned; device does not support ethtool stats.\n\t\t\tcontinue\n\t\t}\n\n\t\t// Sanitizing the metric names can lead to duplicate metric names. Therefore check for clashes beforehand.\n\t\tmetricFQNames := make(map[string]string)\n\t\trenamedStats := make(map[string]uint64, len(stats))\n\t\tfor metric := range stats {\n\t\t\tmetricName := SanitizeMetricName(metric)\n\t\t\tif !c.metricsPattern.MatchString(metricName) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmetricFQName := buildEthtoolFQName(metricName)\n\t\t\texistingMetric, exists := metricFQNames[metricFQName]\n\t\t\tif exists {\n\t\t\t\tc.logger.Debug(\"dropping duplicate metric name\", \"device\", device,\n\t\t\t\t\t\"metricFQName\", metricFQName, \"metric1\", existingMetric, \"metric2\", metricName)\n\t\t\t\t// Keep the metricName as \"deleted\" in the dict in case there are 3 duplicates.\n\t\t\t\tmetricFQNames[metricFQName] = \"\"\n\t\t\t} else {\n\t\t\t\tmetricFQNames[metricFQName] = metricName\n\t\t\t\t// Later we'll go look for the stat with the \"sanitized\" metric name, so we can copy it there already\n\t\t\t\trenamedStats[metricName] = stats[metric]\n\t\t\t}\n\t\t}\n\n\t\t// Sort metric names so that the test fixtures will match up\n\t\tkeys := make([]string, 0, len(metricFQNames))\n\t\tfor k := range metricFQNames {\n\t\t\tkeys = append(keys, k)\n\t\t}\n\t\tsort.Strings(keys)\n\n\t\tfor _, metricFQName := range keys {\n\t\t\tmetric := metricFQNames[metricFQName]\n\t\t\tif metric == \"\" {\n\t\t\t\t// Skip the \"deleted\" duplicate metrics\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tval := renamedStats[metric]\n\n\t\t\t// Check to see if this metric exists; if not then create it and store it in c.entries.\n\t\t\tentry := c.entryWithCreate(metric, metricFQName)\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tentry, prometheus.UntypedValue, float64(val), device)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *ethtoolCollector) entryWithCreate(key, metricFQName string) *prometheus.Desc {\n\tc.entriesMutex.Lock()\n\tdefer c.entriesMutex.Unlock()\n\n\tif _, ok := c.entries[key]; !ok {\n\t\tc.entries[key] = prometheus.NewDesc(\n\t\t\tmetricFQName,\n\t\t\tfmt.Sprintf(\"Network interface %s\", key),\n\t\t\t[]string{\"device\"}, nil,\n\t\t)\n\t}\n\n\treturn c.entries[key]\n}\n\nfunc (c *ethtoolCollector) entry(key string) *prometheus.Desc {\n\tc.entriesMutex.Lock()\n\tdefer c.entriesMutex.Unlock()\n\treturn c.entries[key]\n}\n"
  },
  {
    "path": "collector/ethtool_linux_test.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noethtool\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"syscall\"\n\t\"testing\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/client_golang/prometheus/testutil\"\n\t\"github.com/safchain/ethtool\"\n\t\"golang.org/x/sys/unix\"\n)\n\ntype EthtoolFixture struct {\n\tfixturePath string\n}\n\ntype testEthtoolCollector struct {\n\tdsc Collector\n}\n\nfunc (c testEthtoolCollector) Collect(ch chan<- prometheus.Metric) {\n\tc.dsc.Update(ch)\n}\n\nfunc (c testEthtoolCollector) Describe(ch chan<- *prometheus.Desc) {\n\tprometheus.DescribeByCollect(c, ch)\n}\n\nfunc NewTestEthtoolCollector(logger *slog.Logger) (prometheus.Collector, error) {\n\tdsc, err := NewEthtoolTestCollector(logger)\n\tif err != nil {\n\t\treturn testEthtoolCollector{}, err\n\t}\n\treturn testEthtoolCollector{\n\t\tdsc: dsc,\n\t}, err\n}\n\nfunc (e *EthtoolFixture) DriverInfo(intf string) (ethtool.DrvInfo, error) {\n\tres := ethtool.DrvInfo{}\n\n\tfixtureFile, err := os.Open(filepath.Join(e.fixturePath, intf, \"driver\"))\n\tif e, ok := err.(*os.PathError); ok && e.Err == syscall.ENOENT {\n\t\t// The fixture for this interface doesn't exist. Translate that to unix.EOPNOTSUPP\n\t\t// to replicate an interface that doesn't support ethtool driver info\n\t\treturn res, unix.EOPNOTSUPP\n\t}\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tdefer fixtureFile.Close()\n\n\tscanner := bufio.NewScanner(fixtureFile)\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\t\tif strings.HasPrefix(line, \"#\") {\n\t\t\tcontinue\n\t\t}\n\t\tline = strings.Trim(line, \" \")\n\t\titems := strings.Split(line, \": \")\n\t\tswitch items[0] {\n\t\tcase \"driver\":\n\t\t\tres.Driver = items[1]\n\t\tcase \"version\":\n\t\t\tres.Version = items[1]\n\t\tcase \"firmware-version\":\n\t\t\tres.FwVersion = items[1]\n\t\tcase \"bus-info\":\n\t\t\tres.BusInfo = items[1]\n\t\tcase \"expansion-rom-version\":\n\t\t\tres.EromVersion = items[1]\n\t\t}\n\t}\n\n\treturn res, err\n}\n\nfunc (e *EthtoolFixture) Stats(intf string) (map[string]uint64, error) {\n\tres := make(map[string]uint64)\n\n\tfixtureFile, err := os.Open(filepath.Join(e.fixturePath, intf, \"statistics\"))\n\tif e, ok := err.(*os.PathError); ok && e.Err == syscall.ENOENT {\n\t\t// The fixture for this interface doesn't exist. Translate that to unix.EOPNOTSUPP\n\t\t// to replicate an interface that doesn't support ethtool stats\n\t\treturn res, unix.EOPNOTSUPP\n\t}\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tdefer fixtureFile.Close()\n\n\tscanner := bufio.NewScanner(fixtureFile)\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\t\tif strings.HasPrefix(line, \"#\") {\n\t\t\tcontinue\n\t\t}\n\t\tif strings.HasPrefix(line, \"NIC statistics:\") {\n\t\t\tcontinue\n\t\t}\n\t\tline = strings.Trim(line, \" \")\n\t\titems := strings.Split(line, \": \")\n\t\tval, err := strconv.ParseUint(items[1], 10, 64)\n\t\tif err != nil {\n\t\t\treturn res, err\n\t\t}\n\t\tif items[0] == \"ERROR\" {\n\t\t\treturn res, unix.Errno(val)\n\t\t}\n\t\tres[items[0]] = val\n\t}\n\n\treturn res, err\n}\n\nfunc readModes(modes string) uint32 {\n\tvar out uint32\n\tfor mode := range strings.SplitSeq(modes, \" \") {\n\t\tswitch mode {\n\t\tcase \"10baseT/Half\":\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_10baseT_Half_BIT)\n\t\tcase \"10baseT/Full\":\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_10baseT_Full_BIT)\n\t\tcase \"100baseT/Half\":\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_100baseT_Half_BIT)\n\t\tcase \"100baseT/Full\":\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_100baseT_Full_BIT)\n\t\tcase \"1000baseT/Half\":\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_1000baseT_Half_BIT)\n\t\tcase \"1000baseT/Full\":\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_1000baseT_Full_BIT)\n\t\tcase \"10000baseT/Full\":\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_10000baseT_Full_BIT)\n\t\t}\n\t}\n\treturn out\n}\n\nfunc readPortTypes(portTypes string) uint32 {\n\tvar out uint32\n\tfor ptype := range strings.SplitSeq(portTypes, \" \") {\n\t\tptype = strings.Trim(ptype, \" \\t\")\n\t\tif ptype == \"TP\" {\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_TP_BIT)\n\t\t}\n\t\tif ptype == \"MII\" {\n\t\t\tout |= (1 << unix.ETHTOOL_LINK_MODE_MII_BIT)\n\t\t}\n\t}\n\treturn out\n}\n\nfunc (e *EthtoolFixture) LinkInfo(intf string) (ethtool.EthtoolCmd, error) {\n\tvar res ethtool.EthtoolCmd\n\tfixtureFile, err := os.Open(filepath.Join(e.fixturePath, intf, \"settings\"))\n\tif e, ok := err.(*os.PathError); ok && e.Err == syscall.ENOENT {\n\t\t// The fixture for this interface doesn't exist. Translate that to unix.EOPNOTSUPP\n\t\t// to replicate an interface that doesn't support ethtool stats\n\t\treturn res, unix.EOPNOTSUPP\n\t}\n\tif err != nil {\n\t\treturn res, err\n\t}\n\tdefer fixtureFile.Close()\n\n\tscanner := bufio.NewScanner(fixtureFile)\n\treadingSupportedLinkModes := false\n\treadingAdvertisedLinkModes := false\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\t\tif strings.HasPrefix(line, \"#\") || strings.HasPrefix(line, \"Settings for\") {\n\t\t\tcontinue\n\t\t}\n\t\tline = strings.Trim(line, \" \\t\")\n\n\t\tif (readingAdvertisedLinkModes || readingSupportedLinkModes) && strings.Contains(line, \":\") {\n\t\t\treadingAdvertisedLinkModes = false\n\t\t\treadingSupportedLinkModes = false\n\t\t}\n\n\t\tif readingAdvertisedLinkModes {\n\t\t\tres.Advertising |= readModes(line)\n\t\t\tcontinue\n\t\t} else if readingSupportedLinkModes {\n\t\t\tres.Supported |= readModes(line)\n\t\t\tcontinue\n\t\t}\n\n\t\titems := strings.Split(line, \": \")\n\t\tif items[0] == \"Supported pause frame use\" {\n\t\t\tswitch items[1] {\n\t\t\tcase \"Symmetric\":\n\t\t\t\tres.Supported |= (1 << unix.ETHTOOL_LINK_MODE_Pause_BIT)\n\t\t\tcase \"Receive-only\":\n\t\t\t\tres.Supported |= (1 << unix.ETHTOOL_LINK_MODE_Asym_Pause_BIT)\n\t\t\t}\n\t\t}\n\t\tif items[0] == \"Advertised pause frame use\" {\n\t\t\tswitch items[1] {\n\t\t\tcase \"Symmetric\":\n\t\t\t\tres.Advertising |= (1 << unix.ETHTOOL_LINK_MODE_Pause_BIT)\n\t\t\tcase \"Receive-only\":\n\t\t\t\tres.Advertising |= (1 << unix.ETHTOOL_LINK_MODE_Asym_Pause_BIT)\n\t\t\t}\n\t\t}\n\t\tif items[0] == \"Supported ports\" {\n\t\t\tres.Supported |= readPortTypes(items[1])\n\t\t}\n\t\tif items[0] == \"Supported link modes\" {\n\t\t\tres.Supported |= readModes(items[1])\n\t\t\treadingSupportedLinkModes = true\n\t\t}\n\t\tif items[0] == \"Advertised link modes\" {\n\t\t\tres.Advertising |= readModes(items[1])\n\t\t\treadingAdvertisedLinkModes = true\n\t\t}\n\t\tif items[0] == \"Supports auto-negotiation\" {\n\t\t\tif items[1] == \"Yes\" {\n\t\t\t\tres.Supported |= (1 << unix.ETHTOOL_LINK_MODE_Autoneg_BIT)\n\t\t\t}\n\t\t}\n\t\tif items[0] == \"Advertised auto-negotiation\" {\n\t\t\tif items[1] == \"Yes\" {\n\t\t\t\tres.Advertising |= (1 << unix.ETHTOOL_LINK_MODE_Autoneg_BIT)\n\t\t\t}\n\t\t}\n\t\tif items[0] == \"Auto-negotiation\" {\n\t\t\tif items[1] == \"on\" {\n\t\t\t\tres.Autoneg = 1\n\t\t\t}\n\t\t}\n\t}\n\n\treturn res, err\n}\n\nfunc NewEthtoolTestCollector(logger *slog.Logger) (Collector, error) {\n\tcollector, err := makeEthtoolCollector(logger)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcollector.ethtool = &EthtoolFixture{\n\t\tfixturePath: \"fixtures/ethtool/\",\n\t}\n\treturn collector, nil\n}\n\nfunc TestBuildEthtoolFQName(t *testing.T) {\n\ttestcases := map[string]string{\n\t\t\"port.rx_errors\":               \"node_ethtool_port_received_errors\",\n\t\t\"rx_errors\":                    \"node_ethtool_received_errors\",\n\t\t\"Queue[0] AllocFails\":          \"node_ethtool_queue_0_allocfails\",\n\t\t\"Tx LPI entry count\":           \"node_ethtool_transmitted_lpi_entry_count\",\n\t\t\"port.VF_admin_queue_requests\": \"node_ethtool_port_vf_admin_queue_requests\",\n\t\t\"[3]: tx_bytes\":                \"node_ethtool_3_transmitted_bytes\",\n\t\t\"     err\":                     \"node_ethtool_err\",\n\t}\n\n\tfor metric, expected := range testcases {\n\t\tgot := buildEthtoolFQName(metric)\n\t\tif expected != got {\n\t\t\tt.Errorf(\"Expected '%s' but got '%s'\", expected, got)\n\t\t}\n\t}\n}\n\nfunc TestEthToolCollector(t *testing.T) {\n\ttestcase := `# HELP node_ethtool_align_errors Network interface align_errors\n# TYPE node_ethtool_align_errors untyped\nnode_ethtool_align_errors{device=\"eth0\"} 0\n# HELP node_ethtool_info A metric with a constant '1' value labeled by bus_info, device, driver, expansion_rom_version, firmware_version, version.\n# TYPE node_ethtool_info gauge\nnode_ethtool_info{bus_info=\"0000:00:1f.6\",device=\"eth0\",driver=\"e1000e\",expansion_rom_version=\"\",firmware_version=\"0.5-4\",version=\"5.11.0-22-generic\"} 1\n# HELP node_ethtool_port_received_dropped Network interface port_rx_dropped\n# TYPE node_ethtool_port_received_dropped untyped\nnode_ethtool_port_received_dropped{device=\"eth0\"} 12028\n# HELP node_ethtool_received_broadcast Network interface rx_broadcast\n# TYPE node_ethtool_received_broadcast untyped\nnode_ethtool_received_broadcast{device=\"eth0\"} 5792\n# HELP node_ethtool_received_errors_total Number of received frames with errors\n# TYPE node_ethtool_received_errors_total untyped\nnode_ethtool_received_errors_total{device=\"eth0\"} 0\n# HELP node_ethtool_received_missed Network interface rx_missed\n# TYPE node_ethtool_received_missed untyped\nnode_ethtool_received_missed{device=\"eth0\"} 401\n# HELP node_ethtool_received_multicast Network interface rx_multicast\n# TYPE node_ethtool_received_multicast untyped\nnode_ethtool_received_multicast{device=\"eth0\"} 23973\n# HELP node_ethtool_received_packets_total Network interface packets received\n# TYPE node_ethtool_received_packets_total untyped\nnode_ethtool_received_packets_total{device=\"eth0\"} 1.260062e+06\n# HELP node_ethtool_received_unicast Network interface rx_unicast\n# TYPE node_ethtool_received_unicast untyped\nnode_ethtool_received_unicast{device=\"eth0\"} 1.230297e+06\n# HELP node_ethtool_transmitted_aborted Network interface tx_aborted\n# TYPE node_ethtool_transmitted_aborted untyped\nnode_ethtool_transmitted_aborted{device=\"eth0\"} 0\n# HELP node_ethtool_transmitted_errors_total Number of sent frames with errors\n# TYPE node_ethtool_transmitted_errors_total untyped\nnode_ethtool_transmitted_errors_total{device=\"eth0\"} 0\n# HELP node_ethtool_transmitted_multi_collisions Network interface tx_multi_collisions\n# TYPE node_ethtool_transmitted_multi_collisions untyped\nnode_ethtool_transmitted_multi_collisions{device=\"eth0\"} 0\n# HELP node_ethtool_transmitted_packets_total Network interface packets sent\n# TYPE node_ethtool_transmitted_packets_total untyped\nnode_ethtool_transmitted_packets_total{device=\"eth0\"} 961500\n# HELP node_ethtool_transmitted_single_collisions Network interface tx_single_collisions\n# TYPE node_ethtool_transmitted_single_collisions untyped\nnode_ethtool_transmitted_single_collisions{device=\"eth0\"} 0\n# HELP node_ethtool_transmitted_underrun Network interface tx_underrun\n# TYPE node_ethtool_transmitted_underrun untyped\nnode_ethtool_transmitted_underrun{device=\"eth0\"} 0\n# HELP node_network_advertised_speed_bytes Combination of speeds and features offered by network device\n# TYPE node_network_advertised_speed_bytes gauge\nnode_network_advertised_speed_bytes{device=\"eth0\",duplex=\"full\",mode=\"1000baseT\"} 1.25e+08\nnode_network_advertised_speed_bytes{device=\"eth0\",duplex=\"full\",mode=\"100baseT\"} 1.25e+07\nnode_network_advertised_speed_bytes{device=\"eth0\",duplex=\"full\",mode=\"10baseT\"} 1.25e+06\nnode_network_advertised_speed_bytes{device=\"eth0\",duplex=\"half\",mode=\"100baseT\"} 1.25e+07\nnode_network_advertised_speed_bytes{device=\"eth0\",duplex=\"half\",mode=\"10baseT\"} 1.25e+06\n# HELP node_network_asymmetricpause_advertised If this port device offers asymmetric pause capability\n# TYPE node_network_asymmetricpause_advertised gauge\nnode_network_asymmetricpause_advertised{device=\"eth0\"} 0\n# HELP node_network_asymmetricpause_supported If this port device supports asymmetric pause frames\n# TYPE node_network_asymmetricpause_supported gauge\nnode_network_asymmetricpause_supported{device=\"eth0\"} 0\n# HELP node_network_autonegotiate If this port is using autonegotiate\n# TYPE node_network_autonegotiate gauge\nnode_network_autonegotiate{device=\"eth0\"} 1\n# HELP node_network_autonegotiate_advertised If this port device offers autonegotiate\n# TYPE node_network_autonegotiate_advertised gauge\nnode_network_autonegotiate_advertised{device=\"eth0\"} 1\n# HELP node_network_autonegotiate_supported If this port device supports autonegotiate\n# TYPE node_network_autonegotiate_supported gauge\nnode_network_autonegotiate_supported{device=\"eth0\"} 1\n# HELP node_network_pause_advertised If this port device offers pause capability\n# TYPE node_network_pause_advertised gauge\nnode_network_pause_advertised{device=\"eth0\"} 1\n# HELP node_network_pause_supported If this port device supports pause frames\n# TYPE node_network_pause_supported gauge\nnode_network_pause_supported{device=\"eth0\"} 1\n# HELP node_network_supported_port_info Type of ports or PHYs supported by network device\n# TYPE node_network_supported_port_info gauge\nnode_network_supported_port_info{device=\"eth0\",type=\"MII\"} 1\nnode_network_supported_port_info{device=\"eth0\",type=\"TP\"} 1\n# HELP node_network_supported_speed_bytes Combination of speeds and features supported by network device\n# TYPE node_network_supported_speed_bytes gauge\nnode_network_supported_speed_bytes{device=\"eth0\",duplex=\"full\",mode=\"10000baseT\"} 1.25e+09\nnode_network_supported_speed_bytes{device=\"eth0\",duplex=\"full\",mode=\"1000baseT\"} 1.25e+08\nnode_network_supported_speed_bytes{device=\"eth0\",duplex=\"full\",mode=\"100baseT\"} 1.25e+07\nnode_network_supported_speed_bytes{device=\"eth0\",duplex=\"full\",mode=\"10baseT\"} 1.25e+06\nnode_network_supported_speed_bytes{device=\"eth0\",duplex=\"half\",mode=\"100baseT\"} 1.25e+07\nnode_network_supported_speed_bytes{device=\"eth0\",duplex=\"half\",mode=\"10baseT\"} 1.25e+06\n`\n\t*sysPath = \"fixtures/sys\"\n\n\tlogger := slog.New(slog.NewTextHandler(io.Discard, nil))\n\tcollector, err := NewEthtoolTestCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tc, err := NewTestEthtoolCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\treg := prometheus.NewRegistry()\n\treg.MustRegister(c)\n\n\tsink := make(chan prometheus.Metric)\n\tgo func() {\n\t\terr = collector.Update(sink)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"failed to update collector: %s\", err))\n\t\t}\n\t\tclose(sink)\n\t}()\n\n\terr = testutil.GatherAndCompare(reg, strings.NewReader(testcase))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n"
  },
  {
    "path": "collector/exec_bsd.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (freebsd || dragonfly) && !noexec\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype execCollector struct {\n\tsysctls []bsdSysctl\n\tlogger  *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"exec\", defaultEnabled, NewExecCollector)\n}\n\n// NewExecCollector returns a new Collector exposing system execution statistics.\nfunc NewExecCollector(logger *slog.Logger) (Collector, error) {\n\t// From sys/vm/vm_meter.c:\n\t// All are of type CTLTYPE_UINT.\n\t//\n\t// vm.stats.sys.v_swtch: Context switches\n\t// vm.stats.sys.v_trap: Traps\n\t// vm.stats.sys.v_syscall: System calls\n\t// vm.stats.sys.v_intr: Device interrupts\n\t// vm.stats.sys.v_soft: Software interrupts\n\t// vm.stats.vm.v_forks: Number of fork() calls\n\n\treturn &execCollector{\n\t\tsysctls: []bsdSysctl{\n\t\t\t{\n\t\t\t\tname:        \"exec_context_switches_total\",\n\t\t\t\tdescription: \"Context switches since system boot.  Resets at architecture unsigned integer.\",\n\t\t\t\tmib:         \"vm.stats.sys.v_swtch\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"exec_traps_total\",\n\t\t\t\tdescription: \"Traps since system boot.  Resets at architecture unsigned integer.\",\n\t\t\t\tmib:         \"vm.stats.sys.v_trap\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"exec_system_calls_total\",\n\t\t\t\tdescription: \"System calls since system boot.  Resets at architecture unsigned integer.\",\n\t\t\t\tmib:         \"vm.stats.sys.v_syscall\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"exec_device_interrupts_total\",\n\t\t\t\tdescription: \"Device interrupts since system boot.  Resets at architecture unsigned integer.\",\n\t\t\t\tmib:         \"vm.stats.sys.v_intr\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"exec_software_interrupts_total\",\n\t\t\t\tdescription: \"Software interrupts since system boot.  Resets at architecture unsigned integer.\",\n\t\t\t\tmib:         \"vm.stats.sys.v_soft\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"exec_forks_total\",\n\t\t\t\tdescription: \"Number of fork() calls since system boot.  Resets at architecture unsigned integer.\",\n\t\t\t\tmib:         \"vm.stats.vm.v_forks\",\n\t\t\t},\n\t\t},\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update pushes exec statistics onto ch\nfunc (c *execCollector) Update(ch chan<- prometheus.Metric) error {\n\tfor _, m := range c.sysctls {\n\t\tv, err := m.Value()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tnamespace+\"_\"+m.name,\n\t\t\t\tm.description,\n\t\t\t\tnil, nil,\n\t\t\t), prometheus.CounterValue, v)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/fibrechannel_linux.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofibrechannel\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n\n\t\"github.com/prometheus/node_exporter/collector/utils\"\n)\n\nconst maxUint64 = ^uint64(0)\n\ntype fibrechannelCollector struct {\n\tfs          sysfs.FS\n\tmetricDescs map[string]*prometheus.Desc\n\tlogger      *slog.Logger\n\tsubsystem   string\n}\n\nfunc init() {\n\tregisterCollector(\"fibrechannel\", defaultEnabled, NewFibreChannelCollector)\n}\n\n// NewFibreChannelCollector returns a new Collector exposing FibreChannel stats.\nfunc NewFibreChannelCollector(logger *slog.Logger) (Collector, error) {\n\tvar i fibrechannelCollector\n\tvar err error\n\n\ti.fs, err = sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\ti.logger = logger\n\n\t// Detailed description for all metrics.\n\tdescriptions := map[string]string{\n\t\t\"dumped_frames_total\":            \"Number of dumped frames\",\n\t\t\"loss_of_signal_total\":           \"Number of times signal has been lost\",\n\t\t\"loss_of_sync_total\":             \"Number of failures on either bit or transmission word boundaries\",\n\t\t\"rx_frames_total\":                \"Number of frames received\",\n\t\t\"error_frames_total\":             \"Number of errors in frames\",\n\t\t\"invalid_tx_words_total\":         \"Number of invalid words transmitted by host port\",\n\t\t\"seconds_since_last_reset_total\": \"Number of seconds since last host port reset\",\n\t\t\"tx_words_total\":                 \"Number of words transmitted by host port\",\n\t\t\"invalid_crc_total\":              \"Invalid Cyclic Redundancy Check count\",\n\t\t\"nos_total\":                      \"Number Not_Operational Primitive Sequence received by host port\",\n\t\t\"fcp_packet_aborts_total\":        \"Number of aborted packets\",\n\t\t\"rx_words_total\":                 \"Number of words received by host port\",\n\t\t\"tx_frames_total\":                \"Number of frames transmitted by host port\",\n\t\t\"link_failure_total\":             \"Number of times the host port link has failed\",\n\t}\n\n\ti.metricDescs = make(map[string]*prometheus.Desc)\n\ti.subsystem = \"fibrechannel\"\n\n\tfor metricName, description := range descriptions {\n\t\ti.metricDescs[metricName] = prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, i.subsystem, metricName),\n\t\t\tdescription,\n\t\t\t[]string{\"fc_host\"},\n\t\t\tnil,\n\t\t)\n\t}\n\n\treturn &i, nil\n}\n\nfunc (c *fibrechannelCollector) pushMetric(ch chan<- prometheus.Metric, name string, value uint64, host string, valueType prometheus.ValueType) {\n\tch <- prometheus.MustNewConstMetric(c.metricDescs[name], valueType, float64(value), host)\n}\n\nfunc (c *fibrechannelCollector) pushCounter(ch chan<- prometheus.Metric, name string, value uint64, host string) {\n\t// Don't push counters that aren't implemented (a counter equal to maxUint64 is unimplemented by the HBA firmware)\n\tif value != maxUint64 {\n\t\tc.pushMetric(ch, name, value, host, prometheus.CounterValue)\n\t}\n}\n\nfunc (c *fibrechannelCollector) Update(ch chan<- prometheus.Metric) error {\n\thosts, err := c.fs.FibreChannelClass()\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tc.logger.Debug(\"fibrechannel statistics not found, skipping\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"error obtaining FibreChannel class info: %s\", err)\n\t}\n\n\tfor _, host := range hosts {\n\t\tinfoDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"info\"),\n\t\t\t\"Non-numeric data from /sys/class/fc_host/<host>, value is always 1.\",\n\t\t\t[]string{\"fc_host\", \"speed\", \"port_state\", \"port_type\", \"port_id\", \"port_name\", \"fabric_name\", \"symbolic_name\", \"supported_classes\", \"supported_speeds\", \"dev_loss_tmo\"},\n\t\t\tnil,\n\t\t)\n\t\tinfoValue := 1.0\n\n\t\t// First push the Host values\n\t\tch <- prometheus.MustNewConstMetric(infoDesc, prometheus.GaugeValue, infoValue, utils.SafeDereference(\n\t\t\thost.Name,\n\t\t\thost.Speed,\n\t\t\thost.PortState,\n\t\t\thost.PortType,\n\t\t\thost.PortID,\n\t\t\thost.PortName,\n\t\t\thost.FabricName,\n\t\t\thost.SymbolicName,\n\t\t\thost.SupportedClasses,\n\t\t\thost.SupportedSpeeds,\n\t\t\thost.DevLossTMO,\n\t\t)...)\n\n\t\t// Then the counters\n\t\t// Note: `procfs` guarantees these a safe dereference for these counters.\n\t\tc.pushCounter(ch, \"dumped_frames_total\", *host.Counters.DumpedFrames, *host.Name)\n\t\tc.pushCounter(ch, \"error_frames_total\", *host.Counters.ErrorFrames, *host.Name)\n\t\tc.pushCounter(ch, \"invalid_crc_total\", *host.Counters.InvalidCRCCount, *host.Name)\n\t\tc.pushCounter(ch, \"rx_frames_total\", *host.Counters.RXFrames, *host.Name)\n\t\tc.pushCounter(ch, \"rx_words_total\", *host.Counters.RXWords, *host.Name)\n\t\tc.pushCounter(ch, \"tx_frames_total\", *host.Counters.TXFrames, *host.Name)\n\t\tc.pushCounter(ch, \"tx_words_total\", *host.Counters.TXWords, *host.Name)\n\t\tc.pushCounter(ch, \"seconds_since_last_reset_total\", *host.Counters.SecondsSinceLastReset, *host.Name)\n\t\tc.pushCounter(ch, \"invalid_tx_words_total\", *host.Counters.InvalidTXWordCount, *host.Name)\n\t\tc.pushCounter(ch, \"link_failure_total\", *host.Counters.LinkFailureCount, *host.Name)\n\t\tc.pushCounter(ch, \"loss_of_sync_total\", *host.Counters.LossOfSyncCount, *host.Name)\n\t\tc.pushCounter(ch, \"loss_of_signal_total\", *host.Counters.LossOfSignalCount, *host.Name)\n\t\tc.pushCounter(ch, \"nos_total\", *host.Counters.NosCount, *host.Name)\n\t\tc.pushCounter(ch, \"fcp_packet_aborts_total\", *host.Counters.FCPPacketAborts, *host.Name)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/filefd_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilefd\n\npackage collector\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tfileFDStatSubsystem = \"filefd\"\n)\n\ntype fileFDStatCollector struct {\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(fileFDStatSubsystem, defaultEnabled, NewFileFDStatCollector)\n}\n\n// NewFileFDStatCollector returns a new Collector exposing file-nr stats.\nfunc NewFileFDStatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &fileFDStatCollector{logger}, nil\n}\n\nfunc (c *fileFDStatCollector) Update(ch chan<- prometheus.Metric) error {\n\tfileFDStat, err := parseFileFDStats(procFilePath(\"sys/fs/file-nr\"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get file-nr: %w\", err)\n\t}\n\tfor name, value := range fileFDStat {\n\t\tv, err := strconv.ParseFloat(value, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid value %s in file-nr: %w\", value, err)\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, fileFDStatSubsystem, name),\n\t\t\t\tfmt.Sprintf(\"File descriptor statistics: %s.\", name),\n\t\t\t\tnil, nil,\n\t\t\t),\n\t\t\tprometheus.GaugeValue, v,\n\t\t)\n\t}\n\treturn nil\n}\n\nfunc parseFileFDStats(filename string) (map[string]string, error) {\n\tfile, err := os.Open(filename)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer file.Close()\n\n\tcontent, err := io.ReadAll(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tparts := bytes.Split(bytes.TrimSpace(content), []byte(\"\\u0009\"))\n\tif len(parts) < 3 {\n\t\treturn nil, fmt.Errorf(\"unexpected number of file stats in %q\", filename)\n\t}\n\n\tvar fileFDStat = map[string]string{}\n\t// The file-nr proc is only 1 line with 3 values.\n\tfileFDStat[\"allocated\"] = string(parts[0])\n\t// The second value is skipped as it will always be zero in linux 2.6.\n\tfileFDStat[\"maximum\"] = string(parts[2])\n\n\treturn fileFDStat, nil\n}\n"
  },
  {
    "path": "collector/filefd_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilefd\n\npackage collector\n\nimport \"testing\"\n\nfunc TestFileFDStats(t *testing.T) {\n\tfileFDStats, err := parseFileFDStats(\"fixtures/proc/sys/fs/file-nr\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := \"1024\", fileFDStats[\"allocated\"]; want != got {\n\t\tt.Errorf(\"want filefd allocated %q, got %q\", want, got)\n\t}\n\n\tif want, got := \"1631329\", fileFDStats[\"maximum\"]; want != got {\n\t\tt.Errorf(\"want filefd maximum %q, got %q\", want, got)\n\t}\n}\n"
  },
  {
    "path": "collector/filesystem_aix.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilesystem\n\npackage collector\n\nimport (\n\t\"github.com/power-devops/perfstat\"\n)\n\nconst (\n\tdefMountPointsExcluded = \"^/(dev|aha)($|/)\"\n\tdefFSTypesExcluded     = \"^procfs$\"\n)\n\n// Expose filesystem fullness.\nfunc (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {\n\tfsStat, err := perfstat.FileSystemStat()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, stat := range fsStat {\n\t\tif c.mountPointFilter.ignored(stat.MountPoint) {\n\t\t\tc.logger.Debug(\"Ignoring mount point\", \"mountpoint\", stat.MountPoint)\n\t\t\tcontinue\n\t\t}\n\t\tfstype := stat.TypeString()\n\t\tif c.fsTypeFilter.ignored(fstype) {\n\t\t\tc.logger.Debug(\"Ignoring fs type\", \"type\", fstype)\n\t\t\tcontinue\n\t\t}\n\n\t\tro := 0.0\n\t\tif stat.Flags&perfstat.VFS_READONLY != 0 {\n\t\t\tro = 1.0\n\t\t}\n\n\t\tstats = append(stats, filesystemStats{\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tdevice:     stat.Device,\n\t\t\t\tmountPoint: stat.MountPoint,\n\t\t\t\tfsType:     fstype,\n\t\t\t},\n\t\t\tsize:      float64(stat.TotalBlocks * 512.0),\n\t\t\tfree:      float64(stat.FreeBlocks * 512.0),\n\t\t\tavail:     float64(stat.FreeBlocks * 512.0), // AIX doesn't distinguish between free and available blocks.\n\t\t\tfiles:     float64(stat.TotalInodes),\n\t\t\tfilesFree: float64(stat.FreeInodes),\n\t\t\tro:        ro,\n\t\t})\n\t}\n\treturn stats, nil\n}\n"
  },
  {
    "path": "collector/filesystem_bsd.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build dragonfly && !nofilesystem\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"unsafe\"\n)\n\n/*\n#include <sys/param.h>\n#include <sys/ucred.h>\n#include <sys/mount.h>\n#include <stdio.h>\n*/\nimport \"C\"\n\nconst (\n\tdefMountPointsExcluded = \"^/(dev)($|/)\"\n\tdefFSTypesExcluded     = \"^devfs$\"\n\treadOnly               = 0x1 // MNT_RDONLY\n)\n\n// Expose filesystem fullness.\nfunc (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {\n\tvar mntbuf *C.struct_statfs\n\tcount := C.getmntinfo(&mntbuf, C.MNT_NOWAIT)\n\tif count == 0 {\n\t\treturn nil, errors.New(\"getmntinfo() failed\")\n\t}\n\n\tmnt := (*[1 << 20]C.struct_statfs)(unsafe.Pointer(mntbuf))\n\tstats = []filesystemStats{}\n\tfor i := 0; i < int(count); i++ {\n\t\tmountpoint := C.GoString(&mnt[i].f_mntonname[0])\n\t\tif c.mountPointFilter.ignored(mountpoint) {\n\t\t\tc.logger.Debug(\"Ignoring mount point\", \"mountpoint\", mountpoint)\n\t\t\tcontinue\n\t\t}\n\n\t\tdevice := C.GoString(&mnt[i].f_mntfromname[0])\n\t\tfstype := C.GoString(&mnt[i].f_fstypename[0])\n\t\tif c.fsTypeFilter.ignored(fstype) {\n\t\t\tc.logger.Debug(\"Ignoring fs type\", \"type\", fstype)\n\t\t\tcontinue\n\t\t}\n\n\t\tvar ro float64\n\t\tif (mnt[i].f_flags & readOnly) != 0 {\n\t\t\tro = 1\n\t\t}\n\n\t\tstats = append(stats, filesystemStats{\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tdevice:     device,\n\t\t\t\tmountPoint: rootfsStripPrefix(mountpoint),\n\t\t\t\tfsType:     fstype,\n\t\t\t},\n\t\t\tsize:      float64(mnt[i].f_blocks) * float64(mnt[i].f_bsize),\n\t\t\tfree:      float64(mnt[i].f_bfree) * float64(mnt[i].f_bsize),\n\t\t\tavail:     float64(mnt[i].f_bavail) * float64(mnt[i].f_bsize),\n\t\t\tfiles:     float64(mnt[i].f_files),\n\t\t\tfilesFree: float64(mnt[i].f_ffree),\n\t\t\tro:        ro,\n\t\t})\n\t}\n\treturn stats, nil\n}\n"
  },
  {
    "path": "collector/filesystem_common.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilesystem && (linux || freebsd || netbsd || openbsd || darwin || dragonfly || aix)\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// Arch-dependent implementation must define:\n// * defMountPointsExcluded\n// * defFSTypesExcluded\n// * filesystemLabelNames\n// * filesystemCollector.GetStats\n\nvar (\n\tmountPointsExcludeSet bool\n\tmountPointsExclude    = kingpin.Flag(\n\t\t\"collector.filesystem.mount-points-exclude\",\n\t\t\"Regexp of mount points to exclude for filesystem collector. (mutually exclusive to mount-points-include)\",\n\t).Default(defMountPointsExcluded).PreAction(func(c *kingpin.ParseContext) error {\n\t\tmountPointsExcludeSet = true\n\t\treturn nil\n\t}).String()\n\toldMountPointsExcluded = kingpin.Flag(\n\t\t\"collector.filesystem.ignored-mount-points\",\n\t\t\"Regexp of mount points to ignore for filesystem collector.\",\n\t).Hidden().String()\n\tmountPointsInclude = kingpin.Flag(\n\t\t\"collector.filesystem.mount-points-include\",\n\t\t\"Regexp of mount points to include for filesystem collector. (mutually exclusive to mount-points-exclude)\",\n\t).String()\n\n\tfsTypesExcludeSet bool\n\tfsTypesExclude    = kingpin.Flag(\n\t\t\"collector.filesystem.fs-types-exclude\",\n\t\t\"Regexp of filesystem types to exclude for filesystem collector. (mutually exclusive to fs-types-include)\",\n\t).Default(defFSTypesExcluded).PreAction(func(c *kingpin.ParseContext) error {\n\t\tfsTypesExcludeSet = true\n\t\treturn nil\n\t}).String()\n\toldFSTypesExcluded = kingpin.Flag(\n\t\t\"collector.filesystem.ignored-fs-types\",\n\t\t\"Regexp of filesystem types to ignore for filesystem collector.\",\n\t).Hidden().String()\n\tfsTypesInclude = kingpin.Flag(\n\t\t\"collector.filesystem.fs-types-include\",\n\t\t\"Regexp of filesystem types to exclude for filesystem collector. (mutually exclusive to fs-types-exclude)\",\n\t).String()\n\n\tfilesystemLabelNames = []string{\"device\", \"mountpoint\", \"fstype\", \"device_error\"}\n)\n\ntype filesystemCollector struct {\n\tmountPointFilter              deviceFilter\n\tfsTypeFilter                  deviceFilter\n\tsizeDesc, freeDesc, availDesc *prometheus.Desc\n\tfilesDesc, filesFreeDesc      *prometheus.Desc\n\tpurgeableDesc                 *prometheus.Desc\n\troDesc, deviceErrorDesc       *prometheus.Desc\n\tmountInfoDesc                 *prometheus.Desc\n\tlogger                        *slog.Logger\n}\n\ntype filesystemLabels struct {\n\tdevice, mountPoint, fsType, mountOptions, superOptions, deviceError, major, minor string\n}\n\ntype filesystemStats struct {\n\tlabels            filesystemLabels\n\tsize, free, avail float64\n\tfiles, filesFree  float64\n\tpurgeable         float64\n\tro, deviceError   float64\n}\n\nfunc init() {\n\tregisterCollector(\"filesystem\", defaultEnabled, NewFilesystemCollector)\n}\n\n// NewFilesystemCollector returns a new Collector exposing filesystems stats.\nfunc NewFilesystemCollector(logger *slog.Logger) (Collector, error) {\n\tconst subsystem = \"filesystem\"\n\n\tsizeDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"size_bytes\"),\n\t\t\"Filesystem size in bytes.\",\n\t\tfilesystemLabelNames, nil,\n\t)\n\n\tfreeDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"free_bytes\"),\n\t\t\"Filesystem free space in bytes.\",\n\t\tfilesystemLabelNames, nil,\n\t)\n\n\tavailDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"avail_bytes\"),\n\t\t\"Filesystem space available to non-root users in bytes.\",\n\t\tfilesystemLabelNames, nil,\n\t)\n\n\tfilesDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"files\"),\n\t\t\"Filesystem total file nodes.\",\n\t\tfilesystemLabelNames, nil,\n\t)\n\n\tfilesFreeDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"files_free\"),\n\t\t\"Filesystem total free file nodes.\",\n\t\tfilesystemLabelNames, nil,\n\t)\n\n\tpurgeableDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"purgeable_bytes\"),\n\t\t\"Filesystem space available including purgeable space (MacOS specific).\",\n\t\tfilesystemLabelNames, nil,\n\t)\n\n\troDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"readonly\"),\n\t\t\"Filesystem read-only status.\",\n\t\tfilesystemLabelNames, nil,\n\t)\n\n\tdeviceErrorDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"device_error\"),\n\t\t\"Whether an error occurred while getting statistics for the given device.\",\n\t\tfilesystemLabelNames, nil,\n\t)\n\n\tmountInfoDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"mount_info\"),\n\t\t\"Filesystem mount information.\",\n\t\t[]string{\"device\", \"major\", \"minor\", \"mountpoint\"},\n\t\tnil,\n\t)\n\n\tmountPointFilter, err := newMountPointsFilter(logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse mount points filter flags: %w\", err)\n\t}\n\n\tfsTypeFilter, err := newFSTypeFilter(logger)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse fs types filter flags: %w\", err)\n\t}\n\n\treturn &filesystemCollector{\n\t\tmountPointFilter: mountPointFilter,\n\t\tfsTypeFilter:     fsTypeFilter,\n\t\tsizeDesc:         sizeDesc,\n\t\tfreeDesc:         freeDesc,\n\t\tavailDesc:        availDesc,\n\t\tfilesDesc:        filesDesc,\n\t\tfilesFreeDesc:    filesFreeDesc,\n\t\tpurgeableDesc:    purgeableDesc,\n\t\troDesc:           roDesc,\n\t\tdeviceErrorDesc:  deviceErrorDesc,\n\t\tmountInfoDesc:    mountInfoDesc,\n\t\tlogger:           logger,\n\t}, nil\n}\n\nfunc (c *filesystemCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.GetStats()\n\tif err != nil {\n\t\treturn err\n\t}\n\t// Make sure we expose a metric once, even if there are multiple mounts\n\tseen := map[filesystemLabels]bool{}\n\tfor _, s := range stats {\n\t\tif seen[s.labels] {\n\t\t\tcontinue\n\t\t}\n\t\tseen[s.labels] = true\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.deviceErrorDesc, prometheus.GaugeValue,\n\t\t\ts.deviceError, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.roDesc, prometheus.GaugeValue,\n\t\t\ts.ro, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t)\n\n\t\tif s.deviceError > 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.sizeDesc, prometheus.GaugeValue,\n\t\t\ts.size, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.freeDesc, prometheus.GaugeValue,\n\t\t\ts.free, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.availDesc, prometheus.GaugeValue,\n\t\t\ts.avail, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.filesDesc, prometheus.GaugeValue,\n\t\t\ts.files, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.filesFreeDesc, prometheus.GaugeValue,\n\t\t\ts.filesFree, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.mountInfoDesc, prometheus.GaugeValue,\n\t\t\t1.0, s.labels.device, s.labels.major, s.labels.minor, s.labels.mountPoint,\n\t\t)\n\t\tif s.purgeable >= 0 {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.purgeableDesc, prometheus.GaugeValue,\n\t\t\t\ts.purgeable, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t\t)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc newMountPointsFilter(logger *slog.Logger) (deviceFilter, error) {\n\tif *oldMountPointsExcluded != \"\" {\n\t\tif !mountPointsExcludeSet {\n\t\t\tlogger.Warn(\"--collector.filesystem.ignored-mount-points is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.mount-points-exclude\")\n\t\t\t*mountPointsExclude = *oldMountPointsExcluded\n\t\t} else {\n\t\t\treturn deviceFilter{}, errors.New(\"--collector.filesystem.ignored-mount-points and --collector.filesystem.mount-points-exclude are mutually exclusive\")\n\t\t}\n\t}\n\n\tif *mountPointsInclude != \"\" && !mountPointsExcludeSet {\n\t\tlogger.Debug(\"mount-points-exclude flag not set when mount-points-include flag is set, assuming include is desired\")\n\t\t*mountPointsExclude = \"\"\n\t}\n\n\tif *mountPointsExclude != \"\" && *mountPointsInclude != \"\" {\n\t\treturn deviceFilter{}, errors.New(\"--collector.filesystem.mount-points-exclude and --collector.filesystem.mount-points-include are mutually exclusive\")\n\t}\n\n\tif *mountPointsExclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.filesystem.mount-points-exclude\", \"flag\", *mountPointsExclude)\n\t}\n\tif *mountPointsInclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.filesystem.mount-points-include\", \"flag\", *mountPointsInclude)\n\t}\n\n\treturn newDeviceFilter(*mountPointsExclude, *mountPointsInclude), nil\n}\n\nfunc newFSTypeFilter(logger *slog.Logger) (deviceFilter, error) {\n\tif *oldFSTypesExcluded != \"\" {\n\t\tif !fsTypesExcludeSet {\n\t\t\tlogger.Warn(\"--collector.filesystem.ignored-fs-types is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.fs-types-exclude\")\n\t\t\t*fsTypesExclude = *oldFSTypesExcluded\n\t\t} else {\n\t\t\treturn deviceFilter{}, errors.New(\"--collector.filesystem.ignored-fs-types and --collector.filesystem.fs-types-exclude are mutually exclusive\")\n\t\t}\n\t}\n\n\tif *fsTypesInclude != \"\" && !fsTypesExcludeSet {\n\t\tlogger.Debug(\"fs-types-exclude flag not set when fs-types-include flag is set, assuming include is desired\")\n\t\t*fsTypesExclude = \"\"\n\t}\n\n\tif *fsTypesExclude != \"\" && *fsTypesInclude != \"\" {\n\t\treturn deviceFilter{}, errors.New(\"--collector.filesystem.fs-types-exclude and --collector.filesystem.fs-types-include are mutually exclusive\")\n\t}\n\n\tif *fsTypesExclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.filesystem.fs-types-exclude\", \"flag\", *fsTypesExclude)\n\t}\n\tif *fsTypesInclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.filesystem.fs-types-include\", \"flag\", *fsTypesInclude)\n\t}\n\n\treturn newDeviceFilter(*fsTypesExclude, *fsTypesInclude), nil\n}\n"
  },
  {
    "path": "collector/filesystem_freebsd.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilesystem\n\npackage collector\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tdefMountPointsExcluded = \"^/(dev)($|/)\"\n\tdefFSTypesExcluded     = \"^devfs$\"\n)\n\n// Expose filesystem fullness.\nfunc (c *filesystemCollector) GetStats() ([]filesystemStats, error) {\n\tn, err := unix.Getfsstat(nil, unix.MNT_NOWAIT)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tbuf := make([]unix.Statfs_t, n)\n\t_, err = unix.Getfsstat(buf, unix.MNT_NOWAIT)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tstats := []filesystemStats{}\n\tfor _, fs := range buf {\n\t\tmountpoint := unix.ByteSliceToString(fs.Mntonname[:])\n\t\tif c.mountPointFilter.ignored(mountpoint) {\n\t\t\tc.logger.Debug(\"Ignoring mount point\", \"mountpoint\", mountpoint)\n\t\t\tcontinue\n\t\t}\n\n\t\tdevice := unix.ByteSliceToString(fs.Mntfromname[:])\n\t\tfstype := unix.ByteSliceToString(fs.Fstypename[:])\n\t\tif c.fsTypeFilter.ignored(fstype) {\n\t\t\tc.logger.Debug(\"Ignoring fs type\", \"type\", fstype)\n\t\t\tcontinue\n\t\t}\n\n\t\tif (fs.Flags & unix.MNT_IGNORE) != 0 {\n\t\t\tc.logger.Debug(\"Ignoring mount flagged as ignore\", \"mountpoint\", mountpoint)\n\t\t\tcontinue\n\t\t}\n\n\t\tvar ro float64\n\t\tif (fs.Flags & unix.MNT_RDONLY) != 0 {\n\t\t\tro = 1\n\t\t}\n\n\t\tstats = append(stats, filesystemStats{\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tdevice:     device,\n\t\t\t\tmountPoint: rootfsStripPrefix(mountpoint),\n\t\t\t\tfsType:     fstype,\n\t\t\t},\n\t\t\tsize:      float64(fs.Blocks) * float64(fs.Bsize),\n\t\t\tfree:      float64(fs.Bfree) * float64(fs.Bsize),\n\t\t\tavail:     float64(fs.Bavail) * float64(fs.Bsize),\n\t\t\tfiles:     float64(fs.Files),\n\t\t\tfilesFree: float64(fs.Ffree),\n\t\t\tro:        ro,\n\t\t})\n\t}\n\treturn stats, nil\n}\n"
  },
  {
    "path": "collector/filesystem_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilesystem\n\npackage collector\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"golang.org/x/sys/unix\"\n\n\t\"github.com/prometheus/procfs\"\n)\n\nconst (\n\tdefMountPointsExcluded = \"^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)\"\n\tdefFSTypesExcluded     = \"^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|erofs|sysfs|tracefs)$\"\n)\n\nvar mountTimeout = kingpin.Flag(\"collector.filesystem.mount-timeout\",\n\t\"how long to wait for a mount to respond before marking it as stale\").\n\tHidden().Default(\"5s\").Duration()\nvar statWorkerCount = kingpin.Flag(\"collector.filesystem.stat-workers\",\n\t\"how many stat calls to process simultaneously\").\n\tHidden().Default(\"4\").Int()\nvar stuckMounts = make(map[string]struct{})\nvar stuckMountsMtx = &sync.Mutex{}\n\n// GetStats returns filesystem stats.\nfunc (c *filesystemCollector) GetStats() ([]filesystemStats, error) {\n\tmps, err := mountPointDetails(c.logger)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tstats := []filesystemStats{}\n\tlabelChan := make(chan filesystemLabels)\n\tstatChan := make(chan filesystemStats)\n\twg := sync.WaitGroup{}\n\n\tworkerCount := max(*statWorkerCount, 1)\n\n\tfor i := 0; i < workerCount; i++ {\n\t\twg.Add(1)\n\t\tgo func() {\n\t\t\tdefer wg.Done()\n\t\t\tfor labels := range labelChan {\n\t\t\t\tstatChan <- c.processStat(labels)\n\t\t\t}\n\t\t}()\n\t}\n\n\tgo func() {\n\t\tfor _, labels := range mps {\n\t\t\tif c.mountPointFilter.ignored(labels.mountPoint) {\n\t\t\t\tc.logger.Debug(\"Ignoring mount point\", \"mountpoint\", labels.mountPoint)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif c.fsTypeFilter.ignored(labels.fsType) {\n\t\t\t\tc.logger.Debug(\"Ignoring fs type\", \"type\", labels.fsType)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tstuckMountsMtx.Lock()\n\t\t\tif _, ok := stuckMounts[labels.mountPoint]; ok {\n\t\t\t\tlabels.deviceError = \"mountpoint timeout\"\n\t\t\t\tstats = append(stats, filesystemStats{\n\t\t\t\t\tlabels:      labels,\n\t\t\t\t\tdeviceError: 1,\n\t\t\t\t})\n\t\t\t\tc.logger.Debug(\"Mount point is in an unresponsive state\", \"mountpoint\", labels.mountPoint)\n\t\t\t\tstuckMountsMtx.Unlock()\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tstuckMountsMtx.Unlock()\n\t\t\tlabelChan <- labels\n\t\t}\n\t\tclose(labelChan)\n\t\twg.Wait()\n\t\tclose(statChan)\n\t}()\n\n\tfor stat := range statChan {\n\t\tstats = append(stats, stat)\n\t}\n\treturn stats, nil\n}\n\nfunc (c *filesystemCollector) processStat(labels filesystemLabels) filesystemStats {\n\tvar ro float64\n\tif isFilesystemReadOnly(labels) {\n\t\tro = 1\n\t}\n\n\tsuccess := make(chan struct{})\n\tgo stuckMountWatcher(labels.mountPoint, success, c.logger)\n\n\tbuf := new(unix.Statfs_t)\n\terr := unix.Statfs(rootfsFilePath(labels.mountPoint), buf)\n\tstuckMountsMtx.Lock()\n\tclose(success)\n\n\t// If the mount has been marked as stuck, unmark it and log it's recovery.\n\tif _, ok := stuckMounts[labels.mountPoint]; ok {\n\t\tc.logger.Debug(\"Mount point has recovered, monitoring will resume\", \"mountpoint\", labels.mountPoint)\n\t\tdelete(stuckMounts, labels.mountPoint)\n\t}\n\tstuckMountsMtx.Unlock()\n\n\t// Remove options from labels because options will not be used from this point forward\n\t// and keeping them can lead to errors when the same device is mounted to the same mountpoint\n\t// twice, with different options (metrics would be recorded multiple times).\n\tlabels.mountOptions = \"\"\n\tlabels.superOptions = \"\"\n\n\tif err != nil {\n\t\tlabels.deviceError = err.Error()\n\t\tc.logger.Debug(\"Error on statfs() system call\", \"rootfs\", rootfsFilePath(labels.mountPoint), \"err\", err)\n\t\treturn filesystemStats{\n\t\t\tlabels:      labels,\n\t\t\tdeviceError: 1,\n\t\t\tro:          ro,\n\t\t}\n\t}\n\n\treturn filesystemStats{\n\t\tlabels:    labels,\n\t\tsize:      float64(buf.Blocks) * float64(buf.Bsize),\n\t\tfree:      float64(buf.Bfree) * float64(buf.Bsize),\n\t\tavail:     float64(buf.Bavail) * float64(buf.Bsize),\n\t\tfiles:     float64(buf.Files),\n\t\tfilesFree: float64(buf.Ffree),\n\t\tro:        ro,\n\t}\n}\n\n// stuckMountWatcher listens on the given success channel and if the channel closes\n// then the watcher does nothing. If instead the timeout is reached, the\n// mount point that is being watched is marked as stuck.\nfunc stuckMountWatcher(mountPoint string, success chan struct{}, logger *slog.Logger) {\n\tmountCheckTimer := time.NewTimer(*mountTimeout)\n\tdefer mountCheckTimer.Stop()\n\tselect {\n\tcase <-success:\n\t\t// Success\n\tcase <-mountCheckTimer.C:\n\t\t// Timed out, mark mount as stuck\n\t\tstuckMountsMtx.Lock()\n\t\tselect {\n\t\tcase <-success:\n\t\t\t// Success came in just after the timeout was reached, don't label the mount as stuck\n\t\tdefault:\n\t\t\tlogger.Debug(\"Mount point timed out, it is being labeled as stuck and will not be monitored\", \"mountpoint\", mountPoint)\n\t\t\tstuckMounts[mountPoint] = struct{}{}\n\t\t}\n\t\tstuckMountsMtx.Unlock()\n\t}\n}\n\nfunc mountPointDetails(logger *slog.Logger) ([]filesystemLabels, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\tmountInfo, err := fs.GetProcMounts(1)\n\tif errors.Is(err, os.ErrNotExist) {\n\t\t// Fallback to `/proc/self/mountinfo` if `/proc/1/mountinfo` is missing due hidepid.\n\t\tlogger.Debug(\"Reading root mounts failed, falling back to self mounts\", \"err\", err)\n\t\tmountInfo, err = fs.GetMounts()\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn parseFilesystemLabels(mountInfo)\n}\n\nfunc parseFilesystemLabels(mountInfo []*procfs.MountInfo) ([]filesystemLabels, error) {\n\tvar filesystems []filesystemLabels\n\n\tfor _, mount := range mountInfo {\n\t\tmajor, minor := 0, 0\n\t\t_, err := fmt.Sscanf(mount.MajorMinorVer, \"%d:%d\", &major, &minor)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"malformed mount point MajorMinorVer: %q\", mount.MajorMinorVer)\n\t\t}\n\n\t\t// Ensure we handle the translation of \\040 and \\011\n\t\t// as per fstab(5).\n\t\tmount.MountPoint = strings.ReplaceAll(mount.MountPoint, \"\\\\040\", \" \")\n\t\tmount.MountPoint = strings.ReplaceAll(mount.MountPoint, \"\\\\011\", \"\\t\")\n\n\t\tfilesystems = append(filesystems, filesystemLabels{\n\t\t\tdevice:       mount.Source,\n\t\t\tmountPoint:   rootfsStripPrefix(mount.MountPoint),\n\t\t\tfsType:       mount.FSType,\n\t\t\tmountOptions: mountOptionsString(mount.Options),\n\t\t\tsuperOptions: mountOptionsString(mount.SuperOptions),\n\t\t\tmajor:        strconv.Itoa(major),\n\t\t\tminor:        strconv.Itoa(minor),\n\t\t\tdeviceError:  \"\",\n\t\t})\n\t}\n\n\treturn filesystems, nil\n}\n\n// see https://github.com/prometheus/node_exporter/issues/3157#issuecomment-2422761187\n// if either mount or super options contain \"ro\" the filesystem is read-only\nfunc isFilesystemReadOnly(labels filesystemLabels) bool {\n\tif slices.Contains(strings.Split(labels.mountOptions, \",\"), \"ro\") || slices.Contains(strings.Split(labels.superOptions, \",\"), \"ro\") {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\nfunc mountOptionsString(m map[string]string) string {\n\tb := new(bytes.Buffer)\n\tfor key, value := range m {\n\t\tif value == \"\" {\n\t\t\tfmt.Fprintf(b, \"%s\", key)\n\t\t} else {\n\t\t\tfmt.Fprintf(b, \"%s=%s\", key, value)\n\t\t}\n\t}\n\treturn b.String()\n}\n"
  },
  {
    "path": "collector/filesystem_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilesystem\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"testing\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\n\t\"github.com/prometheus/procfs\"\n)\n\nfunc Test_parseFilesystemLabelsError(t *testing.T) {\n\ttests := []struct {\n\t\tname string\n\t\tin   []*procfs.MountInfo\n\t}{\n\t\t{\n\t\t\tname: \"malformed Major:Minor\",\n\t\t\tin: []*procfs.MountInfo{\n\t\t\t\t{\n\t\t\t\t\tMajorMinorVer: \"nope\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tif _, err := parseFilesystemLabels(tt.in); err == nil {\n\t\t\t\tt.Fatal(\"expected an error, but none occurred\")\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc Test_isFilesystemReadOnly(t *testing.T) {\n\ttests := map[string]struct {\n\t\tlabels   filesystemLabels\n\t\texpected bool\n\t}{\n\t\t\"/media/volume1\": {\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tmountOptions: \"rw,nosuid,nodev,noexec,relatime\",\n\t\t\t\tsuperOptions: \"rw,devices\",\n\t\t\t},\n\t\t\texpected: false,\n\t\t},\n\t\t\"/media/volume2\": {\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tmountOptions: \"ro,relatime\",\n\t\t\t\tsuperOptions: \"rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct\",\n\t\t\t}, expected: true,\n\t\t},\n\t\t\"/media/volume3\": {\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tmountOptions: \"rw,user_id=1000,group_id=1000\",\n\t\t\t\tsuperOptions: \"ro\",\n\t\t\t}, expected: true,\n\t\t},\n\t\t\"/media/volume4\": {\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tmountOptions: \"ro,nosuid,noexec\",\n\t\t\t\tsuperOptions: \"ro,nodev\",\n\t\t\t}, expected: true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tif got := isFilesystemReadOnly(tt.labels); got != tt.expected {\n\t\t\tt.Errorf(\"Expected %t, got %t\", tt.expected, got)\n\t\t}\n\t}\n}\n\nfunc TestMountPointDetails(t *testing.T) {\n\tif _, err := kingpin.CommandLine.Parse([]string{\"--path.procfs\", \"./fixtures/proc\"}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\texpected := map[string]string{\n\t\t\"/\":                               \"\",\n\t\t\"/sys\":                            \"\",\n\t\t\"/proc\":                           \"\",\n\t\t\"/dev\":                            \"\",\n\t\t\"/dev/pts\":                        \"\",\n\t\t\"/run\":                            \"\",\n\t\t\"/sys/kernel/security\":            \"\",\n\t\t\"/dev/shm\":                        \"\",\n\t\t\"/run/lock\":                       \"\",\n\t\t\"/sys/fs/cgroup\":                  \"\",\n\t\t\"/sys/fs/cgroup/systemd\":          \"\",\n\t\t\"/sys/fs/pstore\":                  \"\",\n\t\t\"/sys/fs/cgroup/cpuset\":           \"\",\n\t\t\"/sys/fs/cgroup/cpu,cpuacct\":      \"\",\n\t\t\"/sys/fs/cgroup/devices\":          \"\",\n\t\t\"/sys/fs/cgroup/freezer\":          \"\",\n\t\t\"/sys/fs/cgroup/net_cls,net_prio\": \"\",\n\t\t\"/sys/fs/cgroup/blkio\":            \"\",\n\t\t\"/sys/fs/cgroup/perf_event\":       \"\",\n\t\t\"/proc/sys/fs/binfmt_misc\":        \"\",\n\t\t\"/dev/mqueue\":                     \"\",\n\t\t\"/sys/kernel/debug\":               \"\",\n\t\t\"/dev/hugepages\":                  \"\",\n\t\t\"/sys/fs/fuse/connections\":        \"\",\n\t\t\"/boot\":                           \"\",\n\t\t\"/run/rpc_pipefs\":                 \"\",\n\t\t\"/run/user/1000\":                  \"\",\n\t\t\"/run/user/1000/gvfs\":             \"\",\n\t\t\"/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore] bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk\": \"\",\n\t\t\"/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore]\tbafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk\": \"\",\n\t\t\"/var/lib/containers/storage/overlay\": \"\",\n\t}\n\n\tfilesystems, err := mountPointDetails(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\tif err != nil {\n\t\tt.Log(err)\n\t}\n\n\tfoundSet := map[string]bool{}\n\tfor _, fs := range filesystems {\n\t\tif _, ok := expected[fs.mountPoint]; !ok {\n\t\t\tt.Errorf(\"Got unexpected %s\", fs.mountPoint)\n\t\t}\n\t\tfoundSet[fs.mountPoint] = true\n\t}\n\n\tfor mountPoint := range expected {\n\t\tif _, ok := foundSet[mountPoint]; !ok {\n\t\t\tt.Errorf(\"Expected %s, got nothing\", mountPoint)\n\t\t}\n\t}\n}\n\nfunc TestMountsFallback(t *testing.T) {\n\tif _, err := kingpin.CommandLine.Parse([]string{\"--path.procfs\", \"./fixtures_hidepid/proc\"}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\texpected := map[string]string{\n\t\t\"/\": \"\",\n\t}\n\n\tfilesystems, err := mountPointDetails(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\tif err != nil {\n\t\tt.Log(err)\n\t}\n\n\tfor _, fs := range filesystems {\n\t\tif _, ok := expected[fs.mountPoint]; !ok {\n\t\t\tt.Errorf(\"Got unexpected %s\", fs.mountPoint)\n\t\t}\n\t}\n}\n\nfunc TestPathRootfs(t *testing.T) {\n\tif _, err := kingpin.CommandLine.Parse([]string{\"--path.procfs\", \"./fixtures_bindmount/proc\", \"--path.rootfs\", \"/host\"}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\texpected := map[string]string{\n\t\t// should modify these mountpoints (removes /host, see fixture proc file)\n\t\t\"/\":              \"\",\n\t\t\"/media/volume1\": \"\",\n\t\t\"/media/volume2\": \"\",\n\t\t// should not modify these mountpoints\n\t\t\"/dev/shm\":       \"\",\n\t\t\"/run/lock\":      \"\",\n\t\t\"/sys/fs/cgroup\": \"\",\n\t}\n\n\tfilesystems, err := mountPointDetails(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\tif err != nil {\n\t\tt.Log(err)\n\t}\n\n\tfor _, fs := range filesystems {\n\t\tif _, ok := expected[fs.mountPoint]; !ok {\n\t\t\tt.Errorf(\"Got unexpected %s\", fs.mountPoint)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "collector/filesystem_macos.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build darwin && !nofilesystem\n\npackage collector\n\n/*\n#cgo CFLAGS: -x objective-c\n#cgo LDFLAGS: -framework Foundation\n#import <Foundation/Foundation.h>\n#include <sys/param.h>\n#include <sys/ucred.h>\n#include <sys/mount.h>\n#include <stdio.h>\n\ndouble purgeable(char *path) {\n  double value = -1.0f;\n\n  @autoreleasepool {\n    NSError *error = nil;\n    NSString *str = [NSString stringWithUTF8String:path];\n    NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:str];\n\n    NSDictionary *results = [fileURL resourceValuesForKeys:@[NSURLVolumeAvailableCapacityForImportantUsageKey] error:&error];\n    if (results) {\n      CFNumberRef tmp = CFDictionaryGetValue((CFDictionaryRef)results, NSURLVolumeAvailableCapacityForImportantUsageKey);\n      if (tmp != NULL) {\n        CFNumberGetValue(tmp, kCFNumberFloat64Type, &value);\n      }\n    }\n\n    [fileURL release];\n  }\n\n  return value;\n}\n*/\nimport \"C\"\n\nimport (\n\t\"errors\"\n\t\"unsafe\"\n)\n\nconst (\n\tdefMountPointsExcluded = \"^/(dev)($|/)\"\n\tdefFSTypesExcluded     = \"^devfs$\"\n\treadOnly               = 0x1 // MNT_RDONLY\n)\n\n// Expose filesystem fullness.\nfunc (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {\n\tvar mntbuf *C.struct_statfs\n\tcount := C.getmntinfo(&mntbuf, C.MNT_NOWAIT)\n\tif count == 0 {\n\t\treturn nil, errors.New(\"getmntinfo() failed\")\n\t}\n\n\tmnt := (*[1 << 20]C.struct_statfs)(unsafe.Pointer(mntbuf))\n\tstats = []filesystemStats{}\n\tfor i := 0; i < int(count); i++ {\n\t\tmountpoint := C.GoString(&mnt[i].f_mntonname[0])\n\t\tif c.mountPointFilter.ignored(mountpoint) {\n\t\t\tc.logger.Debug(\"Ignoring mount point\", \"mountpoint\", mountpoint)\n\t\t\tcontinue\n\t\t}\n\n\t\tdevice := C.GoString(&mnt[i].f_mntfromname[0])\n\t\tfstype := C.GoString(&mnt[i].f_fstypename[0])\n\t\tif c.fsTypeFilter.ignored(fstype) {\n\t\t\tc.logger.Debug(\"Ignoring fs type\", \"type\", fstype)\n\t\t\tcontinue\n\t\t}\n\n\t\tvar ro float64\n\t\tif (mnt[i].f_flags & readOnly) != 0 {\n\t\t\tro = 1\n\t\t}\n\n\t\tmountpointCString := C.CString(mountpoint)\n\t\tdefer C.free(unsafe.Pointer(mountpointCString))\n\n\t\tstats = append(stats, filesystemStats{\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tdevice:     device,\n\t\t\t\tmountPoint: rootfsStripPrefix(mountpoint),\n\t\t\t\tfsType:     fstype,\n\t\t\t},\n\t\t\tsize:      float64(mnt[i].f_blocks) * float64(mnt[i].f_bsize),\n\t\t\tfree:      float64(mnt[i].f_bfree) * float64(mnt[i].f_bsize),\n\t\t\tavail:     float64(mnt[i].f_bavail) * float64(mnt[i].f_bsize),\n\t\t\tfiles:     float64(mnt[i].f_files),\n\t\t\tfilesFree: float64(mnt[i].f_ffree),\n\t\t\tpurgeable: float64(C.purgeable(mountpointCString)),\n\t\t\tro:        ro,\n\t\t})\n\t}\n\treturn stats, nil\n}\n"
  },
  {
    "path": "collector/filesystem_netbsd.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilesystem\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tdefMountPointsExcluded = \"^/(dev)($|/)\"\n\tdefFSTypesExcluded     = \"^(kernfs|procfs|ptyfs|fdesc)$\"\n\t_VFS_NAMELEN           = 32\n\t_VFS_MNAMELEN          = 1024\n)\n\n/*\n * Go uses the NetBSD 9 ABI and thus syscall.SYS_GETVFSSTAT is compat_90_getvfsstat.\n * We have to declare struct statvfs90 because it is not included in the unix package.\n * See NetBSD/src/sys/compat/sys/statvfs.h.\n */\ntype statvfs90 struct {\n\tF_flag   uint\n\tF_bsize  uint\n\tF_frsize uint\n\tF_iosize uint\n\n\tF_blocks uint64\n\tF_bfree  uint64\n\tF_bavail uint64\n\tF_bresvd uint64\n\n\tF_files  uint64\n\tF_ffree  uint64\n\tF_favail uint64\n\tF_fresvd uint64\n\n\tF_syncreads  uint64\n\tF_syncwrites uint64\n\n\tF_asyncreads  uint64\n\tF_asyncwrites uint64\n\n\tF_fsidx   [2]uint32\n\tF_fsid    uint32\n\tF_namemax uint\n\tF_owner   uint32\n\tF_spare   [4]uint32\n\n\tF_fstypename  [_VFS_NAMELEN]byte\n\tF_mntonname   [_VFS_MNAMELEN]byte\n\tF_mntfromname [_VFS_MNAMELEN]byte\n\n\tcgo_pad [4]byte\n}\n\nfunc (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {\n\tvar mnt []statvfs90\n\tif syscall.SYS_GETVFSSTAT != 356 /* compat_90_getvfsstat */ {\n\t\t/*\n\t\t * Catch if golang ever updates to newer ABI and bail.\n\t\t */\n\t\treturn nil, fmt.Errorf(\"getvfsstat: ABI mismatch\")\n\t}\n\tfor {\n\t\tr1, _, errno := syscall.Syscall(syscall.SYS_GETVFSSTAT, uintptr(0), 0, unix.ST_NOWAIT)\n\t\tif errno != 0 {\n\t\t\treturn nil, fmt.Errorf(\"getvfsstat: %s\", string(errno))\n\t\t}\n\t\tmnt = make([]statvfs90, r1, r1)\n\t\tr2, _, errno := syscall.Syscall(syscall.SYS_GETVFSSTAT, uintptr(unsafe.Pointer(&mnt[0])), unsafe.Sizeof(mnt[0])*r1, unix.ST_NOWAIT /* ST_NOWAIT */)\n\t\tif errno != 0 {\n\t\t\treturn nil, fmt.Errorf(\"getvfsstat: %s\", string(errno))\n\t\t}\n\t\tif r1 == r2 {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tstats = []filesystemStats{}\n\tfor _, v := range mnt {\n\t\tmountpoint := unix.ByteSliceToString(v.F_mntonname[:])\n\t\tif c.mountPointFilter.ignored(mountpoint) {\n\t\t\tc.logger.Debug(\"msg\", \"Ignoring mount point\", \"mountpoint\", mountpoint)\n\t\t\tcontinue\n\t\t}\n\n\t\tdevice := unix.ByteSliceToString(v.F_mntfromname[:])\n\t\tfstype := unix.ByteSliceToString(v.F_fstypename[:])\n\t\tif c.fsTypeFilter.ignored(fstype) {\n\t\t\tc.logger.Debug(\"msg\", \"Ignoring fs type\", \"type\", fstype)\n\t\t\tcontinue\n\t\t}\n\n\t\tvar ro float64\n\t\tif (v.F_flag & unix.MNT_RDONLY) != 0 {\n\t\t\tro = 1\n\t\t}\n\n\t\tstats = append(stats, filesystemStats{\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tdevice:     device,\n\t\t\t\tmountPoint: mountpoint,\n\t\t\t\tfsType:     fstype,\n\t\t\t},\n\t\t\tsize:      float64(v.F_blocks) * float64(v.F_bsize),\n\t\t\tfree:      float64(v.F_bfree) * float64(v.F_bsize),\n\t\t\tavail:     float64(v.F_bavail) * float64(v.F_bsize),\n\t\t\tfiles:     float64(v.F_files),\n\t\t\tfilesFree: float64(v.F_ffree),\n\t\t\tro:        ro,\n\t\t})\n\t}\n\treturn stats, nil\n}\n"
  },
  {
    "path": "collector/filesystem_openbsd.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nofilesystem\n\npackage collector\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tdefMountPointsExcluded = \"^/(dev)($|/)\"\n\tdefFSTypesExcluded     = \"^devfs$\"\n)\n\n// Expose filesystem fullness.\nfunc (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {\n\tvar mnt []unix.Statfs_t\n\tsize, err := unix.Getfsstat(mnt, unix.MNT_NOWAIT)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tmnt = make([]unix.Statfs_t, size)\n\t_, err = unix.Getfsstat(mnt, unix.MNT_NOWAIT)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tstats = []filesystemStats{}\n\tfor _, v := range mnt {\n\t\tmountpoint := unix.ByteSliceToString(v.F_mntonname[:])\n\t\tif c.mountPointFilter.ignored(mountpoint) {\n\t\t\tc.logger.Debug(\"Ignoring mount point\", \"mountpoint\", mountpoint)\n\t\t\tcontinue\n\t\t}\n\n\t\tdevice := unix.ByteSliceToString(v.F_mntfromname[:])\n\t\tfstype := unix.ByteSliceToString(v.F_fstypename[:])\n\t\tif c.fsTypeFilter.ignored(fstype) {\n\t\t\tc.logger.Debug(\"Ignoring fs type\", \"type\", fstype)\n\t\t\tcontinue\n\t\t}\n\n\t\tvar ro float64\n\t\tif (v.F_flags & unix.MNT_RDONLY) != 0 {\n\t\t\tro = 1\n\t\t}\n\n\t\tstats = append(stats, filesystemStats{\n\t\t\tlabels: filesystemLabels{\n\t\t\t\tdevice:     device,\n\t\t\t\tmountPoint: mountpoint,\n\t\t\t\tfsType:     fstype,\n\t\t\t},\n\t\t\tsize:      float64(v.F_blocks) * float64(v.F_bsize),\n\t\t\tfree:      float64(v.F_bfree) * float64(v.F_bsize),\n\t\t\tavail:     float64(v.F_bavail) * float64(v.F_bsize),\n\t\t\tfiles:     float64(v.F_files),\n\t\t\tfilesFree: float64(v.F_ffree),\n\t\t\tro:        ro,\n\t\t})\n\t}\n\treturn stats, nil\n}\n"
  },
  {
    "path": "collector/fixtures/e2e-64k-page-output.txt",
    "content": "# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\n# HELP node_arp_entries ARP entries by device\n# TYPE node_arp_entries gauge\nnode_arp_entries{device=\"eth0\"} 3\nnode_arp_entries{device=\"eth1\"} 3\n# HELP node_bcache_active_journal_entries Number of journal entries that are newer than the index.\n# TYPE node_bcache_active_journal_entries gauge\nnode_bcache_active_journal_entries{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 1\n# HELP node_bcache_average_key_size_sectors Average data per key in the btree (sectors).\n# TYPE node_bcache_average_key_size_sectors gauge\nnode_bcache_average_key_size_sectors{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_btree_cache_size_bytes Amount of memory currently used by the btree cache.\n# TYPE node_bcache_btree_cache_size_bytes gauge\nnode_bcache_btree_cache_size_bytes{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_btree_nodes Total nodes in the btree.\n# TYPE node_bcache_btree_nodes gauge\nnode_bcache_btree_nodes{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_btree_read_average_duration_seconds Average btree read duration.\n# TYPE node_bcache_btree_read_average_duration_seconds gauge\nnode_bcache_btree_read_average_duration_seconds{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 1.305e-06\n# HELP node_bcache_bypassed_bytes_total Amount of IO (both reads and writes) that has bypassed the cache.\n# TYPE node_bcache_bypassed_bytes_total counter\nnode_bcache_bypassed_bytes_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, usable for writeback (may contain clean cached data).\n# TYPE node_bcache_cache_available_percent gauge\nnode_bcache_cache_available_percent{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 100\n# HELP node_bcache_cache_bypass_hits_total Hits for IO intended to skip the cache.\n# TYPE node_bcache_cache_bypass_hits_total counter\nnode_bcache_cache_bypass_hits_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_bypass_misses_total Misses for IO intended to skip the cache.\n# TYPE node_bcache_cache_bypass_misses_total counter\nnode_bcache_cache_bypass_misses_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_hits_total Hits counted per individual IO as bcache sees them.\n# TYPE node_bcache_cache_hits_total counter\nnode_bcache_cache_hits_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 546\n# HELP node_bcache_cache_miss_collisions_total Instances where data insertion from cache miss raced with write (data already present).\n# TYPE node_bcache_cache_miss_collisions_total counter\nnode_bcache_cache_miss_collisions_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_misses_total Misses counted per individual IO as bcache sees them.\n# TYPE node_bcache_cache_misses_total counter\nnode_bcache_cache_misses_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_read_races_total Counts instances where while data was being read from the cache, the bucket was reused and invalidated - i.e. where the pointer was stale after the read completed.\n# TYPE node_bcache_cache_read_races_total counter\nnode_bcache_cache_read_races_total{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_readaheads_total Count of times readahead occurred.\n# TYPE node_bcache_cache_readaheads_total counter\nnode_bcache_cache_readaheads_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 13\n# HELP node_bcache_congested Congestion.\n# TYPE node_bcache_congested gauge\nnode_bcache_congested{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_dirty_data_bytes Amount of dirty data for this backing device in the cache.\n# TYPE node_bcache_dirty_data_bytes gauge\nnode_bcache_dirty_data_bytes{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_dirty_target_bytes Current dirty data target threshold for this backing device in bytes.\n# TYPE node_bcache_dirty_target_bytes gauge\nnode_bcache_dirty_target_bytes{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 2.189426688e+10\n# HELP node_bcache_io_errors Number of errors that have occurred, decayed by io_error_halflife.\n# TYPE node_bcache_io_errors gauge\nnode_bcache_io_errors{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_metadata_written_bytes_total Sum of all non data writes (btree writes and all other metadata).\n# TYPE node_bcache_metadata_written_bytes_total counter\nnode_bcache_metadata_written_bytes_total{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 512\n# HELP node_bcache_priority_stats_metadata_percent Bcache's metadata overhead.\n# TYPE node_bcache_priority_stats_metadata_percent gauge\nnode_bcache_priority_stats_metadata_percent{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_priority_stats_unused_percent The percentage of the cache that doesn't contain any data.\n# TYPE node_bcache_priority_stats_unused_percent gauge\nnode_bcache_priority_stats_unused_percent{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 99\n# HELP node_bcache_root_usage_percent Percentage of the root btree node in use (tree depth increases if too high).\n# TYPE node_bcache_root_usage_percent gauge\nnode_bcache_root_usage_percent{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_tree_depth Depth of the btree.\n# TYPE node_bcache_tree_depth gauge\nnode_bcache_tree_depth{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_writeback_change Last writeback rate change step for this backing device.\n# TYPE node_bcache_writeback_change gauge\nnode_bcache_writeback_change{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 329204\n# HELP node_bcache_writeback_rate Current writeback rate for this backing device in bytes.\n# TYPE node_bcache_writeback_rate gauge\nnode_bcache_writeback_rate{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 1.150976e+06\n# HELP node_bcache_writeback_rate_integral_term Current result of integral controller, part of writeback rate\n# TYPE node_bcache_writeback_rate_integral_term gauge\nnode_bcache_writeback_rate_integral_term{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 808960\n# HELP node_bcache_writeback_rate_proportional_term Current result of proportional controller, part of writeback rate\n# TYPE node_bcache_writeback_rate_proportional_term gauge\nnode_bcache_writeback_rate_proportional_term{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 437748\n# HELP node_bcache_written_bytes_total Sum of all data that has been written to the cache.\n# TYPE node_bcache_written_bytes_total counter\nnode_bcache_written_bytes_total{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcachefs_accounting_key_to_wb_slowpath_total Bcachefs counter accounting_key_to_wb_slowpath since filesystem creation.\n# TYPE node_bcachefs_accounting_key_to_wb_slowpath_total counter\nnode_bcachefs_accounting_key_to_wb_slowpath_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.4105502e+07\n# HELP node_bcachefs_bkey_pack_pos_fail_total Bcachefs counter bkey_pack_pos_fail since filesystem creation.\n# TYPE node_bcachefs_bkey_pack_pos_fail_total counter\nnode_bcachefs_bkey_pack_pos_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_btree_cache_cannibalize_lock_fail_total Bcachefs counter btree_cache_cannibalize_lock_fail since filesystem creation.\n# TYPE node_bcachefs_btree_cache_cannibalize_lock_fail_total counter\nnode_bcachefs_btree_cache_cannibalize_lock_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 24213\n# HELP node_bcachefs_btree_cache_cannibalize_lock_total Bcachefs counter btree_cache_cannibalize_lock since filesystem creation.\n# TYPE node_bcachefs_btree_cache_cannibalize_lock_total counter\nnode_bcachefs_btree_cache_cannibalize_lock_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.2061408e+07\n# HELP node_bcachefs_btree_cache_cannibalize_total Bcachefs counter btree_cache_cannibalize since filesystem creation.\n# TYPE node_bcachefs_btree_cache_cannibalize_total counter\nnode_bcachefs_btree_cache_cannibalize_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.6587339e+07\n# HELP node_bcachefs_btree_cache_cannibalize_unlock_total Bcachefs counter btree_cache_cannibalize_unlock since filesystem creation.\n# TYPE node_bcachefs_btree_cache_cannibalize_unlock_total counter\nnode_bcachefs_btree_cache_cannibalize_unlock_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.6260384e+07\n# HELP node_bcachefs_btree_cache_reap_total Bcachefs counter btree_cache_reap since filesystem creation.\n# TYPE node_bcachefs_btree_cache_reap_total counter\nnode_bcachefs_btree_cache_reap_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.9068459e+07\n# HELP node_bcachefs_btree_cache_scan_total Bcachefs counter btree_cache_scan since filesystem creation.\n# TYPE node_bcachefs_btree_cache_scan_total counter\nnode_bcachefs_btree_cache_scan_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 427545\n# HELP node_bcachefs_btree_cache_size_bytes Btree cache memory usage in bytes.\n# TYPE node_bcachefs_btree_cache_size_bytes gauge\nnode_bcachefs_btree_cache_size_bytes{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.201170739e+09\n# HELP node_bcachefs_btree_key_cache_fill_total Bcachefs counter btree_key_cache_fill since filesystem creation.\n# TYPE node_bcachefs_btree_key_cache_fill_total counter\nnode_bcachefs_btree_key_cache_fill_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.69308144e+08\n# HELP node_bcachefs_btree_node_alloc_total Bcachefs counter btree_node_alloc since filesystem creation.\n# TYPE node_bcachefs_btree_node_alloc_total counter\nnode_bcachefs_btree_node_alloc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 8.665587e+06\n# HELP node_bcachefs_btree_node_compact_total Bcachefs counter btree_node_compact since filesystem creation.\n# TYPE node_bcachefs_btree_node_compact_total counter\nnode_bcachefs_btree_node_compact_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.554425e+06\n# HELP node_bcachefs_btree_node_free_total Bcachefs counter btree_node_free since filesystem creation.\n# TYPE node_bcachefs_btree_node_free_total counter\nnode_bcachefs_btree_node_free_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.4112667e+07\n# HELP node_bcachefs_btree_node_merge_attempt_total Bcachefs counter btree_node_merge_attempt since filesystem creation.\n# TYPE node_bcachefs_btree_node_merge_attempt_total counter\nnode_bcachefs_btree_node_merge_attempt_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.5868895e+07\n# HELP node_bcachefs_btree_node_merge_total Bcachefs counter btree_node_merge since filesystem creation.\n# TYPE node_bcachefs_btree_node_merge_total counter\nnode_bcachefs_btree_node_merge_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 559684\n# HELP node_bcachefs_btree_node_read_total Bcachefs counter btree_node_read since filesystem creation.\n# TYPE node_bcachefs_btree_node_read_total counter\nnode_bcachefs_btree_node_read_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.0225874e+07\n# HELP node_bcachefs_btree_node_rewrite_total Bcachefs counter btree_node_rewrite since filesystem creation.\n# TYPE node_bcachefs_btree_node_rewrite_total counter\nnode_bcachefs_btree_node_rewrite_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.130316e+06\n# HELP node_bcachefs_btree_node_set_root_total Bcachefs counter btree_node_set_root since filesystem creation.\n# TYPE node_bcachefs_btree_node_set_root_total counter\nnode_bcachefs_btree_node_set_root_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 77958\n# HELP node_bcachefs_btree_node_split_total Bcachefs counter btree_node_split since filesystem creation.\n# TYPE node_bcachefs_btree_node_split_total counter\nnode_bcachefs_btree_node_split_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 710571\n# HELP node_bcachefs_btree_node_write_total Bcachefs counter btree_node_write since filesystem creation.\n# TYPE node_bcachefs_btree_node_write_total counter\nnode_bcachefs_btree_node_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.4796849e+08\n# HELP node_bcachefs_btree_path_relock_fail_total Bcachefs counter btree_path_relock_fail since filesystem creation.\n# TYPE node_bcachefs_btree_path_relock_fail_total counter\nnode_bcachefs_btree_path_relock_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.6213103e+07\n# HELP node_bcachefs_btree_path_upgrade_fail_total Bcachefs counter btree_path_upgrade_fail since filesystem creation.\n# TYPE node_bcachefs_btree_path_upgrade_fail_total counter\nnode_bcachefs_btree_path_upgrade_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.103667e+06\n# HELP node_bcachefs_btree_reserve_get_fail_total Bcachefs counter btree_reserve_get_fail since filesystem creation.\n# TYPE node_bcachefs_btree_reserve_get_fail_total counter\nnode_bcachefs_btree_reserve_get_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 11706\n# HELP node_bcachefs_btree_write_average_size_bytes Average btree write size by type.\n# TYPE node_bcachefs_btree_write_average_size_bytes gauge\nnode_bcachefs_btree_write_average_size_bytes{type=\"cache_reclaim\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 720\nnode_bcachefs_btree_write_average_size_bytes{type=\"init_next_bset\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 28876\nnode_bcachefs_btree_write_average_size_bytes{type=\"initial\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 102400\nnode_bcachefs_btree_write_average_size_bytes{type=\"interior\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1290\nnode_bcachefs_btree_write_average_size_bytes{type=\"journal_reclaim\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 697\n# HELP node_bcachefs_btree_writes_total Number of btree writes by type.\n# TYPE node_bcachefs_btree_writes_total counter\nnode_bcachefs_btree_writes_total{type=\"cache_reclaim\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 14401\nnode_bcachefs_btree_writes_total{type=\"init_next_bset\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.055926e+06\nnode_bcachefs_btree_writes_total{type=\"initial\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.298401e+06\nnode_bcachefs_btree_writes_total{type=\"interior\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.035363e+06\nnode_bcachefs_btree_writes_total{type=\"journal_reclaim\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.6903805e+07\n# HELP node_bcachefs_bucket_alloc_fail_total Bcachefs counter bucket_alloc_fail since filesystem creation.\n# TYPE node_bcachefs_bucket_alloc_fail_total counter\nnode_bcachefs_bucket_alloc_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.1156091e+07\n# HELP node_bcachefs_bucket_alloc_from_stripe_total Bcachefs counter bucket_alloc_from_stripe since filesystem creation.\n# TYPE node_bcachefs_bucket_alloc_from_stripe_total counter\nnode_bcachefs_bucket_alloc_from_stripe_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_bucket_alloc_total Bcachefs counter bucket_alloc since filesystem creation.\n# TYPE node_bcachefs_bucket_alloc_total counter\nnode_bcachefs_bucket_alloc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.7363674e+07\n# HELP node_bcachefs_bucket_discard_fast_total Bcachefs counter bucket_discard_fast since filesystem creation.\n# TYPE node_bcachefs_bucket_discard_fast_total counter\nnode_bcachefs_bucket_discard_fast_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 10204\n# HELP node_bcachefs_bucket_discard_fast_worker_total Bcachefs counter bucket_discard_fast_worker since filesystem creation.\n# TYPE node_bcachefs_bucket_discard_fast_worker_total counter\nnode_bcachefs_bucket_discard_fast_worker_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4012\n# HELP node_bcachefs_bucket_discard_total Bcachefs counter bucket_discard since filesystem creation.\n# TYPE node_bcachefs_bucket_discard_total counter\nnode_bcachefs_bucket_discard_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.4751388e+07\n# HELP node_bcachefs_bucket_discard_worker_total Bcachefs counter bucket_discard_worker since filesystem creation.\n# TYPE node_bcachefs_bucket_discard_worker_total counter\nnode_bcachefs_bucket_discard_worker_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.021501e+06\n# HELP node_bcachefs_bucket_invalidate_total Bcachefs counter bucket_invalidate since filesystem creation.\n# TYPE node_bcachefs_bucket_invalidate_total counter\nnode_bcachefs_bucket_invalidate_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.483205e+06\n# HELP node_bcachefs_cached_ptr_drop_total Bcachefs counter cached_ptr_drop since filesystem creation.\n# TYPE node_bcachefs_cached_ptr_drop_total counter\nnode_bcachefs_cached_ptr_drop_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.201170739e+09\n# HELP node_bcachefs_compression_compressed_bytes Compressed size by algorithm.\n# TYPE node_bcachefs_compression_compressed_bytes gauge\nnode_bcachefs_compression_compressed_bytes{algorithm=\"gzip\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_compression_compressed_bytes{algorithm=\"incompressible\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.187472557998e+13\nnode_bcachefs_compression_compressed_bytes{algorithm=\"lz4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.2505975193e+10\nnode_bcachefs_compression_compressed_bytes{algorithm=\"lz4_old\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_compression_compressed_bytes{algorithm=\"zstd\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.42665652224e+11\n# HELP node_bcachefs_compression_uncompressed_bytes Uncompressed size by algorithm.\n# TYPE node_bcachefs_compression_uncompressed_bytes gauge\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"gzip\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"incompressible\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.187472557998e+13\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"lz4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.6450417868e+10\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"lz4_old\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"zstd\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.47466319872e+11\n# HELP node_bcachefs_copygc_total Bcachefs counter copygc since filesystem creation.\n# TYPE node_bcachefs_copygc_total counter\nnode_bcachefs_copygc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 424790\n# HELP node_bcachefs_copygc_wait_obsolete_total Bcachefs counter copygc_wait_obsolete since filesystem creation.\n# TYPE node_bcachefs_copygc_wait_obsolete_total counter\nnode_bcachefs_copygc_wait_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 537321\n# HELP node_bcachefs_data_read_bounce_total Bcachefs counter data_read_bounce since filesystem creation.\n# TYPE node_bcachefs_data_read_bounce_total counter\nnode_bcachefs_data_read_bounce_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.5052058e+08\n# HELP node_bcachefs_data_read_fail_and_poison_total Bcachefs counter data_read_fail_and_poison since filesystem creation.\n# TYPE node_bcachefs_data_read_fail_and_poison_total counter\nnode_bcachefs_data_read_fail_and_poison_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_data_read_hole_total Bcachefs counter data_read_hole since filesystem creation.\n# TYPE node_bcachefs_data_read_hole_total counter\nnode_bcachefs_data_read_hole_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.858174650941e+12\n# HELP node_bcachefs_data_read_inline_total Bcachefs counter data_read_inline since filesystem creation.\n# TYPE node_bcachefs_data_read_inline_total counter\nnode_bcachefs_data_read_inline_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.5998753177e+10\n# HELP node_bcachefs_data_read_narrow_crcs_fail_total Bcachefs counter data_read_narrow_crcs_fail since filesystem creation.\n# TYPE node_bcachefs_data_read_narrow_crcs_fail_total counter\nnode_bcachefs_data_read_narrow_crcs_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1779\n# HELP node_bcachefs_data_read_narrow_crcs_total Bcachefs counter data_read_narrow_crcs since filesystem creation.\n# TYPE node_bcachefs_data_read_narrow_crcs_total counter\nnode_bcachefs_data_read_narrow_crcs_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 18529\n# HELP node_bcachefs_data_read_nopromote_already_promoted_total Bcachefs counter data_read_nopromote_already_promoted since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_already_promoted_total counter\nnode_bcachefs_data_read_nopromote_already_promoted_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.11037452e+08\n# HELP node_bcachefs_data_read_nopromote_congested_total Bcachefs counter data_read_nopromote_congested since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_congested_total counter\nnode_bcachefs_data_read_nopromote_congested_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.913847e+06\n# HELP node_bcachefs_data_read_nopromote_may_not_total Bcachefs counter data_read_nopromote_may_not since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_may_not_total counter\nnode_bcachefs_data_read_nopromote_may_not_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.0206095e+07\n# HELP node_bcachefs_data_read_nopromote_total Bcachefs counter data_read_nopromote since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_total counter\nnode_bcachefs_data_read_nopromote_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.42468868e+08\n# HELP node_bcachefs_data_read_nopromote_unwritten_total Bcachefs counter data_read_nopromote_unwritten since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_unwritten_total counter\nnode_bcachefs_data_read_nopromote_unwritten_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_data_read_promote_total Bcachefs counter data_read_promote since filesystem creation.\n# TYPE node_bcachefs_data_read_promote_total counter\nnode_bcachefs_data_read_promote_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.19833053184e+11\n# HELP node_bcachefs_data_read_retry_total Bcachefs counter data_read_retry since filesystem creation.\n# TYPE node_bcachefs_data_read_retry_total counter\nnode_bcachefs_data_read_retry_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.2404675e+07\n# HELP node_bcachefs_data_read_reuse_race_total Bcachefs counter data_read_reuse_race since filesystem creation.\n# TYPE node_bcachefs_data_read_reuse_race_total counter\nnode_bcachefs_data_read_reuse_race_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 201095\n# HELP node_bcachefs_data_read_split_total Bcachefs counter data_read_split since filesystem creation.\n# TYPE node_bcachefs_data_read_split_total counter\nnode_bcachefs_data_read_split_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.18590695e+08\n# HELP node_bcachefs_data_read_total Bcachefs counter data_read since filesystem creation.\n# TYPE node_bcachefs_data_read_total counter\nnode_bcachefs_data_read_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.8928267436032e+13\n# HELP node_bcachefs_data_update_fail_total Bcachefs counter data_update_fail since filesystem creation.\n# TYPE node_bcachefs_data_update_fail_total counter\nnode_bcachefs_data_update_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.138166333e+09\n# HELP node_bcachefs_data_update_in_flight_total Bcachefs counter data_update_in_flight since filesystem creation.\n# TYPE node_bcachefs_data_update_in_flight_total counter\nnode_bcachefs_data_update_in_flight_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.978784e+06\n# HELP node_bcachefs_data_update_key_fail_total Bcachefs counter data_update_key_fail since filesystem creation.\n# TYPE node_bcachefs_data_update_key_fail_total counter\nnode_bcachefs_data_update_key_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.4373939404e+10\n# HELP node_bcachefs_data_update_key_total Bcachefs counter data_update_key since filesystem creation.\n# TYPE node_bcachefs_data_update_key_total counter\nnode_bcachefs_data_update_key_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.00275460453171e+14\n# HELP node_bcachefs_data_update_no_io_total Bcachefs counter data_update_no_io since filesystem creation.\n# TYPE node_bcachefs_data_update_no_io_total counter\nnode_bcachefs_data_update_no_io_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.00824357273e+11\n# HELP node_bcachefs_data_update_noop_obsolete_total Bcachefs counter data_update_noop_obsolete since filesystem creation.\n# TYPE node_bcachefs_data_update_noop_obsolete_total counter\nnode_bcachefs_data_update_noop_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_data_update_pred_total Bcachefs counter data_update_pred since filesystem creation.\n# TYPE node_bcachefs_data_update_pred_total counter\nnode_bcachefs_data_update_pred_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.947802324992e+13\n# HELP node_bcachefs_data_update_read_total Bcachefs counter data_update_read since filesystem creation.\n# TYPE node_bcachefs_data_update_read_total counter\nnode_bcachefs_data_update_read_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 8.9390295338188e+13\n# HELP node_bcachefs_data_update_start_fail_obsolete_total Bcachefs counter data_update_start_fail_obsolete since filesystem creation.\n# TYPE node_bcachefs_data_update_start_fail_obsolete_total counter\nnode_bcachefs_data_update_start_fail_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.14018822443e+11\n# HELP node_bcachefs_data_update_total Bcachefs counter data_update since filesystem creation.\n# TYPE node_bcachefs_data_update_total counter\nnode_bcachefs_data_update_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.4206847997116416e+16\n# HELP node_bcachefs_data_update_useless_write_fail_total Bcachefs counter data_update_useless_write_fail since filesystem creation.\n# TYPE node_bcachefs_data_update_useless_write_fail_total counter\nnode_bcachefs_data_update_useless_write_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.30428461e+09\n# HELP node_bcachefs_data_update_write_total Bcachefs counter data_update_write since filesystem creation.\n# TYPE node_bcachefs_data_update_write_total counter\nnode_bcachefs_data_update_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.7163493018828e+13\n# HELP node_bcachefs_data_write_total Bcachefs counter data_write since filesystem creation.\n# TYPE node_bcachefs_data_write_total counter\nnode_bcachefs_data_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.0780769764966e+13\n# HELP node_bcachefs_device_bucket_size_bytes Bucket size in bytes.\n# TYPE node_bcachefs_device_bucket_size_bytes gauge\nnode_bcachefs_device_bucket_size_bytes{device=\"10\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 524288\nnode_bcachefs_device_bucket_size_bytes{device=\"4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.097152e+06\nnode_bcachefs_device_bucket_size_bytes{device=\"6\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.097152e+06\nnode_bcachefs_device_bucket_size_bytes{device=\"7\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.097152e+06\nnode_bcachefs_device_bucket_size_bytes{device=\"8\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.097152e+06\n# HELP node_bcachefs_device_buckets Total number of buckets.\n# TYPE node_bcachefs_device_buckets gauge\nnode_bcachefs_device_buckets{device=\"10\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 953880\nnode_bcachefs_device_buckets{device=\"4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.629824e+06\nnode_bcachefs_device_buckets{device=\"6\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 953864\nnode_bcachefs_device_buckets{device=\"7\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.907723e+06\nnode_bcachefs_device_buckets{device=\"8\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.384637e+06\n# HELP node_bcachefs_device_durability Device durability setting.\n# TYPE node_bcachefs_device_durability gauge\nnode_bcachefs_device_durability{device=\"10\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_durability{device=\"4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_durability{device=\"6\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_durability{device=\"7\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_durability{device=\"8\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\n# HELP node_bcachefs_device_info Device information.\n# TYPE node_bcachefs_device_info gauge\nnode_bcachefs_device_info{device=\"10\",label=\"disk-10\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_info{device=\"4\",label=\"disk-4\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_info{device=\"6\",label=\"disk-6\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_info{device=\"7\",label=\"disk-7\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_info{device=\"8\",label=\"disk-8\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\n# HELP node_bcachefs_device_io_done_bytes_total IO bytes by operation type and data type.\n# TYPE node_bcachefs_device_io_done_bytes_total counter\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.24288e+06\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 16384\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.193358848e+09\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 589824\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 8.912896e+06\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.767671263232e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.82753624064e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.432028966912e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 645120\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 645120\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 677376\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 645120\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 645120\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.02313054208e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.52377698304e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.770452246528e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.258285805568e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.10019098624e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.62070339584e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.53932742656e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.8382641152e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.115020546048e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.072510210048e+12\n# HELP node_bcachefs_device_io_errors_total IO errors by error type.\n# TYPE node_bcachefs_device_io_errors_total counter\nnode_bcachefs_device_io_errors_total{device=\"10\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"10\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"10\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"4\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"4\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 197416\nnode_bcachefs_device_io_errors_total{device=\"4\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 205\nnode_bcachefs_device_io_errors_total{device=\"6\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5\nnode_bcachefs_device_io_errors_total{device=\"6\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 18828\nnode_bcachefs_device_io_errors_total{device=\"6\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_io_errors_total{device=\"7\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 18\nnode_bcachefs_device_io_errors_total{device=\"7\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"7\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"8\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"8\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"8\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_error_throw_total Bcachefs counter error_throw since filesystem creation.\n# TYPE node_bcachefs_error_throw_total counter\nnode_bcachefs_error_throw_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.719910958e+09\n# HELP node_bcachefs_errors_total Error count by error type.\n# TYPE node_bcachefs_errors_total counter\nnode_bcachefs_errors_total{error_type=\"accounting_mismatch\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6\nnode_bcachefs_errors_total{error_type=\"alloc_key_cached_sectors_wrong\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4537\nnode_bcachefs_errors_total{error_type=\"alloc_key_data_type_wrong\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4415\nnode_bcachefs_errors_total{error_type=\"alloc_key_dirty_sectors_wrong\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4538\nnode_bcachefs_errors_total{error_type=\"alloc_key_to_missing_lru_entry\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4517\nnode_bcachefs_errors_total{error_type=\"backpointer_to_missing_ptr\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 45480\nnode_bcachefs_errors_total{error_type=\"bset_bad_csum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"btree_node_data_missing\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"btree_node_topology_bad_max_key\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"extent_io_opts_not_set\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.1299659571772285e+19\nnode_bcachefs_errors_total{error_type=\"extent_ptrs_all_invalid\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"extent_ptrs_all_invalid_but_cached\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 44612\nnode_bcachefs_errors_total{error_type=\"lru_entry_bad\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4537\nnode_bcachefs_errors_total{error_type=\"ptr_to_missing_backpointer\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 44112\nnode_bcachefs_errors_total{error_type=\"reconcile_work_incorrectly_set\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 113913\nnode_bcachefs_errors_total{error_type=\"subvol_missing\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 194\nnode_bcachefs_errors_total{error_type=\"validate_error_in_commit\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"vfs_bad_inode_rm\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 121\n# HELP node_bcachefs_evacuate_bucket_total Bcachefs counter evacuate_bucket since filesystem creation.\n# TYPE node_bcachefs_evacuate_bucket_total counter\nnode_bcachefs_evacuate_bucket_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.735247e+06\n# HELP node_bcachefs_fsync_total Bcachefs counter fsync since filesystem creation.\n# TYPE node_bcachefs_fsync_total counter\nnode_bcachefs_fsync_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.515147e+06\n# HELP node_bcachefs_gc_gens_end_total Bcachefs counter gc_gens_end since filesystem creation.\n# TYPE node_bcachefs_gc_gens_end_total counter\nnode_bcachefs_gc_gens_end_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3\n# HELP node_bcachefs_gc_gens_start_total Bcachefs counter gc_gens_start since filesystem creation.\n# TYPE node_bcachefs_gc_gens_start_total counter\nnode_bcachefs_gc_gens_start_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3\n# HELP node_bcachefs_info Filesystem information.\n# TYPE node_bcachefs_info gauge\nnode_bcachefs_info{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\n# HELP node_bcachefs_journal_full_total Bcachefs counter journal_full since filesystem creation.\n# TYPE node_bcachefs_journal_full_total counter\nnode_bcachefs_journal_full_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 94587\n# HELP node_bcachefs_journal_reclaim_finish_total Bcachefs counter journal_reclaim_finish since filesystem creation.\n# TYPE node_bcachefs_journal_reclaim_finish_total counter\nnode_bcachefs_journal_reclaim_finish_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.06994135e+08\n# HELP node_bcachefs_journal_reclaim_start_total Bcachefs counter journal_reclaim_start since filesystem creation.\n# TYPE node_bcachefs_journal_reclaim_start_total counter\nnode_bcachefs_journal_reclaim_start_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.06994135e+08\n# HELP node_bcachefs_journal_res_get_blocked_total Bcachefs counter journal_res_get_blocked since filesystem creation.\n# TYPE node_bcachefs_journal_res_get_blocked_total counter\nnode_bcachefs_journal_res_get_blocked_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 74696\n# HELP node_bcachefs_journal_write_total Bcachefs counter journal_write since filesystem creation.\n# TYPE node_bcachefs_journal_write_total counter\nnode_bcachefs_journal_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.5458801e+07\n# HELP node_bcachefs_open_bucket_alloc_fail_total Bcachefs counter open_bucket_alloc_fail since filesystem creation.\n# TYPE node_bcachefs_open_bucket_alloc_fail_total counter\nnode_bcachefs_open_bucket_alloc_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_btree_total Bcachefs counter reconcile_btree since filesystem creation.\n# TYPE node_bcachefs_reconcile_btree_total counter\nnode_bcachefs_reconcile_btree_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.158221066e+09\n# HELP node_bcachefs_reconcile_clear_scan_total Bcachefs counter reconcile_clear_scan since filesystem creation.\n# TYPE node_bcachefs_reconcile_clear_scan_total counter\nnode_bcachefs_reconcile_clear_scan_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 11\n# HELP node_bcachefs_reconcile_data_total Bcachefs counter reconcile_data since filesystem creation.\n# TYPE node_bcachefs_reconcile_data_total counter\nnode_bcachefs_reconcile_data_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_phys_total Bcachefs counter reconcile_phys since filesystem creation.\n# TYPE node_bcachefs_reconcile_phys_total counter\nnode_bcachefs_reconcile_phys_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.9928939526553e+13\n# HELP node_bcachefs_reconcile_scan_device_total Bcachefs counter reconcile_scan_device since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_device_total counter\nnode_bcachefs_reconcile_scan_device_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 8.3562883710976e+13\n# HELP node_bcachefs_reconcile_scan_fs_total Bcachefs counter reconcile_scan_fs since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_fs_total counter\nnode_bcachefs_reconcile_scan_fs_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_scan_inum_total Bcachefs counter reconcile_scan_inum since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_inum_total counter\nnode_bcachefs_reconcile_scan_inum_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_scan_metadata_total Bcachefs counter reconcile_scan_metadata since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_metadata_total counter\nnode_bcachefs_reconcile_scan_metadata_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_scan_pending_total Bcachefs counter reconcile_scan_pending since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_pending_total counter\nnode_bcachefs_reconcile_scan_pending_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_set_pending_total Bcachefs counter reconcile_set_pending since filesystem creation.\n# TYPE node_bcachefs_reconcile_set_pending_total counter\nnode_bcachefs_reconcile_set_pending_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.1138512896e+10\n# HELP node_bcachefs_sectors_alloc_total Bcachefs counter sectors_alloc since filesystem creation.\n# TYPE node_bcachefs_sectors_alloc_total counter\nnode_bcachefs_sectors_alloc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.2534432556646e+13\n# HELP node_bcachefs_stripe_alloc_total Bcachefs counter stripe_alloc since filesystem creation.\n# TYPE node_bcachefs_stripe_alloc_total counter\nnode_bcachefs_stripe_alloc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_create_fail_total Bcachefs counter stripe_create_fail since filesystem creation.\n# TYPE node_bcachefs_stripe_create_fail_total counter\nnode_bcachefs_stripe_create_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_create_total Bcachefs counter stripe_create since filesystem creation.\n# TYPE node_bcachefs_stripe_create_total counter\nnode_bcachefs_stripe_create_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_delete_total Bcachefs counter stripe_delete since filesystem creation.\n# TYPE node_bcachefs_stripe_delete_total counter\nnode_bcachefs_stripe_delete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_reuse_total Bcachefs counter stripe_reuse since filesystem creation.\n# TYPE node_bcachefs_stripe_reuse_total counter\nnode_bcachefs_stripe_reuse_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_update_bucket_total Bcachefs counter stripe_update_bucket since filesystem creation.\n# TYPE node_bcachefs_stripe_update_bucket_total counter\nnode_bcachefs_stripe_update_bucket_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_update_extent_fail_total Bcachefs counter stripe_update_extent_fail since filesystem creation.\n# TYPE node_bcachefs_stripe_update_extent_fail_total counter\nnode_bcachefs_stripe_update_extent_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_update_extent_total Bcachefs counter stripe_update_extent since filesystem creation.\n# TYPE node_bcachefs_stripe_update_extent_total counter\nnode_bcachefs_stripe_update_extent_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_sync_fs_total Bcachefs counter sync_fs since filesystem creation.\n# TYPE node_bcachefs_sync_fs_total counter\nnode_bcachefs_sync_fs_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 42023\n# HELP node_bcachefs_trans_blocked_journal_reclaim_total Bcachefs counter trans_blocked_journal_reclaim since filesystem creation.\n# TYPE node_bcachefs_trans_blocked_journal_reclaim_total counter\nnode_bcachefs_trans_blocked_journal_reclaim_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 78\n# HELP node_bcachefs_trans_restart_btree_node_reused_total Bcachefs counter trans_restart_btree_node_reused since filesystem creation.\n# TYPE node_bcachefs_trans_restart_btree_node_reused_total counter\nnode_bcachefs_trans_restart_btree_node_reused_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 53354\n# HELP node_bcachefs_trans_restart_btree_node_split_total Bcachefs counter trans_restart_btree_node_split since filesystem creation.\n# TYPE node_bcachefs_trans_restart_btree_node_split_total counter\nnode_bcachefs_trans_restart_btree_node_split_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 100190\n# HELP node_bcachefs_trans_restart_fault_inject_total Bcachefs counter trans_restart_fault_inject since filesystem creation.\n# TYPE node_bcachefs_trans_restart_fault_inject_total counter\nnode_bcachefs_trans_restart_fault_inject_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_injected_total Bcachefs counter trans_restart_injected since filesystem creation.\n# TYPE node_bcachefs_trans_restart_injected_total counter\nnode_bcachefs_trans_restart_injected_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_iter_upgrade_total Bcachefs counter trans_restart_iter_upgrade since filesystem creation.\n# TYPE node_bcachefs_trans_restart_iter_upgrade_total counter\nnode_bcachefs_trans_restart_iter_upgrade_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_journal_preres_get_total Bcachefs counter trans_restart_journal_preres_get since filesystem creation.\n# TYPE node_bcachefs_trans_restart_journal_preres_get_total counter\nnode_bcachefs_trans_restart_journal_preres_get_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_journal_reclaim_total Bcachefs counter trans_restart_journal_reclaim since filesystem creation.\n# TYPE node_bcachefs_trans_restart_journal_reclaim_total counter\nnode_bcachefs_trans_restart_journal_reclaim_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_journal_res_get_total Bcachefs counter trans_restart_journal_res_get since filesystem creation.\n# TYPE node_bcachefs_trans_restart_journal_res_get_total counter\nnode_bcachefs_trans_restart_journal_res_get_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_key_cache_key_realloced_total Bcachefs counter trans_restart_key_cache_key_realloced since filesystem creation.\n# TYPE node_bcachefs_trans_restart_key_cache_key_realloced_total counter\nnode_bcachefs_trans_restart_key_cache_key_realloced_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_key_cache_raced_total Bcachefs counter trans_restart_key_cache_raced since filesystem creation.\n# TYPE node_bcachefs_trans_restart_key_cache_raced_total counter\nnode_bcachefs_trans_restart_key_cache_raced_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_key_cache_upgrade_total Bcachefs counter trans_restart_key_cache_upgrade since filesystem creation.\n# TYPE node_bcachefs_trans_restart_key_cache_upgrade_total counter\nnode_bcachefs_trans_restart_key_cache_upgrade_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_mark_replicas_total Bcachefs counter trans_restart_mark_replicas since filesystem creation.\n# TYPE node_bcachefs_trans_restart_mark_replicas_total counter\nnode_bcachefs_trans_restart_mark_replicas_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_mem_realloced_total Bcachefs counter trans_restart_mem_realloced since filesystem creation.\n# TYPE node_bcachefs_trans_restart_mem_realloced_total counter\nnode_bcachefs_trans_restart_mem_realloced_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6111\n# HELP node_bcachefs_trans_restart_memory_allocation_failure_total Bcachefs counter trans_restart_memory_allocation_failure since filesystem creation.\n# TYPE node_bcachefs_trans_restart_memory_allocation_failure_total counter\nnode_bcachefs_trans_restart_memory_allocation_failure_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.7513334e+07\n# HELP node_bcachefs_trans_restart_relock_after_fill_total Bcachefs counter trans_restart_relock_after_fill since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_after_fill_total counter\nnode_bcachefs_trans_restart_relock_after_fill_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_relock_key_cache_fill_obsolete_total Bcachefs counter trans_restart_relock_key_cache_fill_obsolete since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_key_cache_fill_obsolete_total counter\nnode_bcachefs_trans_restart_relock_key_cache_fill_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_relock_next_node_total Bcachefs counter trans_restart_relock_next_node since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_next_node_total counter\nnode_bcachefs_trans_restart_relock_next_node_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 22087\n# HELP node_bcachefs_trans_restart_relock_parent_for_fill_obsolete_total Bcachefs counter trans_restart_relock_parent_for_fill_obsolete since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_parent_for_fill_obsolete_total counter\nnode_bcachefs_trans_restart_relock_parent_for_fill_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2581\n# HELP node_bcachefs_trans_restart_relock_path_intent_total Bcachefs counter trans_restart_relock_path_intent since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_path_intent_total counter\nnode_bcachefs_trans_restart_relock_path_intent_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 298090\n# HELP node_bcachefs_trans_restart_relock_path_total Bcachefs counter trans_restart_relock_path since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_path_total counter\nnode_bcachefs_trans_restart_relock_path_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.752728e+07\n# HELP node_bcachefs_trans_restart_relock_total Bcachefs counter trans_restart_relock since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_total counter\nnode_bcachefs_trans_restart_relock_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.806875e+06\n# HELP node_bcachefs_trans_restart_split_race_total Bcachefs counter trans_restart_split_race since filesystem creation.\n# TYPE node_bcachefs_trans_restart_split_race_total counter\nnode_bcachefs_trans_restart_split_race_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_too_many_iters_total Bcachefs counter trans_restart_too_many_iters since filesystem creation.\n# TYPE node_bcachefs_trans_restart_too_many_iters_total counter\nnode_bcachefs_trans_restart_too_many_iters_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_traverse_total Bcachefs counter trans_restart_traverse since filesystem creation.\n# TYPE node_bcachefs_trans_restart_traverse_total counter\nnode_bcachefs_trans_restart_traverse_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_upgrade_total Bcachefs counter trans_restart_upgrade since filesystem creation.\n# TYPE node_bcachefs_trans_restart_upgrade_total counter\nnode_bcachefs_trans_restart_upgrade_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.055154e+06\n# HELP node_bcachefs_trans_restart_would_deadlock_recursion_limit_total Bcachefs counter trans_restart_would_deadlock_recursion_limit since filesystem creation.\n# TYPE node_bcachefs_trans_restart_would_deadlock_recursion_limit_total counter\nnode_bcachefs_trans_restart_would_deadlock_recursion_limit_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_would_deadlock_total Bcachefs counter trans_restart_would_deadlock since filesystem creation.\n# TYPE node_bcachefs_trans_restart_would_deadlock_total counter\nnode_bcachefs_trans_restart_would_deadlock_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.025983e+06\n# HELP node_bcachefs_trans_restart_would_deadlock_write_total Bcachefs counter trans_restart_would_deadlock_write since filesystem creation.\n# TYPE node_bcachefs_trans_restart_would_deadlock_write_total counter\nnode_bcachefs_trans_restart_would_deadlock_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\n# HELP node_bcachefs_trans_restart_write_buffer_flush_total Bcachefs counter trans_restart_write_buffer_flush since filesystem creation.\n# TYPE node_bcachefs_trans_restart_write_buffer_flush_total counter\nnode_bcachefs_trans_restart_write_buffer_flush_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.1706894e+07\n# HELP node_bcachefs_trans_traverse_all_total Bcachefs counter trans_traverse_all since filesystem creation.\n# TYPE node_bcachefs_trans_traverse_all_total counter\nnode_bcachefs_trans_traverse_all_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.8477746e+07\n# HELP node_bcachefs_transaction_commit_total Bcachefs counter transaction_commit since filesystem creation.\n# TYPE node_bcachefs_transaction_commit_total counter\nnode_bcachefs_transaction_commit_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.338059022e+09\n# HELP node_bcachefs_write_buffer_flush_slowpath_total Bcachefs counter write_buffer_flush_slowpath since filesystem creation.\n# TYPE node_bcachefs_write_buffer_flush_slowpath_total counter\nnode_bcachefs_write_buffer_flush_slowpath_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 21031\n# HELP node_bcachefs_write_buffer_flush_sync_total Bcachefs counter write_buffer_flush_sync since filesystem creation.\n# TYPE node_bcachefs_write_buffer_flush_sync_total counter\nnode_bcachefs_write_buffer_flush_sync_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.024402e+06\n# HELP node_bcachefs_write_buffer_flush_total Bcachefs counter write_buffer_flush since filesystem creation.\n# TYPE node_bcachefs_write_buffer_flush_total counter\nnode_bcachefs_write_buffer_flush_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.8370568e+07\n# HELP node_bcachefs_write_buffer_maybe_flush_total Bcachefs counter write_buffer_maybe_flush since filesystem creation.\n# TYPE node_bcachefs_write_buffer_maybe_flush_total counter\nnode_bcachefs_write_buffer_maybe_flush_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.7412849e+07\n# HELP node_bcachefs_write_super_total Bcachefs counter write_super since filesystem creation.\n# TYPE node_bcachefs_write_super_total counter\nnode_bcachefs_write_super_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 30277\n# HELP node_bonding_active Number of active slaves per bonding interface.\n# TYPE node_bonding_active gauge\nnode_bonding_active{master=\"bond0\"} 0\nnode_bonding_active{master=\"dmz\"} 2\nnode_bonding_active{master=\"int\"} 1\n# HELP node_bonding_slaves Number of configured slaves per bonding interface.\n# TYPE node_bonding_slaves gauge\nnode_bonding_slaves{master=\"bond0\"} 0\nnode_bonding_slaves{master=\"dmz\"} 2\nnode_bonding_slaves{master=\"int\"} 2\n# HELP node_boot_time_seconds Node boot time, in unixtime.\n# TYPE node_boot_time_seconds gauge\nnode_boot_time_seconds 1.418183276e+09\n# HELP node_btrfs_allocation_ratio Data allocation ratio for a layout/data type\n# TYPE node_btrfs_allocation_ratio gauge\nnode_btrfs_allocation_ratio{block_group_type=\"data\",mode=\"raid0\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1\nnode_btrfs_allocation_ratio{block_group_type=\"data\",mode=\"raid5\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.3333333333333333\nnode_btrfs_allocation_ratio{block_group_type=\"metadata\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 2\nnode_btrfs_allocation_ratio{block_group_type=\"metadata\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 2\nnode_btrfs_allocation_ratio{block_group_type=\"system\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 2\nnode_btrfs_allocation_ratio{block_group_type=\"system\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 2\n# HELP node_btrfs_commit_seconds_total Sum of the duration of all commits, in seconds.\n# TYPE node_btrfs_commit_seconds_total counter\nnode_btrfs_commit_seconds_total{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 47836.09\nnode_btrfs_commit_seconds_total{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_commits_total The total number of commits that have occurred.\n# TYPE node_btrfs_commits_total counter\nnode_btrfs_commits_total{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 258051\nnode_btrfs_commits_total{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_device_size_bytes Size of a device that is part of the filesystem.\n# TYPE node_btrfs_device_size_bytes gauge\nnode_btrfs_device_size_bytes{device=\"loop22\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop23\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop24\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop25\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop25\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop26\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1.073741824e+10\n# HELP node_btrfs_global_rsv_size_bytes Size of global reserve.\n# TYPE node_btrfs_global_rsv_size_bytes gauge\nnode_btrfs_global_rsv_size_bytes{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1.6777216e+07\nnode_btrfs_global_rsv_size_bytes{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.6777216e+07\n# HELP node_btrfs_info Filesystem information\n# TYPE node_btrfs_info gauge\nnode_btrfs_info{label=\"\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1\nnode_btrfs_info{label=\"fixture\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1\n# HELP node_btrfs_last_commit_seconds Duration of the most recent commit, in seconds.\n# TYPE node_btrfs_last_commit_seconds gauge\nnode_btrfs_last_commit_seconds{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1\nnode_btrfs_last_commit_seconds{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_max_commit_seconds Duration of the slowest commit, in seconds.\n# TYPE node_btrfs_max_commit_seconds gauge\nnode_btrfs_max_commit_seconds{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 51.462\nnode_btrfs_max_commit_seconds{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_reserved_bytes Amount of space reserved for a data type\n# TYPE node_btrfs_reserved_bytes gauge\nnode_btrfs_reserved_bytes{block_group_type=\"data\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"data\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"metadata\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"metadata\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"system\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"system\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_size_bytes Amount of space allocated for a layout/data type\n# TYPE node_btrfs_size_bytes gauge\nnode_btrfs_size_bytes{block_group_type=\"data\",mode=\"raid0\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 2.147483648e+09\nnode_btrfs_size_bytes{block_group_type=\"data\",mode=\"raid5\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 6.44087808e+08\nnode_btrfs_size_bytes{block_group_type=\"metadata\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1.073741824e+09\nnode_btrfs_size_bytes{block_group_type=\"metadata\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 4.29391872e+08\nnode_btrfs_size_bytes{block_group_type=\"system\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 8.388608e+06\nnode_btrfs_size_bytes{block_group_type=\"system\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.6777216e+07\n# HELP node_btrfs_used_bytes Amount of used space by a layout/data type\n# TYPE node_btrfs_used_bytes gauge\nnode_btrfs_used_bytes{block_group_type=\"data\",mode=\"raid0\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 8.08189952e+08\nnode_btrfs_used_bytes{block_group_type=\"data\",mode=\"raid5\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\nnode_btrfs_used_bytes{block_group_type=\"metadata\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 933888\nnode_btrfs_used_bytes{block_group_type=\"metadata\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 114688\nnode_btrfs_used_bytes{block_group_type=\"system\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 16384\nnode_btrfs_used_bytes{block_group_type=\"system\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 16384\n# HELP node_buddyinfo_blocks Count of free blocks according to size.\n# TYPE node_buddyinfo_blocks gauge\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA32\"} 759\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"Normal\"} 4381\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA32\"} 572\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"Normal\"} 1093\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA\"} 3\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA32\"} 791\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"Normal\"} 185\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA32\"} 475\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"Normal\"} 1530\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA\"} 2\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA32\"} 194\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"Normal\"} 567\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA32\"} 45\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"Normal\"} 102\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA32\"} 12\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"Normal\"} 4\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"Normal\"} 0\n# HELP node_cgroups_cgroups Current cgroup number of the subsystem.\n# TYPE node_cgroups_cgroups gauge\nnode_cgroups_cgroups{subsys_name=\"blkio\"} 170\nnode_cgroups_cgroups{subsys_name=\"cpu\"} 172\nnode_cgroups_cgroups{subsys_name=\"cpuacct\"} 172\nnode_cgroups_cgroups{subsys_name=\"cpuset\"} 47\nnode_cgroups_cgroups{subsys_name=\"devices\"} 170\nnode_cgroups_cgroups{subsys_name=\"freezer\"} 47\nnode_cgroups_cgroups{subsys_name=\"hugetlb\"} 47\nnode_cgroups_cgroups{subsys_name=\"memory\"} 234\nnode_cgroups_cgroups{subsys_name=\"net_cls\"} 47\nnode_cgroups_cgroups{subsys_name=\"perf_event\"} 47\nnode_cgroups_cgroups{subsys_name=\"pids\"} 170\nnode_cgroups_cgroups{subsys_name=\"rdma\"} 1\n# HELP node_cgroups_enabled Current cgroup number of the subsystem.\n# TYPE node_cgroups_enabled gauge\nnode_cgroups_enabled{subsys_name=\"blkio\"} 1\nnode_cgroups_enabled{subsys_name=\"cpu\"} 1\nnode_cgroups_enabled{subsys_name=\"cpuacct\"} 1\nnode_cgroups_enabled{subsys_name=\"cpuset\"} 1\nnode_cgroups_enabled{subsys_name=\"devices\"} 1\nnode_cgroups_enabled{subsys_name=\"freezer\"} 1\nnode_cgroups_enabled{subsys_name=\"hugetlb\"} 1\nnode_cgroups_enabled{subsys_name=\"memory\"} 1\nnode_cgroups_enabled{subsys_name=\"net_cls\"} 1\nnode_cgroups_enabled{subsys_name=\"perf_event\"} 1\nnode_cgroups_enabled{subsys_name=\"pids\"} 1\nnode_cgroups_enabled{subsys_name=\"rdma\"} 1\n# HELP node_context_switches_total Total number of context switches.\n# TYPE node_context_switches_total counter\nnode_context_switches_total 3.8014093e+07\n# HELP node_cooling_device_cur_state Current throttle state of the cooling device\n# TYPE node_cooling_device_cur_state gauge\nnode_cooling_device_cur_state{name=\"0\",type=\"Processor\"} 0\n# HELP node_cooling_device_max_state Maximum throttle state of the cooling device\n# TYPE node_cooling_device_max_state gauge\nnode_cooling_device_max_state{name=\"0\",type=\"Processor\"} 3\n# HELP node_cpu_core_throttles_total Number of times this CPU core has been throttled.\n# TYPE node_cpu_core_throttles_total counter\nnode_cpu_core_throttles_total{core=\"0\",package=\"0\"} 5\nnode_cpu_core_throttles_total{core=\"0\",package=\"1\"} 0\nnode_cpu_core_throttles_total{core=\"1\",package=\"0\"} 0\nnode_cpu_core_throttles_total{core=\"1\",package=\"1\"} 9\n# HELP node_cpu_guest_seconds_total Seconds the CPUs spent in guests (VMs) for each mode.\n# TYPE node_cpu_guest_seconds_total counter\nnode_cpu_guest_seconds_total{cpu=\"0\",mode=\"nice\"} 0.01\nnode_cpu_guest_seconds_total{cpu=\"0\",mode=\"user\"} 0.02\nnode_cpu_guest_seconds_total{cpu=\"1\",mode=\"nice\"} 0.02\nnode_cpu_guest_seconds_total{cpu=\"1\",mode=\"user\"} 0.03\nnode_cpu_guest_seconds_total{cpu=\"2\",mode=\"nice\"} 0.03\nnode_cpu_guest_seconds_total{cpu=\"2\",mode=\"user\"} 0.04\nnode_cpu_guest_seconds_total{cpu=\"3\",mode=\"nice\"} 0.04\nnode_cpu_guest_seconds_total{cpu=\"3\",mode=\"user\"} 0.05\nnode_cpu_guest_seconds_total{cpu=\"4\",mode=\"nice\"} 0.05\nnode_cpu_guest_seconds_total{cpu=\"4\",mode=\"user\"} 0.06\nnode_cpu_guest_seconds_total{cpu=\"5\",mode=\"nice\"} 0.06\nnode_cpu_guest_seconds_total{cpu=\"5\",mode=\"user\"} 0.07\nnode_cpu_guest_seconds_total{cpu=\"6\",mode=\"nice\"} 0.07\nnode_cpu_guest_seconds_total{cpu=\"6\",mode=\"user\"} 0.08\nnode_cpu_guest_seconds_total{cpu=\"7\",mode=\"nice\"} 0.08\nnode_cpu_guest_seconds_total{cpu=\"7\",mode=\"user\"} 0.09\n# HELP node_cpu_isolated Whether each core is isolated, information from /sys/devices/system/cpu/isolated.\n# TYPE node_cpu_isolated gauge\nnode_cpu_isolated{cpu=\"1\"} 1\nnode_cpu_isolated{cpu=\"3\"} 1\nnode_cpu_isolated{cpu=\"4\"} 1\nnode_cpu_isolated{cpu=\"5\"} 1\nnode_cpu_isolated{cpu=\"9\"} 1\n# HELP node_cpu_package_throttles_total Number of times this CPU package has been throttled.\n# TYPE node_cpu_package_throttles_total counter\nnode_cpu_package_throttles_total{package=\"0\"} 30\nnode_cpu_package_throttles_total{package=\"1\"} 6\n# HELP node_cpu_scaling_frequency_hertz Current scaled CPU thread frequency in hertz.\n# TYPE node_cpu_scaling_frequency_hertz gauge\nnode_cpu_scaling_frequency_hertz{cpu=\"0\"} 1.699981e+09\nnode_cpu_scaling_frequency_hertz{cpu=\"1\"} 1.699981e+09\nnode_cpu_scaling_frequency_hertz{cpu=\"2\"} 8e+06\nnode_cpu_scaling_frequency_hertz{cpu=\"3\"} 8e+06\n# HELP node_cpu_scaling_frequency_max_hertz Maximum scaled CPU thread frequency in hertz.\n# TYPE node_cpu_scaling_frequency_max_hertz gauge\nnode_cpu_scaling_frequency_max_hertz{cpu=\"0\"} 3.7e+09\nnode_cpu_scaling_frequency_max_hertz{cpu=\"1\"} 3.7e+09\nnode_cpu_scaling_frequency_max_hertz{cpu=\"2\"} 4.2e+09\nnode_cpu_scaling_frequency_max_hertz{cpu=\"3\"} 4.2e+09\n# HELP node_cpu_scaling_frequency_min_hertz Minimum scaled CPU thread frequency in hertz.\n# TYPE node_cpu_scaling_frequency_min_hertz gauge\nnode_cpu_scaling_frequency_min_hertz{cpu=\"0\"} 8e+08\nnode_cpu_scaling_frequency_min_hertz{cpu=\"1\"} 8e+08\nnode_cpu_scaling_frequency_min_hertz{cpu=\"2\"} 1e+06\nnode_cpu_scaling_frequency_min_hertz{cpu=\"3\"} 1e+06\n# HELP node_cpu_scaling_governor Current enabled CPU frequency governor.\n# TYPE node_cpu_scaling_governor gauge\nnode_cpu_scaling_governor{cpu=\"0\",governor=\"performance\"} 0\nnode_cpu_scaling_governor{cpu=\"0\",governor=\"powersave\"} 1\nnode_cpu_scaling_governor{cpu=\"1\",governor=\"performance\"} 0\nnode_cpu_scaling_governor{cpu=\"1\",governor=\"powersave\"} 1\nnode_cpu_scaling_governor{cpu=\"2\",governor=\"performance\"} 0\nnode_cpu_scaling_governor{cpu=\"2\",governor=\"powersave\"} 1\nnode_cpu_scaling_governor{cpu=\"3\",governor=\"performance\"} 0\nnode_cpu_scaling_governor{cpu=\"3\",governor=\"powersave\"} 1\n# HELP node_cpu_seconds_total Seconds the CPUs spent in each mode.\n# TYPE node_cpu_seconds_total counter\nnode_cpu_seconds_total{cpu=\"0\",mode=\"idle\"} 10870.69\nnode_cpu_seconds_total{cpu=\"0\",mode=\"iowait\"} 2.2\nnode_cpu_seconds_total{cpu=\"0\",mode=\"irq\"} 0.01\nnode_cpu_seconds_total{cpu=\"0\",mode=\"nice\"} 0.19\nnode_cpu_seconds_total{cpu=\"0\",mode=\"softirq\"} 34.1\nnode_cpu_seconds_total{cpu=\"0\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"0\",mode=\"system\"} 210.45\nnode_cpu_seconds_total{cpu=\"0\",mode=\"user\"} 444.9\nnode_cpu_seconds_total{cpu=\"1\",mode=\"idle\"} 11107.87\nnode_cpu_seconds_total{cpu=\"1\",mode=\"iowait\"} 5.91\nnode_cpu_seconds_total{cpu=\"1\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"1\",mode=\"nice\"} 0.23\nnode_cpu_seconds_total{cpu=\"1\",mode=\"softirq\"} 0.46\nnode_cpu_seconds_total{cpu=\"1\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"1\",mode=\"system\"} 164.74\nnode_cpu_seconds_total{cpu=\"1\",mode=\"user\"} 478.69\nnode_cpu_seconds_total{cpu=\"2\",mode=\"idle\"} 11123.21\nnode_cpu_seconds_total{cpu=\"2\",mode=\"iowait\"} 4.41\nnode_cpu_seconds_total{cpu=\"2\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"2\",mode=\"nice\"} 0.36\nnode_cpu_seconds_total{cpu=\"2\",mode=\"softirq\"} 3.26\nnode_cpu_seconds_total{cpu=\"2\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"2\",mode=\"system\"} 159.16\nnode_cpu_seconds_total{cpu=\"2\",mode=\"user\"} 465.04\nnode_cpu_seconds_total{cpu=\"3\",mode=\"idle\"} 11132.3\nnode_cpu_seconds_total{cpu=\"3\",mode=\"iowait\"} 5.33\nnode_cpu_seconds_total{cpu=\"3\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"3\",mode=\"nice\"} 1.02\nnode_cpu_seconds_total{cpu=\"3\",mode=\"softirq\"} 0.6\nnode_cpu_seconds_total{cpu=\"3\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"3\",mode=\"system\"} 156.83\nnode_cpu_seconds_total{cpu=\"3\",mode=\"user\"} 470.54\nnode_cpu_seconds_total{cpu=\"4\",mode=\"idle\"} 11403.21\nnode_cpu_seconds_total{cpu=\"4\",mode=\"iowait\"} 2.17\nnode_cpu_seconds_total{cpu=\"4\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"4\",mode=\"nice\"} 0.25\nnode_cpu_seconds_total{cpu=\"4\",mode=\"softirq\"} 0.08\nnode_cpu_seconds_total{cpu=\"4\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"4\",mode=\"system\"} 107.76\nnode_cpu_seconds_total{cpu=\"4\",mode=\"user\"} 284.13\nnode_cpu_seconds_total{cpu=\"5\",mode=\"idle\"} 11362.7\nnode_cpu_seconds_total{cpu=\"5\",mode=\"iowait\"} 6.72\nnode_cpu_seconds_total{cpu=\"5\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"5\",mode=\"nice\"} 1.01\nnode_cpu_seconds_total{cpu=\"5\",mode=\"softirq\"} 0.3\nnode_cpu_seconds_total{cpu=\"5\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"5\",mode=\"system\"} 115.86\nnode_cpu_seconds_total{cpu=\"5\",mode=\"user\"} 292.71\nnode_cpu_seconds_total{cpu=\"6\",mode=\"idle\"} 11397.21\nnode_cpu_seconds_total{cpu=\"6\",mode=\"iowait\"} 3.19\nnode_cpu_seconds_total{cpu=\"6\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"6\",mode=\"nice\"} 0.36\nnode_cpu_seconds_total{cpu=\"6\",mode=\"softirq\"} 0.29\nnode_cpu_seconds_total{cpu=\"6\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"6\",mode=\"system\"} 102.76\nnode_cpu_seconds_total{cpu=\"6\",mode=\"user\"} 291.52\nnode_cpu_seconds_total{cpu=\"7\",mode=\"idle\"} 11392.82\nnode_cpu_seconds_total{cpu=\"7\",mode=\"iowait\"} 5.55\nnode_cpu_seconds_total{cpu=\"7\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"7\",mode=\"nice\"} 2.68\nnode_cpu_seconds_total{cpu=\"7\",mode=\"softirq\"} 0.31\nnode_cpu_seconds_total{cpu=\"7\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"7\",mode=\"system\"} 101.64\nnode_cpu_seconds_total{cpu=\"7\",mode=\"user\"} 290.98\n# HELP node_cpu_vulnerabilities_info Details of each CPU vulnerability reported by sysfs. The value of the series is an int encoded state of the vulnerability. The same state is stored as a string in the label\n# TYPE node_cpu_vulnerabilities_info gauge\nnode_cpu_vulnerabilities_info{codename=\"itlb_multihit\",mitigation=\"\",state=\"not affected\"} 1\nnode_cpu_vulnerabilities_info{codename=\"mds\",mitigation=\"\",state=\"vulnerable\"} 1\nnode_cpu_vulnerabilities_info{codename=\"retbleed\",mitigation=\"untrained return thunk; SMT enabled with STIBP protection\",state=\"mitigation\"} 1\nnode_cpu_vulnerabilities_info{codename=\"spectre_v1\",mitigation=\"usercopy/swapgs barriers and __user pointer sanitization\",state=\"mitigation\"} 1\nnode_cpu_vulnerabilities_info{codename=\"spectre_v2\",mitigation=\"Retpolines, IBPB: conditional, STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected\",state=\"mitigation\"} 1\n# HELP node_disk_ata_rotation_rate_rpm ATA disk rotation rate in RPMs (0 for SSDs).\n# TYPE node_disk_ata_rotation_rate_rpm gauge\nnode_disk_ata_rotation_rate_rpm{device=\"sda\"} 7200\nnode_disk_ata_rotation_rate_rpm{device=\"sdb\"} 0\nnode_disk_ata_rotation_rate_rpm{device=\"sdc\"} 0\n# HELP node_disk_ata_write_cache ATA disk has a write cache.\n# TYPE node_disk_ata_write_cache gauge\nnode_disk_ata_write_cache{device=\"sda\"} 1\nnode_disk_ata_write_cache{device=\"sdb\"} 1\nnode_disk_ata_write_cache{device=\"sdc\"} 1\n# HELP node_disk_ata_write_cache_enabled ATA disk has its write cache enabled.\n# TYPE node_disk_ata_write_cache_enabled gauge\nnode_disk_ata_write_cache_enabled{device=\"sda\"} 0\nnode_disk_ata_write_cache_enabled{device=\"sdb\"} 1\nnode_disk_ata_write_cache_enabled{device=\"sdc\"} 0\n# HELP node_disk_device_mapper_info Info about disk device mapper.\n# TYPE node_disk_device_mapper_info gauge\nnode_disk_device_mapper_info{device=\"dm-0\",lv_layer=\"\",lv_name=\"\",name=\"nvme0n1_crypt\",uuid=\"CRYPT-LUKS2-jolaulot80fy9zsiobkxyxo7y2dqeho2-nvme0n1_crypt\",vg_name=\"\"} 1\nnode_disk_device_mapper_info{device=\"dm-1\",lv_layer=\"\",lv_name=\"swap_1\",name=\"system-swap_1\",uuid=\"LVM-wbGqQEBL9SxrW2DLntJwgg8fAv946hw3Tvjqh0v31fWgxEtD4BoHO0lROWFUY65T\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-2\",lv_layer=\"\",lv_name=\"root\",name=\"system-root\",uuid=\"LVM-NWEDo8q5ABDyJuC3F8veKNyWfYmeIBfFMS4MF3HakzUhkk7ekDm6fJTHkl2fYHe7\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-3\",lv_layer=\"\",lv_name=\"var\",name=\"system-var\",uuid=\"LVM-hrxHo0rlZ6U95ku5841Lpd17bS1Z7V7lrtEE60DVgE6YEOCdS9gcDGyonWim4hGP\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-4\",lv_layer=\"\",lv_name=\"tmp\",name=\"system-tmp\",uuid=\"LVM-XTNGOHjPWLHcxmJmVu5cWTXEtuzqDeBkdEHAZW5q9LxWQ2d4mb5CchUQzUPJpl8H\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-5\",lv_layer=\"\",lv_name=\"home\",name=\"system-home\",uuid=\"LVM-MtoJaWTpjWRXlUnNFlpxZauTEuYlMvGFutigEzCCrfj8CNh6jCRi5LQJXZCpLjPf\",vg_name=\"system\"} 1\n# HELP node_disk_discard_time_seconds_total This is the total number of seconds spent by all discards.\n# TYPE node_disk_discard_time_seconds_total counter\nnode_disk_discard_time_seconds_total{device=\"sdb\"} 11.13\nnode_disk_discard_time_seconds_total{device=\"sdc\"} 11.13\n# HELP node_disk_discarded_sectors_total The total number of sectors discarded successfully.\n# TYPE node_disk_discarded_sectors_total counter\nnode_disk_discarded_sectors_total{device=\"sdb\"} 1.925173784e+09\nnode_disk_discarded_sectors_total{device=\"sdc\"} 1.25173784e+08\n# HELP node_disk_discards_completed_total The total number of discards completed successfully.\n# TYPE node_disk_discards_completed_total counter\nnode_disk_discards_completed_total{device=\"sdb\"} 68851\nnode_disk_discards_completed_total{device=\"sdc\"} 18851\n# HELP node_disk_discards_merged_total The total number of discards merged.\n# TYPE node_disk_discards_merged_total counter\nnode_disk_discards_merged_total{device=\"sdb\"} 0\nnode_disk_discards_merged_total{device=\"sdc\"} 0\n# HELP node_disk_filesystem_info Info about disk filesystem.\n# TYPE node_disk_filesystem_info gauge\nnode_disk_filesystem_info{device=\"dm-0\",type=\"LVM2_member\",usage=\"raid\",uuid=\"c3C3uW-gD96-Yw69-c1CJ-5MwT-6ysM-mST0vB\",version=\"LVM2 001\"} 1\nnode_disk_filesystem_info{device=\"dm-1\",type=\"swap\",usage=\"other\",uuid=\"5272bb60-04b5-49cd-b730-be57c7604450\",version=\"1\"} 1\nnode_disk_filesystem_info{device=\"dm-2\",type=\"ext4\",usage=\"filesystem\",uuid=\"3deafd0d-faff-4695-8d15-51061ae1f51b\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-3\",type=\"ext4\",usage=\"filesystem\",uuid=\"5c772222-f7d4-4c8e-87e8-e97df6b7a45e\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-4\",type=\"ext4\",usage=\"filesystem\",uuid=\"a9479d44-60e1-4015-a1e5-bb065e6dd11b\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-5\",type=\"ext4\",usage=\"filesystem\",uuid=\"b05b726a-c718-4c4d-8641-7c73a7696d83\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"mmcblk0p1\",type=\"vfat\",usage=\"filesystem\",uuid=\"6284-658D\",version=\"FAT32\"} 1\nnode_disk_filesystem_info{device=\"mmcblk0p2\",type=\"ext4\",usage=\"filesystem\",uuid=\"83324ce8-a6f3-4e35-ad64-dbb3d6b87a32\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"sda\",type=\"LVM2_member\",usage=\"raid\",uuid=\"cVVv6j-HSA2-IY33-1Jmj-dO2H-YL7w-b4Oxqw\",version=\"LVM2 001\"} 1\nnode_disk_filesystem_info{device=\"sdc\",type=\"LVM2_member\",usage=\"raid\",uuid=\"QFy9W7-Brj3-hQ6v-AF8i-3Zqg-n3Vs-kGY4vb\",version=\"LVM2 001\"} 1\n# HELP node_disk_flush_requests_time_seconds_total This is the total number of seconds spent by all flush requests.\n# TYPE node_disk_flush_requests_time_seconds_total counter\nnode_disk_flush_requests_time_seconds_total{device=\"sdc\"} 1.944\n# HELP node_disk_flush_requests_total The total number of flush requests completed successfully\n# TYPE node_disk_flush_requests_total counter\nnode_disk_flush_requests_total{device=\"sdc\"} 1555\n# HELP node_disk_info Info of /sys/block/<block_device>.\n# TYPE node_disk_info gauge\nnode_disk_info{device=\"dm-0\",major=\"252\",minor=\"0\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-1\",major=\"252\",minor=\"1\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-2\",major=\"252\",minor=\"2\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-3\",major=\"252\",minor=\"3\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-4\",major=\"252\",minor=\"4\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-5\",major=\"252\",minor=\"5\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0\",major=\"179\",minor=\"0\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0p1\",major=\"179\",minor=\"1\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0p2\",major=\"179\",minor=\"2\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"nvme0n1\",major=\"259\",minor=\"0\",model=\"SAMSUNG EHFTF55LURSY-000Y9\",path=\"pci-0000:02:00.0-nvme-1\",revision=\"4NBTUY95\",rotational=\"0\",serial=\"S252B6CU1HG3M1\",wwn=\"eui.p3vbbiejx5aae2r3\"} 1\nnode_disk_info{device=\"sda\",major=\"8\",minor=\"0\",model=\"TOSHIBA_KSDB4U86\",path=\"pci-0000:3b:00.0-sas-phy7-lun-0\",revision=\"0102\",rotational=\"1\",serial=\"2160A0D5FVGG\",wwn=\"0x7c72382b8de36a64\"} 1\nnode_disk_info{device=\"sdb\",major=\"8\",minor=\"16\",model=\"SuperMicro_SSD\",path=\"pci-0000:00:1f.2-ata-1\",revision=\"0R\",rotational=\"0\",serial=\"SMC0E1B87ABBB16BD84E\",wwn=\"0xe1b87abbb16bd84e\"} 1\nnode_disk_info{device=\"sdc\",major=\"8\",minor=\"32\",model=\"INTEL_SSDS9X9SI0\",path=\"pci-0000:00:1f.2-ata-4\",revision=\"0100\",rotational=\"0\",serial=\"3EWB5Y25CWQWA7EH1U\",wwn=\"0x58907ddc573a5de\"} 1\nnode_disk_info{device=\"sr0\",major=\"11\",minor=\"0\",model=\"Virtual_CDROM0\",path=\"pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0\",revision=\"1.00\",rotational=\"0\",serial=\"AAAABBBBCCCC1\",wwn=\"\"} 1\nnode_disk_info{device=\"vda\",major=\"254\",minor=\"0\",model=\"\",path=\"pci-0000:00:06.0\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\n# HELP node_disk_io_now The number of I/Os currently in progress.\n# TYPE node_disk_io_now gauge\nnode_disk_io_now{device=\"dm-0\"} 0\nnode_disk_io_now{device=\"dm-1\"} 0\nnode_disk_io_now{device=\"dm-2\"} 0\nnode_disk_io_now{device=\"dm-3\"} 0\nnode_disk_io_now{device=\"dm-4\"} 0\nnode_disk_io_now{device=\"dm-5\"} 0\nnode_disk_io_now{device=\"mmcblk0\"} 0\nnode_disk_io_now{device=\"mmcblk0p1\"} 0\nnode_disk_io_now{device=\"mmcblk0p2\"} 0\nnode_disk_io_now{device=\"nvme0n1\"} 0\nnode_disk_io_now{device=\"sda\"} 0\nnode_disk_io_now{device=\"sdb\"} 0\nnode_disk_io_now{device=\"sdc\"} 0\nnode_disk_io_now{device=\"sr0\"} 0\nnode_disk_io_now{device=\"vda\"} 0\n# HELP node_disk_io_time_seconds_total Total seconds spent doing I/Os.\n# TYPE node_disk_io_time_seconds_total counter\nnode_disk_io_time_seconds_total{device=\"dm-0\"} 11325.968\nnode_disk_io_time_seconds_total{device=\"dm-1\"} 0.076\nnode_disk_io_time_seconds_total{device=\"dm-2\"} 65.4\nnode_disk_io_time_seconds_total{device=\"dm-3\"} 0.016\nnode_disk_io_time_seconds_total{device=\"dm-4\"} 0.024\nnode_disk_io_time_seconds_total{device=\"dm-5\"} 58.848\nnode_disk_io_time_seconds_total{device=\"mmcblk0\"} 0.136\nnode_disk_io_time_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_io_time_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_io_time_seconds_total{device=\"nvme0n1\"} 222.766\nnode_disk_io_time_seconds_total{device=\"sda\"} 9653.880000000001\nnode_disk_io_time_seconds_total{device=\"sdb\"} 60.730000000000004\nnode_disk_io_time_seconds_total{device=\"sdc\"} 10.73\nnode_disk_io_time_seconds_total{device=\"sr0\"} 0\nnode_disk_io_time_seconds_total{device=\"vda\"} 41614.592000000004\n# HELP node_disk_io_time_weighted_seconds_total The weighted # of seconds spent doing I/Os.\n# TYPE node_disk_io_time_weighted_seconds_total counter\nnode_disk_io_time_weighted_seconds_total{device=\"dm-0\"} 1.206301256e+06\nnode_disk_io_time_weighted_seconds_total{device=\"dm-1\"} 0.084\nnode_disk_io_time_weighted_seconds_total{device=\"dm-2\"} 129.416\nnode_disk_io_time_weighted_seconds_total{device=\"dm-3\"} 0.10400000000000001\nnode_disk_io_time_weighted_seconds_total{device=\"dm-4\"} 0.044\nnode_disk_io_time_weighted_seconds_total{device=\"dm-5\"} 105.632\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0\"} 0.156\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_io_time_weighted_seconds_total{device=\"nvme0n1\"} 1032.546\nnode_disk_io_time_weighted_seconds_total{device=\"sda\"} 82621.804\nnode_disk_io_time_weighted_seconds_total{device=\"sdb\"} 67.07000000000001\nnode_disk_io_time_weighted_seconds_total{device=\"sdc\"} 17.07\nnode_disk_io_time_weighted_seconds_total{device=\"sr0\"} 0\nnode_disk_io_time_weighted_seconds_total{device=\"vda\"} 2.0778722280000001e+06\n# HELP node_disk_read_bytes_total The total number of bytes read successfully.\n# TYPE node_disk_read_bytes_total counter\nnode_disk_read_bytes_total{device=\"dm-0\"} 5.13708655616e+11\nnode_disk_read_bytes_total{device=\"dm-1\"} 1.589248e+06\nnode_disk_read_bytes_total{device=\"dm-2\"} 1.578752e+08\nnode_disk_read_bytes_total{device=\"dm-3\"} 1.98144e+06\nnode_disk_read_bytes_total{device=\"dm-4\"} 529408\nnode_disk_read_bytes_total{device=\"dm-5\"} 4.3150848e+07\nnode_disk_read_bytes_total{device=\"mmcblk0\"} 798720\nnode_disk_read_bytes_total{device=\"mmcblk0p1\"} 81920\nnode_disk_read_bytes_total{device=\"mmcblk0p2\"} 389120\nnode_disk_read_bytes_total{device=\"nvme0n1\"} 2.377714176e+09\nnode_disk_read_bytes_total{device=\"sda\"} 5.13713216512e+11\nnode_disk_read_bytes_total{device=\"sdb\"} 4.944782848e+09\nnode_disk_read_bytes_total{device=\"sdc\"} 8.48782848e+08\nnode_disk_read_bytes_total{device=\"sr0\"} 0\nnode_disk_read_bytes_total{device=\"vda\"} 1.6727491584e+10\n# HELP node_disk_read_time_seconds_total The total number of seconds spent by all reads.\n# TYPE node_disk_read_time_seconds_total counter\nnode_disk_read_time_seconds_total{device=\"dm-0\"} 46229.572\nnode_disk_read_time_seconds_total{device=\"dm-1\"} 0.084\nnode_disk_read_time_seconds_total{device=\"dm-2\"} 6.5360000000000005\nnode_disk_read_time_seconds_total{device=\"dm-3\"} 0.10400000000000001\nnode_disk_read_time_seconds_total{device=\"dm-4\"} 0.028\nnode_disk_read_time_seconds_total{device=\"dm-5\"} 0.924\nnode_disk_read_time_seconds_total{device=\"mmcblk0\"} 0.156\nnode_disk_read_time_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_read_time_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_read_time_seconds_total{device=\"nvme0n1\"} 21.650000000000002\nnode_disk_read_time_seconds_total{device=\"sda\"} 18492.372\nnode_disk_read_time_seconds_total{device=\"sdb\"} 0.084\nnode_disk_read_time_seconds_total{device=\"sdc\"} 0.014\nnode_disk_read_time_seconds_total{device=\"sr0\"} 0\nnode_disk_read_time_seconds_total{device=\"vda\"} 8655.768\n# HELP node_disk_reads_completed_total The total number of reads completed successfully.\n# TYPE node_disk_reads_completed_total counter\nnode_disk_reads_completed_total{device=\"dm-0\"} 5.9910002e+07\nnode_disk_reads_completed_total{device=\"dm-1\"} 388\nnode_disk_reads_completed_total{device=\"dm-2\"} 11571\nnode_disk_reads_completed_total{device=\"dm-3\"} 3870\nnode_disk_reads_completed_total{device=\"dm-4\"} 392\nnode_disk_reads_completed_total{device=\"dm-5\"} 3729\nnode_disk_reads_completed_total{device=\"mmcblk0\"} 192\nnode_disk_reads_completed_total{device=\"mmcblk0p1\"} 17\nnode_disk_reads_completed_total{device=\"mmcblk0p2\"} 95\nnode_disk_reads_completed_total{device=\"nvme0n1\"} 47114\nnode_disk_reads_completed_total{device=\"sda\"} 2.5354637e+07\nnode_disk_reads_completed_total{device=\"sdb\"} 326552\nnode_disk_reads_completed_total{device=\"sdc\"} 126552\nnode_disk_reads_completed_total{device=\"sr0\"} 0\nnode_disk_reads_completed_total{device=\"vda\"} 1.775784e+06\n# HELP node_disk_reads_merged_total The total number of reads merged.\n# TYPE node_disk_reads_merged_total counter\nnode_disk_reads_merged_total{device=\"dm-0\"} 0\nnode_disk_reads_merged_total{device=\"dm-1\"} 0\nnode_disk_reads_merged_total{device=\"dm-2\"} 0\nnode_disk_reads_merged_total{device=\"dm-3\"} 0\nnode_disk_reads_merged_total{device=\"dm-4\"} 0\nnode_disk_reads_merged_total{device=\"dm-5\"} 0\nnode_disk_reads_merged_total{device=\"mmcblk0\"} 3\nnode_disk_reads_merged_total{device=\"mmcblk0p1\"} 3\nnode_disk_reads_merged_total{device=\"mmcblk0p2\"} 0\nnode_disk_reads_merged_total{device=\"nvme0n1\"} 4\nnode_disk_reads_merged_total{device=\"sda\"} 3.4367663e+07\nnode_disk_reads_merged_total{device=\"sdb\"} 841\nnode_disk_reads_merged_total{device=\"sdc\"} 141\nnode_disk_reads_merged_total{device=\"sr0\"} 0\nnode_disk_reads_merged_total{device=\"vda\"} 15386\n# HELP node_disk_write_time_seconds_total This is the total number of seconds spent by all writes.\n# TYPE node_disk_write_time_seconds_total counter\nnode_disk_write_time_seconds_total{device=\"dm-0\"} 1.1585578e+06\nnode_disk_write_time_seconds_total{device=\"dm-1\"} 0\nnode_disk_write_time_seconds_total{device=\"dm-2\"} 122.884\nnode_disk_write_time_seconds_total{device=\"dm-3\"} 0\nnode_disk_write_time_seconds_total{device=\"dm-4\"} 0.016\nnode_disk_write_time_seconds_total{device=\"dm-5\"} 104.684\nnode_disk_write_time_seconds_total{device=\"mmcblk0\"} 0\nnode_disk_write_time_seconds_total{device=\"mmcblk0p1\"} 0\nnode_disk_write_time_seconds_total{device=\"mmcblk0p2\"} 0\nnode_disk_write_time_seconds_total{device=\"nvme0n1\"} 1011.053\nnode_disk_write_time_seconds_total{device=\"sda\"} 63877.96\nnode_disk_write_time_seconds_total{device=\"sdb\"} 5.007\nnode_disk_write_time_seconds_total{device=\"sdc\"} 1.0070000000000001\nnode_disk_write_time_seconds_total{device=\"sr0\"} 0\nnode_disk_write_time_seconds_total{device=\"vda\"} 2.069221364e+06\n# HELP node_disk_writes_completed_total The total number of writes completed successfully.\n# TYPE node_disk_writes_completed_total counter\nnode_disk_writes_completed_total{device=\"dm-0\"} 3.9231014e+07\nnode_disk_writes_completed_total{device=\"dm-1\"} 74\nnode_disk_writes_completed_total{device=\"dm-2\"} 153522\nnode_disk_writes_completed_total{device=\"dm-3\"} 0\nnode_disk_writes_completed_total{device=\"dm-4\"} 38\nnode_disk_writes_completed_total{device=\"dm-5\"} 98918\nnode_disk_writes_completed_total{device=\"mmcblk0\"} 0\nnode_disk_writes_completed_total{device=\"mmcblk0p1\"} 0\nnode_disk_writes_completed_total{device=\"mmcblk0p2\"} 0\nnode_disk_writes_completed_total{device=\"nvme0n1\"} 1.07832e+06\nnode_disk_writes_completed_total{device=\"sda\"} 2.8444756e+07\nnode_disk_writes_completed_total{device=\"sdb\"} 41822\nnode_disk_writes_completed_total{device=\"sdc\"} 11822\nnode_disk_writes_completed_total{device=\"sr0\"} 0\nnode_disk_writes_completed_total{device=\"vda\"} 6.038856e+06\n# HELP node_disk_writes_merged_total The number of writes merged.\n# TYPE node_disk_writes_merged_total counter\nnode_disk_writes_merged_total{device=\"dm-0\"} 0\nnode_disk_writes_merged_total{device=\"dm-1\"} 0\nnode_disk_writes_merged_total{device=\"dm-2\"} 0\nnode_disk_writes_merged_total{device=\"dm-3\"} 0\nnode_disk_writes_merged_total{device=\"dm-4\"} 0\nnode_disk_writes_merged_total{device=\"dm-5\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0p1\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0p2\"} 0\nnode_disk_writes_merged_total{device=\"nvme0n1\"} 43950\nnode_disk_writes_merged_total{device=\"sda\"} 1.1134226e+07\nnode_disk_writes_merged_total{device=\"sdb\"} 2895\nnode_disk_writes_merged_total{device=\"sdc\"} 1895\nnode_disk_writes_merged_total{device=\"sr0\"} 0\nnode_disk_writes_merged_total{device=\"vda\"} 2.0711856e+07\n# HELP node_disk_written_bytes_total The total number of bytes written successfully.\n# TYPE node_disk_written_bytes_total counter\nnode_disk_written_bytes_total{device=\"dm-0\"} 2.5891680256e+11\nnode_disk_written_bytes_total{device=\"dm-1\"} 303104\nnode_disk_written_bytes_total{device=\"dm-2\"} 2.607828992e+09\nnode_disk_written_bytes_total{device=\"dm-3\"} 0\nnode_disk_written_bytes_total{device=\"dm-4\"} 70144\nnode_disk_written_bytes_total{device=\"dm-5\"} 5.89664256e+08\nnode_disk_written_bytes_total{device=\"mmcblk0\"} 0\nnode_disk_written_bytes_total{device=\"mmcblk0p1\"} 0\nnode_disk_written_bytes_total{device=\"mmcblk0p2\"} 0\nnode_disk_written_bytes_total{device=\"nvme0n1\"} 2.0199236096e+10\nnode_disk_written_bytes_total{device=\"sda\"} 2.58916880384e+11\nnode_disk_written_bytes_total{device=\"sdb\"} 1.01012736e+09\nnode_disk_written_bytes_total{device=\"sdc\"} 8.852736e+07\nnode_disk_written_bytes_total{device=\"sr0\"} 0\nnode_disk_written_bytes_total{device=\"vda\"} 1.0938236928e+11\n# HELP node_dmi_info A metric with a constant '1' value labeled by bios_date, bios_release, bios_vendor, bios_version, board_asset_tag, board_name, board_serial, board_vendor, board_version, chassis_asset_tag, chassis_serial, chassis_vendor, chassis_version, product_family, product_name, product_serial, product_sku, product_uuid, product_version, system_vendor if provided by DMI.\n# TYPE node_dmi_info gauge\nnode_dmi_info{bios_date=\"04/12/2021\",bios_release=\"2.2\",bios_vendor=\"Dell Inc.\",bios_version=\"2.2.4\",board_name=\"07PXPY\",board_serial=\".7N62AI2.GRTCL6944100GP.\",board_vendor=\"Dell Inc.\",board_version=\"A01\",chassis_asset_tag=\"\",chassis_serial=\"7N62AI2\",chassis_vendor=\"Dell Inc.\",chassis_version=\"\",product_family=\"PowerEdge\",product_name=\"PowerEdge R6515\",product_serial=\"7N62AI2\",product_sku=\"SKU=NotProvided;ModelName=PowerEdge R6515\",product_uuid=\"83340ca8-cb49-4474-8c29-d2088ca84dd9\",product_version=\"�\u001c[�\",system_vendor=\"Dell Inc.\"} 1\n# HELP node_drbd_activitylog_writes_total Number of updates of the activity log area of the meta data.\n# TYPE node_drbd_activitylog_writes_total counter\nnode_drbd_activitylog_writes_total{device=\"drbd1\"} 1100\n# HELP node_drbd_application_pending Number of block I/O requests forwarded to DRBD, but not yet answered by DRBD.\n# TYPE node_drbd_application_pending gauge\nnode_drbd_application_pending{device=\"drbd1\"} 12348\n# HELP node_drbd_bitmap_writes_total Number of updates of the bitmap area of the meta data.\n# TYPE node_drbd_bitmap_writes_total counter\nnode_drbd_bitmap_writes_total{device=\"drbd1\"} 221\n# HELP node_drbd_connected Whether DRBD is connected to the peer.\n# TYPE node_drbd_connected gauge\nnode_drbd_connected{device=\"drbd1\"} 1\n# HELP node_drbd_disk_read_bytes_total Net data read from local hard disk; in bytes.\n# TYPE node_drbd_disk_read_bytes_total counter\nnode_drbd_disk_read_bytes_total{device=\"drbd1\"} 1.2154539008e+11\n# HELP node_drbd_disk_state_is_up_to_date Whether the disk of the node is up to date.\n# TYPE node_drbd_disk_state_is_up_to_date gauge\nnode_drbd_disk_state_is_up_to_date{device=\"drbd1\",node=\"local\"} 1\nnode_drbd_disk_state_is_up_to_date{device=\"drbd1\",node=\"remote\"} 1\n# HELP node_drbd_disk_written_bytes_total Net data written on local hard disk; in bytes.\n# TYPE node_drbd_disk_written_bytes_total counter\nnode_drbd_disk_written_bytes_total{device=\"drbd1\"} 2.8941845504e+10\n# HELP node_drbd_epochs Number of Epochs currently on the fly.\n# TYPE node_drbd_epochs gauge\nnode_drbd_epochs{device=\"drbd1\"} 1\n# HELP node_drbd_local_pending Number of open requests to the local I/O sub-system.\n# TYPE node_drbd_local_pending gauge\nnode_drbd_local_pending{device=\"drbd1\"} 12345\n# HELP node_drbd_network_received_bytes_total Total number of bytes received via the network.\n# TYPE node_drbd_network_received_bytes_total counter\nnode_drbd_network_received_bytes_total{device=\"drbd1\"} 1.0961011e+07\n# HELP node_drbd_network_sent_bytes_total Total number of bytes sent via the network.\n# TYPE node_drbd_network_sent_bytes_total counter\nnode_drbd_network_sent_bytes_total{device=\"drbd1\"} 1.7740228608e+10\n# HELP node_drbd_node_role_is_primary Whether the role of the node is in the primary state.\n# TYPE node_drbd_node_role_is_primary gauge\nnode_drbd_node_role_is_primary{device=\"drbd1\",node=\"local\"} 1\nnode_drbd_node_role_is_primary{device=\"drbd1\",node=\"remote\"} 1\n# HELP node_drbd_out_of_sync_bytes Amount of data known to be out of sync; in bytes.\n# TYPE node_drbd_out_of_sync_bytes gauge\nnode_drbd_out_of_sync_bytes{device=\"drbd1\"} 1.2645376e+07\n# HELP node_drbd_remote_pending Number of requests sent to the peer, but that have not yet been answered by the latter.\n# TYPE node_drbd_remote_pending gauge\nnode_drbd_remote_pending{device=\"drbd1\"} 12346\n# HELP node_drbd_remote_unacknowledged Number of requests received by the peer via the network connection, but that have not yet been answered.\n# TYPE node_drbd_remote_unacknowledged gauge\nnode_drbd_remote_unacknowledged{device=\"drbd1\"} 12347\n# HELP node_edac_correctable_errors_total Total correctable memory errors.\n# TYPE node_edac_correctable_errors_total counter\nnode_edac_correctable_errors_total{controller=\"0\"} 1\n# HELP node_edac_csrow_correctable_errors_total Total correctable memory errors for this csrow.\n# TYPE node_edac_csrow_correctable_errors_total counter\nnode_edac_csrow_correctable_errors_total{controller=\"0\",csrow=\"0\"} 3\nnode_edac_csrow_correctable_errors_total{controller=\"0\",csrow=\"unknown\"} 2\n# HELP node_edac_csrow_uncorrectable_errors_total Total uncorrectable memory errors for this csrow.\n# TYPE node_edac_csrow_uncorrectable_errors_total counter\nnode_edac_csrow_uncorrectable_errors_total{controller=\"0\",csrow=\"0\"} 4\nnode_edac_csrow_uncorrectable_errors_total{controller=\"0\",csrow=\"unknown\"} 6\n# HELP node_edac_uncorrectable_errors_total Total uncorrectable memory errors.\n# TYPE node_edac_uncorrectable_errors_total counter\nnode_edac_uncorrectable_errors_total{controller=\"0\"} 5\n# HELP node_entropy_available_bits Bits of available entropy.\n# TYPE node_entropy_available_bits gauge\nnode_entropy_available_bits 1337\n# HELP node_entropy_pool_size_bits Bits of entropy pool.\n# TYPE node_entropy_pool_size_bits gauge\nnode_entropy_pool_size_bits 4096\n# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.\n# TYPE node_exporter_build_info gauge\n# HELP node_fibrechannel_dumped_frames_total Number of dumped frames\n# TYPE node_fibrechannel_dumped_frames_total counter\nnode_fibrechannel_dumped_frames_total{fc_host=\"host1\"} 0\n# HELP node_fibrechannel_error_frames_total Number of errors in frames\n# TYPE node_fibrechannel_error_frames_total counter\nnode_fibrechannel_error_frames_total{fc_host=\"host0\"} 0\nnode_fibrechannel_error_frames_total{fc_host=\"host1\"} 19\n# HELP node_fibrechannel_fcp_packet_aborts_total Number of aborted packets\n# TYPE node_fibrechannel_fcp_packet_aborts_total counter\nnode_fibrechannel_fcp_packet_aborts_total{fc_host=\"host0\"} 19\n# HELP node_fibrechannel_info Non-numeric data from /sys/class/fc_host/<host>, value is always 1.\n# TYPE node_fibrechannel_info gauge\nnode_fibrechannel_info{dev_loss_tmo=\"\",fabric_name=\"\",fc_host=\"host1\",port_id=\"\",port_name=\"\",port_state=\"\",port_type=\"\",speed=\"8 Gbit\",supported_classes=\"\",supported_speeds=\"\",symbolic_name=\"\"} 1\nnode_fibrechannel_info{dev_loss_tmo=\"30\",fabric_name=\"0\",fc_host=\"host0\",port_id=\"000002\",port_name=\"1000e0071bce95f2\",port_state=\"Online\",port_type=\"Point-To-Point (direct nport connection)\",speed=\"16 Gbit\",supported_classes=\"Class 3\",supported_speeds=\"4 Gbit, 8 Gbit, 16 Gbit\",symbolic_name=\"Emulex SN1100E2P FV12.4.270.3 DV12.4.0.0. HN:gotest. OS:Linux\"} 1\n# HELP node_fibrechannel_invalid_crc_total Invalid Cyclic Redundancy Check count\n# TYPE node_fibrechannel_invalid_crc_total counter\nnode_fibrechannel_invalid_crc_total{fc_host=\"host0\"} 2\nnode_fibrechannel_invalid_crc_total{fc_host=\"host1\"} 32\n# HELP node_fibrechannel_invalid_tx_words_total Number of invalid words transmitted by host port\n# TYPE node_fibrechannel_invalid_tx_words_total counter\nnode_fibrechannel_invalid_tx_words_total{fc_host=\"host0\"} 8\nnode_fibrechannel_invalid_tx_words_total{fc_host=\"host1\"} 128\n# HELP node_fibrechannel_link_failure_total Number of times the host port link has failed\n# TYPE node_fibrechannel_link_failure_total counter\nnode_fibrechannel_link_failure_total{fc_host=\"host0\"} 9\nnode_fibrechannel_link_failure_total{fc_host=\"host1\"} 144\n# HELP node_fibrechannel_loss_of_signal_total Number of times signal has been lost\n# TYPE node_fibrechannel_loss_of_signal_total counter\nnode_fibrechannel_loss_of_signal_total{fc_host=\"host0\"} 17\nnode_fibrechannel_loss_of_signal_total{fc_host=\"host1\"} 272\n# HELP node_fibrechannel_loss_of_sync_total Number of failures on either bit or transmission word boundaries\n# TYPE node_fibrechannel_loss_of_sync_total counter\nnode_fibrechannel_loss_of_sync_total{fc_host=\"host0\"} 16\nnode_fibrechannel_loss_of_sync_total{fc_host=\"host1\"} 256\n# HELP node_fibrechannel_nos_total Number Not_Operational Primitive Sequence received by host port\n# TYPE node_fibrechannel_nos_total counter\nnode_fibrechannel_nos_total{fc_host=\"host0\"} 18\nnode_fibrechannel_nos_total{fc_host=\"host1\"} 288\n# HELP node_fibrechannel_rx_frames_total Number of frames received\n# TYPE node_fibrechannel_rx_frames_total counter\nnode_fibrechannel_rx_frames_total{fc_host=\"host0\"} 3\nnode_fibrechannel_rx_frames_total{fc_host=\"host1\"} 48\n# HELP node_fibrechannel_rx_words_total Number of words received by host port\n# TYPE node_fibrechannel_rx_words_total counter\nnode_fibrechannel_rx_words_total{fc_host=\"host0\"} 4\nnode_fibrechannel_rx_words_total{fc_host=\"host1\"} 64\n# HELP node_fibrechannel_seconds_since_last_reset_total Number of seconds since last host port reset\n# TYPE node_fibrechannel_seconds_since_last_reset_total counter\nnode_fibrechannel_seconds_since_last_reset_total{fc_host=\"host0\"} 7\nnode_fibrechannel_seconds_since_last_reset_total{fc_host=\"host1\"} 112\n# HELP node_fibrechannel_tx_frames_total Number of frames transmitted by host port\n# TYPE node_fibrechannel_tx_frames_total counter\nnode_fibrechannel_tx_frames_total{fc_host=\"host0\"} 5\nnode_fibrechannel_tx_frames_total{fc_host=\"host1\"} 80\n# HELP node_fibrechannel_tx_words_total Number of words transmitted by host port\n# TYPE node_fibrechannel_tx_words_total counter\nnode_fibrechannel_tx_words_total{fc_host=\"host0\"} 6\nnode_fibrechannel_tx_words_total{fc_host=\"host1\"} 96\n# HELP node_filefd_allocated File descriptor statistics: allocated.\n# TYPE node_filefd_allocated gauge\nnode_filefd_allocated 1024\n# HELP node_filefd_maximum File descriptor statistics: maximum.\n# TYPE node_filefd_maximum gauge\nnode_filefd_maximum 1.631329e+06\n# HELP node_forks_total Total number of forks.\n# TYPE node_forks_total counter\nnode_forks_total 26442\n# HELP node_hwmon_chip_names Annotation metric for human-readable chip names\n# TYPE node_hwmon_chip_names gauge\nnode_hwmon_chip_names{chip=\"nct6779\",chip_name=\"nct6779\"} 1\nnode_hwmon_chip_names{chip=\"platform_coretemp_0\",chip_name=\"coretemp\"} 1\nnode_hwmon_chip_names{chip=\"platform_coretemp_1\",chip_name=\"coretemp\"} 1\n# HELP node_hwmon_fan_alarm Hardware sensor alarm status (fan)\n# TYPE node_hwmon_fan_alarm gauge\nnode_hwmon_fan_alarm{chip=\"nct6779\",sensor=\"fan2\"} 0\n# HELP node_hwmon_fan_beep_enabled Hardware monitor sensor has beeping enabled\n# TYPE node_hwmon_fan_beep_enabled gauge\nnode_hwmon_fan_beep_enabled{chip=\"nct6779\",sensor=\"fan2\"} 0\n# HELP node_hwmon_fan_manual Hardware monitor fan element manual\n# TYPE node_hwmon_fan_manual gauge\nnode_hwmon_fan_manual{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 0\nnode_hwmon_fan_manual{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 0\n# HELP node_hwmon_fan_max_rpm Hardware monitor for fan revolutions per minute (max)\n# TYPE node_hwmon_fan_max_rpm gauge\nnode_hwmon_fan_max_rpm{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 6156\nnode_hwmon_fan_max_rpm{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 5700\n# HELP node_hwmon_fan_min_rpm Hardware monitor for fan revolutions per minute (min)\n# TYPE node_hwmon_fan_min_rpm gauge\nnode_hwmon_fan_min_rpm{chip=\"nct6779\",sensor=\"fan2\"} 0\nnode_hwmon_fan_min_rpm{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 2160\nnode_hwmon_fan_min_rpm{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 2000\n# HELP node_hwmon_fan_output Hardware monitor fan element output\n# TYPE node_hwmon_fan_output gauge\nnode_hwmon_fan_output{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 2160\nnode_hwmon_fan_output{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 2000\n# HELP node_hwmon_fan_pulses Hardware monitor fan element pulses\n# TYPE node_hwmon_fan_pulses gauge\nnode_hwmon_fan_pulses{chip=\"nct6779\",sensor=\"fan2\"} 2\n# HELP node_hwmon_fan_rpm Hardware monitor for fan revolutions per minute (input)\n# TYPE node_hwmon_fan_rpm gauge\nnode_hwmon_fan_rpm{chip=\"nct6779\",sensor=\"fan2\"} 1098\nnode_hwmon_fan_rpm{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 0\nnode_hwmon_fan_rpm{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 1998\n# HELP node_hwmon_fan_target_rpm Hardware monitor for fan revolutions per minute (target)\n# TYPE node_hwmon_fan_target_rpm gauge\nnode_hwmon_fan_target_rpm{chip=\"nct6779\",sensor=\"fan2\"} 27000\n# HELP node_hwmon_fan_tolerance Hardware monitor fan element tolerance\n# TYPE node_hwmon_fan_tolerance gauge\nnode_hwmon_fan_tolerance{chip=\"nct6779\",sensor=\"fan2\"} 0\n# HELP node_hwmon_freq_freq_mhz Hardware monitor for GPU frequency in MHz\n# TYPE node_hwmon_freq_freq_mhz gauge\nnode_hwmon_freq_freq_mhz{chip=\"hwmon4\",sensor=\"mclk\"} 300\nnode_hwmon_freq_freq_mhz{chip=\"hwmon4\",sensor=\"sclk\"} 214\n# HELP node_hwmon_in_alarm Hardware sensor alarm status (in)\n# TYPE node_hwmon_in_alarm gauge\nnode_hwmon_in_alarm{chip=\"nct6779\",sensor=\"in0\"} 0\nnode_hwmon_in_alarm{chip=\"nct6779\",sensor=\"in1\"} 1\n# HELP node_hwmon_in_beep_enabled Hardware monitor sensor has beeping enabled\n# TYPE node_hwmon_in_beep_enabled gauge\nnode_hwmon_in_beep_enabled{chip=\"nct6779\",sensor=\"in0\"} 0\nnode_hwmon_in_beep_enabled{chip=\"nct6779\",sensor=\"in1\"} 0\n# HELP node_hwmon_in_max_volts Hardware monitor for voltage (max)\n# TYPE node_hwmon_in_max_volts gauge\nnode_hwmon_in_max_volts{chip=\"nct6779\",sensor=\"in0\"} 1.744\nnode_hwmon_in_max_volts{chip=\"nct6779\",sensor=\"in1\"} 0\n# HELP node_hwmon_in_min_volts Hardware monitor for voltage (min)\n# TYPE node_hwmon_in_min_volts gauge\nnode_hwmon_in_min_volts{chip=\"nct6779\",sensor=\"in0\"} 0\nnode_hwmon_in_min_volts{chip=\"nct6779\",sensor=\"in1\"} 0\n# HELP node_hwmon_in_volts Hardware monitor for voltage (input)\n# TYPE node_hwmon_in_volts gauge\nnode_hwmon_in_volts{chip=\"nct6779\",sensor=\"in0\"} 0.792\nnode_hwmon_in_volts{chip=\"nct6779\",sensor=\"in1\"} 1.024\n# HELP node_hwmon_intrusion_alarm Hardware sensor alarm status (intrusion)\n# TYPE node_hwmon_intrusion_alarm gauge\nnode_hwmon_intrusion_alarm{chip=\"nct6779\",sensor=\"intrusion0\"} 1\nnode_hwmon_intrusion_alarm{chip=\"nct6779\",sensor=\"intrusion1\"} 1\n# HELP node_hwmon_intrusion_beep_enabled Hardware monitor sensor has beeping enabled\n# TYPE node_hwmon_intrusion_beep_enabled gauge\nnode_hwmon_intrusion_beep_enabled{chip=\"nct6779\",sensor=\"intrusion0\"} 0\nnode_hwmon_intrusion_beep_enabled{chip=\"nct6779\",sensor=\"intrusion1\"} 0\n# HELP node_hwmon_pwm_auto_point1_pwm Hardware monitor pwm element auto_point1_pwm\n# TYPE node_hwmon_pwm_auto_point1_pwm gauge\nnode_hwmon_pwm_auto_point1_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 153\n# HELP node_hwmon_pwm_auto_point1_temp Hardware monitor pwm element auto_point1_temp\n# TYPE node_hwmon_pwm_auto_point1_temp gauge\nnode_hwmon_pwm_auto_point1_temp{chip=\"nct6779\",sensor=\"pwm1\"} 30000\n# HELP node_hwmon_pwm_auto_point2_pwm Hardware monitor pwm element auto_point2_pwm\n# TYPE node_hwmon_pwm_auto_point2_pwm gauge\nnode_hwmon_pwm_auto_point2_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 255\n# HELP node_hwmon_pwm_auto_point2_temp Hardware monitor pwm element auto_point2_temp\n# TYPE node_hwmon_pwm_auto_point2_temp gauge\nnode_hwmon_pwm_auto_point2_temp{chip=\"nct6779\",sensor=\"pwm1\"} 70000\n# HELP node_hwmon_pwm_auto_point3_pwm Hardware monitor pwm element auto_point3_pwm\n# TYPE node_hwmon_pwm_auto_point3_pwm gauge\nnode_hwmon_pwm_auto_point3_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 255\n# HELP node_hwmon_pwm_auto_point3_temp Hardware monitor pwm element auto_point3_temp\n# TYPE node_hwmon_pwm_auto_point3_temp gauge\nnode_hwmon_pwm_auto_point3_temp{chip=\"nct6779\",sensor=\"pwm1\"} 70000\n# HELP node_hwmon_pwm_auto_point4_pwm Hardware monitor pwm element auto_point4_pwm\n# TYPE node_hwmon_pwm_auto_point4_pwm gauge\nnode_hwmon_pwm_auto_point4_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 255\n# HELP node_hwmon_pwm_auto_point4_temp Hardware monitor pwm element auto_point4_temp\n# TYPE node_hwmon_pwm_auto_point4_temp gauge\nnode_hwmon_pwm_auto_point4_temp{chip=\"nct6779\",sensor=\"pwm1\"} 70000\n# HELP node_hwmon_pwm_auto_point5_pwm Hardware monitor pwm element auto_point5_pwm\n# TYPE node_hwmon_pwm_auto_point5_pwm gauge\nnode_hwmon_pwm_auto_point5_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 255\n# HELP node_hwmon_pwm_auto_point5_temp Hardware monitor pwm element auto_point5_temp\n# TYPE node_hwmon_pwm_auto_point5_temp gauge\nnode_hwmon_pwm_auto_point5_temp{chip=\"nct6779\",sensor=\"pwm1\"} 75000\n# HELP node_hwmon_pwm_crit_temp_tolerance Hardware monitor pwm element crit_temp_tolerance\n# TYPE node_hwmon_pwm_crit_temp_tolerance gauge\nnode_hwmon_pwm_crit_temp_tolerance{chip=\"nct6779\",sensor=\"pwm1\"} 2000\n# HELP node_hwmon_pwm_enable Hardware monitor pwm element enable\n# TYPE node_hwmon_pwm_enable gauge\nnode_hwmon_pwm_enable{chip=\"nct6779\",sensor=\"pwm1\"} 5\n# HELP node_hwmon_pwm_floor Hardware monitor pwm element floor\n# TYPE node_hwmon_pwm_floor gauge\nnode_hwmon_pwm_floor{chip=\"nct6779\",sensor=\"pwm1\"} 1\n# HELP node_hwmon_pwm_mode Hardware monitor pwm element mode\n# TYPE node_hwmon_pwm_mode gauge\nnode_hwmon_pwm_mode{chip=\"nct6779\",sensor=\"pwm1\"} 1\n# HELP node_hwmon_pwm_start Hardware monitor pwm element start\n# TYPE node_hwmon_pwm_start gauge\nnode_hwmon_pwm_start{chip=\"nct6779\",sensor=\"pwm1\"} 1\n# HELP node_hwmon_pwm_step_down_time Hardware monitor pwm element step_down_time\n# TYPE node_hwmon_pwm_step_down_time gauge\nnode_hwmon_pwm_step_down_time{chip=\"nct6779\",sensor=\"pwm1\"} 100\n# HELP node_hwmon_pwm_step_up_time Hardware monitor pwm element step_up_time\n# TYPE node_hwmon_pwm_step_up_time gauge\nnode_hwmon_pwm_step_up_time{chip=\"nct6779\",sensor=\"pwm1\"} 100\n# HELP node_hwmon_pwm_stop_time Hardware monitor pwm element stop_time\n# TYPE node_hwmon_pwm_stop_time gauge\nnode_hwmon_pwm_stop_time{chip=\"nct6779\",sensor=\"pwm1\"} 6000\n# HELP node_hwmon_pwm_target_temp Hardware monitor pwm element target_temp\n# TYPE node_hwmon_pwm_target_temp gauge\nnode_hwmon_pwm_target_temp{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_temp_sel Hardware monitor pwm element temp_sel\n# TYPE node_hwmon_pwm_temp_sel gauge\nnode_hwmon_pwm_temp_sel{chip=\"nct6779\",sensor=\"pwm1\"} 7\n# HELP node_hwmon_pwm_temp_tolerance Hardware monitor pwm element temp_tolerance\n# TYPE node_hwmon_pwm_temp_tolerance gauge\nnode_hwmon_pwm_temp_tolerance{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_duty_base Hardware monitor pwm element weight_duty_base\n# TYPE node_hwmon_pwm_weight_duty_base gauge\nnode_hwmon_pwm_weight_duty_base{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_duty_step Hardware monitor pwm element weight_duty_step\n# TYPE node_hwmon_pwm_weight_duty_step gauge\nnode_hwmon_pwm_weight_duty_step{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_temp_sel Hardware monitor pwm element weight_temp_sel\n# TYPE node_hwmon_pwm_weight_temp_sel gauge\nnode_hwmon_pwm_weight_temp_sel{chip=\"nct6779\",sensor=\"pwm1\"} 1\n# HELP node_hwmon_pwm_weight_temp_step Hardware monitor pwm element weight_temp_step\n# TYPE node_hwmon_pwm_weight_temp_step gauge\nnode_hwmon_pwm_weight_temp_step{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_temp_step_base Hardware monitor pwm element weight_temp_step_base\n# TYPE node_hwmon_pwm_weight_temp_step_base gauge\nnode_hwmon_pwm_weight_temp_step_base{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_temp_step_tol Hardware monitor pwm element weight_temp_step_tol\n# TYPE node_hwmon_pwm_weight_temp_step_tol gauge\nnode_hwmon_pwm_weight_temp_step_tol{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_sensor_label Label for given chip and sensor\n# TYPE node_hwmon_sensor_label gauge\nnode_hwmon_sensor_label{chip=\"hwmon4\",label=\"foosensor\",sensor=\"temp1\"} 1\nnode_hwmon_sensor_label{chip=\"hwmon4\",label=\"foosensor\",sensor=\"temp2\"} 1\nnode_hwmon_sensor_label{chip=\"hwmon4\",label=\"mclk\",sensor=\"freq2\"} 1\nnode_hwmon_sensor_label{chip=\"hwmon4\",label=\"sclk\",sensor=\"freq1\"} 1\nnode_hwmon_sensor_label{chip=\"platform_applesmc_768\",label=\"Left side\",sensor=\"fan1\"} 1\nnode_hwmon_sensor_label{chip=\"platform_applesmc_768\",label=\"Right side\",sensor=\"fan2\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Core 0\",sensor=\"temp2\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Core 1\",sensor=\"temp3\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Core 2\",sensor=\"temp4\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Core 3\",sensor=\"temp5\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Physical id 0\",sensor=\"temp1\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Core 0\",sensor=\"temp2\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Core 1\",sensor=\"temp3\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Core 2\",sensor=\"temp4\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Core 3\",sensor=\"temp5\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Physical id 0\",sensor=\"temp1\"} 1\n# HELP node_hwmon_temp_celsius Hardware monitor for temperature (input)\n# TYPE node_hwmon_temp_celsius gauge\nnode_hwmon_temp_celsius{chip=\"hwmon4\",sensor=\"temp1\"} 55\nnode_hwmon_temp_celsius{chip=\"hwmon4\",sensor=\"temp2\"} 54\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp1\"} 55\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp2\"} 54\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp3\"} 52\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp4\"} 53\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp5\"} 50\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp1\"} 55\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp2\"} 54\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp3\"} 52\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp4\"} 53\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp5\"} 50\n# HELP node_hwmon_temp_crit_alarm_celsius Hardware monitor for temperature (crit_alarm)\n# TYPE node_hwmon_temp_crit_alarm_celsius gauge\nnode_hwmon_temp_crit_alarm_celsius{chip=\"hwmon4\",sensor=\"temp1\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"hwmon4\",sensor=\"temp2\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp1\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp2\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp3\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp4\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp5\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp1\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp2\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp3\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp4\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp5\"} 0\n# HELP node_hwmon_temp_crit_celsius Hardware monitor for temperature (crit)\n# TYPE node_hwmon_temp_crit_celsius gauge\nnode_hwmon_temp_crit_celsius{chip=\"hwmon4\",sensor=\"temp1\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"hwmon4\",sensor=\"temp2\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp1\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp2\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp3\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp4\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp5\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp1\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp2\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp3\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp4\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp5\"} 100\n# HELP node_hwmon_temp_max_celsius Hardware monitor for temperature (max)\n# TYPE node_hwmon_temp_max_celsius gauge\nnode_hwmon_temp_max_celsius{chip=\"hwmon4\",sensor=\"temp1\"} 100\nnode_hwmon_temp_max_celsius{chip=\"hwmon4\",sensor=\"temp2\"} 100\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp1\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp2\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp3\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp4\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp5\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp1\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp2\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp3\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp4\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp5\"} 84\n# HELP node_infiniband_info Non-numeric data from /sys/class/infiniband/<device>, value is always 1.\n# TYPE node_infiniband_info gauge\nnode_infiniband_info{board_id=\"I40IW Board ID\",device=\"i40iw0\",firmware_version=\"0.2\",hca_type=\"I40IW\"} 1\nnode_infiniband_info{board_id=\"SM_1141000001000\",device=\"mlx4_0\",firmware_version=\"2.31.5050\",hca_type=\"MT4099\"} 1\n# HELP node_infiniband_legacy_data_received_bytes_total Number of data octets received on all links\n# TYPE node_infiniband_legacy_data_received_bytes_total counter\nnode_infiniband_legacy_data_received_bytes_total{device=\"mlx4_0\",port=\"1\"} 1.8527668e+07\nnode_infiniband_legacy_data_received_bytes_total{device=\"mlx4_0\",port=\"2\"} 1.8527668e+07\n# HELP node_infiniband_legacy_data_transmitted_bytes_total Number of data octets transmitted on all links\n# TYPE node_infiniband_legacy_data_transmitted_bytes_total counter\nnode_infiniband_legacy_data_transmitted_bytes_total{device=\"mlx4_0\",port=\"1\"} 1.493376e+07\nnode_infiniband_legacy_data_transmitted_bytes_total{device=\"mlx4_0\",port=\"2\"} 1.493376e+07\n# HELP node_infiniband_legacy_multicast_packets_received_total Number of multicast packets received\n# TYPE node_infiniband_legacy_multicast_packets_received_total counter\nnode_infiniband_legacy_multicast_packets_received_total{device=\"mlx4_0\",port=\"1\"} 93\nnode_infiniband_legacy_multicast_packets_received_total{device=\"mlx4_0\",port=\"2\"} 93\n# HELP node_infiniband_legacy_multicast_packets_transmitted_total Number of multicast packets transmitted\n# TYPE node_infiniband_legacy_multicast_packets_transmitted_total counter\nnode_infiniband_legacy_multicast_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 16\nnode_infiniband_legacy_multicast_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 16\n# HELP node_infiniband_legacy_packets_received_total Number of data packets received on all links\n# TYPE node_infiniband_legacy_packets_received_total counter\nnode_infiniband_legacy_packets_received_total{device=\"mlx4_0\",port=\"1\"} 0\nnode_infiniband_legacy_packets_received_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_legacy_packets_transmitted_total Number of data packets received on all links\n# TYPE node_infiniband_legacy_packets_transmitted_total counter\nnode_infiniband_legacy_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 0\nnode_infiniband_legacy_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_legacy_unicast_packets_received_total Number of unicast packets received\n# TYPE node_infiniband_legacy_unicast_packets_received_total counter\nnode_infiniband_legacy_unicast_packets_received_total{device=\"mlx4_0\",port=\"1\"} 61148\nnode_infiniband_legacy_unicast_packets_received_total{device=\"mlx4_0\",port=\"2\"} 61148\n# HELP node_infiniband_legacy_unicast_packets_transmitted_total Number of unicast packets transmitted\n# TYPE node_infiniband_legacy_unicast_packets_transmitted_total counter\nnode_infiniband_legacy_unicast_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 61239\nnode_infiniband_legacy_unicast_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 61239\n# HELP node_infiniband_link_downed_total Number of times the link failed to recover from an error state and went down\n# TYPE node_infiniband_link_downed_total counter\nnode_infiniband_link_downed_total{device=\"mlx4_0\",port=\"1\"} 0\nnode_infiniband_link_downed_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_link_error_recovery_total Number of times the link successfully recovered from an error state\n# TYPE node_infiniband_link_error_recovery_total counter\nnode_infiniband_link_error_recovery_total{device=\"mlx4_0\",port=\"1\"} 0\nnode_infiniband_link_error_recovery_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_multicast_packets_received_total Number of multicast packets received (including errors)\n# TYPE node_infiniband_multicast_packets_received_total counter\nnode_infiniband_multicast_packets_received_total{device=\"mlx4_0\",port=\"1\"} 93\nnode_infiniband_multicast_packets_received_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_multicast_packets_transmitted_total Number of multicast packets transmitted (including errors)\n# TYPE node_infiniband_multicast_packets_transmitted_total counter\nnode_infiniband_multicast_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 16\nnode_infiniband_multicast_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_physical_state_id Physical state of the InfiniBand port (0: no change, 1: sleep, 2: polling, 3: disable, 4: shift, 5: link up, 6: link error recover, 7: phytest)\n# TYPE node_infiniband_physical_state_id gauge\nnode_infiniband_physical_state_id{device=\"i40iw0\",port=\"1\"} 5\nnode_infiniband_physical_state_id{device=\"mlx4_0\",port=\"1\"} 5\nnode_infiniband_physical_state_id{device=\"mlx4_0\",port=\"2\"} 5\n# HELP node_infiniband_port_constraint_errors_received_total Number of packets received on the switch physical port that are discarded\n# TYPE node_infiniband_port_constraint_errors_received_total counter\nnode_infiniband_port_constraint_errors_received_total{device=\"mlx4_0\",port=\"1\"} 0\n# HELP node_infiniband_port_constraint_errors_transmitted_total Number of packets not transmitted from the switch physical port\n# TYPE node_infiniband_port_constraint_errors_transmitted_total counter\nnode_infiniband_port_constraint_errors_transmitted_total{device=\"mlx4_0\",port=\"1\"} 0\n# HELP node_infiniband_port_data_received_bytes_total Number of data octets received on all links\n# TYPE node_infiniband_port_data_received_bytes_total counter\nnode_infiniband_port_data_received_bytes_total{device=\"mlx4_0\",port=\"1\"} 1.8527668e+07\nnode_infiniband_port_data_received_bytes_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_port_data_transmitted_bytes_total Number of data octets transmitted on all links\n# TYPE node_infiniband_port_data_transmitted_bytes_total counter\nnode_infiniband_port_data_transmitted_bytes_total{device=\"mlx4_0\",port=\"1\"} 1.493376e+07\nnode_infiniband_port_data_transmitted_bytes_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_port_discards_received_total Number of inbound packets discarded by the port because the port is down or congested\n# TYPE node_infiniband_port_discards_received_total counter\nnode_infiniband_port_discards_received_total{device=\"mlx4_0\",port=\"1\"} 0\n# HELP node_infiniband_port_discards_transmitted_total Number of outbound packets discarded by the port because the port is down or congested\n# TYPE node_infiniband_port_discards_transmitted_total counter\nnode_infiniband_port_discards_transmitted_total{device=\"mlx4_0\",port=\"1\"} 5\n# HELP node_infiniband_port_errors_received_total Number of packets containing an error that were received on this port\n# TYPE node_infiniband_port_errors_received_total counter\nnode_infiniband_port_errors_received_total{device=\"mlx4_0\",port=\"1\"} 0\n# HELP node_infiniband_port_packets_received_total Number of packets received on all VLs by this port (including errors)\n# TYPE node_infiniband_port_packets_received_total counter\nnode_infiniband_port_packets_received_total{device=\"mlx4_0\",port=\"1\"} 6.825908347e+09\n# HELP node_infiniband_port_packets_transmitted_total Number of packets transmitted on all VLs from this port (including errors)\n# TYPE node_infiniband_port_packets_transmitted_total counter\nnode_infiniband_port_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 6.235865e+06\n# HELP node_infiniband_port_transmit_wait_total Number of ticks during which the port had data to transmit but no data was sent during the entire tick\n# TYPE node_infiniband_port_transmit_wait_total counter\nnode_infiniband_port_transmit_wait_total{device=\"mlx4_0\",port=\"1\"} 4.294967295e+09\n# HELP node_infiniband_rate_bytes_per_second Maximum signal transfer rate\n# TYPE node_infiniband_rate_bytes_per_second gauge\nnode_infiniband_rate_bytes_per_second{device=\"i40iw0\",port=\"1\"} 1.25e+09\nnode_infiniband_rate_bytes_per_second{device=\"mlx4_0\",port=\"1\"} 5e+09\nnode_infiniband_rate_bytes_per_second{device=\"mlx4_0\",port=\"2\"} 5e+09\n# HELP node_infiniband_state_id State of the InfiniBand port (0: no change, 1: down, 2: init, 3: armed, 4: active, 5: act defer)\n# TYPE node_infiniband_state_id gauge\nnode_infiniband_state_id{device=\"i40iw0\",port=\"1\"} 4\nnode_infiniband_state_id{device=\"mlx4_0\",port=\"1\"} 4\nnode_infiniband_state_id{device=\"mlx4_0\",port=\"2\"} 4\n# HELP node_infiniband_unicast_packets_received_total Number of unicast packets received (including errors)\n# TYPE node_infiniband_unicast_packets_received_total counter\nnode_infiniband_unicast_packets_received_total{device=\"mlx4_0\",port=\"1\"} 61148\nnode_infiniband_unicast_packets_received_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_unicast_packets_transmitted_total Number of unicast packets transmitted (including errors)\n# TYPE node_infiniband_unicast_packets_transmitted_total counter\nnode_infiniband_unicast_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 61239\nnode_infiniband_unicast_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_interrupts_total Interrupt details.\n# TYPE node_interrupts_total counter\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"APIC ICR read retries\",type=\"RTR\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Function call interrupts\",type=\"CAL\"} 148554\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"IRQ work interrupts\",type=\"IWI\"} 1.509379e+06\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Local timer interrupts\",type=\"LOC\"} 1.74326351e+08\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Machine check exceptions\",type=\"MCE\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Machine check polls\",type=\"MCP\"} 2406\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Non-maskable interrupts\",type=\"NMI\"} 47\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Performance monitoring interrupts\",type=\"PMI\"} 47\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Rescheduling interrupts\",type=\"RES\"} 1.0847134e+07\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Spurious interrupts\",type=\"SPU\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"TLB shootdowns\",type=\"TLB\"} 1.0460334e+07\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Thermal event interrupts\",type=\"TRM\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Threshold APIC interrupts\",type=\"THR\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"acpi\",info=\"IR-IO-APIC-fasteoi\",type=\"9\"} 398553\nnode_interrupts_total{cpu=\"0\",devices=\"ahci\",info=\"IR-PCI-MSI-edge\",type=\"43\"} 7.434032e+06\nnode_interrupts_total{cpu=\"0\",devices=\"dmar0\",info=\"DMAR_MSI-edge\",type=\"40\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"dmar1\",info=\"DMAR_MSI-edge\",type=\"41\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"ehci_hcd:usb1, mmc0\",info=\"IR-IO-APIC-fasteoi\",type=\"16\"} 328511\nnode_interrupts_total{cpu=\"0\",devices=\"ehci_hcd:usb2\",info=\"IR-IO-APIC-fasteoi\",type=\"23\"} 1.451445e+06\nnode_interrupts_total{cpu=\"0\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"1\"} 17960\nnode_interrupts_total{cpu=\"0\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"12\"} 380847\nnode_interrupts_total{cpu=\"0\",devices=\"i915\",info=\"IR-PCI-MSI-edge\",type=\"44\"} 140636\nnode_interrupts_total{cpu=\"0\",devices=\"iwlwifi\",info=\"IR-PCI-MSI-edge\",type=\"46\"} 4.3078464e+07\nnode_interrupts_total{cpu=\"0\",devices=\"mei_me\",info=\"IR-PCI-MSI-edge\",type=\"45\"} 4\nnode_interrupts_total{cpu=\"0\",devices=\"rtc0\",info=\"IR-IO-APIC-edge\",type=\"8\"} 1\nnode_interrupts_total{cpu=\"0\",devices=\"snd_hda_intel\",info=\"IR-PCI-MSI-edge\",type=\"47\"} 350\nnode_interrupts_total{cpu=\"0\",devices=\"timer\",info=\"IR-IO-APIC-edge\",type=\"0\"} 18\nnode_interrupts_total{cpu=\"0\",devices=\"xhci_hcd\",info=\"IR-PCI-MSI-edge\",type=\"42\"} 378324\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"APIC ICR read retries\",type=\"RTR\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Function call interrupts\",type=\"CAL\"} 157441\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"IRQ work interrupts\",type=\"IWI\"} 2.411776e+06\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Local timer interrupts\",type=\"LOC\"} 1.35776678e+08\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Machine check exceptions\",type=\"MCE\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Machine check polls\",type=\"MCP\"} 2399\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Non-maskable interrupts\",type=\"NMI\"} 5031\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Performance monitoring interrupts\",type=\"PMI\"} 5031\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Rescheduling interrupts\",type=\"RES\"} 9.111507e+06\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Spurious interrupts\",type=\"SPU\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"TLB shootdowns\",type=\"TLB\"} 9.918429e+06\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Thermal event interrupts\",type=\"TRM\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Threshold APIC interrupts\",type=\"THR\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"acpi\",info=\"IR-IO-APIC-fasteoi\",type=\"9\"} 2320\nnode_interrupts_total{cpu=\"1\",devices=\"ahci\",info=\"IR-PCI-MSI-edge\",type=\"43\"} 8.092205e+06\nnode_interrupts_total{cpu=\"1\",devices=\"dmar0\",info=\"DMAR_MSI-edge\",type=\"40\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"dmar1\",info=\"DMAR_MSI-edge\",type=\"41\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"ehci_hcd:usb1, mmc0\",info=\"IR-IO-APIC-fasteoi\",type=\"16\"} 322879\nnode_interrupts_total{cpu=\"1\",devices=\"ehci_hcd:usb2\",info=\"IR-IO-APIC-fasteoi\",type=\"23\"} 3.333499e+06\nnode_interrupts_total{cpu=\"1\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"1\"} 105\nnode_interrupts_total{cpu=\"1\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"12\"} 1021\nnode_interrupts_total{cpu=\"1\",devices=\"i915\",info=\"IR-PCI-MSI-edge\",type=\"44\"} 226313\nnode_interrupts_total{cpu=\"1\",devices=\"iwlwifi\",info=\"IR-PCI-MSI-edge\",type=\"46\"} 130\nnode_interrupts_total{cpu=\"1\",devices=\"mei_me\",info=\"IR-PCI-MSI-edge\",type=\"45\"} 22\nnode_interrupts_total{cpu=\"1\",devices=\"rtc0\",info=\"IR-IO-APIC-edge\",type=\"8\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"snd_hda_intel\",info=\"IR-PCI-MSI-edge\",type=\"47\"} 224\nnode_interrupts_total{cpu=\"1\",devices=\"timer\",info=\"IR-IO-APIC-edge\",type=\"0\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"xhci_hcd\",info=\"IR-PCI-MSI-edge\",type=\"42\"} 1.734637e+06\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"APIC ICR read retries\",type=\"RTR\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Function call interrupts\",type=\"CAL\"} 142912\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"IRQ work interrupts\",type=\"IWI\"} 1.512975e+06\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Local timer interrupts\",type=\"LOC\"} 1.68393257e+08\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Machine check exceptions\",type=\"MCE\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Machine check polls\",type=\"MCP\"} 2399\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Non-maskable interrupts\",type=\"NMI\"} 6211\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Performance monitoring interrupts\",type=\"PMI\"} 6211\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Rescheduling interrupts\",type=\"RES\"} 1.5999335e+07\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Spurious interrupts\",type=\"SPU\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"TLB shootdowns\",type=\"TLB\"} 1.0494258e+07\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Thermal event interrupts\",type=\"TRM\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Threshold APIC interrupts\",type=\"THR\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"acpi\",info=\"IR-IO-APIC-fasteoi\",type=\"9\"} 824\nnode_interrupts_total{cpu=\"2\",devices=\"ahci\",info=\"IR-PCI-MSI-edge\",type=\"43\"} 6.478877e+06\nnode_interrupts_total{cpu=\"2\",devices=\"dmar0\",info=\"DMAR_MSI-edge\",type=\"40\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"dmar1\",info=\"DMAR_MSI-edge\",type=\"41\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"ehci_hcd:usb1, mmc0\",info=\"IR-IO-APIC-fasteoi\",type=\"16\"} 293782\nnode_interrupts_total{cpu=\"2\",devices=\"ehci_hcd:usb2\",info=\"IR-IO-APIC-fasteoi\",type=\"23\"} 1.092032e+06\nnode_interrupts_total{cpu=\"2\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"1\"} 28\nnode_interrupts_total{cpu=\"2\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"12\"} 240\nnode_interrupts_total{cpu=\"2\",devices=\"i915\",info=\"IR-PCI-MSI-edge\",type=\"44\"} 347\nnode_interrupts_total{cpu=\"2\",devices=\"iwlwifi\",info=\"IR-PCI-MSI-edge\",type=\"46\"} 460171\nnode_interrupts_total{cpu=\"2\",devices=\"mei_me\",info=\"IR-PCI-MSI-edge\",type=\"45\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"rtc0\",info=\"IR-IO-APIC-edge\",type=\"8\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"snd_hda_intel\",info=\"IR-PCI-MSI-edge\",type=\"47\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"timer\",info=\"IR-IO-APIC-edge\",type=\"0\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"xhci_hcd\",info=\"IR-PCI-MSI-edge\",type=\"42\"} 440240\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"APIC ICR read retries\",type=\"RTR\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Function call interrupts\",type=\"CAL\"} 155528\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"IRQ work interrupts\",type=\"IWI\"} 2.428828e+06\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Local timer interrupts\",type=\"LOC\"} 1.30980079e+08\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Machine check exceptions\",type=\"MCE\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Machine check polls\",type=\"MCP\"} 2399\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Non-maskable interrupts\",type=\"NMI\"} 4968\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Performance monitoring interrupts\",type=\"PMI\"} 4968\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Rescheduling interrupts\",type=\"RES\"} 7.45726e+06\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Spurious interrupts\",type=\"SPU\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"TLB shootdowns\",type=\"TLB\"} 1.0345022e+07\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Thermal event interrupts\",type=\"TRM\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Threshold APIC interrupts\",type=\"THR\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"acpi\",info=\"IR-IO-APIC-fasteoi\",type=\"9\"} 863\nnode_interrupts_total{cpu=\"3\",devices=\"ahci\",info=\"IR-PCI-MSI-edge\",type=\"43\"} 7.492252e+06\nnode_interrupts_total{cpu=\"3\",devices=\"dmar0\",info=\"DMAR_MSI-edge\",type=\"40\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"dmar1\",info=\"DMAR_MSI-edge\",type=\"41\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"ehci_hcd:usb1, mmc0\",info=\"IR-IO-APIC-fasteoi\",type=\"16\"} 351412\nnode_interrupts_total{cpu=\"3\",devices=\"ehci_hcd:usb2\",info=\"IR-IO-APIC-fasteoi\",type=\"23\"} 2.644609e+06\nnode_interrupts_total{cpu=\"3\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"1\"} 28\nnode_interrupts_total{cpu=\"3\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"12\"} 198\nnode_interrupts_total{cpu=\"3\",devices=\"i915\",info=\"IR-PCI-MSI-edge\",type=\"44\"} 633\nnode_interrupts_total{cpu=\"3\",devices=\"iwlwifi\",info=\"IR-PCI-MSI-edge\",type=\"46\"} 290\nnode_interrupts_total{cpu=\"3\",devices=\"mei_me\",info=\"IR-PCI-MSI-edge\",type=\"45\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"rtc0\",info=\"IR-IO-APIC-edge\",type=\"8\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"snd_hda_intel\",info=\"IR-PCI-MSI-edge\",type=\"47\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"timer\",info=\"IR-IO-APIC-edge\",type=\"0\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"xhci_hcd\",info=\"IR-PCI-MSI-edge\",type=\"42\"} 2.434308e+06\n# HELP node_intr_total Total number of interrupts serviced.\n# TYPE node_intr_total counter\nnode_intr_total 8.885917e+06\n# HELP node_ipvs_backend_connections_active The current active connections by local and remote address.\n# TYPE node_ipvs_backend_connections_active gauge\nnode_ipvs_backend_connections_active{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 321\nnode_ipvs_backend_connections_active{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 64\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 1498\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 1499\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_backend_connections_inactive The current inactive connections by local and remote address.\n# TYPE node_ipvs_backend_connections_inactive gauge\nnode_ipvs_backend_connections_inactive{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 5\nnode_ipvs_backend_connections_inactive{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 1\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 2\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 1\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 2\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_backend_weight The current backend weight by local and remote address.\n# TYPE node_ipvs_backend_weight gauge\nnode_ipvs_backend_weight{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 20\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_connections_total The total number of connections made.\n# TYPE node_ipvs_connections_total counter\nnode_ipvs_connections_total 2.3765872e+07\n# HELP node_ipvs_incoming_bytes_total The total amount of incoming data.\n# TYPE node_ipvs_incoming_bytes_total counter\nnode_ipvs_incoming_bytes_total 8.9991519156915e+13\n# HELP node_ipvs_incoming_packets_total The total number of incoming packets.\n# TYPE node_ipvs_incoming_packets_total counter\nnode_ipvs_incoming_packets_total 3.811989221e+09\n# HELP node_ipvs_outgoing_bytes_total The total amount of outgoing data.\n# TYPE node_ipvs_outgoing_bytes_total counter\nnode_ipvs_outgoing_bytes_total 0\n# HELP node_ipvs_outgoing_packets_total The total number of outgoing packets.\n# TYPE node_ipvs_outgoing_packets_total counter\nnode_ipvs_outgoing_packets_total 0\n# HELP node_ksmd_full_scans_total ksmd 'full_scans' file.\n# TYPE node_ksmd_full_scans_total counter\nnode_ksmd_full_scans_total 323\n# HELP node_ksmd_merge_across_nodes ksmd 'merge_across_nodes' file.\n# TYPE node_ksmd_merge_across_nodes gauge\nnode_ksmd_merge_across_nodes 1\n# HELP node_ksmd_pages_shared ksmd 'pages_shared' file.\n# TYPE node_ksmd_pages_shared gauge\nnode_ksmd_pages_shared 1\n# HELP node_ksmd_pages_sharing ksmd 'pages_sharing' file.\n# TYPE node_ksmd_pages_sharing gauge\nnode_ksmd_pages_sharing 255\n# HELP node_ksmd_pages_to_scan ksmd 'pages_to_scan' file.\n# TYPE node_ksmd_pages_to_scan gauge\nnode_ksmd_pages_to_scan 100\n# HELP node_ksmd_pages_unshared ksmd 'pages_unshared' file.\n# TYPE node_ksmd_pages_unshared gauge\nnode_ksmd_pages_unshared 0\n# HELP node_ksmd_pages_volatile ksmd 'pages_volatile' file.\n# TYPE node_ksmd_pages_volatile gauge\nnode_ksmd_pages_volatile 0\n# HELP node_ksmd_run ksmd 'run' file.\n# TYPE node_ksmd_run gauge\nnode_ksmd_run 1\n# HELP node_ksmd_sleep_seconds ksmd 'sleep_millisecs' file.\n# TYPE node_ksmd_sleep_seconds gauge\nnode_ksmd_sleep_seconds 0.02\n# HELP node_lnstat_allocs_total linux network cache stats\n# TYPE node_lnstat_allocs_total counter\nnode_lnstat_allocs_total{cpu=\"0\",subsystem=\"arp_cache\"} 1\nnode_lnstat_allocs_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 240\nnode_lnstat_allocs_total{cpu=\"1\",subsystem=\"arp_cache\"} 13\nnode_lnstat_allocs_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 252\n# HELP node_lnstat_delete_list_total linux network cache stats\n# TYPE node_lnstat_delete_list_total counter\nnode_lnstat_delete_list_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_list_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_list_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_list_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_delete_total linux network cache stats\n# TYPE node_lnstat_delete_total counter\nnode_lnstat_delete_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_destroys_total linux network cache stats\n# TYPE node_lnstat_destroys_total counter\nnode_lnstat_destroys_total{cpu=\"0\",subsystem=\"arp_cache\"} 2\nnode_lnstat_destroys_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 241\nnode_lnstat_destroys_total{cpu=\"1\",subsystem=\"arp_cache\"} 14\nnode_lnstat_destroys_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 253\n# HELP node_lnstat_drop_total linux network cache stats\n# TYPE node_lnstat_drop_total counter\nnode_lnstat_drop_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_drop_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_drop_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_drop_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_early_drop_total linux network cache stats\n# TYPE node_lnstat_early_drop_total counter\nnode_lnstat_early_drop_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_early_drop_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_early_drop_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_early_drop_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_entries_total linux network cache stats\n# TYPE node_lnstat_entries_total counter\nnode_lnstat_entries_total{cpu=\"0\",subsystem=\"arp_cache\"} 20\nnode_lnstat_entries_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 36\nnode_lnstat_entries_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 33\nnode_lnstat_entries_total{cpu=\"1\",subsystem=\"arp_cache\"} 20\nnode_lnstat_entries_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 36\nnode_lnstat_entries_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 33\nnode_lnstat_entries_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 33\nnode_lnstat_entries_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 33\n# HELP node_lnstat_expect_create_total linux network cache stats\n# TYPE node_lnstat_expect_create_total counter\nnode_lnstat_expect_create_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_create_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_create_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_create_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_expect_delete_total linux network cache stats\n# TYPE node_lnstat_expect_delete_total counter\nnode_lnstat_expect_delete_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_delete_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_delete_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_delete_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_expect_new_total linux network cache stats\n# TYPE node_lnstat_expect_new_total counter\nnode_lnstat_expect_new_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_new_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_new_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_new_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_forced_gc_runs_total linux network cache stats\n# TYPE node_lnstat_forced_gc_runs_total counter\nnode_lnstat_forced_gc_runs_total{cpu=\"0\",subsystem=\"arp_cache\"} 10\nnode_lnstat_forced_gc_runs_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 249\nnode_lnstat_forced_gc_runs_total{cpu=\"1\",subsystem=\"arp_cache\"} 22\nnode_lnstat_forced_gc_runs_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 261\n# HELP node_lnstat_found_total linux network cache stats\n# TYPE node_lnstat_found_total counter\nnode_lnstat_found_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_found_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_found_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_found_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_hash_grows_total linux network cache stats\n# TYPE node_lnstat_hash_grows_total counter\nnode_lnstat_hash_grows_total{cpu=\"0\",subsystem=\"arp_cache\"} 3\nnode_lnstat_hash_grows_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 242\nnode_lnstat_hash_grows_total{cpu=\"1\",subsystem=\"arp_cache\"} 15\nnode_lnstat_hash_grows_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 254\n# HELP node_lnstat_hits_total linux network cache stats\n# TYPE node_lnstat_hits_total counter\nnode_lnstat_hits_total{cpu=\"0\",subsystem=\"arp_cache\"} 5\nnode_lnstat_hits_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 244\nnode_lnstat_hits_total{cpu=\"1\",subsystem=\"arp_cache\"} 17\nnode_lnstat_hits_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 256\n# HELP node_lnstat_icmp_error_total linux network cache stats\n# TYPE node_lnstat_icmp_error_total counter\nnode_lnstat_icmp_error_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_icmp_error_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_icmp_error_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_icmp_error_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_ignore_total linux network cache stats\n# TYPE node_lnstat_ignore_total counter\nnode_lnstat_ignore_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 22666\nnode_lnstat_ignore_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 22180\nnode_lnstat_ignore_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 22740\nnode_lnstat_ignore_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 22152\n# HELP node_lnstat_insert_failed_total linux network cache stats\n# TYPE node_lnstat_insert_failed_total counter\nnode_lnstat_insert_failed_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_failed_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_failed_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_failed_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_insert_total linux network cache stats\n# TYPE node_lnstat_insert_total counter\nnode_lnstat_insert_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_invalid_total linux network cache stats\n# TYPE node_lnstat_invalid_total counter\nnode_lnstat_invalid_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 3\nnode_lnstat_invalid_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 2\nnode_lnstat_invalid_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 1\nnode_lnstat_invalid_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 47\n# HELP node_lnstat_lookups_total linux network cache stats\n# TYPE node_lnstat_lookups_total counter\nnode_lnstat_lookups_total{cpu=\"0\",subsystem=\"arp_cache\"} 4\nnode_lnstat_lookups_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 243\nnode_lnstat_lookups_total{cpu=\"1\",subsystem=\"arp_cache\"} 16\nnode_lnstat_lookups_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 255\n# HELP node_lnstat_new_total linux network cache stats\n# TYPE node_lnstat_new_total counter\nnode_lnstat_new_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_new_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_new_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_new_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_periodic_gc_runs_total linux network cache stats\n# TYPE node_lnstat_periodic_gc_runs_total counter\nnode_lnstat_periodic_gc_runs_total{cpu=\"0\",subsystem=\"arp_cache\"} 9\nnode_lnstat_periodic_gc_runs_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 248\nnode_lnstat_periodic_gc_runs_total{cpu=\"1\",subsystem=\"arp_cache\"} 21\nnode_lnstat_periodic_gc_runs_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 260\n# HELP node_lnstat_rcv_probes_mcast_total linux network cache stats\n# TYPE node_lnstat_rcv_probes_mcast_total counter\nnode_lnstat_rcv_probes_mcast_total{cpu=\"0\",subsystem=\"arp_cache\"} 7\nnode_lnstat_rcv_probes_mcast_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 246\nnode_lnstat_rcv_probes_mcast_total{cpu=\"1\",subsystem=\"arp_cache\"} 19\nnode_lnstat_rcv_probes_mcast_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 258\n# HELP node_lnstat_rcv_probes_ucast_total linux network cache stats\n# TYPE node_lnstat_rcv_probes_ucast_total counter\nnode_lnstat_rcv_probes_ucast_total{cpu=\"0\",subsystem=\"arp_cache\"} 8\nnode_lnstat_rcv_probes_ucast_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 247\nnode_lnstat_rcv_probes_ucast_total{cpu=\"1\",subsystem=\"arp_cache\"} 20\nnode_lnstat_rcv_probes_ucast_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 259\n# HELP node_lnstat_res_failed_total linux network cache stats\n# TYPE node_lnstat_res_failed_total counter\nnode_lnstat_res_failed_total{cpu=\"0\",subsystem=\"arp_cache\"} 6\nnode_lnstat_res_failed_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 245\nnode_lnstat_res_failed_total{cpu=\"1\",subsystem=\"arp_cache\"} 18\nnode_lnstat_res_failed_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 257\n# HELP node_lnstat_search_restart_total linux network cache stats\n# TYPE node_lnstat_search_restart_total counter\nnode_lnstat_search_restart_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_search_restart_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 2\nnode_lnstat_search_restart_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 1\nnode_lnstat_search_restart_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 4\n# HELP node_lnstat_searched_total linux network cache stats\n# TYPE node_lnstat_searched_total counter\nnode_lnstat_searched_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_searched_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_searched_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_searched_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_table_fulls_total linux network cache stats\n# TYPE node_lnstat_table_fulls_total counter\nnode_lnstat_table_fulls_total{cpu=\"0\",subsystem=\"arp_cache\"} 12\nnode_lnstat_table_fulls_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 251\nnode_lnstat_table_fulls_total{cpu=\"1\",subsystem=\"arp_cache\"} 24\nnode_lnstat_table_fulls_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 263\n# HELP node_lnstat_unresolved_discards_total linux network cache stats\n# TYPE node_lnstat_unresolved_discards_total counter\nnode_lnstat_unresolved_discards_total{cpu=\"0\",subsystem=\"arp_cache\"} 11\nnode_lnstat_unresolved_discards_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 250\nnode_lnstat_unresolved_discards_total{cpu=\"1\",subsystem=\"arp_cache\"} 23\nnode_lnstat_unresolved_discards_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 262\n# HELP node_load1 1m load average.\n# TYPE node_load1 gauge\nnode_load1 0.21\n# HELP node_load15 15m load average.\n# TYPE node_load15 gauge\nnode_load15 0.39\n# HELP node_load5 5m load average.\n# TYPE node_load5 gauge\nnode_load5 0.37\n# HELP node_md_blocks Total number of blocks on device.\n# TYPE node_md_blocks gauge\nnode_md_blocks{device=\"md0\"} 248896\nnode_md_blocks{device=\"md00\"} 4.186624e+06\nnode_md_blocks{device=\"md10\"} 3.14159265e+08\nnode_md_blocks{device=\"md101\"} 322560\nnode_md_blocks{device=\"md11\"} 4.190208e+06\nnode_md_blocks{device=\"md12\"} 3.886394368e+09\nnode_md_blocks{device=\"md120\"} 2.095104e+06\nnode_md_blocks{device=\"md126\"} 1.855870976e+09\nnode_md_blocks{device=\"md127\"} 3.12319552e+08\nnode_md_blocks{device=\"md201\"} 1.993728e+06\nnode_md_blocks{device=\"md219\"} 7932\nnode_md_blocks{device=\"md3\"} 5.853468288e+09\nnode_md_blocks{device=\"md4\"} 4.883648e+06\nnode_md_blocks{device=\"md6\"} 1.95310144e+08\nnode_md_blocks{device=\"md7\"} 7.813735424e+09\nnode_md_blocks{device=\"md8\"} 1.95310144e+08\nnode_md_blocks{device=\"md9\"} 523968\n# HELP node_md_blocks_synced Number of blocks synced on device.\n# TYPE node_md_blocks_synced gauge\nnode_md_blocks_synced{device=\"md0\"} 248896\nnode_md_blocks_synced{device=\"md00\"} 4.186624e+06\nnode_md_blocks_synced{device=\"md10\"} 3.14159265e+08\nnode_md_blocks_synced{device=\"md101\"} 322560\nnode_md_blocks_synced{device=\"md11\"} 0\nnode_md_blocks_synced{device=\"md12\"} 3.886394368e+09\nnode_md_blocks_synced{device=\"md120\"} 2.095104e+06\nnode_md_blocks_synced{device=\"md126\"} 1.855870976e+09\nnode_md_blocks_synced{device=\"md127\"} 3.12319552e+08\nnode_md_blocks_synced{device=\"md201\"} 114176\nnode_md_blocks_synced{device=\"md219\"} 7932\nnode_md_blocks_synced{device=\"md3\"} 5.853468288e+09\nnode_md_blocks_synced{device=\"md4\"} 4.883648e+06\nnode_md_blocks_synced{device=\"md6\"} 1.6775552e+07\nnode_md_blocks_synced{device=\"md7\"} 7.813735424e+09\nnode_md_blocks_synced{device=\"md8\"} 1.6775552e+07\nnode_md_blocks_synced{device=\"md9\"} 0\n# HELP node_md_degraded Number of degraded disks on device.\n# TYPE node_md_degraded gauge\nnode_md_degraded{device=\"md0\"} 0\nnode_md_degraded{device=\"md1\"} 0\nnode_md_degraded{device=\"md10\"} 0\nnode_md_degraded{device=\"md4\"} 0\nnode_md_degraded{device=\"md5\"} 1\nnode_md_degraded{device=\"md6\"} 1\n# HELP node_md_disks Number of active/failed/spare disks of device.\n# TYPE node_md_disks gauge\nnode_md_disks{device=\"md0\",state=\"active\"} 2\nnode_md_disks{device=\"md0\",state=\"failed\"} 0\nnode_md_disks{device=\"md0\",state=\"spare\"} 0\nnode_md_disks{device=\"md00\",state=\"active\"} 1\nnode_md_disks{device=\"md00\",state=\"failed\"} 0\nnode_md_disks{device=\"md00\",state=\"spare\"} 0\nnode_md_disks{device=\"md10\",state=\"active\"} 2\nnode_md_disks{device=\"md10\",state=\"failed\"} 0\nnode_md_disks{device=\"md10\",state=\"spare\"} 0\nnode_md_disks{device=\"md101\",state=\"active\"} 3\nnode_md_disks{device=\"md101\",state=\"failed\"} 0\nnode_md_disks{device=\"md101\",state=\"spare\"} 0\nnode_md_disks{device=\"md11\",state=\"active\"} 2\nnode_md_disks{device=\"md11\",state=\"failed\"} 1\nnode_md_disks{device=\"md11\",state=\"spare\"} 2\nnode_md_disks{device=\"md12\",state=\"active\"} 2\nnode_md_disks{device=\"md12\",state=\"failed\"} 0\nnode_md_disks{device=\"md12\",state=\"spare\"} 0\nnode_md_disks{device=\"md120\",state=\"active\"} 2\nnode_md_disks{device=\"md120\",state=\"failed\"} 0\nnode_md_disks{device=\"md120\",state=\"spare\"} 0\nnode_md_disks{device=\"md126\",state=\"active\"} 2\nnode_md_disks{device=\"md126\",state=\"failed\"} 0\nnode_md_disks{device=\"md126\",state=\"spare\"} 0\nnode_md_disks{device=\"md127\",state=\"active\"} 2\nnode_md_disks{device=\"md127\",state=\"failed\"} 0\nnode_md_disks{device=\"md127\",state=\"spare\"} 0\nnode_md_disks{device=\"md201\",state=\"active\"} 2\nnode_md_disks{device=\"md201\",state=\"failed\"} 0\nnode_md_disks{device=\"md201\",state=\"spare\"} 0\nnode_md_disks{device=\"md219\",state=\"active\"} 0\nnode_md_disks{device=\"md219\",state=\"failed\"} 0\nnode_md_disks{device=\"md219\",state=\"spare\"} 3\nnode_md_disks{device=\"md3\",state=\"active\"} 8\nnode_md_disks{device=\"md3\",state=\"failed\"} 0\nnode_md_disks{device=\"md3\",state=\"spare\"} 2\nnode_md_disks{device=\"md4\",state=\"active\"} 0\nnode_md_disks{device=\"md4\",state=\"failed\"} 1\nnode_md_disks{device=\"md4\",state=\"spare\"} 1\nnode_md_disks{device=\"md6\",state=\"active\"} 1\nnode_md_disks{device=\"md6\",state=\"failed\"} 1\nnode_md_disks{device=\"md6\",state=\"spare\"} 1\nnode_md_disks{device=\"md7\",state=\"active\"} 3\nnode_md_disks{device=\"md7\",state=\"failed\"} 1\nnode_md_disks{device=\"md7\",state=\"spare\"} 0\nnode_md_disks{device=\"md8\",state=\"active\"} 2\nnode_md_disks{device=\"md8\",state=\"failed\"} 0\nnode_md_disks{device=\"md8\",state=\"spare\"} 2\nnode_md_disks{device=\"md9\",state=\"active\"} 4\nnode_md_disks{device=\"md9\",state=\"failed\"} 2\nnode_md_disks{device=\"md9\",state=\"spare\"} 1\n# HELP node_md_disks_required Total number of disks of device.\n# TYPE node_md_disks_required gauge\nnode_md_disks_required{device=\"md0\"} 2\nnode_md_disks_required{device=\"md00\"} 1\nnode_md_disks_required{device=\"md10\"} 2\nnode_md_disks_required{device=\"md101\"} 3\nnode_md_disks_required{device=\"md11\"} 2\nnode_md_disks_required{device=\"md12\"} 2\nnode_md_disks_required{device=\"md120\"} 2\nnode_md_disks_required{device=\"md126\"} 2\nnode_md_disks_required{device=\"md127\"} 2\nnode_md_disks_required{device=\"md201\"} 2\nnode_md_disks_required{device=\"md219\"} 0\nnode_md_disks_required{device=\"md3\"} 8\nnode_md_disks_required{device=\"md4\"} 0\nnode_md_disks_required{device=\"md6\"} 2\nnode_md_disks_required{device=\"md7\"} 4\nnode_md_disks_required{device=\"md8\"} 2\nnode_md_disks_required{device=\"md9\"} 4\n# HELP node_md_raid_disks Number of raid disks on device.\n# TYPE node_md_raid_disks gauge\nnode_md_raid_disks{device=\"md0\"} 2\nnode_md_raid_disks{device=\"md1\"} 2\nnode_md_raid_disks{device=\"md10\"} 4\nnode_md_raid_disks{device=\"md4\"} 3\nnode_md_raid_disks{device=\"md5\"} 3\nnode_md_raid_disks{device=\"md6\"} 4\n# HELP node_md_state Indicates the state of md-device.\n# TYPE node_md_state gauge\nnode_md_state{device=\"md0\",state=\"active\"} 1\nnode_md_state{device=\"md0\",state=\"check\"} 0\nnode_md_state{device=\"md0\",state=\"inactive\"} 0\nnode_md_state{device=\"md0\",state=\"recovering\"} 0\nnode_md_state{device=\"md0\",state=\"resync\"} 0\nnode_md_state{device=\"md00\",state=\"active\"} 1\nnode_md_state{device=\"md00\",state=\"check\"} 0\nnode_md_state{device=\"md00\",state=\"inactive\"} 0\nnode_md_state{device=\"md00\",state=\"recovering\"} 0\nnode_md_state{device=\"md00\",state=\"resync\"} 0\nnode_md_state{device=\"md10\",state=\"active\"} 1\nnode_md_state{device=\"md10\",state=\"check\"} 0\nnode_md_state{device=\"md10\",state=\"inactive\"} 0\nnode_md_state{device=\"md10\",state=\"recovering\"} 0\nnode_md_state{device=\"md10\",state=\"resync\"} 0\nnode_md_state{device=\"md101\",state=\"active\"} 1\nnode_md_state{device=\"md101\",state=\"check\"} 0\nnode_md_state{device=\"md101\",state=\"inactive\"} 0\nnode_md_state{device=\"md101\",state=\"recovering\"} 0\nnode_md_state{device=\"md101\",state=\"resync\"} 0\nnode_md_state{device=\"md11\",state=\"active\"} 0\nnode_md_state{device=\"md11\",state=\"check\"} 0\nnode_md_state{device=\"md11\",state=\"inactive\"} 0\nnode_md_state{device=\"md11\",state=\"recovering\"} 0\nnode_md_state{device=\"md11\",state=\"resync\"} 1\nnode_md_state{device=\"md12\",state=\"active\"} 1\nnode_md_state{device=\"md12\",state=\"check\"} 0\nnode_md_state{device=\"md12\",state=\"inactive\"} 0\nnode_md_state{device=\"md12\",state=\"recovering\"} 0\nnode_md_state{device=\"md12\",state=\"resync\"} 0\nnode_md_state{device=\"md120\",state=\"active\"} 1\nnode_md_state{device=\"md120\",state=\"check\"} 0\nnode_md_state{device=\"md120\",state=\"inactive\"} 0\nnode_md_state{device=\"md120\",state=\"recovering\"} 0\nnode_md_state{device=\"md120\",state=\"resync\"} 0\nnode_md_state{device=\"md126\",state=\"active\"} 1\nnode_md_state{device=\"md126\",state=\"check\"} 0\nnode_md_state{device=\"md126\",state=\"inactive\"} 0\nnode_md_state{device=\"md126\",state=\"recovering\"} 0\nnode_md_state{device=\"md126\",state=\"resync\"} 0\nnode_md_state{device=\"md127\",state=\"active\"} 1\nnode_md_state{device=\"md127\",state=\"check\"} 0\nnode_md_state{device=\"md127\",state=\"inactive\"} 0\nnode_md_state{device=\"md127\",state=\"recovering\"} 0\nnode_md_state{device=\"md127\",state=\"resync\"} 0\nnode_md_state{device=\"md201\",state=\"active\"} 0\nnode_md_state{device=\"md201\",state=\"check\"} 1\nnode_md_state{device=\"md201\",state=\"inactive\"} 0\nnode_md_state{device=\"md201\",state=\"recovering\"} 0\nnode_md_state{device=\"md201\",state=\"resync\"} 0\nnode_md_state{device=\"md219\",state=\"active\"} 0\nnode_md_state{device=\"md219\",state=\"check\"} 0\nnode_md_state{device=\"md219\",state=\"inactive\"} 1\nnode_md_state{device=\"md219\",state=\"recovering\"} 0\nnode_md_state{device=\"md219\",state=\"resync\"} 0\nnode_md_state{device=\"md3\",state=\"active\"} 1\nnode_md_state{device=\"md3\",state=\"check\"} 0\nnode_md_state{device=\"md3\",state=\"inactive\"} 0\nnode_md_state{device=\"md3\",state=\"recovering\"} 0\nnode_md_state{device=\"md3\",state=\"resync\"} 0\nnode_md_state{device=\"md4\",state=\"active\"} 0\nnode_md_state{device=\"md4\",state=\"check\"} 0\nnode_md_state{device=\"md4\",state=\"inactive\"} 1\nnode_md_state{device=\"md4\",state=\"recovering\"} 0\nnode_md_state{device=\"md4\",state=\"resync\"} 0\nnode_md_state{device=\"md6\",state=\"active\"} 0\nnode_md_state{device=\"md6\",state=\"check\"} 0\nnode_md_state{device=\"md6\",state=\"inactive\"} 0\nnode_md_state{device=\"md6\",state=\"recovering\"} 1\nnode_md_state{device=\"md6\",state=\"resync\"} 0\nnode_md_state{device=\"md7\",state=\"active\"} 1\nnode_md_state{device=\"md7\",state=\"check\"} 0\nnode_md_state{device=\"md7\",state=\"inactive\"} 0\nnode_md_state{device=\"md7\",state=\"recovering\"} 0\nnode_md_state{device=\"md7\",state=\"resync\"} 0\nnode_md_state{device=\"md8\",state=\"active\"} 0\nnode_md_state{device=\"md8\",state=\"check\"} 0\nnode_md_state{device=\"md8\",state=\"inactive\"} 0\nnode_md_state{device=\"md8\",state=\"recovering\"} 0\nnode_md_state{device=\"md8\",state=\"resync\"} 1\nnode_md_state{device=\"md9\",state=\"active\"} 0\nnode_md_state{device=\"md9\",state=\"check\"} 0\nnode_md_state{device=\"md9\",state=\"inactive\"} 0\nnode_md_state{device=\"md9\",state=\"recovering\"} 0\nnode_md_state{device=\"md9\",state=\"resync\"} 1\n# HELP node_memory_Active_anon_bytes Memory information field Active_anon_bytes.\n# TYPE node_memory_Active_anon_bytes gauge\nnode_memory_Active_anon_bytes 2.068484096e+09\n# HELP node_memory_Active_bytes Memory information field Active_bytes.\n# TYPE node_memory_Active_bytes gauge\nnode_memory_Active_bytes 2.287017984e+09\n# HELP node_memory_Active_file_bytes Memory information field Active_file_bytes.\n# TYPE node_memory_Active_file_bytes gauge\nnode_memory_Active_file_bytes 2.18533888e+08\n# HELP node_memory_AnonHugePages_bytes Memory information field AnonHugePages_bytes.\n# TYPE node_memory_AnonHugePages_bytes gauge\nnode_memory_AnonHugePages_bytes 0\n# HELP node_memory_AnonPages_bytes Memory information field AnonPages_bytes.\n# TYPE node_memory_AnonPages_bytes gauge\nnode_memory_AnonPages_bytes 2.298032128e+09\n# HELP node_memory_Bounce_bytes Memory information field Bounce_bytes.\n# TYPE node_memory_Bounce_bytes gauge\nnode_memory_Bounce_bytes 0\n# HELP node_memory_Buffers_bytes Memory information field Buffers_bytes.\n# TYPE node_memory_Buffers_bytes gauge\nnode_memory_Buffers_bytes 2.256896e+07\n# HELP node_memory_Cached_bytes Memory information field Cached_bytes.\n# TYPE node_memory_Cached_bytes gauge\nnode_memory_Cached_bytes 9.53229312e+08\n# HELP node_memory_CommitLimit_bytes Memory information field CommitLimit_bytes.\n# TYPE node_memory_CommitLimit_bytes gauge\nnode_memory_CommitLimit_bytes 6.210940928e+09\n# HELP node_memory_Committed_AS_bytes Memory information field Committed_AS_bytes.\n# TYPE node_memory_Committed_AS_bytes gauge\nnode_memory_Committed_AS_bytes 8.023486464e+09\n# HELP node_memory_DirectMap2M_bytes Memory information field DirectMap2M_bytes.\n# TYPE node_memory_DirectMap2M_bytes gauge\nnode_memory_DirectMap2M_bytes 3.787456512e+09\n# HELP node_memory_DirectMap4k_bytes Memory information field DirectMap4k_bytes.\n# TYPE node_memory_DirectMap4k_bytes gauge\nnode_memory_DirectMap4k_bytes 1.9011584e+08\n# HELP node_memory_Dirty_bytes Memory information field Dirty_bytes.\n# TYPE node_memory_Dirty_bytes gauge\nnode_memory_Dirty_bytes 1.077248e+06\n# HELP node_memory_HardwareCorrupted_bytes Memory information field HardwareCorrupted_bytes.\n# TYPE node_memory_HardwareCorrupted_bytes gauge\nnode_memory_HardwareCorrupted_bytes 0\n# HELP node_memory_HugePages_Free Memory information field HugePages_Free.\n# TYPE node_memory_HugePages_Free gauge\nnode_memory_HugePages_Free 0\n# HELP node_memory_HugePages_Rsvd Memory information field HugePages_Rsvd.\n# TYPE node_memory_HugePages_Rsvd gauge\nnode_memory_HugePages_Rsvd 0\n# HELP node_memory_HugePages_Surp Memory information field HugePages_Surp.\n# TYPE node_memory_HugePages_Surp gauge\nnode_memory_HugePages_Surp 0\n# HELP node_memory_HugePages_Total Memory information field HugePages_Total.\n# TYPE node_memory_HugePages_Total gauge\nnode_memory_HugePages_Total 0\n# HELP node_memory_Hugepagesize_bytes Memory information field Hugepagesize_bytes.\n# TYPE node_memory_Hugepagesize_bytes gauge\nnode_memory_Hugepagesize_bytes 2.097152e+06\n# HELP node_memory_Inactive_anon_bytes Memory information field Inactive_anon_bytes.\n# TYPE node_memory_Inactive_anon_bytes gauge\nnode_memory_Inactive_anon_bytes 9.04245248e+08\n# HELP node_memory_Inactive_bytes Memory information field Inactive_bytes.\n# TYPE node_memory_Inactive_bytes gauge\nnode_memory_Inactive_bytes 1.053417472e+09\n# HELP node_memory_Inactive_file_bytes Memory information field Inactive_file_bytes.\n# TYPE node_memory_Inactive_file_bytes gauge\nnode_memory_Inactive_file_bytes 1.49172224e+08\n# HELP node_memory_KernelStack_bytes Memory information field KernelStack_bytes.\n# TYPE node_memory_KernelStack_bytes gauge\nnode_memory_KernelStack_bytes 5.9392e+06\n# HELP node_memory_Mapped_bytes Memory information field Mapped_bytes.\n# TYPE node_memory_Mapped_bytes gauge\nnode_memory_Mapped_bytes 2.4496128e+08\n# HELP node_memory_MemFree_bytes Memory information field MemFree_bytes.\n# TYPE node_memory_MemFree_bytes gauge\nnode_memory_MemFree_bytes 2.30883328e+08\n# HELP node_memory_MemTotal_bytes Memory information field MemTotal_bytes.\n# TYPE node_memory_MemTotal_bytes gauge\nnode_memory_MemTotal_bytes 3.831959552e+09\n# HELP node_memory_Mlocked_bytes Memory information field Mlocked_bytes.\n# TYPE node_memory_Mlocked_bytes gauge\nnode_memory_Mlocked_bytes 32768\n# HELP node_memory_NFS_Unstable_bytes Memory information field NFS_Unstable_bytes.\n# TYPE node_memory_NFS_Unstable_bytes gauge\nnode_memory_NFS_Unstable_bytes 0\n# HELP node_memory_PageTables_bytes Memory information field PageTables_bytes.\n# TYPE node_memory_PageTables_bytes gauge\nnode_memory_PageTables_bytes 7.7017088e+07\n# HELP node_memory_SReclaimable_bytes Memory information field SReclaimable_bytes.\n# TYPE node_memory_SReclaimable_bytes gauge\nnode_memory_SReclaimable_bytes 4.5846528e+07\n# HELP node_memory_SUnreclaim_bytes Memory information field SUnreclaim_bytes.\n# TYPE node_memory_SUnreclaim_bytes gauge\nnode_memory_SUnreclaim_bytes 5.545984e+07\n# HELP node_memory_Shmem_bytes Memory information field Shmem_bytes.\n# TYPE node_memory_Shmem_bytes gauge\nnode_memory_Shmem_bytes 6.0809216e+08\n# HELP node_memory_Slab_bytes Memory information field Slab_bytes.\n# TYPE node_memory_Slab_bytes gauge\nnode_memory_Slab_bytes 1.01306368e+08\n# HELP node_memory_SwapCached_bytes Memory information field SwapCached_bytes.\n# TYPE node_memory_SwapCached_bytes gauge\nnode_memory_SwapCached_bytes 1.97124096e+08\n# HELP node_memory_SwapFree_bytes Memory information field SwapFree_bytes.\n# TYPE node_memory_SwapFree_bytes gauge\nnode_memory_SwapFree_bytes 3.23108864e+09\n# HELP node_memory_SwapTotal_bytes Memory information field SwapTotal_bytes.\n# TYPE node_memory_SwapTotal_bytes gauge\nnode_memory_SwapTotal_bytes 4.2949632e+09\n# HELP node_memory_Unevictable_bytes Memory information field Unevictable_bytes.\n# TYPE node_memory_Unevictable_bytes gauge\nnode_memory_Unevictable_bytes 32768\n# HELP node_memory_VmallocChunk_bytes Memory information field VmallocChunk_bytes.\n# TYPE node_memory_VmallocChunk_bytes gauge\nnode_memory_VmallocChunk_bytes 3.5183963009024e+13\n# HELP node_memory_VmallocTotal_bytes Memory information field VmallocTotal_bytes.\n# TYPE node_memory_VmallocTotal_bytes gauge\nnode_memory_VmallocTotal_bytes 3.5184372087808e+13\n# HELP node_memory_VmallocUsed_bytes Memory information field VmallocUsed_bytes.\n# TYPE node_memory_VmallocUsed_bytes gauge\nnode_memory_VmallocUsed_bytes 3.6130816e+08\n# HELP node_memory_WritebackTmp_bytes Memory information field WritebackTmp_bytes.\n# TYPE node_memory_WritebackTmp_bytes gauge\nnode_memory_WritebackTmp_bytes 0\n# HELP node_memory_Writeback_bytes Memory information field Writeback_bytes.\n# TYPE node_memory_Writeback_bytes gauge\nnode_memory_Writeback_bytes 0\n# HELP node_memory_numa_Active Memory information field Active.\n# TYPE node_memory_numa_Active gauge\nnode_memory_numa_Active{node=\"0\"} 5.58733312e+09\nnode_memory_numa_Active{node=\"1\"} 5.739003904e+09\nnode_memory_numa_Active{node=\"2\"} 5.739003904e+09\n# HELP node_memory_numa_Active_anon Memory information field Active_anon.\n# TYPE node_memory_numa_Active_anon gauge\nnode_memory_numa_Active_anon{node=\"0\"} 7.07915776e+08\nnode_memory_numa_Active_anon{node=\"1\"} 6.04635136e+08\nnode_memory_numa_Active_anon{node=\"2\"} 6.04635136e+08\n# HELP node_memory_numa_Active_file Memory information field Active_file.\n# TYPE node_memory_numa_Active_file gauge\nnode_memory_numa_Active_file{node=\"0\"} 4.879417344e+09\nnode_memory_numa_Active_file{node=\"1\"} 5.134368768e+09\nnode_memory_numa_Active_file{node=\"2\"} 5.134368768e+09\n# HELP node_memory_numa_AnonHugePages Memory information field AnonHugePages.\n# TYPE node_memory_numa_AnonHugePages gauge\nnode_memory_numa_AnonHugePages{node=\"0\"} 1.50994944e+08\nnode_memory_numa_AnonHugePages{node=\"1\"} 9.2274688e+07\nnode_memory_numa_AnonHugePages{node=\"2\"} 9.2274688e+07\n# HELP node_memory_numa_AnonPages Memory information field AnonPages.\n# TYPE node_memory_numa_AnonPages gauge\nnode_memory_numa_AnonPages{node=\"0\"} 8.07112704e+08\nnode_memory_numa_AnonPages{node=\"1\"} 6.88058368e+08\nnode_memory_numa_AnonPages{node=\"2\"} 6.88058368e+08\n# HELP node_memory_numa_Bounce Memory information field Bounce.\n# TYPE node_memory_numa_Bounce gauge\nnode_memory_numa_Bounce{node=\"0\"} 0\nnode_memory_numa_Bounce{node=\"1\"} 0\nnode_memory_numa_Bounce{node=\"2\"} 0\n# HELP node_memory_numa_Dirty Memory information field Dirty.\n# TYPE node_memory_numa_Dirty gauge\nnode_memory_numa_Dirty{node=\"0\"} 20480\nnode_memory_numa_Dirty{node=\"1\"} 122880\nnode_memory_numa_Dirty{node=\"2\"} 122880\n# HELP node_memory_numa_FilePages Memory information field FilePages.\n# TYPE node_memory_numa_FilePages gauge\nnode_memory_numa_FilePages{node=\"0\"} 7.1855017984e+10\nnode_memory_numa_FilePages{node=\"1\"} 8.5585088512e+10\nnode_memory_numa_FilePages{node=\"2\"} 8.5585088512e+10\n# HELP node_memory_numa_HugePages_Free Memory information field HugePages_Free.\n# TYPE node_memory_numa_HugePages_Free gauge\nnode_memory_numa_HugePages_Free{node=\"0\"} 0\nnode_memory_numa_HugePages_Free{node=\"1\"} 0\nnode_memory_numa_HugePages_Free{node=\"2\"} 0\n# HELP node_memory_numa_HugePages_Surp Memory information field HugePages_Surp.\n# TYPE node_memory_numa_HugePages_Surp gauge\nnode_memory_numa_HugePages_Surp{node=\"0\"} 0\nnode_memory_numa_HugePages_Surp{node=\"1\"} 0\nnode_memory_numa_HugePages_Surp{node=\"2\"} 0\n# HELP node_memory_numa_HugePages_Total Memory information field HugePages_Total.\n# TYPE node_memory_numa_HugePages_Total gauge\nnode_memory_numa_HugePages_Total{node=\"0\"} 0\nnode_memory_numa_HugePages_Total{node=\"1\"} 0\nnode_memory_numa_HugePages_Total{node=\"2\"} 0\n# HELP node_memory_numa_Inactive Memory information field Inactive.\n# TYPE node_memory_numa_Inactive gauge\nnode_memory_numa_Inactive{node=\"0\"} 6.0569788416e+10\nnode_memory_numa_Inactive{node=\"1\"} 7.3165406208e+10\nnode_memory_numa_Inactive{node=\"2\"} 7.3165406208e+10\n# HELP node_memory_numa_Inactive_anon Memory information field Inactive_anon.\n# TYPE node_memory_numa_Inactive_anon gauge\nnode_memory_numa_Inactive_anon{node=\"0\"} 3.48626944e+08\nnode_memory_numa_Inactive_anon{node=\"1\"} 2.91930112e+08\nnode_memory_numa_Inactive_anon{node=\"2\"} 2.91930112e+08\n# HELP node_memory_numa_Inactive_file Memory information field Inactive_file.\n# TYPE node_memory_numa_Inactive_file gauge\nnode_memory_numa_Inactive_file{node=\"0\"} 6.0221161472e+10\nnode_memory_numa_Inactive_file{node=\"1\"} 7.2873476096e+10\nnode_memory_numa_Inactive_file{node=\"2\"} 7.2873476096e+10\n# HELP node_memory_numa_KernelStack Memory information field KernelStack.\n# TYPE node_memory_numa_KernelStack gauge\nnode_memory_numa_KernelStack{node=\"0\"} 3.4832384e+07\nnode_memory_numa_KernelStack{node=\"1\"} 3.1850496e+07\nnode_memory_numa_KernelStack{node=\"2\"} 3.1850496e+07\n# HELP node_memory_numa_Mapped Memory information field Mapped.\n# TYPE node_memory_numa_Mapped gauge\nnode_memory_numa_Mapped{node=\"0\"} 9.1570176e+08\nnode_memory_numa_Mapped{node=\"1\"} 8.84850688e+08\nnode_memory_numa_Mapped{node=\"2\"} 8.84850688e+08\n# HELP node_memory_numa_MemFree Memory information field MemFree.\n# TYPE node_memory_numa_MemFree gauge\nnode_memory_numa_MemFree{node=\"0\"} 5.4303100928e+10\nnode_memory_numa_MemFree{node=\"1\"} 4.0586022912e+10\nnode_memory_numa_MemFree{node=\"2\"} 4.0586022912e+10\n# HELP node_memory_numa_MemTotal Memory information field MemTotal.\n# TYPE node_memory_numa_MemTotal gauge\nnode_memory_numa_MemTotal{node=\"0\"} 1.3740271616e+11\nnode_memory_numa_MemTotal{node=\"1\"} 1.37438953472e+11\nnode_memory_numa_MemTotal{node=\"2\"} 1.37438953472e+11\n# HELP node_memory_numa_MemUsed Memory information field MemUsed.\n# TYPE node_memory_numa_MemUsed gauge\nnode_memory_numa_MemUsed{node=\"0\"} 8.3099615232e+10\nnode_memory_numa_MemUsed{node=\"1\"} 9.685293056e+10\nnode_memory_numa_MemUsed{node=\"2\"} 9.685293056e+10\n# HELP node_memory_numa_Mlocked Memory information field Mlocked.\n# TYPE node_memory_numa_Mlocked gauge\nnode_memory_numa_Mlocked{node=\"0\"} 0\nnode_memory_numa_Mlocked{node=\"1\"} 0\nnode_memory_numa_Mlocked{node=\"2\"} 0\n# HELP node_memory_numa_NFS_Unstable Memory information field NFS_Unstable.\n# TYPE node_memory_numa_NFS_Unstable gauge\nnode_memory_numa_NFS_Unstable{node=\"0\"} 0\nnode_memory_numa_NFS_Unstable{node=\"1\"} 0\nnode_memory_numa_NFS_Unstable{node=\"2\"} 0\n# HELP node_memory_numa_PageTables Memory information field PageTables.\n# TYPE node_memory_numa_PageTables gauge\nnode_memory_numa_PageTables{node=\"0\"} 1.46743296e+08\nnode_memory_numa_PageTables{node=\"1\"} 1.27254528e+08\nnode_memory_numa_PageTables{node=\"2\"} 1.27254528e+08\n# HELP node_memory_numa_SReclaimable Memory information field SReclaimable.\n# TYPE node_memory_numa_SReclaimable gauge\nnode_memory_numa_SReclaimable{node=\"0\"} 4.580478976e+09\nnode_memory_numa_SReclaimable{node=\"1\"} 4.724822016e+09\nnode_memory_numa_SReclaimable{node=\"2\"} 4.724822016e+09\n# HELP node_memory_numa_SUnreclaim Memory information field SUnreclaim.\n# TYPE node_memory_numa_SUnreclaim gauge\nnode_memory_numa_SUnreclaim{node=\"0\"} 2.23352832e+09\nnode_memory_numa_SUnreclaim{node=\"1\"} 2.464391168e+09\nnode_memory_numa_SUnreclaim{node=\"2\"} 2.464391168e+09\n# HELP node_memory_numa_Shmem Memory information field Shmem.\n# TYPE node_memory_numa_Shmem gauge\nnode_memory_numa_Shmem{node=\"0\"} 4.900864e+07\nnode_memory_numa_Shmem{node=\"1\"} 8.968192e+07\nnode_memory_numa_Shmem{node=\"2\"} 8.968192e+07\n# HELP node_memory_numa_Slab Memory information field Slab.\n# TYPE node_memory_numa_Slab gauge\nnode_memory_numa_Slab{node=\"0\"} 6.814007296e+09\nnode_memory_numa_Slab{node=\"1\"} 7.189213184e+09\nnode_memory_numa_Slab{node=\"2\"} 7.189213184e+09\n# HELP node_memory_numa_Unevictable Memory information field Unevictable.\n# TYPE node_memory_numa_Unevictable gauge\nnode_memory_numa_Unevictable{node=\"0\"} 0\nnode_memory_numa_Unevictable{node=\"1\"} 0\nnode_memory_numa_Unevictable{node=\"2\"} 0\n# HELP node_memory_numa_Writeback Memory information field Writeback.\n# TYPE node_memory_numa_Writeback gauge\nnode_memory_numa_Writeback{node=\"0\"} 0\nnode_memory_numa_Writeback{node=\"1\"} 0\nnode_memory_numa_Writeback{node=\"2\"} 0\n# HELP node_memory_numa_WritebackTmp Memory information field WritebackTmp.\n# TYPE node_memory_numa_WritebackTmp gauge\nnode_memory_numa_WritebackTmp{node=\"0\"} 0\nnode_memory_numa_WritebackTmp{node=\"1\"} 0\nnode_memory_numa_WritebackTmp{node=\"2\"} 0\n# HELP node_memory_numa_interleave_hit_total Memory information field interleave_hit_total.\n# TYPE node_memory_numa_interleave_hit_total counter\nnode_memory_numa_interleave_hit_total{node=\"0\"} 57146\nnode_memory_numa_interleave_hit_total{node=\"1\"} 57286\nnode_memory_numa_interleave_hit_total{node=\"2\"} 7286\n# HELP node_memory_numa_local_node_total Memory information field local_node_total.\n# TYPE node_memory_numa_local_node_total counter\nnode_memory_numa_local_node_total{node=\"0\"} 1.93454780853e+11\nnode_memory_numa_local_node_total{node=\"1\"} 3.2671904655e+11\nnode_memory_numa_local_node_total{node=\"2\"} 2.671904655e+10\n# HELP node_memory_numa_numa_foreign_total Memory information field numa_foreign_total.\n# TYPE node_memory_numa_numa_foreign_total counter\nnode_memory_numa_numa_foreign_total{node=\"0\"} 5.98586233e+10\nnode_memory_numa_numa_foreign_total{node=\"1\"} 1.2624528e+07\nnode_memory_numa_numa_foreign_total{node=\"2\"} 2.624528e+06\n# HELP node_memory_numa_numa_hit_total Memory information field numa_hit_total.\n# TYPE node_memory_numa_numa_hit_total counter\nnode_memory_numa_numa_hit_total{node=\"0\"} 1.93460335812e+11\nnode_memory_numa_numa_hit_total{node=\"1\"} 3.26720946761e+11\nnode_memory_numa_numa_hit_total{node=\"2\"} 2.6720946761e+10\n# HELP node_memory_numa_numa_miss_total Memory information field numa_miss_total.\n# TYPE node_memory_numa_numa_miss_total counter\nnode_memory_numa_numa_miss_total{node=\"0\"} 1.2624528e+07\nnode_memory_numa_numa_miss_total{node=\"1\"} 5.9858626709e+10\nnode_memory_numa_numa_miss_total{node=\"2\"} 9.858626709e+09\n# HELP node_memory_numa_other_node_total Memory information field other_node_total.\n# TYPE node_memory_numa_other_node_total counter\nnode_memory_numa_other_node_total{node=\"0\"} 1.8179487e+07\nnode_memory_numa_other_node_total{node=\"1\"} 5.986052692e+10\nnode_memory_numa_other_node_total{node=\"2\"} 9.86052692e+09\n# HELP node_mountstats_nfs_age_seconds_total The age of the NFS mount in seconds.\n# TYPE node_mountstats_nfs_age_seconds_total counter\nnode_mountstats_nfs_age_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 13968\nnode_mountstats_nfs_age_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 13968\n# HELP node_mountstats_nfs_direct_read_bytes_total Number of bytes read using the read() syscall in O_DIRECT mode.\n# TYPE node_mountstats_nfs_direct_read_bytes_total counter\nnode_mountstats_nfs_direct_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_direct_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_direct_write_bytes_total Number of bytes written using the write() syscall in O_DIRECT mode.\n# TYPE node_mountstats_nfs_direct_write_bytes_total counter\nnode_mountstats_nfs_direct_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_direct_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_attribute_invalidate_total Number of times cached inode attributes are invalidated.\n# TYPE node_mountstats_nfs_event_attribute_invalidate_total counter\nnode_mountstats_nfs_event_attribute_invalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_attribute_invalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_data_invalidate_total Number of times an inode cache is cleared.\n# TYPE node_mountstats_nfs_event_data_invalidate_total counter\nnode_mountstats_nfs_event_data_invalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_data_invalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_dnode_revalidate_total Number of times cached dentry nodes are re-validated from the server.\n# TYPE node_mountstats_nfs_event_dnode_revalidate_total counter\nnode_mountstats_nfs_event_dnode_revalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 226\nnode_mountstats_nfs_event_dnode_revalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 226\n# HELP node_mountstats_nfs_event_inode_revalidate_total Number of times cached inode attributes are re-validated from the server.\n# TYPE node_mountstats_nfs_event_inode_revalidate_total counter\nnode_mountstats_nfs_event_inode_revalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 52\nnode_mountstats_nfs_event_inode_revalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 52\n# HELP node_mountstats_nfs_event_jukebox_delay_total Number of times the NFS server indicated EJUKEBOX; retrieving data from offline storage.\n# TYPE node_mountstats_nfs_event_jukebox_delay_total counter\nnode_mountstats_nfs_event_jukebox_delay_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_jukebox_delay_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_pnfs_read_total Number of NFS v4.1+ pNFS reads.\n# TYPE node_mountstats_nfs_event_pnfs_read_total counter\nnode_mountstats_nfs_event_pnfs_read_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_pnfs_read_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_pnfs_write_total Number of NFS v4.1+ pNFS writes.\n# TYPE node_mountstats_nfs_event_pnfs_write_total counter\nnode_mountstats_nfs_event_pnfs_write_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_pnfs_write_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_short_read_total Number of times the NFS server gave less data than expected while reading.\n# TYPE node_mountstats_nfs_event_short_read_total counter\nnode_mountstats_nfs_event_short_read_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_short_read_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_short_write_total Number of times the NFS server wrote less data than expected while writing.\n# TYPE node_mountstats_nfs_event_short_write_total counter\nnode_mountstats_nfs_event_short_write_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_short_write_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_silly_rename_total Number of times a file was removed while still open by another process.\n# TYPE node_mountstats_nfs_event_silly_rename_total counter\nnode_mountstats_nfs_event_silly_rename_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_silly_rename_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_truncation_total Number of times files have been truncated.\n# TYPE node_mountstats_nfs_event_truncation_total counter\nnode_mountstats_nfs_event_truncation_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_truncation_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_access_total Number of times permissions have been checked.\n# TYPE node_mountstats_nfs_event_vfs_access_total counter\nnode_mountstats_nfs_event_vfs_access_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 398\nnode_mountstats_nfs_event_vfs_access_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 398\n# HELP node_mountstats_nfs_event_vfs_file_release_total Number of times files have been closed and released.\n# TYPE node_mountstats_nfs_event_vfs_file_release_total counter\nnode_mountstats_nfs_event_vfs_file_release_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 77\nnode_mountstats_nfs_event_vfs_file_release_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 77\n# HELP node_mountstats_nfs_event_vfs_flush_total Number of pending writes that have been forcefully flushed to the server.\n# TYPE node_mountstats_nfs_event_vfs_flush_total counter\nnode_mountstats_nfs_event_vfs_flush_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 77\nnode_mountstats_nfs_event_vfs_flush_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 77\n# HELP node_mountstats_nfs_event_vfs_fsync_total Number of times fsync() has been called on directories and files.\n# TYPE node_mountstats_nfs_event_vfs_fsync_total counter\nnode_mountstats_nfs_event_vfs_fsync_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_fsync_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_getdents_total Number of times directory entries have been read with getdents().\n# TYPE node_mountstats_nfs_event_vfs_getdents_total counter\nnode_mountstats_nfs_event_vfs_getdents_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_getdents_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_lock_total Number of times locking has been attempted on a file.\n# TYPE node_mountstats_nfs_event_vfs_lock_total counter\nnode_mountstats_nfs_event_vfs_lock_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_lock_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_lookup_total Number of times a directory lookup has occurred.\n# TYPE node_mountstats_nfs_event_vfs_lookup_total counter\nnode_mountstats_nfs_event_vfs_lookup_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 13\nnode_mountstats_nfs_event_vfs_lookup_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 13\n# HELP node_mountstats_nfs_event_vfs_open_total Number of times cached inode attributes are invalidated.\n# TYPE node_mountstats_nfs_event_vfs_open_total counter\nnode_mountstats_nfs_event_vfs_open_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 1\nnode_mountstats_nfs_event_vfs_open_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 1\n# HELP node_mountstats_nfs_event_vfs_read_page_total Number of pages read directly via mmap()'d files.\n# TYPE node_mountstats_nfs_event_vfs_read_page_total counter\nnode_mountstats_nfs_event_vfs_read_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_read_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_read_pages_total Number of times a group of pages have been read.\n# TYPE node_mountstats_nfs_event_vfs_read_pages_total counter\nnode_mountstats_nfs_event_vfs_read_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 331\nnode_mountstats_nfs_event_vfs_read_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 331\n# HELP node_mountstats_nfs_event_vfs_setattr_total Number of times directory entries have been read with getdents().\n# TYPE node_mountstats_nfs_event_vfs_setattr_total counter\nnode_mountstats_nfs_event_vfs_setattr_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_setattr_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_update_page_total Number of updates (and potential writes) to pages.\n# TYPE node_mountstats_nfs_event_vfs_update_page_total counter\nnode_mountstats_nfs_event_vfs_update_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_update_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_write_page_total Number of pages written directly via mmap()'d files.\n# TYPE node_mountstats_nfs_event_vfs_write_page_total counter\nnode_mountstats_nfs_event_vfs_write_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_write_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_write_pages_total Number of times a group of pages have been written.\n# TYPE node_mountstats_nfs_event_vfs_write_pages_total counter\nnode_mountstats_nfs_event_vfs_write_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 47\nnode_mountstats_nfs_event_vfs_write_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 47\n# HELP node_mountstats_nfs_event_write_extension_total Number of times a file has been grown due to writes beyond its existing end.\n# TYPE node_mountstats_nfs_event_write_extension_total counter\nnode_mountstats_nfs_event_write_extension_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_write_extension_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_major_timeouts_total Number of times a request has had a major timeout for a given operation.\n# TYPE node_mountstats_nfs_operations_major_timeouts_total counter\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_queue_time_seconds_total Duration all requests spent queued for transmission for a given operation before they were sent, in seconds.\n# TYPE node_mountstats_nfs_operations_queue_time_seconds_total counter\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 9.007044786793922e+12\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 0.006\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 0.006\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_received_bytes_total Number of bytes received for a given operation, including RPC headers and payload.\n# TYPE node_mountstats_nfs_operations_received_bytes_total counter\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 3.62996810236e+11\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 1.210292152e+09\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 1.210292152e+09\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_request_time_seconds_total Duration all requests took from when a request was enqueued to when it was completely handled for a given operation, in seconds.\n# TYPE node_mountstats_nfs_operations_request_time_seconds_total counter\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 1.953587717e+06\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 79.407\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 79.407\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_requests_total Number of requests performed for a given operation.\n# TYPE node_mountstats_nfs_operations_requests_total counter\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 2.927395007e+09\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 1298\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 1298\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_response_time_seconds_total Duration all requests took to get a reply back after a request for a given operation was transmitted, in seconds.\n# TYPE node_mountstats_nfs_operations_response_time_seconds_total counter\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 1.667369447e+06\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 79.386\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 79.386\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_sent_bytes_total Number of bytes sent for a given operation, including RPC headers and payload.\n# TYPE node_mountstats_nfs_operations_sent_bytes_total counter\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 5.26931094212e+11\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 207680\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 207680\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_transmissions_total Number of times an actual RPC request has been transmitted for a given operation.\n# TYPE node_mountstats_nfs_operations_transmissions_total counter\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 2.927394995e+09\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 1298\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 1298\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_read_bytes_total Number of bytes read using the read() syscall.\n# TYPE node_mountstats_nfs_read_bytes_total counter\nnode_mountstats_nfs_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 1.20764023e+09\nnode_mountstats_nfs_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 1.20764023e+09\n# HELP node_mountstats_nfs_read_pages_total Number of pages read directly via mmap()'d files.\n# TYPE node_mountstats_nfs_read_pages_total counter\nnode_mountstats_nfs_read_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 295483\nnode_mountstats_nfs_read_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 295483\n# HELP node_mountstats_nfs_total_read_bytes_total Number of bytes read from the NFS server, in total.\n# TYPE node_mountstats_nfs_total_read_bytes_total counter\nnode_mountstats_nfs_total_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 1.210214218e+09\nnode_mountstats_nfs_total_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 1.210214218e+09\n# HELP node_mountstats_nfs_total_write_bytes_total Number of bytes written to the NFS server, in total.\n# TYPE node_mountstats_nfs_total_write_bytes_total counter\nnode_mountstats_nfs_total_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_total_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_transport_backlog_queue_total Total number of items added to the RPC backlog queue.\n# TYPE node_mountstats_nfs_transport_backlog_queue_total counter\nnode_mountstats_nfs_transport_backlog_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 0\nnode_mountstats_nfs_transport_backlog_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_bad_transaction_ids_total Number of times the NFS server sent a response with a transaction ID unknown to this client.\n# TYPE node_mountstats_nfs_transport_bad_transaction_ids_total counter\nnode_mountstats_nfs_transport_bad_transaction_ids_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 0\nnode_mountstats_nfs_transport_bad_transaction_ids_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_bind_total Number of times the client has had to establish a connection from scratch to the NFS server.\n# TYPE node_mountstats_nfs_transport_bind_total counter\nnode_mountstats_nfs_transport_bind_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 0\nnode_mountstats_nfs_transport_bind_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_connect_total Number of times the client has made a TCP connection to the NFS server.\n# TYPE node_mountstats_nfs_transport_connect_total counter\nnode_mountstats_nfs_transport_connect_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 1\nnode_mountstats_nfs_transport_connect_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_idle_time_seconds Duration since the NFS mount last saw any RPC traffic, in seconds.\n# TYPE node_mountstats_nfs_transport_idle_time_seconds gauge\nnode_mountstats_nfs_transport_idle_time_seconds{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 11\nnode_mountstats_nfs_transport_idle_time_seconds{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_maximum_rpc_slots Maximum number of simultaneously active RPC requests ever used.\n# TYPE node_mountstats_nfs_transport_maximum_rpc_slots gauge\nnode_mountstats_nfs_transport_maximum_rpc_slots{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 24\nnode_mountstats_nfs_transport_maximum_rpc_slots{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 24\n# HELP node_mountstats_nfs_transport_pending_queue_total Total number of items added to the RPC transmission pending queue.\n# TYPE node_mountstats_nfs_transport_pending_queue_total counter\nnode_mountstats_nfs_transport_pending_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 5726\nnode_mountstats_nfs_transport_pending_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 5726\n# HELP node_mountstats_nfs_transport_receives_total Number of RPC responses for this mount received from the NFS server.\n# TYPE node_mountstats_nfs_transport_receives_total counter\nnode_mountstats_nfs_transport_receives_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 6428\nnode_mountstats_nfs_transport_receives_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 6428\n# HELP node_mountstats_nfs_transport_sending_queue_total Total number of items added to the RPC transmission sending queue.\n# TYPE node_mountstats_nfs_transport_sending_queue_total counter\nnode_mountstats_nfs_transport_sending_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 26\nnode_mountstats_nfs_transport_sending_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 26\n# HELP node_mountstats_nfs_transport_sends_total Number of RPC requests for this mount sent to the NFS server.\n# TYPE node_mountstats_nfs_transport_sends_total counter\nnode_mountstats_nfs_transport_sends_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 6428\nnode_mountstats_nfs_transport_sends_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 6428\n# HELP node_mountstats_nfs_write_bytes_total Number of bytes written using the write() syscall.\n# TYPE node_mountstats_nfs_write_bytes_total counter\nnode_mountstats_nfs_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_write_pages_total Number of pages written directly via mmap()'d files.\n# TYPE node_mountstats_nfs_write_pages_total counter\nnode_mountstats_nfs_write_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_write_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_netstat_Icmp6_InErrors Statistic Icmp6InErrors.\n# TYPE node_netstat_Icmp6_InErrors untyped\nnode_netstat_Icmp6_InErrors 0\n# HELP node_netstat_Icmp6_InMsgs Statistic Icmp6InMsgs.\n# TYPE node_netstat_Icmp6_InMsgs untyped\nnode_netstat_Icmp6_InMsgs 0\n# HELP node_netstat_Icmp6_OutMsgs Statistic Icmp6OutMsgs.\n# TYPE node_netstat_Icmp6_OutMsgs untyped\nnode_netstat_Icmp6_OutMsgs 8\n# HELP node_netstat_Icmp_InErrors Statistic IcmpInErrors.\n# TYPE node_netstat_Icmp_InErrors untyped\nnode_netstat_Icmp_InErrors 0\n# HELP node_netstat_Icmp_InMsgs Statistic IcmpInMsgs.\n# TYPE node_netstat_Icmp_InMsgs untyped\nnode_netstat_Icmp_InMsgs 104\n# HELP node_netstat_Icmp_OutMsgs Statistic IcmpOutMsgs.\n# TYPE node_netstat_Icmp_OutMsgs untyped\nnode_netstat_Icmp_OutMsgs 120\n# HELP node_netstat_Ip6_InOctets Statistic Ip6InOctets.\n# TYPE node_netstat_Ip6_InOctets untyped\nnode_netstat_Ip6_InOctets 460\n# HELP node_netstat_Ip6_OutOctets Statistic Ip6OutOctets.\n# TYPE node_netstat_Ip6_OutOctets untyped\nnode_netstat_Ip6_OutOctets 536\n# HELP node_netstat_IpExt_InOctets Statistic IpExtInOctets.\n# TYPE node_netstat_IpExt_InOctets untyped\nnode_netstat_IpExt_InOctets 6.28639697e+09\n# HELP node_netstat_IpExt_OutOctets Statistic IpExtOutOctets.\n# TYPE node_netstat_IpExt_OutOctets untyped\nnode_netstat_IpExt_OutOctets 2.786264347e+09\n# HELP node_netstat_Ip_Forwarding Statistic IpForwarding.\n# TYPE node_netstat_Ip_Forwarding untyped\nnode_netstat_Ip_Forwarding 1\n# HELP node_netstat_TcpExt_ListenDrops Statistic TcpExtListenDrops.\n# TYPE node_netstat_TcpExt_ListenDrops untyped\nnode_netstat_TcpExt_ListenDrops 0\n# HELP node_netstat_TcpExt_ListenOverflows Statistic TcpExtListenOverflows.\n# TYPE node_netstat_TcpExt_ListenOverflows untyped\nnode_netstat_TcpExt_ListenOverflows 0\n# HELP node_netstat_TcpExt_SyncookiesFailed Statistic TcpExtSyncookiesFailed.\n# TYPE node_netstat_TcpExt_SyncookiesFailed untyped\nnode_netstat_TcpExt_SyncookiesFailed 2\n# HELP node_netstat_TcpExt_SyncookiesRecv Statistic TcpExtSyncookiesRecv.\n# TYPE node_netstat_TcpExt_SyncookiesRecv untyped\nnode_netstat_TcpExt_SyncookiesRecv 0\n# HELP node_netstat_TcpExt_SyncookiesSent Statistic TcpExtSyncookiesSent.\n# TYPE node_netstat_TcpExt_SyncookiesSent untyped\nnode_netstat_TcpExt_SyncookiesSent 0\n# HELP node_netstat_TcpExt_TCPOFOQueue Statistic TcpExtTCPOFOQueue.\n# TYPE node_netstat_TcpExt_TCPOFOQueue untyped\nnode_netstat_TcpExt_TCPOFOQueue 42\n# HELP node_netstat_TcpExt_TCPRcvQDrop Statistic TcpExtTCPRcvQDrop.\n# TYPE node_netstat_TcpExt_TCPRcvQDrop untyped\nnode_netstat_TcpExt_TCPRcvQDrop 131\n# HELP node_netstat_TcpExt_TCPTimeouts Statistic TcpExtTCPTimeouts.\n# TYPE node_netstat_TcpExt_TCPTimeouts untyped\nnode_netstat_TcpExt_TCPTimeouts 115\n# HELP node_netstat_Tcp_ActiveOpens Statistic TcpActiveOpens.\n# TYPE node_netstat_Tcp_ActiveOpens untyped\nnode_netstat_Tcp_ActiveOpens 3556\n# HELP node_netstat_Tcp_CurrEstab Statistic TcpCurrEstab.\n# TYPE node_netstat_Tcp_CurrEstab untyped\nnode_netstat_Tcp_CurrEstab 0\n# HELP node_netstat_Tcp_InErrs Statistic TcpInErrs.\n# TYPE node_netstat_Tcp_InErrs untyped\nnode_netstat_Tcp_InErrs 5\n# HELP node_netstat_Tcp_InSegs Statistic TcpInSegs.\n# TYPE node_netstat_Tcp_InSegs untyped\nnode_netstat_Tcp_InSegs 5.7252008e+07\n# HELP node_netstat_Tcp_OutRsts Statistic TcpOutRsts.\n# TYPE node_netstat_Tcp_OutRsts untyped\nnode_netstat_Tcp_OutRsts 1003\n# HELP node_netstat_Tcp_OutSegs Statistic TcpOutSegs.\n# TYPE node_netstat_Tcp_OutSegs untyped\nnode_netstat_Tcp_OutSegs 5.4915039e+07\n# HELP node_netstat_Tcp_PassiveOpens Statistic TcpPassiveOpens.\n# TYPE node_netstat_Tcp_PassiveOpens untyped\nnode_netstat_Tcp_PassiveOpens 230\n# HELP node_netstat_Tcp_RetransSegs Statistic TcpRetransSegs.\n# TYPE node_netstat_Tcp_RetransSegs untyped\nnode_netstat_Tcp_RetransSegs 227\n# HELP node_netstat_Udp6_InDatagrams Statistic Udp6InDatagrams.\n# TYPE node_netstat_Udp6_InDatagrams untyped\nnode_netstat_Udp6_InDatagrams 0\n# HELP node_netstat_Udp6_InErrors Statistic Udp6InErrors.\n# TYPE node_netstat_Udp6_InErrors untyped\nnode_netstat_Udp6_InErrors 0\n# HELP node_netstat_Udp6_NoPorts Statistic Udp6NoPorts.\n# TYPE node_netstat_Udp6_NoPorts untyped\nnode_netstat_Udp6_NoPorts 0\n# HELP node_netstat_Udp6_OutDatagrams Statistic Udp6OutDatagrams.\n# TYPE node_netstat_Udp6_OutDatagrams untyped\nnode_netstat_Udp6_OutDatagrams 0\n# HELP node_netstat_Udp6_RcvbufErrors Statistic Udp6RcvbufErrors.\n# TYPE node_netstat_Udp6_RcvbufErrors untyped\nnode_netstat_Udp6_RcvbufErrors 9\n# HELP node_netstat_Udp6_SndbufErrors Statistic Udp6SndbufErrors.\n# TYPE node_netstat_Udp6_SndbufErrors untyped\nnode_netstat_Udp6_SndbufErrors 8\n# HELP node_netstat_UdpLite6_InErrors Statistic UdpLite6InErrors.\n# TYPE node_netstat_UdpLite6_InErrors untyped\nnode_netstat_UdpLite6_InErrors 0\n# HELP node_netstat_UdpLite_InErrors Statistic UdpLiteInErrors.\n# TYPE node_netstat_UdpLite_InErrors untyped\nnode_netstat_UdpLite_InErrors 0\n# HELP node_netstat_Udp_InDatagrams Statistic UdpInDatagrams.\n# TYPE node_netstat_Udp_InDatagrams untyped\nnode_netstat_Udp_InDatagrams 88542\n# HELP node_netstat_Udp_InErrors Statistic UdpInErrors.\n# TYPE node_netstat_Udp_InErrors untyped\nnode_netstat_Udp_InErrors 0\n# HELP node_netstat_Udp_NoPorts Statistic UdpNoPorts.\n# TYPE node_netstat_Udp_NoPorts untyped\nnode_netstat_Udp_NoPorts 120\n# HELP node_netstat_Udp_OutDatagrams Statistic UdpOutDatagrams.\n# TYPE node_netstat_Udp_OutDatagrams untyped\nnode_netstat_Udp_OutDatagrams 53028\n# HELP node_netstat_Udp_RcvbufErrors Statistic UdpRcvbufErrors.\n# TYPE node_netstat_Udp_RcvbufErrors untyped\nnode_netstat_Udp_RcvbufErrors 9\n# HELP node_netstat_Udp_SndbufErrors Statistic UdpSndbufErrors.\n# TYPE node_netstat_Udp_SndbufErrors untyped\nnode_netstat_Udp_SndbufErrors 8\n# HELP node_network_address_assign_type Network device property: address_assign_type\n# TYPE node_network_address_assign_type gauge\nnode_network_address_assign_type{device=\"bond0\"} 3\nnode_network_address_assign_type{device=\"eth0\"} 3\n# HELP node_network_carrier Network device property: carrier\n# TYPE node_network_carrier gauge\nnode_network_carrier{device=\"bond0\"} 1\nnode_network_carrier{device=\"eth0\"} 1\n# HELP node_network_carrier_changes_total Network device property: carrier_changes_total\n# TYPE node_network_carrier_changes_total counter\nnode_network_carrier_changes_total{device=\"bond0\"} 2\nnode_network_carrier_changes_total{device=\"eth0\"} 2\n# HELP node_network_carrier_down_changes_total Network device property: carrier_down_changes_total\n# TYPE node_network_carrier_down_changes_total counter\nnode_network_carrier_down_changes_total{device=\"bond0\"} 1\nnode_network_carrier_down_changes_total{device=\"eth0\"} 1\n# HELP node_network_carrier_up_changes_total Network device property: carrier_up_changes_total\n# TYPE node_network_carrier_up_changes_total counter\nnode_network_carrier_up_changes_total{device=\"bond0\"} 1\nnode_network_carrier_up_changes_total{device=\"eth0\"} 1\n# HELP node_network_device_id Network device property: device_id\n# TYPE node_network_device_id gauge\nnode_network_device_id{device=\"bond0\"} 32\nnode_network_device_id{device=\"eth0\"} 32\n# HELP node_network_dormant Network device property: dormant\n# TYPE node_network_dormant gauge\nnode_network_dormant{device=\"bond0\"} 1\nnode_network_dormant{device=\"eth0\"} 1\n# HELP node_network_flags Network device property: flags\n# TYPE node_network_flags gauge\nnode_network_flags{device=\"bond0\"} 4867\nnode_network_flags{device=\"eth0\"} 4867\n# HELP node_network_iface_id Network device property: iface_id\n# TYPE node_network_iface_id gauge\nnode_network_iface_id{device=\"bond0\"} 2\nnode_network_iface_id{device=\"eth0\"} 2\n# HELP node_network_iface_link Network device property: iface_link\n# TYPE node_network_iface_link gauge\nnode_network_iface_link{device=\"bond0\"} 2\nnode_network_iface_link{device=\"eth0\"} 2\n# HELP node_network_iface_link_mode Network device property: iface_link_mode\n# TYPE node_network_iface_link_mode gauge\nnode_network_iface_link_mode{device=\"bond0\"} 1\nnode_network_iface_link_mode{device=\"eth0\"} 1\n# HELP node_network_info Non-numeric data from /sys/class/net/<iface>, value is always 1.\n# TYPE node_network_info gauge\nnode_network_info{address=\"01:01:01:01:01:01\",adminstate=\"up\",broadcast=\"ff:ff:ff:ff:ff:ff\",device=\"bond0\",duplex=\"full\",ifalias=\"\",operstate=\"up\"} 1\nnode_network_info{address=\"01:01:01:01:01:01\",adminstate=\"up\",broadcast=\"ff:ff:ff:ff:ff:ff\",device=\"eth0\",duplex=\"full\",ifalias=\"\",operstate=\"up\"} 1\n# HELP node_network_mtu_bytes Network device property: mtu_bytes\n# TYPE node_network_mtu_bytes gauge\nnode_network_mtu_bytes{device=\"bond0\"} 1500\nnode_network_mtu_bytes{device=\"eth0\"} 1500\n# HELP node_network_name_assign_type Network device property: name_assign_type\n# TYPE node_network_name_assign_type gauge\nnode_network_name_assign_type{device=\"bond0\"} 2\nnode_network_name_assign_type{device=\"eth0\"} 2\n# HELP node_network_net_dev_group Network device property: net_dev_group\n# TYPE node_network_net_dev_group gauge\nnode_network_net_dev_group{device=\"bond0\"} 0\nnode_network_net_dev_group{device=\"eth0\"} 0\n# HELP node_network_protocol_type Network device property: protocol_type\n# TYPE node_network_protocol_type gauge\nnode_network_protocol_type{device=\"bond0\"} 1\nnode_network_protocol_type{device=\"eth0\"} 1\n# HELP node_network_receive_bytes_total Network device statistic receive_bytes.\n# TYPE node_network_receive_bytes_total counter\n# HELP node_network_receive_compressed_total Network device statistic receive_compressed.\n# TYPE node_network_receive_compressed_total counter\nnode_network_receive_compressed_total{device=\"lo\"} 0\n# HELP node_network_receive_drop_total Network device statistic receive_drop.\n# TYPE node_network_receive_drop_total counter\nnode_network_receive_drop_total{device=\"lo\"} 0\n# HELP node_network_receive_errs_total Network device statistic receive_errs.\n# TYPE node_network_receive_errs_total counter\nnode_network_receive_errs_total{device=\"lo\"} 0\n# HELP node_network_receive_fifo_total Network device statistic receive_fifo.\n# TYPE node_network_receive_fifo_total counter\nnode_network_receive_fifo_total{device=\"lo\"} 0\n# HELP node_network_receive_frame_total Network device statistic receive_frame.\n# TYPE node_network_receive_frame_total counter\nnode_network_receive_frame_total{device=\"lo\"} 0\n# HELP node_network_receive_multicast_total Network device statistic receive_multicast.\n# TYPE node_network_receive_multicast_total counter\nnode_network_receive_multicast_total{device=\"lo\"} 0\n# HELP node_network_receive_nohandler_total Network device statistic receive_nohandler.\n# TYPE node_network_receive_nohandler_total counter\nnode_network_receive_nohandler_total{device=\"lo\"} 0\n# HELP node_network_receive_packets_total Network device statistic receive_packets.\n# TYPE node_network_receive_packets_total counter\n# HELP node_network_speed_bytes Network device property: speed_bytes\n# TYPE node_network_speed_bytes gauge\nnode_network_speed_bytes{device=\"eth0\"} 1.25e+08\n# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.\n# TYPE node_network_transmit_bytes_total counter\n# HELP node_network_transmit_carrier_total Network device statistic transmit_carrier.\n# TYPE node_network_transmit_carrier_total counter\nnode_network_transmit_carrier_total{device=\"lo\"} 0\n# HELP node_network_transmit_colls_total Network device statistic transmit_colls.\n# TYPE node_network_transmit_colls_total counter\nnode_network_transmit_colls_total{device=\"lo\"} 0\n# HELP node_network_transmit_compressed_total Network device statistic transmit_compressed.\n# TYPE node_network_transmit_compressed_total counter\nnode_network_transmit_compressed_total{device=\"lo\"} 0\n# HELP node_network_transmit_drop_total Network device statistic transmit_drop.\n# TYPE node_network_transmit_drop_total counter\nnode_network_transmit_drop_total{device=\"lo\"} 0\n# HELP node_network_transmit_errs_total Network device statistic transmit_errs.\n# TYPE node_network_transmit_errs_total counter\nnode_network_transmit_errs_total{device=\"lo\"} 0\n# HELP node_network_transmit_fifo_total Network device statistic transmit_fifo.\n# TYPE node_network_transmit_fifo_total counter\nnode_network_transmit_fifo_total{device=\"lo\"} 0\n# HELP node_network_transmit_packets_total Network device statistic transmit_packets.\n# TYPE node_network_transmit_packets_total counter\n# HELP node_network_transmit_queue_length Network device property: transmit_queue_length\n# TYPE node_network_transmit_queue_length gauge\nnode_network_transmit_queue_length{device=\"bond0\"} 1000\nnode_network_transmit_queue_length{device=\"eth0\"} 1000\n# HELP node_network_up Value is 1 if operstate is 'up', 0 otherwise.\n# TYPE node_network_up gauge\nnode_network_up{device=\"bond0\"} 1\nnode_network_up{device=\"eth0\"} 1\n# HELP node_nf_conntrack_entries Number of currently allocated flow entries for connection tracking.\n# TYPE node_nf_conntrack_entries gauge\nnode_nf_conntrack_entries 123\n# HELP node_nf_conntrack_entries_limit Maximum size of connection tracking table.\n# TYPE node_nf_conntrack_entries_limit gauge\nnode_nf_conntrack_entries_limit 65536\n# HELP node_nf_conntrack_stat_drop Number of packets dropped due to conntrack failure.\n# TYPE node_nf_conntrack_stat_drop gauge\nnode_nf_conntrack_stat_drop 0\n# HELP node_nf_conntrack_stat_early_drop Number of dropped conntrack entries to make room for new ones, if maximum table size was reached.\n# TYPE node_nf_conntrack_stat_early_drop gauge\nnode_nf_conntrack_stat_early_drop 0\n# HELP node_nf_conntrack_stat_found Number of searched entries which were successful.\n# TYPE node_nf_conntrack_stat_found gauge\nnode_nf_conntrack_stat_found 0\n# HELP node_nf_conntrack_stat_ignore Number of packets seen which are already connected to a conntrack entry.\n# TYPE node_nf_conntrack_stat_ignore gauge\nnode_nf_conntrack_stat_ignore 89738\n# HELP node_nf_conntrack_stat_insert Number of entries inserted into the list.\n# TYPE node_nf_conntrack_stat_insert gauge\nnode_nf_conntrack_stat_insert 0\n# HELP node_nf_conntrack_stat_insert_failed Number of entries for which list insertion was attempted but failed.\n# TYPE node_nf_conntrack_stat_insert_failed gauge\nnode_nf_conntrack_stat_insert_failed 0\n# HELP node_nf_conntrack_stat_invalid Number of packets seen which can not be tracked.\n# TYPE node_nf_conntrack_stat_invalid gauge\nnode_nf_conntrack_stat_invalid 53\n# HELP node_nf_conntrack_stat_search_restart Number of conntrack table lookups which had to be restarted due to hashtable resizes.\n# TYPE node_nf_conntrack_stat_search_restart gauge\nnode_nf_conntrack_stat_search_restart 7\n# HELP node_nfs_connections_total Total number of NFSd TCP connections.\n# TYPE node_nfs_connections_total counter\nnode_nfs_connections_total 45\n# HELP node_nfs_packets_total Total NFSd network packets (sent+received) by protocol type.\n# TYPE node_nfs_packets_total counter\nnode_nfs_packets_total{protocol=\"tcp\"} 69\nnode_nfs_packets_total{protocol=\"udp\"} 70\n# HELP node_nfs_requests_total Number of NFS procedures invoked.\n# TYPE node_nfs_requests_total counter\nnode_nfs_requests_total{method=\"Access\",proto=\"3\"} 1.17661341e+08\nnode_nfs_requests_total{method=\"Access\",proto=\"4\"} 58\nnode_nfs_requests_total{method=\"Allocate\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"BindConnToSession\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Clone\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Close\",proto=\"4\"} 28\nnode_nfs_requests_total{method=\"Commit\",proto=\"3\"} 23729\nnode_nfs_requests_total{method=\"Commit\",proto=\"4\"} 83\nnode_nfs_requests_total{method=\"Create\",proto=\"2\"} 52\nnode_nfs_requests_total{method=\"Create\",proto=\"3\"} 2.993289e+06\nnode_nfs_requests_total{method=\"Create\",proto=\"4\"} 15\nnode_nfs_requests_total{method=\"CreateSession\",proto=\"4\"} 32\nnode_nfs_requests_total{method=\"DeAllocate\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"DelegReturn\",proto=\"4\"} 97\nnode_nfs_requests_total{method=\"DestroyClientID\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"DestroySession\",proto=\"4\"} 67\nnode_nfs_requests_total{method=\"ExchangeID\",proto=\"4\"} 58\nnode_nfs_requests_total{method=\"FreeStateID\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"FsInfo\",proto=\"3\"} 2\nnode_nfs_requests_total{method=\"FsInfo\",proto=\"4\"} 68\nnode_nfs_requests_total{method=\"FsLocations\",proto=\"4\"} 32\nnode_nfs_requests_total{method=\"FsStat\",proto=\"2\"} 82\nnode_nfs_requests_total{method=\"FsStat\",proto=\"3\"} 13332\nnode_nfs_requests_total{method=\"FsidPresent\",proto=\"4\"} 11\nnode_nfs_requests_total{method=\"GetACL\",proto=\"4\"} 36\nnode_nfs_requests_total{method=\"GetAttr\",proto=\"2\"} 57\nnode_nfs_requests_total{method=\"GetAttr\",proto=\"3\"} 1.061909262e+09\nnode_nfs_requests_total{method=\"GetDeviceInfo\",proto=\"4\"} 1\nnode_nfs_requests_total{method=\"GetDeviceList\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"GetLeaseTime\",proto=\"4\"} 28\nnode_nfs_requests_total{method=\"Getattr\",proto=\"4\"} 88\nnode_nfs_requests_total{method=\"LayoutCommit\",proto=\"4\"} 26\nnode_nfs_requests_total{method=\"LayoutGet\",proto=\"4\"} 90\nnode_nfs_requests_total{method=\"LayoutReturn\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"LayoutStats\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Link\",proto=\"2\"} 17\nnode_nfs_requests_total{method=\"Link\",proto=\"3\"} 0\nnode_nfs_requests_total{method=\"Link\",proto=\"4\"} 21\nnode_nfs_requests_total{method=\"Lock\",proto=\"4\"} 39\nnode_nfs_requests_total{method=\"Lockt\",proto=\"4\"} 68\nnode_nfs_requests_total{method=\"Locku\",proto=\"4\"} 59\nnode_nfs_requests_total{method=\"Lookup\",proto=\"2\"} 71\nnode_nfs_requests_total{method=\"Lookup\",proto=\"3\"} 4.077635e+06\nnode_nfs_requests_total{method=\"Lookup\",proto=\"4\"} 29\nnode_nfs_requests_total{method=\"LookupRoot\",proto=\"4\"} 74\nnode_nfs_requests_total{method=\"MkDir\",proto=\"2\"} 50\nnode_nfs_requests_total{method=\"MkDir\",proto=\"3\"} 590\nnode_nfs_requests_total{method=\"MkNod\",proto=\"3\"} 0\nnode_nfs_requests_total{method=\"Null\",proto=\"2\"} 16\nnode_nfs_requests_total{method=\"Null\",proto=\"3\"} 0\nnode_nfs_requests_total{method=\"Null\",proto=\"4\"} 98\nnode_nfs_requests_total{method=\"Open\",proto=\"4\"} 85\nnode_nfs_requests_total{method=\"OpenConfirm\",proto=\"4\"} 23\nnode_nfs_requests_total{method=\"OpenDowngrade\",proto=\"4\"} 1\nnode_nfs_requests_total{method=\"OpenNoattr\",proto=\"4\"} 24\nnode_nfs_requests_total{method=\"PathConf\",proto=\"3\"} 1\nnode_nfs_requests_total{method=\"Pathconf\",proto=\"4\"} 53\nnode_nfs_requests_total{method=\"Read\",proto=\"2\"} 45\nnode_nfs_requests_total{method=\"Read\",proto=\"3\"} 2.9391916e+07\nnode_nfs_requests_total{method=\"Read\",proto=\"4\"} 51\nnode_nfs_requests_total{method=\"ReadDir\",proto=\"2\"} 70\nnode_nfs_requests_total{method=\"ReadDir\",proto=\"3\"} 3983\nnode_nfs_requests_total{method=\"ReadDir\",proto=\"4\"} 66\nnode_nfs_requests_total{method=\"ReadDirPlus\",proto=\"3\"} 92385\nnode_nfs_requests_total{method=\"ReadLink\",proto=\"2\"} 73\nnode_nfs_requests_total{method=\"ReadLink\",proto=\"3\"} 5\nnode_nfs_requests_total{method=\"ReadLink\",proto=\"4\"} 54\nnode_nfs_requests_total{method=\"ReclaimComplete\",proto=\"4\"} 35\nnode_nfs_requests_total{method=\"ReleaseLockowner\",proto=\"4\"} 85\nnode_nfs_requests_total{method=\"Remove\",proto=\"2\"} 83\nnode_nfs_requests_total{method=\"Remove\",proto=\"3\"} 7815\nnode_nfs_requests_total{method=\"Remove\",proto=\"4\"} 69\nnode_nfs_requests_total{method=\"Rename\",proto=\"2\"} 61\nnode_nfs_requests_total{method=\"Rename\",proto=\"3\"} 1130\nnode_nfs_requests_total{method=\"Rename\",proto=\"4\"} 96\nnode_nfs_requests_total{method=\"Renew\",proto=\"4\"} 83\nnode_nfs_requests_total{method=\"RmDir\",proto=\"2\"} 23\nnode_nfs_requests_total{method=\"RmDir\",proto=\"3\"} 15\nnode_nfs_requests_total{method=\"Root\",proto=\"2\"} 52\nnode_nfs_requests_total{method=\"Secinfo\",proto=\"4\"} 81\nnode_nfs_requests_total{method=\"SecinfoNoName\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Seek\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Sequence\",proto=\"4\"} 13\nnode_nfs_requests_total{method=\"ServerCaps\",proto=\"4\"} 56\nnode_nfs_requests_total{method=\"SetACL\",proto=\"4\"} 49\nnode_nfs_requests_total{method=\"SetAttr\",proto=\"2\"} 74\nnode_nfs_requests_total{method=\"SetAttr\",proto=\"3\"} 48906\nnode_nfs_requests_total{method=\"SetClientID\",proto=\"4\"} 12\nnode_nfs_requests_total{method=\"SetClientIDConfirm\",proto=\"4\"} 84\nnode_nfs_requests_total{method=\"Setattr\",proto=\"4\"} 73\nnode_nfs_requests_total{method=\"StatFs\",proto=\"4\"} 86\nnode_nfs_requests_total{method=\"SymLink\",proto=\"2\"} 53\nnode_nfs_requests_total{method=\"SymLink\",proto=\"3\"} 0\nnode_nfs_requests_total{method=\"Symlink\",proto=\"4\"} 84\nnode_nfs_requests_total{method=\"TestStateID\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"WrCache\",proto=\"2\"} 86\nnode_nfs_requests_total{method=\"Write\",proto=\"2\"} 0\nnode_nfs_requests_total{method=\"Write\",proto=\"3\"} 2.570425e+06\nnode_nfs_requests_total{method=\"Write\",proto=\"4\"} 54\n# HELP node_nfs_rpc_authentication_refreshes_total Number of RPC authentication refreshes performed.\n# TYPE node_nfs_rpc_authentication_refreshes_total counter\nnode_nfs_rpc_authentication_refreshes_total 1.218815394e+09\n# HELP node_nfs_rpc_retransmissions_total Number of RPC transmissions performed.\n# TYPE node_nfs_rpc_retransmissions_total counter\nnode_nfs_rpc_retransmissions_total 374636\n# HELP node_nfs_rpcs_total Total number of RPCs performed.\n# TYPE node_nfs_rpcs_total counter\nnode_nfs_rpcs_total 1.218785755e+09\n# HELP node_nfsd_connections_total Total number of NFSd TCP connections.\n# TYPE node_nfsd_connections_total counter\nnode_nfsd_connections_total 1\n# HELP node_nfsd_disk_bytes_read_total Total NFSd bytes read.\n# TYPE node_nfsd_disk_bytes_read_total counter\nnode_nfsd_disk_bytes_read_total 1.572864e+08\n# HELP node_nfsd_disk_bytes_written_total Total NFSd bytes written.\n# TYPE node_nfsd_disk_bytes_written_total counter\nnode_nfsd_disk_bytes_written_total 72864\n# HELP node_nfsd_file_handles_stale_total Total number of NFSd stale file handles\n# TYPE node_nfsd_file_handles_stale_total counter\nnode_nfsd_file_handles_stale_total 0\n# HELP node_nfsd_packets_total Total NFSd network packets (sent+received) by protocol type.\n# TYPE node_nfsd_packets_total counter\nnode_nfsd_packets_total{proto=\"tcp\"} 917\nnode_nfsd_packets_total{proto=\"udp\"} 55\n# HELP node_nfsd_read_ahead_cache_not_found_total Total number of NFSd read ahead cache not found.\n# TYPE node_nfsd_read_ahead_cache_not_found_total counter\nnode_nfsd_read_ahead_cache_not_found_total 0\n# HELP node_nfsd_read_ahead_cache_size_blocks How large the read ahead cache is in blocks.\n# TYPE node_nfsd_read_ahead_cache_size_blocks gauge\nnode_nfsd_read_ahead_cache_size_blocks 32\n# HELP node_nfsd_reply_cache_hits_total Total number of NFSd Reply Cache hits (client lost server response).\n# TYPE node_nfsd_reply_cache_hits_total counter\nnode_nfsd_reply_cache_hits_total 0\n# HELP node_nfsd_reply_cache_misses_total Total number of NFSd Reply Cache an operation that requires caching (idempotent).\n# TYPE node_nfsd_reply_cache_misses_total counter\nnode_nfsd_reply_cache_misses_total 6\n# HELP node_nfsd_reply_cache_nocache_total Total number of NFSd Reply Cache non-idempotent operations (rename/delete/…).\n# TYPE node_nfsd_reply_cache_nocache_total counter\nnode_nfsd_reply_cache_nocache_total 18622\n# HELP node_nfsd_requests_total Total number NFSd Requests by method and protocol.\n# TYPE node_nfsd_requests_total counter\nnode_nfsd_requests_total{method=\"Access\",proto=\"3\"} 111\nnode_nfsd_requests_total{method=\"Access\",proto=\"4\"} 1098\nnode_nfsd_requests_total{method=\"Close\",proto=\"4\"} 2\nnode_nfsd_requests_total{method=\"Commit\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Commit\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Create\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Create\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Create\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"DelegPurge\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"DelegReturn\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"FsInfo\",proto=\"3\"} 2\nnode_nfsd_requests_total{method=\"FsStat\",proto=\"2\"} 2\nnode_nfsd_requests_total{method=\"FsStat\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"GetAttr\",proto=\"2\"} 69\nnode_nfsd_requests_total{method=\"GetAttr\",proto=\"3\"} 112\nnode_nfsd_requests_total{method=\"GetAttr\",proto=\"4\"} 8179\nnode_nfsd_requests_total{method=\"GetFH\",proto=\"4\"} 5896\nnode_nfsd_requests_total{method=\"Link\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Link\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Link\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Lock\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Lockt\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Locku\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Lookup\",proto=\"2\"} 4410\nnode_nfsd_requests_total{method=\"Lookup\",proto=\"3\"} 2719\nnode_nfsd_requests_total{method=\"Lookup\",proto=\"4\"} 5900\nnode_nfsd_requests_total{method=\"LookupRoot\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"MkDir\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"MkDir\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"MkNod\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Nverify\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Open\",proto=\"4\"} 2\nnode_nfsd_requests_total{method=\"OpenAttr\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"OpenConfirm\",proto=\"4\"} 2\nnode_nfsd_requests_total{method=\"OpenDgrd\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"PathConf\",proto=\"3\"} 1\nnode_nfsd_requests_total{method=\"PutFH\",proto=\"4\"} 9609\nnode_nfsd_requests_total{method=\"Read\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Read\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Read\",proto=\"4\"} 150\nnode_nfsd_requests_total{method=\"ReadDir\",proto=\"2\"} 99\nnode_nfsd_requests_total{method=\"ReadDir\",proto=\"3\"} 27\nnode_nfsd_requests_total{method=\"ReadDir\",proto=\"4\"} 1272\nnode_nfsd_requests_total{method=\"ReadDirPlus\",proto=\"3\"} 216\nnode_nfsd_requests_total{method=\"ReadLink\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"ReadLink\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"ReadLink\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"RelLockOwner\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Remove\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Remove\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Remove\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Rename\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Rename\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Rename\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Renew\",proto=\"4\"} 1236\nnode_nfsd_requests_total{method=\"RestoreFH\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"RmDir\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"RmDir\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Root\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"SaveFH\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"SecInfo\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"SetAttr\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"SetAttr\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"SetAttr\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"SetClientID\",proto=\"4\"} 3\nnode_nfsd_requests_total{method=\"SetClientIDConfirm\",proto=\"4\"} 3\nnode_nfsd_requests_total{method=\"SymLink\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"SymLink\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Verify\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"WdelegGetattr\",proto=\"4\"} 15\nnode_nfsd_requests_total{method=\"WrCache\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Write\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Write\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Write\",proto=\"4\"} 0\n# HELP node_nfsd_rpc_errors_total Total number of NFSd RPC errors by error type.\n# TYPE node_nfsd_rpc_errors_total counter\nnode_nfsd_rpc_errors_total{error=\"auth\"} 2\nnode_nfsd_rpc_errors_total{error=\"cInt\"} 0\nnode_nfsd_rpc_errors_total{error=\"fmt\"} 1\n# HELP node_nfsd_server_rpcs_total Total number of NFSd RPCs.\n# TYPE node_nfsd_server_rpcs_total counter\nnode_nfsd_server_rpcs_total 18628\n# HELP node_nfsd_server_threads Total number of NFSd kernel threads that are running.\n# TYPE node_nfsd_server_threads gauge\nnode_nfsd_server_threads 8\n# HELP node_nvme_info Non-numeric data from /sys/class/nvme/<device>, value is always 1.\n# TYPE node_nvme_info gauge\nnode_nvme_info{cntlid=\"1997\",device=\"nvme0\",firmware_revision=\"1B2QEXP7\",model=\"Samsung SSD 970 PRO 512GB\",serial=\"S680HF8N190894I\",state=\"live\"} 1\n# HELP node_nvme_namespace_capacity_bytes Capacity of the NVMe namespace in bytes. Computed as namespace_size * namespace_logical_block_size\n# TYPE node_nvme_namespace_capacity_bytes gauge\nnode_nvme_namespace_capacity_bytes{device=\"nvme0\",nsid=\"0\"} 1.6e+13\n# HELP node_nvme_namespace_info Information about NVMe namespaces. Value is always 1\n# TYPE node_nvme_namespace_info gauge\nnode_nvme_namespace_info{ana_state=\"optimized\",device=\"nvme0\",nsid=\"0\"} 1\n# HELP node_nvme_namespace_logical_block_size_bytes Logical block size of the NVMe namespace in bytes. Usually 4Kb. Available in /sys/class/nvme/<device>/<namespace>/queue/logical_block_size\n# TYPE node_nvme_namespace_logical_block_size_bytes gauge\nnode_nvme_namespace_logical_block_size_bytes{device=\"nvme0\",nsid=\"0\"} 4096\n# HELP node_nvme_namespace_size_bytes Size of the NVMe namespace in bytes. Available in /sys/class/nvme/<device>/<namespace>/size\n# TYPE node_nvme_namespace_size_bytes gauge\nnode_nvme_namespace_size_bytes{device=\"nvme0\",nsid=\"0\"} 1.6e+13\n# HELP node_nvme_namespace_used_bytes Used space of the NVMe namespace in bytes. Available in /sys/class/nvme/<device>/<namespace>/nuse\n# TYPE node_nvme_namespace_used_bytes gauge\nnode_nvme_namespace_used_bytes{device=\"nvme0\",nsid=\"0\"} 2e+12\n# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.\n# TYPE node_os_info gauge\nnode_os_info{build_id=\"\",id=\"ubuntu\",id_like=\"debian\",image_id=\"\",image_version=\"\",name=\"Ubuntu\",pretty_name=\"Ubuntu 20.04.2 LTS\",variant=\"\",variant_id=\"\",version=\"20.04.2 LTS (Focal Fossa)\",version_codename=\"focal\",version_id=\"20.04\"} 1\n# HELP node_os_version Metric containing the major.minor part of the OS version.\n# TYPE node_os_version gauge\nnode_os_version{id=\"ubuntu\",id_like=\"debian\",name=\"Ubuntu\"} 20.04\n# HELP node_pcidevice_current_link_transfers_per_second Value of current link's transfers per second (T/s)\n# TYPE node_pcidevice_current_link_transfers_per_second gauge\nnode_pcidevice_current_link_transfers_per_second{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8e+09\nnode_pcidevice_current_link_transfers_per_second{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 8e+09\nnode_pcidevice_current_link_transfers_per_second{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 5e+09\n# HELP node_pcidevice_current_link_width Value of current link's width (number of lanes)\n# TYPE node_pcidevice_current_link_width gauge\nnode_pcidevice_current_link_width{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 4\nnode_pcidevice_current_link_width{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_current_link_width{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 4\n# HELP node_pcidevice_d3cold_allowed Whether the PCIe device supports D3cold power state (0/1).\n# TYPE node_pcidevice_d3cold_allowed gauge\nnode_pcidevice_d3cold_allowed{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 1\nnode_pcidevice_d3cold_allowed{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1\nnode_pcidevice_d3cold_allowed{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 1\n# HELP node_pcidevice_info Non-numeric data from /sys/bus/pci/devices/<location>, value is always 1.\n# TYPE node_pcidevice_info gauge\nnode_pcidevice_info{bus=\"00\",class_id=\"0x060400\",device=\"02\",device_id=\"0x1634\",function=\"1\",parent_bus=\"*\",parent_device=\"*\",parent_function=\"*\",parent_segment=\"*\",revision=\"0x00\",segment=\"0000\",subsystem_device_id=\"0x5095\",subsystem_vendor_id=\"0x17aa\",vendor_id=\"0x1022\"} 1\nnode_pcidevice_info{bus=\"01\",class_id=\"0x010802\",device=\"00\",device_id=\"0x540a\",function=\"0\",parent_bus=\"00\",parent_device=\"02\",parent_function=\"1\",parent_segment=\"0000\",revision=\"0x01\",segment=\"0000\",subsystem_device_id=\"0x5021\",subsystem_vendor_id=\"0xc0a9\",vendor_id=\"0xc0a9\"} 1\nnode_pcidevice_info{bus=\"45\",class_id=\"0x020000\",device=\"00\",device_id=\"0x1521\",function=\"0\",parent_bus=\"40\",parent_device=\"01\",parent_function=\"3\",parent_segment=\"0000\",revision=\"0x01\",segment=\"0000\",subsystem_device_id=\"0x00a3\",subsystem_vendor_id=\"0x8086\",vendor_id=\"0x8086\"} 1\n# HELP node_pcidevice_max_link_transfers_per_second Value of maximum link's transfers per second (T/s)\n# TYPE node_pcidevice_max_link_transfers_per_second gauge\nnode_pcidevice_max_link_transfers_per_second{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8e+09\nnode_pcidevice_max_link_transfers_per_second{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1.6e+10\nnode_pcidevice_max_link_transfers_per_second{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 5e+09\n# HELP node_pcidevice_max_link_width Value of maximum link's width (number of lanes)\n# TYPE node_pcidevice_max_link_width gauge\nnode_pcidevice_max_link_width{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8\nnode_pcidevice_max_link_width{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_max_link_width{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 4\n# HELP node_pcidevice_numa_node NUMA node number for the PCI device. -1 indicates unknown or not available.\n# TYPE node_pcidevice_numa_node gauge\nnode_pcidevice_numa_node{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n# HELP node_pcidevice_power_state PCIe device power state, one of: D0, D1, D2, D3hot, D3cold, unknown or error.\n# TYPE node_pcidevice_power_state gauge\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"unknown\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"unknown\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"unknown\"} 0\n# HELP node_pcidevice_sriov_drivers_autoprobe Whether SR-IOV drivers autoprobe is enabled for the device (0/1).\n# TYPE node_pcidevice_sriov_drivers_autoprobe gauge\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 1\n# HELP node_pcidevice_sriov_numvfs Number of Virtual Functions (VFs) currently enabled for SR-IOV.\n# TYPE node_pcidevice_sriov_numvfs gauge\nnode_pcidevice_sriov_numvfs{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_numvfs{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_sriov_numvfs{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n# HELP node_pcidevice_sriov_totalvfs Total number of Virtual Functions (VFs) supported by the device.\n# TYPE node_pcidevice_sriov_totalvfs gauge\nnode_pcidevice_sriov_totalvfs{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_totalvfs{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 8\nnode_pcidevice_sriov_totalvfs{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 7\n# HELP node_pcidevice_sriov_vf_total_msix Total number of MSI-X vectors for Virtual Functions.\n# TYPE node_pcidevice_sriov_vf_total_msix gauge\nnode_pcidevice_sriov_vf_total_msix{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_vf_total_msix{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 16\nnode_pcidevice_sriov_vf_total_msix{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n# HELP node_power_supply_capacity capacity value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_capacity gauge\nnode_power_supply_capacity{power_supply=\"BAT0\"} 81\n# HELP node_power_supply_cyclecount cyclecount value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_cyclecount gauge\nnode_power_supply_cyclecount{power_supply=\"BAT0\"} 0\n# HELP node_power_supply_energy_full energy_full value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_energy_full gauge\nnode_power_supply_energy_full{power_supply=\"BAT0\"} 45.07\n# HELP node_power_supply_energy_full_design energy_full_design value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_energy_full_design gauge\nnode_power_supply_energy_full_design{power_supply=\"BAT0\"} 47.52\n# HELP node_power_supply_energy_watthour energy_watthour value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_energy_watthour gauge\nnode_power_supply_energy_watthour{power_supply=\"BAT0\"} 36.58\n# HELP node_power_supply_info info of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_info gauge\nnode_power_supply_info{power_supply=\"AC\",type=\"Mains\"} 1\nnode_power_supply_info{capacity_level=\"Normal\",manufacturer=\"LGC\",model_name=\"LNV-45N1��\",power_supply=\"BAT0\",serial_number=\"38109\",status=\"Discharging\",technology=\"Li-ion\",type=\"Battery\"} 1\n# HELP node_power_supply_online online value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_online gauge\nnode_power_supply_online{power_supply=\"AC\"} 0\n# HELP node_power_supply_power_watt power_watt value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_power_watt gauge\nnode_power_supply_power_watt{power_supply=\"BAT0\"} 5.002\n# HELP node_power_supply_present present value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_present gauge\nnode_power_supply_present{power_supply=\"BAT0\"} 1\n# HELP node_power_supply_voltage_min_design voltage_min_design value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_voltage_min_design gauge\nnode_power_supply_voltage_min_design{power_supply=\"BAT0\"} 10.8\n# HELP node_power_supply_voltage_volt voltage_volt value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_voltage_volt gauge\nnode_power_supply_voltage_volt{power_supply=\"BAT0\"} 11.66\n# HELP node_pressure_cpu_waiting_seconds_total Total time in seconds that processes have waited for CPU time\n# TYPE node_pressure_cpu_waiting_seconds_total counter\nnode_pressure_cpu_waiting_seconds_total 14.036781000000001\n# HELP node_pressure_io_stalled_seconds_total Total time in seconds no process could make progress due to IO congestion\n# TYPE node_pressure_io_stalled_seconds_total counter\nnode_pressure_io_stalled_seconds_total 159.229614\n# HELP node_pressure_io_waiting_seconds_total Total time in seconds that processes have waited due to IO congestion\n# TYPE node_pressure_io_waiting_seconds_total counter\nnode_pressure_io_waiting_seconds_total 159.886802\n# HELP node_pressure_irq_stalled_seconds_total Total time in seconds no process could make progress due to IRQ congestion\n# TYPE node_pressure_irq_stalled_seconds_total counter\nnode_pressure_irq_stalled_seconds_total 0.008494\n# HELP node_pressure_memory_stalled_seconds_total Total time in seconds no process could make progress due to memory congestion\n# TYPE node_pressure_memory_stalled_seconds_total counter\nnode_pressure_memory_stalled_seconds_total 0\n# HELP node_pressure_memory_waiting_seconds_total Total time in seconds that processes have waited for memory\n# TYPE node_pressure_memory_waiting_seconds_total counter\nnode_pressure_memory_waiting_seconds_total 0\n# HELP node_processes_max_processes Number of max PIDs limit\n# TYPE node_processes_max_processes gauge\nnode_processes_max_processes 123\n# HELP node_processes_max_threads Limit of threads in the system\n# TYPE node_processes_max_threads gauge\nnode_processes_max_threads 7801\n# HELP node_processes_pids Number of PIDs\n# TYPE node_processes_pids gauge\nnode_processes_pids 3\n# HELP node_processes_state Number of processes in each state.\n# TYPE node_processes_state gauge\nnode_processes_state{state=\"I\"} 1\nnode_processes_state{state=\"S\"} 2\n# HELP node_processes_threads Allocated threads in system\n# TYPE node_processes_threads gauge\nnode_processes_threads 3\n# HELP node_procs_blocked Number of processes blocked waiting for I/O to complete.\n# TYPE node_procs_blocked gauge\nnode_procs_blocked 0\n# HELP node_procs_running Number of processes in runnable state.\n# TYPE node_procs_running gauge\nnode_procs_running 2\n# HELP node_qdisc_backlog Number of bytes currently in queue to be sent.\n# TYPE node_qdisc_backlog gauge\nnode_qdisc_backlog{device=\"eth0\",kind=\"pfifo_fast\"} 0\nnode_qdisc_backlog{device=\"wlan0\",kind=\"fq\"} 0\n# HELP node_qdisc_bytes_total Number of bytes sent.\n# TYPE node_qdisc_bytes_total counter\nnode_qdisc_bytes_total{device=\"eth0\",kind=\"pfifo_fast\"} 83\nnode_qdisc_bytes_total{device=\"wlan0\",kind=\"fq\"} 42\n# HELP node_qdisc_current_queue_length Number of packets currently in queue to be sent.\n# TYPE node_qdisc_current_queue_length gauge\nnode_qdisc_current_queue_length{device=\"eth0\",kind=\"pfifo_fast\"} 0\nnode_qdisc_current_queue_length{device=\"wlan0\",kind=\"fq\"} 0\n# HELP node_qdisc_drops_total Number of packets dropped.\n# TYPE node_qdisc_drops_total counter\nnode_qdisc_drops_total{device=\"eth0\",kind=\"pfifo_fast\"} 0\nnode_qdisc_drops_total{device=\"wlan0\",kind=\"fq\"} 1\n# HELP node_qdisc_overlimits_total Number of overlimit packets.\n# TYPE node_qdisc_overlimits_total counter\nnode_qdisc_overlimits_total{device=\"eth0\",kind=\"pfifo_fast\"} 0\nnode_qdisc_overlimits_total{device=\"wlan0\",kind=\"fq\"} 0\n# HELP node_qdisc_packets_total Number of packets sent.\n# TYPE node_qdisc_packets_total counter\nnode_qdisc_packets_total{device=\"eth0\",kind=\"pfifo_fast\"} 83\nnode_qdisc_packets_total{device=\"wlan0\",kind=\"fq\"} 42\n# HELP node_qdisc_requeues_total Number of packets dequeued, not transmitted, and requeued.\n# TYPE node_qdisc_requeues_total counter\nnode_qdisc_requeues_total{device=\"eth0\",kind=\"pfifo_fast\"} 2\nnode_qdisc_requeues_total{device=\"wlan0\",kind=\"fq\"} 1\n# HELP node_rapl_core_joules_total Current RAPL core value in joules\n# TYPE node_rapl_core_joules_total counter\nnode_rapl_core_joules_total{index=\"0\",path=\"collector/fixtures/sys/class/powercap/intel-rapl:0:0\"} 118821.284256\n# HELP node_rapl_package_joules_total Current RAPL package value in joules\n# TYPE node_rapl_package_joules_total counter\nnode_rapl_package_joules_total{index=\"0\",path=\"collector/fixtures/sys/class/powercap/intel-rapl:0\"} 240422.366267\n# HELP node_schedstat_running_seconds_total Number of seconds CPU spent running a process.\n# TYPE node_schedstat_running_seconds_total counter\nnode_schedstat_running_seconds_total{cpu=\"0\"} 2.045936778163039e+06\nnode_schedstat_running_seconds_total{cpu=\"1\"} 1.904686152592476e+06\n# HELP node_schedstat_timeslices_total Number of timeslices executed by CPU.\n# TYPE node_schedstat_timeslices_total counter\nnode_schedstat_timeslices_total{cpu=\"0\"} 4.767485306e+09\nnode_schedstat_timeslices_total{cpu=\"1\"} 5.145567945e+09\n# HELP node_schedstat_waiting_seconds_total Number of seconds spent by processing waiting for this CPU.\n# TYPE node_schedstat_waiting_seconds_total counter\nnode_schedstat_waiting_seconds_total{cpu=\"0\"} 343796.328169361\nnode_schedstat_waiting_seconds_total{cpu=\"1\"} 364107.263788241\n# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.\n# TYPE node_scrape_collector_duration_seconds gauge\n# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.\n# TYPE node_scrape_collector_success gauge\nnode_scrape_collector_success{collector=\"arp\"} 1\nnode_scrape_collector_success{collector=\"bcache\"} 1\nnode_scrape_collector_success{collector=\"bcachefs\"} 1\nnode_scrape_collector_success{collector=\"bonding\"} 1\nnode_scrape_collector_success{collector=\"btrfs\"} 1\nnode_scrape_collector_success{collector=\"buddyinfo\"} 1\nnode_scrape_collector_success{collector=\"cgroups\"} 1\nnode_scrape_collector_success{collector=\"conntrack\"} 1\nnode_scrape_collector_success{collector=\"cpu\"} 1\nnode_scrape_collector_success{collector=\"cpu_vulnerabilities\"} 1\nnode_scrape_collector_success{collector=\"cpufreq\"} 1\nnode_scrape_collector_success{collector=\"diskstats\"} 1\nnode_scrape_collector_success{collector=\"dmi\"} 1\nnode_scrape_collector_success{collector=\"drbd\"} 1\nnode_scrape_collector_success{collector=\"edac\"} 1\nnode_scrape_collector_success{collector=\"entropy\"} 1\nnode_scrape_collector_success{collector=\"fibrechannel\"} 1\nnode_scrape_collector_success{collector=\"filefd\"} 1\nnode_scrape_collector_success{collector=\"hwmon\"} 1\nnode_scrape_collector_success{collector=\"infiniband\"} 1\nnode_scrape_collector_success{collector=\"interrupts\"} 1\nnode_scrape_collector_success{collector=\"ipvs\"} 1\nnode_scrape_collector_success{collector=\"ksmd\"} 1\nnode_scrape_collector_success{collector=\"lnstat\"} 1\nnode_scrape_collector_success{collector=\"loadavg\"} 1\nnode_scrape_collector_success{collector=\"mdadm\"} 1\nnode_scrape_collector_success{collector=\"meminfo\"} 1\nnode_scrape_collector_success{collector=\"meminfo_numa\"} 1\nnode_scrape_collector_success{collector=\"mountstats\"} 1\nnode_scrape_collector_success{collector=\"netclass\"} 1\nnode_scrape_collector_success{collector=\"netdev\"} 1\nnode_scrape_collector_success{collector=\"netstat\"} 1\nnode_scrape_collector_success{collector=\"nfs\"} 1\nnode_scrape_collector_success{collector=\"nfsd\"} 1\nnode_scrape_collector_success{collector=\"nvme\"} 1\nnode_scrape_collector_success{collector=\"os\"} 1\nnode_scrape_collector_success{collector=\"pcidevice\"} 1\nnode_scrape_collector_success{collector=\"powersupplyclass\"} 1\nnode_scrape_collector_success{collector=\"pressure\"} 1\nnode_scrape_collector_success{collector=\"processes\"} 1\nnode_scrape_collector_success{collector=\"qdisc\"} 1\nnode_scrape_collector_success{collector=\"rapl\"} 1\nnode_scrape_collector_success{collector=\"schedstat\"} 1\nnode_scrape_collector_success{collector=\"slabinfo\"} 1\nnode_scrape_collector_success{collector=\"sockstat\"} 1\nnode_scrape_collector_success{collector=\"softirqs\"} 1\nnode_scrape_collector_success{collector=\"softnet\"} 1\nnode_scrape_collector_success{collector=\"stat\"} 1\nnode_scrape_collector_success{collector=\"sysctl\"} 1\nnode_scrape_collector_success{collector=\"tapestats\"} 1\nnode_scrape_collector_success{collector=\"textfile\"} 1\nnode_scrape_collector_success{collector=\"thermal_zone\"} 1\nnode_scrape_collector_success{collector=\"time\"} 1\nnode_scrape_collector_success{collector=\"udp_queues\"} 1\nnode_scrape_collector_success{collector=\"vmstat\"} 1\nnode_scrape_collector_success{collector=\"watchdog\"} 1\nnode_scrape_collector_success{collector=\"wifi\"} 1\nnode_scrape_collector_success{collector=\"xfrm\"} 1\nnode_scrape_collector_success{collector=\"xfs\"} 1\nnode_scrape_collector_success{collector=\"zfs\"} 1\nnode_scrape_collector_success{collector=\"zoneinfo\"} 1\n# HELP node_slabinfo_active_objects The number of objects that are currently active (i.e., in use).\n# TYPE node_slabinfo_active_objects gauge\nnode_slabinfo_active_objects{slab=\"dmaengine-unmap-128\"} 1206\nnode_slabinfo_active_objects{slab=\"kmalloc-8192\"} 132\nnode_slabinfo_active_objects{slab=\"kmem_cache\"} 320\nnode_slabinfo_active_objects{slab=\"tw_sock_TCP\"} 704\n# HELP node_slabinfo_object_size_bytes The size of objects in this slab, in bytes.\n# TYPE node_slabinfo_object_size_bytes gauge\nnode_slabinfo_object_size_bytes{slab=\"dmaengine-unmap-128\"} 1088\nnode_slabinfo_object_size_bytes{slab=\"kmalloc-8192\"} 8192\nnode_slabinfo_object_size_bytes{slab=\"kmem_cache\"} 256\nnode_slabinfo_object_size_bytes{slab=\"tw_sock_TCP\"} 256\n# HELP node_slabinfo_objects The total number of allocated objects (i.e., objects that are both in use and not in use).\n# TYPE node_slabinfo_objects gauge\nnode_slabinfo_objects{slab=\"dmaengine-unmap-128\"} 1320\nnode_slabinfo_objects{slab=\"kmalloc-8192\"} 148\nnode_slabinfo_objects{slab=\"kmem_cache\"} 320\nnode_slabinfo_objects{slab=\"tw_sock_TCP\"} 864\n# HELP node_slabinfo_objects_per_slab The number of objects stored in each slab.\n# TYPE node_slabinfo_objects_per_slab gauge\nnode_slabinfo_objects_per_slab{slab=\"dmaengine-unmap-128\"} 30\nnode_slabinfo_objects_per_slab{slab=\"kmalloc-8192\"} 4\nnode_slabinfo_objects_per_slab{slab=\"kmem_cache\"} 32\nnode_slabinfo_objects_per_slab{slab=\"tw_sock_TCP\"} 32\n# HELP node_slabinfo_pages_per_slab The number of pages allocated for each slab.\n# TYPE node_slabinfo_pages_per_slab gauge\nnode_slabinfo_pages_per_slab{slab=\"dmaengine-unmap-128\"} 8\nnode_slabinfo_pages_per_slab{slab=\"kmalloc-8192\"} 8\nnode_slabinfo_pages_per_slab{slab=\"kmem_cache\"} 2\nnode_slabinfo_pages_per_slab{slab=\"tw_sock_TCP\"} 2\n# HELP node_sockstat_FRAG6_inuse Number of FRAG6 sockets in state inuse.\n# TYPE node_sockstat_FRAG6_inuse gauge\nnode_sockstat_FRAG6_inuse 0\n# HELP node_sockstat_FRAG6_memory Number of FRAG6 sockets in state memory.\n# TYPE node_sockstat_FRAG6_memory gauge\nnode_sockstat_FRAG6_memory 0\n# HELP node_sockstat_FRAG_inuse Number of FRAG sockets in state inuse.\n# TYPE node_sockstat_FRAG_inuse gauge\nnode_sockstat_FRAG_inuse 0\n# HELP node_sockstat_FRAG_memory Number of FRAG sockets in state memory.\n# TYPE node_sockstat_FRAG_memory gauge\nnode_sockstat_FRAG_memory 0\n# HELP node_sockstat_RAW6_inuse Number of RAW6 sockets in state inuse.\n# TYPE node_sockstat_RAW6_inuse gauge\nnode_sockstat_RAW6_inuse 1\n# HELP node_sockstat_RAW_inuse Number of RAW sockets in state inuse.\n# TYPE node_sockstat_RAW_inuse gauge\nnode_sockstat_RAW_inuse 0\n# HELP node_sockstat_TCP6_inuse Number of TCP6 sockets in state inuse.\n# TYPE node_sockstat_TCP6_inuse gauge\nnode_sockstat_TCP6_inuse 17\n# HELP node_sockstat_TCP_alloc Number of TCP sockets in state alloc.\n# TYPE node_sockstat_TCP_alloc gauge\nnode_sockstat_TCP_alloc 17\n# HELP node_sockstat_TCP_inuse Number of TCP sockets in state inuse.\n# TYPE node_sockstat_TCP_inuse gauge\nnode_sockstat_TCP_inuse 4\n# HELP node_sockstat_TCP_mem Number of TCP sockets in state mem.\n# TYPE node_sockstat_TCP_mem gauge\nnode_sockstat_TCP_mem 1\n# HELP node_sockstat_TCP_mem_bytes Number of TCP sockets in state mem_bytes.\n# TYPE node_sockstat_TCP_mem_bytes gauge\nnode_sockstat_TCP_mem_bytes 4096\n# HELP node_sockstat_TCP_orphan Number of TCP sockets in state orphan.\n# TYPE node_sockstat_TCP_orphan gauge\nnode_sockstat_TCP_orphan 0\n# HELP node_sockstat_TCP_tw Number of TCP sockets in state tw.\n# TYPE node_sockstat_TCP_tw gauge\nnode_sockstat_TCP_tw 4\n# HELP node_sockstat_UDP6_inuse Number of UDP6 sockets in state inuse.\n# TYPE node_sockstat_UDP6_inuse gauge\nnode_sockstat_UDP6_inuse 9\n# HELP node_sockstat_UDPLITE6_inuse Number of UDPLITE6 sockets in state inuse.\n# TYPE node_sockstat_UDPLITE6_inuse gauge\nnode_sockstat_UDPLITE6_inuse 0\n# HELP node_sockstat_UDPLITE_inuse Number of UDPLITE sockets in state inuse.\n# TYPE node_sockstat_UDPLITE_inuse gauge\nnode_sockstat_UDPLITE_inuse 0\n# HELP node_sockstat_UDP_inuse Number of UDP sockets in state inuse.\n# TYPE node_sockstat_UDP_inuse gauge\nnode_sockstat_UDP_inuse 0\n# HELP node_sockstat_UDP_mem Number of UDP sockets in state mem.\n# TYPE node_sockstat_UDP_mem gauge\nnode_sockstat_UDP_mem 0\n# HELP node_sockstat_UDP_mem_bytes Number of UDP sockets in state mem_bytes.\n# TYPE node_sockstat_UDP_mem_bytes gauge\nnode_sockstat_UDP_mem_bytes 0\n# HELP node_sockstat_sockets_used Number of IPv4 sockets in use.\n# TYPE node_sockstat_sockets_used gauge\nnode_sockstat_sockets_used 229\n# HELP node_softirqs_functions_total Softirq counts per CPU.\n# TYPE node_softirqs_functions_total counter\nnode_softirqs_functions_total{cpu=\"0\",type=\"BLOCK\"} 23776\nnode_softirqs_functions_total{cpu=\"0\",type=\"HI\"} 7\nnode_softirqs_functions_total{cpu=\"0\",type=\"HRTIMER\"} 40\nnode_softirqs_functions_total{cpu=\"0\",type=\"IRQ_POLL\"} 0\nnode_softirqs_functions_total{cpu=\"0\",type=\"NET_RX\"} 43066\nnode_softirqs_functions_total{cpu=\"0\",type=\"NET_TX\"} 2301\nnode_softirqs_functions_total{cpu=\"0\",type=\"RCU\"} 155929\nnode_softirqs_functions_total{cpu=\"0\",type=\"SCHED\"} 378895\nnode_softirqs_functions_total{cpu=\"0\",type=\"TASKLET\"} 372\nnode_softirqs_functions_total{cpu=\"0\",type=\"TIMER\"} 424191\nnode_softirqs_functions_total{cpu=\"1\",type=\"BLOCK\"} 24115\nnode_softirqs_functions_total{cpu=\"1\",type=\"HI\"} 1\nnode_softirqs_functions_total{cpu=\"1\",type=\"HRTIMER\"} 346\nnode_softirqs_functions_total{cpu=\"1\",type=\"IRQ_POLL\"} 0\nnode_softirqs_functions_total{cpu=\"1\",type=\"NET_RX\"} 104508\nnode_softirqs_functions_total{cpu=\"1\",type=\"NET_TX\"} 2430\nnode_softirqs_functions_total{cpu=\"1\",type=\"RCU\"} 146631\nnode_softirqs_functions_total{cpu=\"1\",type=\"SCHED\"} 152852\nnode_softirqs_functions_total{cpu=\"1\",type=\"TASKLET\"} 1899\nnode_softirqs_functions_total{cpu=\"1\",type=\"TIMER\"} 108342\n# HELP node_softirqs_total Number of softirq calls.\n# TYPE node_softirqs_total counter\nnode_softirqs_total{vector=\"block\"} 186066\nnode_softirqs_total{vector=\"block_iopoll\"} 0\nnode_softirqs_total{vector=\"hi\"} 250191\nnode_softirqs_total{vector=\"hrtimer\"} 12499\nnode_softirqs_total{vector=\"net_rx\"} 211099\nnode_softirqs_total{vector=\"net_tx\"} 1647\nnode_softirqs_total{vector=\"rcu\"} 508444\nnode_softirqs_total{vector=\"sched\"} 622196\nnode_softirqs_total{vector=\"tasklet\"} 1.783454e+06\nnode_softirqs_total{vector=\"timer\"} 1.481983e+06\n# HELP node_softnet_backlog_len Softnet backlog status\n# TYPE node_softnet_backlog_len gauge\nnode_softnet_backlog_len{cpu=\"0\"} 0\nnode_softnet_backlog_len{cpu=\"1\"} 0\nnode_softnet_backlog_len{cpu=\"2\"} 0\nnode_softnet_backlog_len{cpu=\"3\"} 0\n# HELP node_softnet_cpu_collision_total Number of collision occur while obtaining device lock while transmitting\n# TYPE node_softnet_cpu_collision_total counter\nnode_softnet_cpu_collision_total{cpu=\"0\"} 0\nnode_softnet_cpu_collision_total{cpu=\"1\"} 0\nnode_softnet_cpu_collision_total{cpu=\"2\"} 0\nnode_softnet_cpu_collision_total{cpu=\"3\"} 0\n# HELP node_softnet_dropped_total Number of dropped packets\n# TYPE node_softnet_dropped_total counter\nnode_softnet_dropped_total{cpu=\"0\"} 0\nnode_softnet_dropped_total{cpu=\"1\"} 41\nnode_softnet_dropped_total{cpu=\"2\"} 0\nnode_softnet_dropped_total{cpu=\"3\"} 0\n# HELP node_softnet_flow_limit_count_total Number of times flow limit has been reached\n# TYPE node_softnet_flow_limit_count_total counter\nnode_softnet_flow_limit_count_total{cpu=\"0\"} 0\nnode_softnet_flow_limit_count_total{cpu=\"1\"} 0\nnode_softnet_flow_limit_count_total{cpu=\"2\"} 0\nnode_softnet_flow_limit_count_total{cpu=\"3\"} 0\n# HELP node_softnet_processed_total Number of processed packets\n# TYPE node_softnet_processed_total counter\nnode_softnet_processed_total{cpu=\"0\"} 299641\nnode_softnet_processed_total{cpu=\"1\"} 916354\nnode_softnet_processed_total{cpu=\"2\"} 5.577791e+06\nnode_softnet_processed_total{cpu=\"3\"} 3.113785e+06\n# HELP node_softnet_received_rps_total Number of times cpu woken up received_rps\n# TYPE node_softnet_received_rps_total counter\nnode_softnet_received_rps_total{cpu=\"0\"} 0\nnode_softnet_received_rps_total{cpu=\"1\"} 0\nnode_softnet_received_rps_total{cpu=\"2\"} 0\nnode_softnet_received_rps_total{cpu=\"3\"} 0\n# HELP node_softnet_times_squeezed_total Number of times processing packets ran out of quota\n# TYPE node_softnet_times_squeezed_total counter\nnode_softnet_times_squeezed_total{cpu=\"0\"} 1\nnode_softnet_times_squeezed_total{cpu=\"1\"} 10\nnode_softnet_times_squeezed_total{cpu=\"2\"} 85\nnode_softnet_times_squeezed_total{cpu=\"3\"} 50\n# HELP node_sysctl_fs_file_nr sysctl fs.file-nr\n# TYPE node_sysctl_fs_file_nr untyped\nnode_sysctl_fs_file_nr{index=\"0\"} 1024\nnode_sysctl_fs_file_nr{index=\"1\"} 0\nnode_sysctl_fs_file_nr{index=\"2\"} 1.631329e+06\n# HELP node_sysctl_fs_file_nr_current sysctl fs.file-nr, field 1\n# TYPE node_sysctl_fs_file_nr_current untyped\nnode_sysctl_fs_file_nr_current 0\n# HELP node_sysctl_fs_file_nr_max sysctl fs.file-nr, field 2\n# TYPE node_sysctl_fs_file_nr_max untyped\nnode_sysctl_fs_file_nr_max 1.631329e+06\n# HELP node_sysctl_fs_file_nr_total sysctl fs.file-nr, field 0\n# TYPE node_sysctl_fs_file_nr_total untyped\nnode_sysctl_fs_file_nr_total 1024\n# HELP node_sysctl_info sysctl info\n# TYPE node_sysctl_info gauge\nnode_sysctl_info{index=\"0\",name=\"kernel.seccomp.actions_avail\",value=\"kill_process\"} 1\nnode_sysctl_info{index=\"1\",name=\"kernel.seccomp.actions_avail\",value=\"kill_thread\"} 1\nnode_sysctl_info{index=\"2\",name=\"kernel.seccomp.actions_avail\",value=\"trap\"} 1\nnode_sysctl_info{index=\"3\",name=\"kernel.seccomp.actions_avail\",value=\"errno\"} 1\nnode_sysctl_info{index=\"4\",name=\"kernel.seccomp.actions_avail\",value=\"user_notif\"} 1\nnode_sysctl_info{index=\"5\",name=\"kernel.seccomp.actions_avail\",value=\"trace\"} 1\nnode_sysctl_info{index=\"6\",name=\"kernel.seccomp.actions_avail\",value=\"log\"} 1\nnode_sysctl_info{index=\"7\",name=\"kernel.seccomp.actions_avail\",value=\"allow\"} 1\n# HELP node_sysctl_kernel_threads_max sysctl kernel.threads-max\n# TYPE node_sysctl_kernel_threads_max untyped\nnode_sysctl_kernel_threads_max 7801\n# HELP node_tape_io_now The number of I/Os currently outstanding to this device.\n# TYPE node_tape_io_now gauge\nnode_tape_io_now{device=\"st0\"} 1\n# HELP node_tape_io_others_total The number of I/Os issued to the tape drive other than read or write commands. The time taken to complete these commands uses the following calculation io_time_seconds_total-read_time_seconds_total-write_time_seconds_total\n# TYPE node_tape_io_others_total counter\nnode_tape_io_others_total{device=\"st0\"} 1409\n# HELP node_tape_io_time_seconds_total The amount of time spent waiting for all I/O to complete (including read and write). This includes tape movement commands such as seeking between file or set marks and implicit tape movement such as when rewind on close tape devices are used.\n# TYPE node_tape_io_time_seconds_total counter\nnode_tape_io_time_seconds_total{device=\"st0\"} 9247.01108772\n# HELP node_tape_read_bytes_total The number of bytes read from the tape drive.\n# TYPE node_tape_read_bytes_total counter\nnode_tape_read_bytes_total{device=\"st0\"} 9.79383912e+08\n# HELP node_tape_read_time_seconds_total The amount of time spent waiting for read requests to complete.\n# TYPE node_tape_read_time_seconds_total counter\nnode_tape_read_time_seconds_total{device=\"st0\"} 33.788355744\n# HELP node_tape_reads_completed_total The number of read requests issued to the tape drive.\n# TYPE node_tape_reads_completed_total counter\nnode_tape_reads_completed_total{device=\"st0\"} 3741\n# HELP node_tape_residual_total The number of times during a read or write we found the residual amount to be non-zero. This should mean that a program is issuing a read larger thean the block size on tape. For write not all data made it to tape.\n# TYPE node_tape_residual_total counter\nnode_tape_residual_total{device=\"st0\"} 19\n# HELP node_tape_write_time_seconds_total The amount of time spent waiting for write requests to complete.\n# TYPE node_tape_write_time_seconds_total counter\nnode_tape_write_time_seconds_total{device=\"st0\"} 5233.597394395\n# HELP node_tape_writes_completed_total The number of write requests issued to the tape drive.\n# TYPE node_tape_writes_completed_total counter\nnode_tape_writes_completed_total{device=\"st0\"} 5.3772916e+07\n# HELP node_tape_written_bytes_total The number of bytes written to the tape drive.\n# TYPE node_tape_written_bytes_total counter\nnode_tape_written_bytes_total{device=\"st0\"} 1.496246784e+12\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP node_thermal_zone_temp Zone temperature in Celsius\n# TYPE node_thermal_zone_temp gauge\nnode_thermal_zone_temp{type=\"cpu-thermal\",zone=\"0\"} 12.376\n# HELP node_time_clocksource_available_info Available clocksources read from '/sys/devices/system/clocksource'.\n# TYPE node_time_clocksource_available_info gauge\nnode_time_clocksource_available_info{clocksource=\"acpi_pm\",device=\"0\"} 1\nnode_time_clocksource_available_info{clocksource=\"hpet\",device=\"0\"} 1\nnode_time_clocksource_available_info{clocksource=\"tsc\",device=\"0\"} 1\n# HELP node_time_clocksource_current_info Current clocksource read from '/sys/devices/system/clocksource'.\n# TYPE node_time_clocksource_current_info gauge\nnode_time_clocksource_current_info{clocksource=\"tsc\",device=\"0\"} 1\n# HELP node_time_seconds System time in seconds since epoch (1970).\n# TYPE node_time_seconds gauge\n# HELP node_time_zone_offset_seconds System time zone offset in seconds.\n# TYPE node_time_zone_offset_seconds gauge\n# HELP node_udp_queues Number of allocated memory in the kernel for UDP datagrams in bytes.\n# TYPE node_udp_queues gauge\nnode_udp_queues{ip=\"v4\",queue=\"rx\"} 0\nnode_udp_queues{ip=\"v4\",queue=\"tx\"} 21\n# HELP node_vmstat_oom_kill /proc/vmstat information field oom_kill.\n# TYPE node_vmstat_oom_kill untyped\nnode_vmstat_oom_kill 0\n# HELP node_vmstat_pgfault /proc/vmstat information field pgfault.\n# TYPE node_vmstat_pgfault untyped\nnode_vmstat_pgfault 2.320168809e+09\n# HELP node_vmstat_pgmajfault /proc/vmstat information field pgmajfault.\n# TYPE node_vmstat_pgmajfault untyped\nnode_vmstat_pgmajfault 507162\n# HELP node_vmstat_pgpgin /proc/vmstat information field pgpgin.\n# TYPE node_vmstat_pgpgin untyped\nnode_vmstat_pgpgin 7.344136e+06\n# HELP node_vmstat_pgpgout /proc/vmstat information field pgpgout.\n# TYPE node_vmstat_pgpgout untyped\nnode_vmstat_pgpgout 1.541180581e+09\n# HELP node_vmstat_pswpin /proc/vmstat information field pswpin.\n# TYPE node_vmstat_pswpin untyped\nnode_vmstat_pswpin 1476\n# HELP node_vmstat_pswpout /proc/vmstat information field pswpout.\n# TYPE node_vmstat_pswpout untyped\nnode_vmstat_pswpout 35045\n# HELP node_watchdog_access_cs0 Value of /sys/class/watchdog/<watchdog>/access_cs0\n# TYPE node_watchdog_access_cs0 gauge\nnode_watchdog_access_cs0{name=\"watchdog0\"} 0\n# HELP node_watchdog_bootstatus Value of /sys/class/watchdog/<watchdog>/bootstatus\n# TYPE node_watchdog_bootstatus gauge\nnode_watchdog_bootstatus{name=\"watchdog0\"} 1\n# HELP node_watchdog_fw_version Value of /sys/class/watchdog/<watchdog>/fw_version\n# TYPE node_watchdog_fw_version gauge\nnode_watchdog_fw_version{name=\"watchdog0\"} 2\n# HELP node_watchdog_info Info of /sys/class/watchdog/<watchdog>\n# TYPE node_watchdog_info gauge\nnode_watchdog_info{identity=\"\",name=\"watchdog1\",options=\"\",pretimeout_governor=\"\",state=\"\",status=\"\"} 1\nnode_watchdog_info{identity=\"Software Watchdog\",name=\"watchdog0\",options=\"0x8380\",pretimeout_governor=\"noop\",state=\"active\",status=\"0x8000\"} 1\n# HELP node_watchdog_nowayout Value of /sys/class/watchdog/<watchdog>/nowayout\n# TYPE node_watchdog_nowayout gauge\nnode_watchdog_nowayout{name=\"watchdog0\"} 0\n# HELP node_watchdog_pretimeout_seconds Value of /sys/class/watchdog/<watchdog>/pretimeout\n# TYPE node_watchdog_pretimeout_seconds gauge\nnode_watchdog_pretimeout_seconds{name=\"watchdog0\"} 120\n# HELP node_watchdog_timeleft_seconds Value of /sys/class/watchdog/<watchdog>/timeleft\n# TYPE node_watchdog_timeleft_seconds gauge\nnode_watchdog_timeleft_seconds{name=\"watchdog0\"} 300\n# HELP node_watchdog_timeout_seconds Value of /sys/class/watchdog/<watchdog>/timeout\n# TYPE node_watchdog_timeout_seconds gauge\nnode_watchdog_timeout_seconds{name=\"watchdog0\"} 60\n# HELP node_wifi_interface_frequency_hertz The current frequency a WiFi interface is operating at, in hertz.\n# TYPE node_wifi_interface_frequency_hertz gauge\nnode_wifi_interface_frequency_hertz{device=\"wlan0\"} 2.412e+09\nnode_wifi_interface_frequency_hertz{device=\"wlan1\"} 2.412e+09\n# HELP node_wifi_station_beacon_loss_total The total number of times a station has detected a beacon loss.\n# TYPE node_wifi_station_beacon_loss_total counter\nnode_wifi_station_beacon_loss_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 2\nnode_wifi_station_beacon_loss_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 1\n# HELP node_wifi_station_connected_seconds_total The total number of seconds a station has been connected to an access point.\n# TYPE node_wifi_station_connected_seconds_total counter\nnode_wifi_station_connected_seconds_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 60\nnode_wifi_station_connected_seconds_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 30\n# HELP node_wifi_station_inactive_seconds The number of seconds since any wireless activity has occurred on a station.\n# TYPE node_wifi_station_inactive_seconds gauge\nnode_wifi_station_inactive_seconds{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0.8\nnode_wifi_station_inactive_seconds{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0.4\n# HELP node_wifi_station_info Labeled WiFi interface station information as provided by the operating system.\n# TYPE node_wifi_station_info gauge\nnode_wifi_station_info{bssid=\"00:11:22:33:44:55\",device=\"wlan0\",mode=\"client\",ssid=\"Example\"} 1\n# HELP node_wifi_station_receive_bits_per_second The current WiFi receive bitrate of a station, in bits per second.\n# TYPE node_wifi_station_receive_bits_per_second gauge\nnode_wifi_station_receive_bits_per_second{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 2.56e+08\nnode_wifi_station_receive_bits_per_second{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 1.28e+08\n# HELP node_wifi_station_receive_bytes_total The total number of bytes received by a WiFi station.\n# TYPE node_wifi_station_receive_bytes_total counter\nnode_wifi_station_receive_bytes_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0\nnode_wifi_station_receive_bytes_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0\n# HELP node_wifi_station_received_packets_total The total number of packets received by a station.\n# TYPE node_wifi_station_received_packets_total counter\nnode_wifi_station_received_packets_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0\nnode_wifi_station_received_packets_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0\n# HELP node_wifi_station_signal_dbm The current WiFi signal strength, in decibel-milliwatts (dBm).\n# TYPE node_wifi_station_signal_dbm gauge\nnode_wifi_station_signal_dbm{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} -26\nnode_wifi_station_signal_dbm{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} -52\n# HELP node_wifi_station_transmit_bits_per_second The current WiFi transmit bitrate of a station, in bits per second.\n# TYPE node_wifi_station_transmit_bits_per_second gauge\nnode_wifi_station_transmit_bits_per_second{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 3.28e+08\nnode_wifi_station_transmit_bits_per_second{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 1.64e+08\n# HELP node_wifi_station_transmit_bytes_total The total number of bytes transmitted by a WiFi station.\n# TYPE node_wifi_station_transmit_bytes_total counter\nnode_wifi_station_transmit_bytes_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0\nnode_wifi_station_transmit_bytes_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0\n# HELP node_wifi_station_transmit_failed_total The total number of times a station has failed to send a packet.\n# TYPE node_wifi_station_transmit_failed_total counter\nnode_wifi_station_transmit_failed_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 4\nnode_wifi_station_transmit_failed_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 2\n# HELP node_wifi_station_transmit_retries_total The total number of times a station has had to retry while sending a packet.\n# TYPE node_wifi_station_transmit_retries_total counter\nnode_wifi_station_transmit_retries_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 20\nnode_wifi_station_transmit_retries_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 10\n# HELP node_wifi_station_transmitted_packets_total The total number of packets transmitted by a station.\n# TYPE node_wifi_station_transmitted_packets_total counter\nnode_wifi_station_transmitted_packets_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0\nnode_wifi_station_transmitted_packets_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0\n# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n# TYPE node_xfrm_acquire_error_packets_total counter\nnode_xfrm_acquire_error_packets_total 24532\n# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n# TYPE node_xfrm_fwd_hdr_error_packets_total counter\nnode_xfrm_fwd_hdr_error_packets_total 6654\n# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n# TYPE node_xfrm_in_buffer_error_packets_total counter\nnode_xfrm_in_buffer_error_packets_total 2\n# HELP node_xfrm_in_error_packets_total All errors not matched by other\n# TYPE node_xfrm_in_error_packets_total counter\nnode_xfrm_in_error_packets_total 1\n# HELP node_xfrm_in_hdr_error_packets_total Header error\n# TYPE node_xfrm_in_hdr_error_packets_total counter\nnode_xfrm_in_hdr_error_packets_total 4\n# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n# TYPE node_xfrm_in_no_pols_packets_total counter\nnode_xfrm_in_no_pols_packets_total 65432\n# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n# TYPE node_xfrm_in_no_states_packets_total counter\nnode_xfrm_in_no_states_packets_total 3\n# HELP node_xfrm_in_pol_block_packets_total Policy discards\n# TYPE node_xfrm_in_pol_block_packets_total counter\nnode_xfrm_in_pol_block_packets_total 100\n# HELP node_xfrm_in_pol_error_packets_total Policy error\n# TYPE node_xfrm_in_pol_error_packets_total counter\nnode_xfrm_in_pol_error_packets_total 10000\n# HELP node_xfrm_in_state_expired_packets_total State is expired\n# TYPE node_xfrm_in_state_expired_packets_total counter\nnode_xfrm_in_state_expired_packets_total 7\n# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n# TYPE node_xfrm_in_state_invalid_packets_total counter\nnode_xfrm_in_state_invalid_packets_total 55555\n# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n# TYPE node_xfrm_in_state_mismatch_packets_total counter\nnode_xfrm_in_state_mismatch_packets_total 23451\n# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_in_state_mode_error_packets_total counter\nnode_xfrm_in_state_mode_error_packets_total 100\n# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n# TYPE node_xfrm_in_state_proto_error_packets_total counter\nnode_xfrm_in_state_proto_error_packets_total 40\n# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n# TYPE node_xfrm_in_state_seq_error_packets_total counter\nnode_xfrm_in_state_seq_error_packets_total 6000\n# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\nnode_xfrm_in_tmpl_mismatch_packets_total 51\n# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n# TYPE node_xfrm_out_bundle_check_error_packets_total counter\nnode_xfrm_out_bundle_check_error_packets_total 555\n# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\nnode_xfrm_out_bundle_gen_error_packets_total 43321\n# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n# TYPE node_xfrm_out_error_packets_total counter\nnode_xfrm_out_error_packets_total 1e+06\n# HELP node_xfrm_out_no_states_packets_total No state is found\n# TYPE node_xfrm_out_no_states_packets_total counter\nnode_xfrm_out_no_states_packets_total 869\n# HELP node_xfrm_out_pol_block_packets_total Policy discards\n# TYPE node_xfrm_out_pol_block_packets_total counter\nnode_xfrm_out_pol_block_packets_total 43456\n# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n# TYPE node_xfrm_out_pol_dead_packets_total counter\nnode_xfrm_out_pol_dead_packets_total 7656\n# HELP node_xfrm_out_pol_error_packets_total Policy error\n# TYPE node_xfrm_out_pol_error_packets_total counter\nnode_xfrm_out_pol_error_packets_total 1454\n# HELP node_xfrm_out_state_expired_packets_total State is expired\n# TYPE node_xfrm_out_state_expired_packets_total counter\nnode_xfrm_out_state_expired_packets_total 565\n# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n# TYPE node_xfrm_out_state_invalid_packets_total counter\nnode_xfrm_out_state_invalid_packets_total 28765\n# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_out_state_mode_error_packets_total counter\nnode_xfrm_out_state_mode_error_packets_total 8\n# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n# TYPE node_xfrm_out_state_proto_error_packets_total counter\nnode_xfrm_out_state_proto_error_packets_total 4542\n# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n# TYPE node_xfrm_out_state_seq_error_packets_total counter\nnode_xfrm_out_state_seq_error_packets_total 543\n# HELP node_xfs_allocation_btree_compares_total Number of allocation B-tree compares for a filesystem.\n# TYPE node_xfs_allocation_btree_compares_total counter\nnode_xfs_allocation_btree_compares_total{device=\"sda1\"} 0\n# HELP node_xfs_allocation_btree_lookups_total Number of allocation B-tree lookups for a filesystem.\n# TYPE node_xfs_allocation_btree_lookups_total counter\nnode_xfs_allocation_btree_lookups_total{device=\"sda1\"} 0\n# HELP node_xfs_allocation_btree_records_deleted_total Number of allocation B-tree records deleted for a filesystem.\n# TYPE node_xfs_allocation_btree_records_deleted_total counter\nnode_xfs_allocation_btree_records_deleted_total{device=\"sda1\"} 0\n# HELP node_xfs_allocation_btree_records_inserted_total Number of allocation B-tree records inserted for a filesystem.\n# TYPE node_xfs_allocation_btree_records_inserted_total counter\nnode_xfs_allocation_btree_records_inserted_total{device=\"sda1\"} 0\n# HELP node_xfs_block_map_btree_compares_total Number of block map B-tree compares for a filesystem.\n# TYPE node_xfs_block_map_btree_compares_total counter\nnode_xfs_block_map_btree_compares_total{device=\"sda1\"} 0\n# HELP node_xfs_block_map_btree_lookups_total Number of block map B-tree lookups for a filesystem.\n# TYPE node_xfs_block_map_btree_lookups_total counter\nnode_xfs_block_map_btree_lookups_total{device=\"sda1\"} 0\n# HELP node_xfs_block_map_btree_records_deleted_total Number of block map B-tree records deleted for a filesystem.\n# TYPE node_xfs_block_map_btree_records_deleted_total counter\nnode_xfs_block_map_btree_records_deleted_total{device=\"sda1\"} 0\n# HELP node_xfs_block_map_btree_records_inserted_total Number of block map B-tree records inserted for a filesystem.\n# TYPE node_xfs_block_map_btree_records_inserted_total counter\nnode_xfs_block_map_btree_records_inserted_total{device=\"sda1\"} 0\n# HELP node_xfs_block_mapping_extent_list_compares_total Number of extent list compares for a filesystem.\n# TYPE node_xfs_block_mapping_extent_list_compares_total counter\nnode_xfs_block_mapping_extent_list_compares_total{device=\"sda1\"} 0\n# HELP node_xfs_block_mapping_extent_list_deletions_total Number of extent list deletions for a filesystem.\n# TYPE node_xfs_block_mapping_extent_list_deletions_total counter\nnode_xfs_block_mapping_extent_list_deletions_total{device=\"sda1\"} 1\n# HELP node_xfs_block_mapping_extent_list_insertions_total Number of extent list insertions for a filesystem.\n# TYPE node_xfs_block_mapping_extent_list_insertions_total counter\nnode_xfs_block_mapping_extent_list_insertions_total{device=\"sda1\"} 1\n# HELP node_xfs_block_mapping_extent_list_lookups_total Number of extent list lookups for a filesystem.\n# TYPE node_xfs_block_mapping_extent_list_lookups_total counter\nnode_xfs_block_mapping_extent_list_lookups_total{device=\"sda1\"} 91\n# HELP node_xfs_block_mapping_reads_total Number of block map for read operations for a filesystem.\n# TYPE node_xfs_block_mapping_reads_total counter\nnode_xfs_block_mapping_reads_total{device=\"sda1\"} 61\n# HELP node_xfs_block_mapping_unmaps_total Number of block unmaps (deletes) for a filesystem.\n# TYPE node_xfs_block_mapping_unmaps_total counter\nnode_xfs_block_mapping_unmaps_total{device=\"sda1\"} 1\n# HELP node_xfs_block_mapping_writes_total Number of block map for write operations for a filesystem.\n# TYPE node_xfs_block_mapping_writes_total counter\nnode_xfs_block_mapping_writes_total{device=\"sda1\"} 29\n# HELP node_xfs_directory_operation_create_total Number of times a new directory entry was created for a filesystem.\n# TYPE node_xfs_directory_operation_create_total counter\nnode_xfs_directory_operation_create_total{device=\"sda1\"} 2\n# HELP node_xfs_directory_operation_getdents_total Number of times the directory getdents operation was performed for a filesystem.\n# TYPE node_xfs_directory_operation_getdents_total counter\nnode_xfs_directory_operation_getdents_total{device=\"sda1\"} 52\n# HELP node_xfs_directory_operation_lookup_total Number of file name directory lookups which miss the operating systems directory name lookup cache.\n# TYPE node_xfs_directory_operation_lookup_total counter\nnode_xfs_directory_operation_lookup_total{device=\"sda1\"} 3\n# HELP node_xfs_directory_operation_remove_total Number of times an existing directory entry was created for a filesystem.\n# TYPE node_xfs_directory_operation_remove_total counter\nnode_xfs_directory_operation_remove_total{device=\"sda1\"} 1\n# HELP node_xfs_extent_allocation_blocks_allocated_total Number of blocks allocated for a filesystem.\n# TYPE node_xfs_extent_allocation_blocks_allocated_total counter\nnode_xfs_extent_allocation_blocks_allocated_total{device=\"sda1\"} 872\n# HELP node_xfs_extent_allocation_blocks_freed_total Number of blocks freed for a filesystem.\n# TYPE node_xfs_extent_allocation_blocks_freed_total counter\nnode_xfs_extent_allocation_blocks_freed_total{device=\"sda1\"} 0\n# HELP node_xfs_extent_allocation_extents_allocated_total Number of extents allocated for a filesystem.\n# TYPE node_xfs_extent_allocation_extents_allocated_total counter\nnode_xfs_extent_allocation_extents_allocated_total{device=\"sda1\"} 1\n# HELP node_xfs_extent_allocation_extents_freed_total Number of extents freed for a filesystem.\n# TYPE node_xfs_extent_allocation_extents_freed_total counter\nnode_xfs_extent_allocation_extents_freed_total{device=\"sda1\"} 0\n# HELP node_xfs_inode_operation_attempts_total Number of times the OS looked for an XFS inode in the inode cache.\n# TYPE node_xfs_inode_operation_attempts_total counter\nnode_xfs_inode_operation_attempts_total{device=\"sda1\"} 5\n# HELP node_xfs_inode_operation_attribute_changes_total Number of times the OS explicitly changed the attributes of an XFS inode.\n# TYPE node_xfs_inode_operation_attribute_changes_total counter\nnode_xfs_inode_operation_attribute_changes_total{device=\"sda1\"} 1\n# HELP node_xfs_inode_operation_duplicates_total Number of times the OS tried to add a missing XFS inode to the inode cache, but found it had already been added by another process.\n# TYPE node_xfs_inode_operation_duplicates_total counter\nnode_xfs_inode_operation_duplicates_total{device=\"sda1\"} 0\n# HELP node_xfs_inode_operation_found_total Number of times the OS looked for and found an XFS inode in the inode cache.\n# TYPE node_xfs_inode_operation_found_total counter\nnode_xfs_inode_operation_found_total{device=\"sda1\"} 1\n# HELP node_xfs_inode_operation_missed_total Number of times the OS looked for an XFS inode in the cache, but did not find it.\n# TYPE node_xfs_inode_operation_missed_total counter\nnode_xfs_inode_operation_missed_total{device=\"sda1\"} 4\n# HELP node_xfs_inode_operation_reclaims_total Number of times the OS reclaimed an XFS inode from the inode cache to free memory for another purpose.\n# TYPE node_xfs_inode_operation_reclaims_total counter\nnode_xfs_inode_operation_reclaims_total{device=\"sda1\"} 0\n# HELP node_xfs_inode_operation_recycled_total Number of times the OS found an XFS inode in the cache, but could not use it as it was being recycled.\n# TYPE node_xfs_inode_operation_recycled_total counter\nnode_xfs_inode_operation_recycled_total{device=\"sda1\"} 0\n# HELP node_xfs_read_calls_total Number of read(2) system calls made to files in a filesystem.\n# TYPE node_xfs_read_calls_total counter\nnode_xfs_read_calls_total{device=\"sda1\"} 0\n# HELP node_xfs_vnode_active_total Number of vnodes not on free lists for a filesystem.\n# TYPE node_xfs_vnode_active_total counter\nnode_xfs_vnode_active_total{device=\"sda1\"} 4\n# HELP node_xfs_vnode_allocate_total Number of times vn_alloc called for a filesystem.\n# TYPE node_xfs_vnode_allocate_total counter\nnode_xfs_vnode_allocate_total{device=\"sda1\"} 0\n# HELP node_xfs_vnode_get_total Number of times vn_get called for a filesystem.\n# TYPE node_xfs_vnode_get_total counter\nnode_xfs_vnode_get_total{device=\"sda1\"} 0\n# HELP node_xfs_vnode_hold_total Number of times vn_hold called for a filesystem.\n# TYPE node_xfs_vnode_hold_total counter\nnode_xfs_vnode_hold_total{device=\"sda1\"} 0\n# HELP node_xfs_vnode_reclaim_total Number of times vn_reclaim called for a filesystem.\n# TYPE node_xfs_vnode_reclaim_total counter\nnode_xfs_vnode_reclaim_total{device=\"sda1\"} 1\n# HELP node_xfs_vnode_release_total Number of times vn_rele called for a filesystem.\n# TYPE node_xfs_vnode_release_total counter\nnode_xfs_vnode_release_total{device=\"sda1\"} 1\n# HELP node_xfs_vnode_remove_total Number of times vn_remove called for a filesystem.\n# TYPE node_xfs_vnode_remove_total counter\nnode_xfs_vnode_remove_total{device=\"sda1\"} 1\n# HELP node_xfs_write_calls_total Number of write(2) system calls made to files in a filesystem.\n# TYPE node_xfs_write_calls_total counter\nnode_xfs_write_calls_total{device=\"sda1\"} 28\n# HELP node_zfs_abd_linear_cnt kstat.zfs.misc.abdstats.linear_cnt\n# TYPE node_zfs_abd_linear_cnt untyped\nnode_zfs_abd_linear_cnt 62\n# HELP node_zfs_abd_linear_data_size kstat.zfs.misc.abdstats.linear_data_size\n# TYPE node_zfs_abd_linear_data_size untyped\nnode_zfs_abd_linear_data_size 223232\n# HELP node_zfs_abd_scatter_chunk_waste kstat.zfs.misc.abdstats.scatter_chunk_waste\n# TYPE node_zfs_abd_scatter_chunk_waste untyped\nnode_zfs_abd_scatter_chunk_waste 0\n# HELP node_zfs_abd_scatter_cnt kstat.zfs.misc.abdstats.scatter_cnt\n# TYPE node_zfs_abd_scatter_cnt untyped\nnode_zfs_abd_scatter_cnt 1\n# HELP node_zfs_abd_scatter_data_size kstat.zfs.misc.abdstats.scatter_data_size\n# TYPE node_zfs_abd_scatter_data_size untyped\nnode_zfs_abd_scatter_data_size 16384\n# HELP node_zfs_abd_scatter_order_0 kstat.zfs.misc.abdstats.scatter_order_0\n# TYPE node_zfs_abd_scatter_order_0 untyped\nnode_zfs_abd_scatter_order_0 0\n# HELP node_zfs_abd_scatter_order_1 kstat.zfs.misc.abdstats.scatter_order_1\n# TYPE node_zfs_abd_scatter_order_1 untyped\nnode_zfs_abd_scatter_order_1 0\n# HELP node_zfs_abd_scatter_order_10 kstat.zfs.misc.abdstats.scatter_order_10\n# TYPE node_zfs_abd_scatter_order_10 untyped\nnode_zfs_abd_scatter_order_10 0\n# HELP node_zfs_abd_scatter_order_2 kstat.zfs.misc.abdstats.scatter_order_2\n# TYPE node_zfs_abd_scatter_order_2 untyped\nnode_zfs_abd_scatter_order_2 1\n# HELP node_zfs_abd_scatter_order_3 kstat.zfs.misc.abdstats.scatter_order_3\n# TYPE node_zfs_abd_scatter_order_3 untyped\nnode_zfs_abd_scatter_order_3 0\n# HELP node_zfs_abd_scatter_order_4 kstat.zfs.misc.abdstats.scatter_order_4\n# TYPE node_zfs_abd_scatter_order_4 untyped\nnode_zfs_abd_scatter_order_4 0\n# HELP node_zfs_abd_scatter_order_5 kstat.zfs.misc.abdstats.scatter_order_5\n# TYPE node_zfs_abd_scatter_order_5 untyped\nnode_zfs_abd_scatter_order_5 0\n# HELP node_zfs_abd_scatter_order_6 kstat.zfs.misc.abdstats.scatter_order_6\n# TYPE node_zfs_abd_scatter_order_6 untyped\nnode_zfs_abd_scatter_order_6 0\n# HELP node_zfs_abd_scatter_order_7 kstat.zfs.misc.abdstats.scatter_order_7\n# TYPE node_zfs_abd_scatter_order_7 untyped\nnode_zfs_abd_scatter_order_7 0\n# HELP node_zfs_abd_scatter_order_8 kstat.zfs.misc.abdstats.scatter_order_8\n# TYPE node_zfs_abd_scatter_order_8 untyped\nnode_zfs_abd_scatter_order_8 0\n# HELP node_zfs_abd_scatter_order_9 kstat.zfs.misc.abdstats.scatter_order_9\n# TYPE node_zfs_abd_scatter_order_9 untyped\nnode_zfs_abd_scatter_order_9 0\n# HELP node_zfs_abd_scatter_page_alloc_retry kstat.zfs.misc.abdstats.scatter_page_alloc_retry\n# TYPE node_zfs_abd_scatter_page_alloc_retry untyped\nnode_zfs_abd_scatter_page_alloc_retry 0\n# HELP node_zfs_abd_scatter_page_multi_chunk kstat.zfs.misc.abdstats.scatter_page_multi_chunk\n# TYPE node_zfs_abd_scatter_page_multi_chunk untyped\nnode_zfs_abd_scatter_page_multi_chunk 0\n# HELP node_zfs_abd_scatter_page_multi_zone kstat.zfs.misc.abdstats.scatter_page_multi_zone\n# TYPE node_zfs_abd_scatter_page_multi_zone untyped\nnode_zfs_abd_scatter_page_multi_zone 0\n# HELP node_zfs_abd_scatter_sg_table_retry kstat.zfs.misc.abdstats.scatter_sg_table_retry\n# TYPE node_zfs_abd_scatter_sg_table_retry untyped\nnode_zfs_abd_scatter_sg_table_retry 0\n# HELP node_zfs_abd_struct_size kstat.zfs.misc.abdstats.struct_size\n# TYPE node_zfs_abd_struct_size untyped\nnode_zfs_abd_struct_size 2520\n# HELP node_zfs_arc_anon_evictable_data kstat.zfs.misc.arcstats.anon_evictable_data\n# TYPE node_zfs_arc_anon_evictable_data untyped\nnode_zfs_arc_anon_evictable_data 0\n# HELP node_zfs_arc_anon_evictable_metadata kstat.zfs.misc.arcstats.anon_evictable_metadata\n# TYPE node_zfs_arc_anon_evictable_metadata untyped\nnode_zfs_arc_anon_evictable_metadata 0\n# HELP node_zfs_arc_anon_size kstat.zfs.misc.arcstats.anon_size\n# TYPE node_zfs_arc_anon_size untyped\nnode_zfs_arc_anon_size 1.91744e+06\n# HELP node_zfs_arc_arc_loaned_bytes kstat.zfs.misc.arcstats.arc_loaned_bytes\n# TYPE node_zfs_arc_arc_loaned_bytes untyped\nnode_zfs_arc_arc_loaned_bytes 0\n# HELP node_zfs_arc_arc_meta_limit kstat.zfs.misc.arcstats.arc_meta_limit\n# TYPE node_zfs_arc_arc_meta_limit untyped\nnode_zfs_arc_arc_meta_limit 6.275982336e+09\n# HELP node_zfs_arc_arc_meta_max kstat.zfs.misc.arcstats.arc_meta_max\n# TYPE node_zfs_arc_arc_meta_max untyped\nnode_zfs_arc_arc_meta_max 4.49286096e+08\n# HELP node_zfs_arc_arc_meta_min kstat.zfs.misc.arcstats.arc_meta_min\n# TYPE node_zfs_arc_arc_meta_min untyped\nnode_zfs_arc_arc_meta_min 1.6777216e+07\n# HELP node_zfs_arc_arc_meta_used kstat.zfs.misc.arcstats.arc_meta_used\n# TYPE node_zfs_arc_arc_meta_used untyped\nnode_zfs_arc_arc_meta_used 3.08103632e+08\n# HELP node_zfs_arc_arc_need_free kstat.zfs.misc.arcstats.arc_need_free\n# TYPE node_zfs_arc_arc_need_free untyped\nnode_zfs_arc_arc_need_free 0\n# HELP node_zfs_arc_arc_no_grow kstat.zfs.misc.arcstats.arc_no_grow\n# TYPE node_zfs_arc_arc_no_grow untyped\nnode_zfs_arc_arc_no_grow 0\n# HELP node_zfs_arc_arc_prune kstat.zfs.misc.arcstats.arc_prune\n# TYPE node_zfs_arc_arc_prune untyped\nnode_zfs_arc_arc_prune 0\n# HELP node_zfs_arc_arc_sys_free kstat.zfs.misc.arcstats.arc_sys_free\n# TYPE node_zfs_arc_arc_sys_free untyped\nnode_zfs_arc_arc_sys_free 2.61496832e+08\n# HELP node_zfs_arc_arc_tempreserve kstat.zfs.misc.arcstats.arc_tempreserve\n# TYPE node_zfs_arc_arc_tempreserve untyped\nnode_zfs_arc_arc_tempreserve 0\n# HELP node_zfs_arc_c kstat.zfs.misc.arcstats.c\n# TYPE node_zfs_arc_c untyped\nnode_zfs_arc_c 1.643208777e+09\n# HELP node_zfs_arc_c_max kstat.zfs.misc.arcstats.c_max\n# TYPE node_zfs_arc_c_max untyped\nnode_zfs_arc_c_max 8.367976448e+09\n# HELP node_zfs_arc_c_min kstat.zfs.misc.arcstats.c_min\n# TYPE node_zfs_arc_c_min untyped\nnode_zfs_arc_c_min 3.3554432e+07\n# HELP node_zfs_arc_data_size kstat.zfs.misc.arcstats.data_size\n# TYPE node_zfs_arc_data_size untyped\nnode_zfs_arc_data_size 1.29583616e+09\n# HELP node_zfs_arc_deleted kstat.zfs.misc.arcstats.deleted\n# TYPE node_zfs_arc_deleted untyped\nnode_zfs_arc_deleted 60403\n# HELP node_zfs_arc_demand_data_hits kstat.zfs.misc.arcstats.demand_data_hits\n# TYPE node_zfs_arc_demand_data_hits untyped\nnode_zfs_arc_demand_data_hits 7.221032e+06\n# HELP node_zfs_arc_demand_data_misses kstat.zfs.misc.arcstats.demand_data_misses\n# TYPE node_zfs_arc_demand_data_misses untyped\nnode_zfs_arc_demand_data_misses 73300\n# HELP node_zfs_arc_demand_metadata_hits kstat.zfs.misc.arcstats.demand_metadata_hits\n# TYPE node_zfs_arc_demand_metadata_hits untyped\nnode_zfs_arc_demand_metadata_hits 1.464353e+06\n# HELP node_zfs_arc_demand_metadata_misses kstat.zfs.misc.arcstats.demand_metadata_misses\n# TYPE node_zfs_arc_demand_metadata_misses untyped\nnode_zfs_arc_demand_metadata_misses 498170\n# HELP node_zfs_arc_duplicate_buffers kstat.zfs.misc.arcstats.duplicate_buffers\n# TYPE node_zfs_arc_duplicate_buffers untyped\nnode_zfs_arc_duplicate_buffers 0\n# HELP node_zfs_arc_duplicate_buffers_size kstat.zfs.misc.arcstats.duplicate_buffers_size\n# TYPE node_zfs_arc_duplicate_buffers_size untyped\nnode_zfs_arc_duplicate_buffers_size 0\n# HELP node_zfs_arc_duplicate_reads kstat.zfs.misc.arcstats.duplicate_reads\n# TYPE node_zfs_arc_duplicate_reads untyped\nnode_zfs_arc_duplicate_reads 0\n# HELP node_zfs_arc_evict_l2_cached kstat.zfs.misc.arcstats.evict_l2_cached\n# TYPE node_zfs_arc_evict_l2_cached untyped\nnode_zfs_arc_evict_l2_cached 0\n# HELP node_zfs_arc_evict_l2_eligible kstat.zfs.misc.arcstats.evict_l2_eligible\n# TYPE node_zfs_arc_evict_l2_eligible untyped\nnode_zfs_arc_evict_l2_eligible 8.99251456e+09\n# HELP node_zfs_arc_evict_l2_ineligible kstat.zfs.misc.arcstats.evict_l2_ineligible\n# TYPE node_zfs_arc_evict_l2_ineligible untyped\nnode_zfs_arc_evict_l2_ineligible 9.92552448e+08\n# HELP node_zfs_arc_evict_l2_skip kstat.zfs.misc.arcstats.evict_l2_skip\n# TYPE node_zfs_arc_evict_l2_skip untyped\nnode_zfs_arc_evict_l2_skip 0\n# HELP node_zfs_arc_evict_not_enough kstat.zfs.misc.arcstats.evict_not_enough\n# TYPE node_zfs_arc_evict_not_enough untyped\nnode_zfs_arc_evict_not_enough 680\n# HELP node_zfs_arc_evict_skip kstat.zfs.misc.arcstats.evict_skip\n# TYPE node_zfs_arc_evict_skip untyped\nnode_zfs_arc_evict_skip 2.265729e+06\n# HELP node_zfs_arc_hash_chain_max kstat.zfs.misc.arcstats.hash_chain_max\n# TYPE node_zfs_arc_hash_chain_max untyped\nnode_zfs_arc_hash_chain_max 3\n# HELP node_zfs_arc_hash_chains kstat.zfs.misc.arcstats.hash_chains\n# TYPE node_zfs_arc_hash_chains untyped\nnode_zfs_arc_hash_chains 412\n# HELP node_zfs_arc_hash_collisions kstat.zfs.misc.arcstats.hash_collisions\n# TYPE node_zfs_arc_hash_collisions untyped\nnode_zfs_arc_hash_collisions 50564\n# HELP node_zfs_arc_hash_elements kstat.zfs.misc.arcstats.hash_elements\n# TYPE node_zfs_arc_hash_elements untyped\nnode_zfs_arc_hash_elements 42359\n# HELP node_zfs_arc_hash_elements_max kstat.zfs.misc.arcstats.hash_elements_max\n# TYPE node_zfs_arc_hash_elements_max untyped\nnode_zfs_arc_hash_elements_max 88245\n# HELP node_zfs_arc_hdr_size kstat.zfs.misc.arcstats.hdr_size\n# TYPE node_zfs_arc_hdr_size untyped\nnode_zfs_arc_hdr_size 1.636108e+07\n# HELP node_zfs_arc_hits kstat.zfs.misc.arcstats.hits\n# TYPE node_zfs_arc_hits untyped\nnode_zfs_arc_hits 8.772612e+06\n# HELP node_zfs_arc_l2_abort_lowmem kstat.zfs.misc.arcstats.l2_abort_lowmem\n# TYPE node_zfs_arc_l2_abort_lowmem untyped\nnode_zfs_arc_l2_abort_lowmem 0\n# HELP node_zfs_arc_l2_asize kstat.zfs.misc.arcstats.l2_asize\n# TYPE node_zfs_arc_l2_asize untyped\nnode_zfs_arc_l2_asize 0\n# HELP node_zfs_arc_l2_cdata_free_on_write kstat.zfs.misc.arcstats.l2_cdata_free_on_write\n# TYPE node_zfs_arc_l2_cdata_free_on_write untyped\nnode_zfs_arc_l2_cdata_free_on_write 0\n# HELP node_zfs_arc_l2_cksum_bad kstat.zfs.misc.arcstats.l2_cksum_bad\n# TYPE node_zfs_arc_l2_cksum_bad untyped\nnode_zfs_arc_l2_cksum_bad 0\n# HELP node_zfs_arc_l2_compress_failures kstat.zfs.misc.arcstats.l2_compress_failures\n# TYPE node_zfs_arc_l2_compress_failures untyped\nnode_zfs_arc_l2_compress_failures 0\n# HELP node_zfs_arc_l2_compress_successes kstat.zfs.misc.arcstats.l2_compress_successes\n# TYPE node_zfs_arc_l2_compress_successes untyped\nnode_zfs_arc_l2_compress_successes 0\n# HELP node_zfs_arc_l2_compress_zeros kstat.zfs.misc.arcstats.l2_compress_zeros\n# TYPE node_zfs_arc_l2_compress_zeros untyped\nnode_zfs_arc_l2_compress_zeros 0\n# HELP node_zfs_arc_l2_evict_l1cached kstat.zfs.misc.arcstats.l2_evict_l1cached\n# TYPE node_zfs_arc_l2_evict_l1cached untyped\nnode_zfs_arc_l2_evict_l1cached 0\n# HELP node_zfs_arc_l2_evict_lock_retry kstat.zfs.misc.arcstats.l2_evict_lock_retry\n# TYPE node_zfs_arc_l2_evict_lock_retry untyped\nnode_zfs_arc_l2_evict_lock_retry 0\n# HELP node_zfs_arc_l2_evict_reading kstat.zfs.misc.arcstats.l2_evict_reading\n# TYPE node_zfs_arc_l2_evict_reading untyped\nnode_zfs_arc_l2_evict_reading 0\n# HELP node_zfs_arc_l2_feeds kstat.zfs.misc.arcstats.l2_feeds\n# TYPE node_zfs_arc_l2_feeds untyped\nnode_zfs_arc_l2_feeds 0\n# HELP node_zfs_arc_l2_free_on_write kstat.zfs.misc.arcstats.l2_free_on_write\n# TYPE node_zfs_arc_l2_free_on_write untyped\nnode_zfs_arc_l2_free_on_write 0\n# HELP node_zfs_arc_l2_hdr_size kstat.zfs.misc.arcstats.l2_hdr_size\n# TYPE node_zfs_arc_l2_hdr_size untyped\nnode_zfs_arc_l2_hdr_size 0\n# HELP node_zfs_arc_l2_hits kstat.zfs.misc.arcstats.l2_hits\n# TYPE node_zfs_arc_l2_hits untyped\nnode_zfs_arc_l2_hits 0\n# HELP node_zfs_arc_l2_io_error kstat.zfs.misc.arcstats.l2_io_error\n# TYPE node_zfs_arc_l2_io_error untyped\nnode_zfs_arc_l2_io_error 0\n# HELP node_zfs_arc_l2_misses kstat.zfs.misc.arcstats.l2_misses\n# TYPE node_zfs_arc_l2_misses untyped\nnode_zfs_arc_l2_misses 0\n# HELP node_zfs_arc_l2_read_bytes kstat.zfs.misc.arcstats.l2_read_bytes\n# TYPE node_zfs_arc_l2_read_bytes untyped\nnode_zfs_arc_l2_read_bytes 0\n# HELP node_zfs_arc_l2_rw_clash kstat.zfs.misc.arcstats.l2_rw_clash\n# TYPE node_zfs_arc_l2_rw_clash untyped\nnode_zfs_arc_l2_rw_clash 0\n# HELP node_zfs_arc_l2_size kstat.zfs.misc.arcstats.l2_size\n# TYPE node_zfs_arc_l2_size untyped\nnode_zfs_arc_l2_size 0\n# HELP node_zfs_arc_l2_write_bytes kstat.zfs.misc.arcstats.l2_write_bytes\n# TYPE node_zfs_arc_l2_write_bytes untyped\nnode_zfs_arc_l2_write_bytes 0\n# HELP node_zfs_arc_l2_writes_done kstat.zfs.misc.arcstats.l2_writes_done\n# TYPE node_zfs_arc_l2_writes_done untyped\nnode_zfs_arc_l2_writes_done 0\n# HELP node_zfs_arc_l2_writes_error kstat.zfs.misc.arcstats.l2_writes_error\n# TYPE node_zfs_arc_l2_writes_error untyped\nnode_zfs_arc_l2_writes_error 0\n# HELP node_zfs_arc_l2_writes_lock_retry kstat.zfs.misc.arcstats.l2_writes_lock_retry\n# TYPE node_zfs_arc_l2_writes_lock_retry untyped\nnode_zfs_arc_l2_writes_lock_retry 0\n# HELP node_zfs_arc_l2_writes_sent kstat.zfs.misc.arcstats.l2_writes_sent\n# TYPE node_zfs_arc_l2_writes_sent untyped\nnode_zfs_arc_l2_writes_sent 0\n# HELP node_zfs_arc_memory_available_bytes kstat.zfs.misc.arcstats.memory_available_bytes\n# TYPE node_zfs_arc_memory_available_bytes untyped\nnode_zfs_arc_memory_available_bytes -9.223372036854776e+17\n# HELP node_zfs_arc_memory_direct_count kstat.zfs.misc.arcstats.memory_direct_count\n# TYPE node_zfs_arc_memory_direct_count untyped\nnode_zfs_arc_memory_direct_count 542\n# HELP node_zfs_arc_memory_indirect_count kstat.zfs.misc.arcstats.memory_indirect_count\n# TYPE node_zfs_arc_memory_indirect_count untyped\nnode_zfs_arc_memory_indirect_count 3006\n# HELP node_zfs_arc_memory_throttle_count kstat.zfs.misc.arcstats.memory_throttle_count\n# TYPE node_zfs_arc_memory_throttle_count untyped\nnode_zfs_arc_memory_throttle_count 0\n# HELP node_zfs_arc_metadata_size kstat.zfs.misc.arcstats.metadata_size\n# TYPE node_zfs_arc_metadata_size untyped\nnode_zfs_arc_metadata_size 1.7529856e+08\n# HELP node_zfs_arc_mfu_evictable_data kstat.zfs.misc.arcstats.mfu_evictable_data\n# TYPE node_zfs_arc_mfu_evictable_data untyped\nnode_zfs_arc_mfu_evictable_data 1.017613824e+09\n# HELP node_zfs_arc_mfu_evictable_metadata kstat.zfs.misc.arcstats.mfu_evictable_metadata\n# TYPE node_zfs_arc_mfu_evictable_metadata untyped\nnode_zfs_arc_mfu_evictable_metadata 9.163776e+06\n# HELP node_zfs_arc_mfu_ghost_evictable_data kstat.zfs.misc.arcstats.mfu_ghost_evictable_data\n# TYPE node_zfs_arc_mfu_ghost_evictable_data untyped\nnode_zfs_arc_mfu_ghost_evictable_data 9.6731136e+07\n# HELP node_zfs_arc_mfu_ghost_evictable_metadata kstat.zfs.misc.arcstats.mfu_ghost_evictable_metadata\n# TYPE node_zfs_arc_mfu_ghost_evictable_metadata untyped\nnode_zfs_arc_mfu_ghost_evictable_metadata 8.205312e+06\n# HELP node_zfs_arc_mfu_ghost_hits kstat.zfs.misc.arcstats.mfu_ghost_hits\n# TYPE node_zfs_arc_mfu_ghost_hits untyped\nnode_zfs_arc_mfu_ghost_hits 821\n# HELP node_zfs_arc_mfu_ghost_size kstat.zfs.misc.arcstats.mfu_ghost_size\n# TYPE node_zfs_arc_mfu_ghost_size untyped\nnode_zfs_arc_mfu_ghost_size 1.04936448e+08\n# HELP node_zfs_arc_mfu_hits kstat.zfs.misc.arcstats.mfu_hits\n# TYPE node_zfs_arc_mfu_hits untyped\nnode_zfs_arc_mfu_hits 7.829854e+06\n# HELP node_zfs_arc_mfu_size kstat.zfs.misc.arcstats.mfu_size\n# TYPE node_zfs_arc_mfu_size untyped\nnode_zfs_arc_mfu_size 1.066623488e+09\n# HELP node_zfs_arc_misses kstat.zfs.misc.arcstats.misses\n# TYPE node_zfs_arc_misses untyped\nnode_zfs_arc_misses 604635\n# HELP node_zfs_arc_mru_evictable_data kstat.zfs.misc.arcstats.mru_evictable_data\n# TYPE node_zfs_arc_mru_evictable_data untyped\nnode_zfs_arc_mru_evictable_data 2.78091264e+08\n# HELP node_zfs_arc_mru_evictable_metadata kstat.zfs.misc.arcstats.mru_evictable_metadata\n# TYPE node_zfs_arc_mru_evictable_metadata untyped\nnode_zfs_arc_mru_evictable_metadata 1.8606592e+07\n# HELP node_zfs_arc_mru_ghost_evictable_data kstat.zfs.misc.arcstats.mru_ghost_evictable_data\n# TYPE node_zfs_arc_mru_ghost_evictable_data untyped\nnode_zfs_arc_mru_ghost_evictable_data 8.83765248e+08\n# HELP node_zfs_arc_mru_ghost_evictable_metadata kstat.zfs.misc.arcstats.mru_ghost_evictable_metadata\n# TYPE node_zfs_arc_mru_ghost_evictable_metadata untyped\nnode_zfs_arc_mru_ghost_evictable_metadata 1.1596288e+08\n# HELP node_zfs_arc_mru_ghost_hits kstat.zfs.misc.arcstats.mru_ghost_hits\n# TYPE node_zfs_arc_mru_ghost_hits untyped\nnode_zfs_arc_mru_ghost_hits 21100\n# HELP node_zfs_arc_mru_ghost_size kstat.zfs.misc.arcstats.mru_ghost_size\n# TYPE node_zfs_arc_mru_ghost_size untyped\nnode_zfs_arc_mru_ghost_size 9.99728128e+08\n# HELP node_zfs_arc_mru_hits kstat.zfs.misc.arcstats.mru_hits\n# TYPE node_zfs_arc_mru_hits untyped\nnode_zfs_arc_mru_hits 855535\n# HELP node_zfs_arc_mru_size kstat.zfs.misc.arcstats.mru_size\n# TYPE node_zfs_arc_mru_size untyped\nnode_zfs_arc_mru_size 4.02593792e+08\n# HELP node_zfs_arc_mutex_miss kstat.zfs.misc.arcstats.mutex_miss\n# TYPE node_zfs_arc_mutex_miss untyped\nnode_zfs_arc_mutex_miss 2\n# HELP node_zfs_arc_other_size kstat.zfs.misc.arcstats.other_size\n# TYPE node_zfs_arc_other_size untyped\nnode_zfs_arc_other_size 1.16443992e+08\n# HELP node_zfs_arc_p kstat.zfs.misc.arcstats.p\n# TYPE node_zfs_arc_p untyped\nnode_zfs_arc_p 5.16395305e+08\n# HELP node_zfs_arc_prefetch_data_hits kstat.zfs.misc.arcstats.prefetch_data_hits\n# TYPE node_zfs_arc_prefetch_data_hits untyped\nnode_zfs_arc_prefetch_data_hits 3615\n# HELP node_zfs_arc_prefetch_data_misses kstat.zfs.misc.arcstats.prefetch_data_misses\n# TYPE node_zfs_arc_prefetch_data_misses untyped\nnode_zfs_arc_prefetch_data_misses 17094\n# HELP node_zfs_arc_prefetch_metadata_hits kstat.zfs.misc.arcstats.prefetch_metadata_hits\n# TYPE node_zfs_arc_prefetch_metadata_hits untyped\nnode_zfs_arc_prefetch_metadata_hits 83612\n# HELP node_zfs_arc_prefetch_metadata_misses kstat.zfs.misc.arcstats.prefetch_metadata_misses\n# TYPE node_zfs_arc_prefetch_metadata_misses untyped\nnode_zfs_arc_prefetch_metadata_misses 16071\n# HELP node_zfs_arc_size kstat.zfs.misc.arcstats.size\n# TYPE node_zfs_arc_size untyped\nnode_zfs_arc_size 1.603939792e+09\n# HELP node_zfs_dbuf_dbuf_cache_count kstat.zfs.misc.dbufstats.dbuf_cache_count\n# TYPE node_zfs_dbuf_dbuf_cache_count untyped\nnode_zfs_dbuf_dbuf_cache_count 27\n# HELP node_zfs_dbuf_dbuf_cache_hiwater_bytes kstat.zfs.misc.dbufstats.dbuf_cache_hiwater_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_hiwater_bytes untyped\nnode_zfs_dbuf_dbuf_cache_hiwater_bytes 6.9117804e+07\n# HELP node_zfs_dbuf_dbuf_cache_level_0 kstat.zfs.misc.dbufstats.dbuf_cache_level_0\n# TYPE node_zfs_dbuf_dbuf_cache_level_0 untyped\nnode_zfs_dbuf_dbuf_cache_level_0 27\n# HELP node_zfs_dbuf_dbuf_cache_level_0_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_0_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_0_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_0_bytes 302080\n# HELP node_zfs_dbuf_dbuf_cache_level_1 kstat.zfs.misc.dbufstats.dbuf_cache_level_1\n# TYPE node_zfs_dbuf_dbuf_cache_level_1 untyped\nnode_zfs_dbuf_dbuf_cache_level_1 0\n# HELP node_zfs_dbuf_dbuf_cache_level_10 kstat.zfs.misc.dbufstats.dbuf_cache_level_10\n# TYPE node_zfs_dbuf_dbuf_cache_level_10 untyped\nnode_zfs_dbuf_dbuf_cache_level_10 0\n# HELP node_zfs_dbuf_dbuf_cache_level_10_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_10_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_10_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_10_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_11 kstat.zfs.misc.dbufstats.dbuf_cache_level_11\n# TYPE node_zfs_dbuf_dbuf_cache_level_11 untyped\nnode_zfs_dbuf_dbuf_cache_level_11 0\n# HELP node_zfs_dbuf_dbuf_cache_level_11_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_11_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_11_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_11_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_1_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_1_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_1_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_1_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_2 kstat.zfs.misc.dbufstats.dbuf_cache_level_2\n# TYPE node_zfs_dbuf_dbuf_cache_level_2 untyped\nnode_zfs_dbuf_dbuf_cache_level_2 0\n# HELP node_zfs_dbuf_dbuf_cache_level_2_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_2_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_2_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_2_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_3 kstat.zfs.misc.dbufstats.dbuf_cache_level_3\n# TYPE node_zfs_dbuf_dbuf_cache_level_3 untyped\nnode_zfs_dbuf_dbuf_cache_level_3 0\n# HELP node_zfs_dbuf_dbuf_cache_level_3_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_3_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_3_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_3_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_4 kstat.zfs.misc.dbufstats.dbuf_cache_level_4\n# TYPE node_zfs_dbuf_dbuf_cache_level_4 untyped\nnode_zfs_dbuf_dbuf_cache_level_4 0\n# HELP node_zfs_dbuf_dbuf_cache_level_4_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_4_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_4_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_4_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_5 kstat.zfs.misc.dbufstats.dbuf_cache_level_5\n# TYPE node_zfs_dbuf_dbuf_cache_level_5 untyped\nnode_zfs_dbuf_dbuf_cache_level_5 0\n# HELP node_zfs_dbuf_dbuf_cache_level_5_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_5_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_5_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_5_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_6 kstat.zfs.misc.dbufstats.dbuf_cache_level_6\n# TYPE node_zfs_dbuf_dbuf_cache_level_6 untyped\nnode_zfs_dbuf_dbuf_cache_level_6 0\n# HELP node_zfs_dbuf_dbuf_cache_level_6_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_6_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_6_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_6_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_7 kstat.zfs.misc.dbufstats.dbuf_cache_level_7\n# TYPE node_zfs_dbuf_dbuf_cache_level_7 untyped\nnode_zfs_dbuf_dbuf_cache_level_7 0\n# HELP node_zfs_dbuf_dbuf_cache_level_7_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_7_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_7_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_7_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_8 kstat.zfs.misc.dbufstats.dbuf_cache_level_8\n# TYPE node_zfs_dbuf_dbuf_cache_level_8 untyped\nnode_zfs_dbuf_dbuf_cache_level_8 0\n# HELP node_zfs_dbuf_dbuf_cache_level_8_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_8_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_8_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_8_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_9 kstat.zfs.misc.dbufstats.dbuf_cache_level_9\n# TYPE node_zfs_dbuf_dbuf_cache_level_9 untyped\nnode_zfs_dbuf_dbuf_cache_level_9 0\n# HELP node_zfs_dbuf_dbuf_cache_level_9_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_9_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_9_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_9_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_lowater_bytes kstat.zfs.misc.dbufstats.dbuf_cache_lowater_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_lowater_bytes untyped\nnode_zfs_dbuf_dbuf_cache_lowater_bytes 5.6550932e+07\n# HELP node_zfs_dbuf_dbuf_cache_max_bytes kstat.zfs.misc.dbufstats.dbuf_cache_max_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_max_bytes untyped\nnode_zfs_dbuf_dbuf_cache_max_bytes 6.2834368e+07\n# HELP node_zfs_dbuf_dbuf_cache_size kstat.zfs.misc.dbufstats.dbuf_cache_size\n# TYPE node_zfs_dbuf_dbuf_cache_size untyped\nnode_zfs_dbuf_dbuf_cache_size 302080\n# HELP node_zfs_dbuf_dbuf_cache_size_max kstat.zfs.misc.dbufstats.dbuf_cache_size_max\n# TYPE node_zfs_dbuf_dbuf_cache_size_max untyped\nnode_zfs_dbuf_dbuf_cache_size_max 394240\n# HELP node_zfs_dbuf_dbuf_cache_total_evicts kstat.zfs.misc.dbufstats.dbuf_cache_total_evicts\n# TYPE node_zfs_dbuf_dbuf_cache_total_evicts untyped\nnode_zfs_dbuf_dbuf_cache_total_evicts 0\n# HELP node_zfs_dbuf_hash_chain_max kstat.zfs.misc.dbufstats.hash_chain_max\n# TYPE node_zfs_dbuf_hash_chain_max untyped\nnode_zfs_dbuf_hash_chain_max 0\n# HELP node_zfs_dbuf_hash_chains kstat.zfs.misc.dbufstats.hash_chains\n# TYPE node_zfs_dbuf_hash_chains untyped\nnode_zfs_dbuf_hash_chains 0\n# HELP node_zfs_dbuf_hash_collisions kstat.zfs.misc.dbufstats.hash_collisions\n# TYPE node_zfs_dbuf_hash_collisions untyped\nnode_zfs_dbuf_hash_collisions 0\n# HELP node_zfs_dbuf_hash_dbuf_level_0 kstat.zfs.misc.dbufstats.hash_dbuf_level_0\n# TYPE node_zfs_dbuf_hash_dbuf_level_0 untyped\nnode_zfs_dbuf_hash_dbuf_level_0 37\n# HELP node_zfs_dbuf_hash_dbuf_level_0_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_0_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_0_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_0_bytes 465920\n# HELP node_zfs_dbuf_hash_dbuf_level_1 kstat.zfs.misc.dbufstats.hash_dbuf_level_1\n# TYPE node_zfs_dbuf_hash_dbuf_level_1 untyped\nnode_zfs_dbuf_hash_dbuf_level_1 10\n# HELP node_zfs_dbuf_hash_dbuf_level_10 kstat.zfs.misc.dbufstats.hash_dbuf_level_10\n# TYPE node_zfs_dbuf_hash_dbuf_level_10 untyped\nnode_zfs_dbuf_hash_dbuf_level_10 0\n# HELP node_zfs_dbuf_hash_dbuf_level_10_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_10_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_10_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_10_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_11 kstat.zfs.misc.dbufstats.hash_dbuf_level_11\n# TYPE node_zfs_dbuf_hash_dbuf_level_11 untyped\nnode_zfs_dbuf_hash_dbuf_level_11 0\n# HELP node_zfs_dbuf_hash_dbuf_level_11_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_11_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_11_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_11_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_1_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_1_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_1_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_1_bytes 1.31072e+06\n# HELP node_zfs_dbuf_hash_dbuf_level_2 kstat.zfs.misc.dbufstats.hash_dbuf_level_2\n# TYPE node_zfs_dbuf_hash_dbuf_level_2 untyped\nnode_zfs_dbuf_hash_dbuf_level_2 2\n# HELP node_zfs_dbuf_hash_dbuf_level_2_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_2_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_2_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_2_bytes 262144\n# HELP node_zfs_dbuf_hash_dbuf_level_3 kstat.zfs.misc.dbufstats.hash_dbuf_level_3\n# TYPE node_zfs_dbuf_hash_dbuf_level_3 untyped\nnode_zfs_dbuf_hash_dbuf_level_3 2\n# HELP node_zfs_dbuf_hash_dbuf_level_3_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_3_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_3_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_3_bytes 262144\n# HELP node_zfs_dbuf_hash_dbuf_level_4 kstat.zfs.misc.dbufstats.hash_dbuf_level_4\n# TYPE node_zfs_dbuf_hash_dbuf_level_4 untyped\nnode_zfs_dbuf_hash_dbuf_level_4 2\n# HELP node_zfs_dbuf_hash_dbuf_level_4_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_4_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_4_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_4_bytes 262144\n# HELP node_zfs_dbuf_hash_dbuf_level_5 kstat.zfs.misc.dbufstats.hash_dbuf_level_5\n# TYPE node_zfs_dbuf_hash_dbuf_level_5 untyped\nnode_zfs_dbuf_hash_dbuf_level_5 2\n# HELP node_zfs_dbuf_hash_dbuf_level_5_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_5_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_5_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_5_bytes 262144\n# HELP node_zfs_dbuf_hash_dbuf_level_6 kstat.zfs.misc.dbufstats.hash_dbuf_level_6\n# TYPE node_zfs_dbuf_hash_dbuf_level_6 untyped\nnode_zfs_dbuf_hash_dbuf_level_6 0\n# HELP node_zfs_dbuf_hash_dbuf_level_6_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_6_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_6_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_6_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_7 kstat.zfs.misc.dbufstats.hash_dbuf_level_7\n# TYPE node_zfs_dbuf_hash_dbuf_level_7 untyped\nnode_zfs_dbuf_hash_dbuf_level_7 0\n# HELP node_zfs_dbuf_hash_dbuf_level_7_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_7_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_7_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_7_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_8 kstat.zfs.misc.dbufstats.hash_dbuf_level_8\n# TYPE node_zfs_dbuf_hash_dbuf_level_8 untyped\nnode_zfs_dbuf_hash_dbuf_level_8 0\n# HELP node_zfs_dbuf_hash_dbuf_level_8_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_8_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_8_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_8_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_9 kstat.zfs.misc.dbufstats.hash_dbuf_level_9\n# TYPE node_zfs_dbuf_hash_dbuf_level_9 untyped\nnode_zfs_dbuf_hash_dbuf_level_9 0\n# HELP node_zfs_dbuf_hash_dbuf_level_9_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_9_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_9_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_9_bytes 0\n# HELP node_zfs_dbuf_hash_elements kstat.zfs.misc.dbufstats.hash_elements\n# TYPE node_zfs_dbuf_hash_elements untyped\nnode_zfs_dbuf_hash_elements 55\n# HELP node_zfs_dbuf_hash_elements_max kstat.zfs.misc.dbufstats.hash_elements_max\n# TYPE node_zfs_dbuf_hash_elements_max untyped\nnode_zfs_dbuf_hash_elements_max 55\n# HELP node_zfs_dbuf_hash_hits kstat.zfs.misc.dbufstats.hash_hits\n# TYPE node_zfs_dbuf_hash_hits untyped\nnode_zfs_dbuf_hash_hits 108807\n# HELP node_zfs_dbuf_hash_insert_race kstat.zfs.misc.dbufstats.hash_insert_race\n# TYPE node_zfs_dbuf_hash_insert_race untyped\nnode_zfs_dbuf_hash_insert_race 0\n# HELP node_zfs_dbuf_hash_misses kstat.zfs.misc.dbufstats.hash_misses\n# TYPE node_zfs_dbuf_hash_misses untyped\nnode_zfs_dbuf_hash_misses 1851\n# HELP node_zfs_dmu_tx_dmu_tx_assigned kstat.zfs.misc.dmu_tx.dmu_tx_assigned\n# TYPE node_zfs_dmu_tx_dmu_tx_assigned untyped\nnode_zfs_dmu_tx_dmu_tx_assigned 3.532844e+06\n# HELP node_zfs_dmu_tx_dmu_tx_delay kstat.zfs.misc.dmu_tx.dmu_tx_delay\n# TYPE node_zfs_dmu_tx_dmu_tx_delay untyped\nnode_zfs_dmu_tx_dmu_tx_delay 0\n# HELP node_zfs_dmu_tx_dmu_tx_dirty_delay kstat.zfs.misc.dmu_tx.dmu_tx_dirty_delay\n# TYPE node_zfs_dmu_tx_dmu_tx_dirty_delay untyped\nnode_zfs_dmu_tx_dmu_tx_dirty_delay 0\n# HELP node_zfs_dmu_tx_dmu_tx_dirty_over_max kstat.zfs.misc.dmu_tx.dmu_tx_dirty_over_max\n# TYPE node_zfs_dmu_tx_dmu_tx_dirty_over_max untyped\nnode_zfs_dmu_tx_dmu_tx_dirty_over_max 0\n# HELP node_zfs_dmu_tx_dmu_tx_dirty_throttle kstat.zfs.misc.dmu_tx.dmu_tx_dirty_throttle\n# TYPE node_zfs_dmu_tx_dmu_tx_dirty_throttle untyped\nnode_zfs_dmu_tx_dmu_tx_dirty_throttle 0\n# HELP node_zfs_dmu_tx_dmu_tx_error kstat.zfs.misc.dmu_tx.dmu_tx_error\n# TYPE node_zfs_dmu_tx_dmu_tx_error untyped\nnode_zfs_dmu_tx_dmu_tx_error 0\n# HELP node_zfs_dmu_tx_dmu_tx_group kstat.zfs.misc.dmu_tx.dmu_tx_group\n# TYPE node_zfs_dmu_tx_dmu_tx_group untyped\nnode_zfs_dmu_tx_dmu_tx_group 0\n# HELP node_zfs_dmu_tx_dmu_tx_memory_reclaim kstat.zfs.misc.dmu_tx.dmu_tx_memory_reclaim\n# TYPE node_zfs_dmu_tx_dmu_tx_memory_reclaim untyped\nnode_zfs_dmu_tx_dmu_tx_memory_reclaim 0\n# HELP node_zfs_dmu_tx_dmu_tx_memory_reserve kstat.zfs.misc.dmu_tx.dmu_tx_memory_reserve\n# TYPE node_zfs_dmu_tx_dmu_tx_memory_reserve untyped\nnode_zfs_dmu_tx_dmu_tx_memory_reserve 0\n# HELP node_zfs_dmu_tx_dmu_tx_quota kstat.zfs.misc.dmu_tx.dmu_tx_quota\n# TYPE node_zfs_dmu_tx_dmu_tx_quota untyped\nnode_zfs_dmu_tx_dmu_tx_quota 0\n# HELP node_zfs_dmu_tx_dmu_tx_suspended kstat.zfs.misc.dmu_tx.dmu_tx_suspended\n# TYPE node_zfs_dmu_tx_dmu_tx_suspended untyped\nnode_zfs_dmu_tx_dmu_tx_suspended 0\n# HELP node_zfs_dnode_dnode_alloc_next_block kstat.zfs.misc.dnodestats.dnode_alloc_next_block\n# TYPE node_zfs_dnode_dnode_alloc_next_block untyped\nnode_zfs_dnode_dnode_alloc_next_block 0\n# HELP node_zfs_dnode_dnode_alloc_next_chunk kstat.zfs.misc.dnodestats.dnode_alloc_next_chunk\n# TYPE node_zfs_dnode_dnode_alloc_next_chunk untyped\nnode_zfs_dnode_dnode_alloc_next_chunk 0\n# HELP node_zfs_dnode_dnode_alloc_race kstat.zfs.misc.dnodestats.dnode_alloc_race\n# TYPE node_zfs_dnode_dnode_alloc_race untyped\nnode_zfs_dnode_dnode_alloc_race 0\n# HELP node_zfs_dnode_dnode_allocate kstat.zfs.misc.dnodestats.dnode_allocate\n# TYPE node_zfs_dnode_dnode_allocate untyped\nnode_zfs_dnode_dnode_allocate 0\n# HELP node_zfs_dnode_dnode_buf_evict kstat.zfs.misc.dnodestats.dnode_buf_evict\n# TYPE node_zfs_dnode_dnode_buf_evict untyped\nnode_zfs_dnode_dnode_buf_evict 17\n# HELP node_zfs_dnode_dnode_hold_alloc_hits kstat.zfs.misc.dnodestats.dnode_hold_alloc_hits\n# TYPE node_zfs_dnode_dnode_hold_alloc_hits untyped\nnode_zfs_dnode_dnode_hold_alloc_hits 37617\n# HELP node_zfs_dnode_dnode_hold_alloc_interior kstat.zfs.misc.dnodestats.dnode_hold_alloc_interior\n# TYPE node_zfs_dnode_dnode_hold_alloc_interior untyped\nnode_zfs_dnode_dnode_hold_alloc_interior 0\n# HELP node_zfs_dnode_dnode_hold_alloc_lock_misses kstat.zfs.misc.dnodestats.dnode_hold_alloc_lock_misses\n# TYPE node_zfs_dnode_dnode_hold_alloc_lock_misses untyped\nnode_zfs_dnode_dnode_hold_alloc_lock_misses 0\n# HELP node_zfs_dnode_dnode_hold_alloc_lock_retry kstat.zfs.misc.dnodestats.dnode_hold_alloc_lock_retry\n# TYPE node_zfs_dnode_dnode_hold_alloc_lock_retry untyped\nnode_zfs_dnode_dnode_hold_alloc_lock_retry 0\n# HELP node_zfs_dnode_dnode_hold_alloc_misses kstat.zfs.misc.dnodestats.dnode_hold_alloc_misses\n# TYPE node_zfs_dnode_dnode_hold_alloc_misses untyped\nnode_zfs_dnode_dnode_hold_alloc_misses 0\n# HELP node_zfs_dnode_dnode_hold_alloc_type_none kstat.zfs.misc.dnodestats.dnode_hold_alloc_type_none\n# TYPE node_zfs_dnode_dnode_hold_alloc_type_none untyped\nnode_zfs_dnode_dnode_hold_alloc_type_none 0\n# HELP node_zfs_dnode_dnode_hold_dbuf_hold kstat.zfs.misc.dnodestats.dnode_hold_dbuf_hold\n# TYPE node_zfs_dnode_dnode_hold_dbuf_hold untyped\nnode_zfs_dnode_dnode_hold_dbuf_hold 0\n# HELP node_zfs_dnode_dnode_hold_dbuf_read kstat.zfs.misc.dnodestats.dnode_hold_dbuf_read\n# TYPE node_zfs_dnode_dnode_hold_dbuf_read untyped\nnode_zfs_dnode_dnode_hold_dbuf_read 0\n# HELP node_zfs_dnode_dnode_hold_free_hits kstat.zfs.misc.dnodestats.dnode_hold_free_hits\n# TYPE node_zfs_dnode_dnode_hold_free_hits untyped\nnode_zfs_dnode_dnode_hold_free_hits 0\n# HELP node_zfs_dnode_dnode_hold_free_lock_misses kstat.zfs.misc.dnodestats.dnode_hold_free_lock_misses\n# TYPE node_zfs_dnode_dnode_hold_free_lock_misses untyped\nnode_zfs_dnode_dnode_hold_free_lock_misses 0\n# HELP node_zfs_dnode_dnode_hold_free_lock_retry kstat.zfs.misc.dnodestats.dnode_hold_free_lock_retry\n# TYPE node_zfs_dnode_dnode_hold_free_lock_retry untyped\nnode_zfs_dnode_dnode_hold_free_lock_retry 0\n# HELP node_zfs_dnode_dnode_hold_free_misses kstat.zfs.misc.dnodestats.dnode_hold_free_misses\n# TYPE node_zfs_dnode_dnode_hold_free_misses untyped\nnode_zfs_dnode_dnode_hold_free_misses 0\n# HELP node_zfs_dnode_dnode_hold_free_overflow kstat.zfs.misc.dnodestats.dnode_hold_free_overflow\n# TYPE node_zfs_dnode_dnode_hold_free_overflow untyped\nnode_zfs_dnode_dnode_hold_free_overflow 0\n# HELP node_zfs_dnode_dnode_hold_free_refcount kstat.zfs.misc.dnodestats.dnode_hold_free_refcount\n# TYPE node_zfs_dnode_dnode_hold_free_refcount untyped\nnode_zfs_dnode_dnode_hold_free_refcount 0\n# HELP node_zfs_dnode_dnode_hold_free_txg kstat.zfs.misc.dnodestats.dnode_hold_free_txg\n# TYPE node_zfs_dnode_dnode_hold_free_txg untyped\nnode_zfs_dnode_dnode_hold_free_txg 0\n# HELP node_zfs_dnode_dnode_move_active kstat.zfs.misc.dnodestats.dnode_move_active\n# TYPE node_zfs_dnode_dnode_move_active untyped\nnode_zfs_dnode_dnode_move_active 0\n# HELP node_zfs_dnode_dnode_move_handle kstat.zfs.misc.dnodestats.dnode_move_handle\n# TYPE node_zfs_dnode_dnode_move_handle untyped\nnode_zfs_dnode_dnode_move_handle 0\n# HELP node_zfs_dnode_dnode_move_invalid kstat.zfs.misc.dnodestats.dnode_move_invalid\n# TYPE node_zfs_dnode_dnode_move_invalid untyped\nnode_zfs_dnode_dnode_move_invalid 0\n# HELP node_zfs_dnode_dnode_move_recheck1 kstat.zfs.misc.dnodestats.dnode_move_recheck1\n# TYPE node_zfs_dnode_dnode_move_recheck1 untyped\nnode_zfs_dnode_dnode_move_recheck1 0\n# HELP node_zfs_dnode_dnode_move_recheck2 kstat.zfs.misc.dnodestats.dnode_move_recheck2\n# TYPE node_zfs_dnode_dnode_move_recheck2 untyped\nnode_zfs_dnode_dnode_move_recheck2 0\n# HELP node_zfs_dnode_dnode_move_rwlock kstat.zfs.misc.dnodestats.dnode_move_rwlock\n# TYPE node_zfs_dnode_dnode_move_rwlock untyped\nnode_zfs_dnode_dnode_move_rwlock 0\n# HELP node_zfs_dnode_dnode_move_special kstat.zfs.misc.dnodestats.dnode_move_special\n# TYPE node_zfs_dnode_dnode_move_special untyped\nnode_zfs_dnode_dnode_move_special 0\n# HELP node_zfs_dnode_dnode_reallocate kstat.zfs.misc.dnodestats.dnode_reallocate\n# TYPE node_zfs_dnode_dnode_reallocate untyped\nnode_zfs_dnode_dnode_reallocate 0\n# HELP node_zfs_fm_erpt_dropped kstat.zfs.misc.fm.erpt-dropped\n# TYPE node_zfs_fm_erpt_dropped untyped\nnode_zfs_fm_erpt_dropped 18\n# HELP node_zfs_fm_erpt_set_failed kstat.zfs.misc.fm.erpt-set-failed\n# TYPE node_zfs_fm_erpt_set_failed untyped\nnode_zfs_fm_erpt_set_failed 0\n# HELP node_zfs_fm_fmri_set_failed kstat.zfs.misc.fm.fmri-set-failed\n# TYPE node_zfs_fm_fmri_set_failed untyped\nnode_zfs_fm_fmri_set_failed 0\n# HELP node_zfs_fm_payload_set_failed kstat.zfs.misc.fm.payload-set-failed\n# TYPE node_zfs_fm_payload_set_failed untyped\nnode_zfs_fm_payload_set_failed 0\n# HELP node_zfs_vdev_cache_delegations kstat.zfs.misc.vdev_cache_stats.delegations\n# TYPE node_zfs_vdev_cache_delegations untyped\nnode_zfs_vdev_cache_delegations 40\n# HELP node_zfs_vdev_cache_hits kstat.zfs.misc.vdev_cache_stats.hits\n# TYPE node_zfs_vdev_cache_hits untyped\nnode_zfs_vdev_cache_hits 0\n# HELP node_zfs_vdev_cache_misses kstat.zfs.misc.vdev_cache_stats.misses\n# TYPE node_zfs_vdev_cache_misses untyped\nnode_zfs_vdev_cache_misses 0\n# HELP node_zfs_vdev_mirror_non_rotating_linear kstat.zfs.misc.vdev_mirror_stats.non_rotating_linear\n# TYPE node_zfs_vdev_mirror_non_rotating_linear untyped\nnode_zfs_vdev_mirror_non_rotating_linear 0\n# HELP node_zfs_vdev_mirror_non_rotating_seek kstat.zfs.misc.vdev_mirror_stats.non_rotating_seek\n# TYPE node_zfs_vdev_mirror_non_rotating_seek untyped\nnode_zfs_vdev_mirror_non_rotating_seek 0\n# HELP node_zfs_vdev_mirror_preferred_found kstat.zfs.misc.vdev_mirror_stats.preferred_found\n# TYPE node_zfs_vdev_mirror_preferred_found untyped\nnode_zfs_vdev_mirror_preferred_found 0\n# HELP node_zfs_vdev_mirror_preferred_not_found kstat.zfs.misc.vdev_mirror_stats.preferred_not_found\n# TYPE node_zfs_vdev_mirror_preferred_not_found untyped\nnode_zfs_vdev_mirror_preferred_not_found 94\n# HELP node_zfs_vdev_mirror_rotating_linear kstat.zfs.misc.vdev_mirror_stats.rotating_linear\n# TYPE node_zfs_vdev_mirror_rotating_linear untyped\nnode_zfs_vdev_mirror_rotating_linear 0\n# HELP node_zfs_vdev_mirror_rotating_offset kstat.zfs.misc.vdev_mirror_stats.rotating_offset\n# TYPE node_zfs_vdev_mirror_rotating_offset untyped\nnode_zfs_vdev_mirror_rotating_offset 0\n# HELP node_zfs_vdev_mirror_rotating_seek kstat.zfs.misc.vdev_mirror_stats.rotating_seek\n# TYPE node_zfs_vdev_mirror_rotating_seek untyped\nnode_zfs_vdev_mirror_rotating_seek 0\n# HELP node_zfs_xuio_onloan_read_buf kstat.zfs.misc.xuio_stats.onloan_read_buf\n# TYPE node_zfs_xuio_onloan_read_buf untyped\nnode_zfs_xuio_onloan_read_buf 32\n# HELP node_zfs_xuio_onloan_write_buf kstat.zfs.misc.xuio_stats.onloan_write_buf\n# TYPE node_zfs_xuio_onloan_write_buf untyped\nnode_zfs_xuio_onloan_write_buf 0\n# HELP node_zfs_xuio_read_buf_copied kstat.zfs.misc.xuio_stats.read_buf_copied\n# TYPE node_zfs_xuio_read_buf_copied untyped\nnode_zfs_xuio_read_buf_copied 0\n# HELP node_zfs_xuio_read_buf_nocopy kstat.zfs.misc.xuio_stats.read_buf_nocopy\n# TYPE node_zfs_xuio_read_buf_nocopy untyped\nnode_zfs_xuio_read_buf_nocopy 0\n# HELP node_zfs_xuio_write_buf_copied kstat.zfs.misc.xuio_stats.write_buf_copied\n# TYPE node_zfs_xuio_write_buf_copied untyped\nnode_zfs_xuio_write_buf_copied 0\n# HELP node_zfs_xuio_write_buf_nocopy kstat.zfs.misc.xuio_stats.write_buf_nocopy\n# TYPE node_zfs_xuio_write_buf_nocopy untyped\nnode_zfs_xuio_write_buf_nocopy 0\n# HELP node_zfs_zfetch_bogus_streams kstat.zfs.misc.zfetchstats.bogus_streams\n# TYPE node_zfs_zfetch_bogus_streams untyped\nnode_zfs_zfetch_bogus_streams 0\n# HELP node_zfs_zfetch_colinear_hits kstat.zfs.misc.zfetchstats.colinear_hits\n# TYPE node_zfs_zfetch_colinear_hits untyped\nnode_zfs_zfetch_colinear_hits 0\n# HELP node_zfs_zfetch_colinear_misses kstat.zfs.misc.zfetchstats.colinear_misses\n# TYPE node_zfs_zfetch_colinear_misses untyped\nnode_zfs_zfetch_colinear_misses 11\n# HELP node_zfs_zfetch_hits kstat.zfs.misc.zfetchstats.hits\n# TYPE node_zfs_zfetch_hits untyped\nnode_zfs_zfetch_hits 7.067992e+06\n# HELP node_zfs_zfetch_misses kstat.zfs.misc.zfetchstats.misses\n# TYPE node_zfs_zfetch_misses untyped\nnode_zfs_zfetch_misses 11\n# HELP node_zfs_zfetch_reclaim_failures kstat.zfs.misc.zfetchstats.reclaim_failures\n# TYPE node_zfs_zfetch_reclaim_failures untyped\nnode_zfs_zfetch_reclaim_failures 11\n# HELP node_zfs_zfetch_reclaim_successes kstat.zfs.misc.zfetchstats.reclaim_successes\n# TYPE node_zfs_zfetch_reclaim_successes untyped\nnode_zfs_zfetch_reclaim_successes 0\n# HELP node_zfs_zfetch_streams_noresets kstat.zfs.misc.zfetchstats.streams_noresets\n# TYPE node_zfs_zfetch_streams_noresets untyped\nnode_zfs_zfetch_streams_noresets 2\n# HELP node_zfs_zfetch_streams_resets kstat.zfs.misc.zfetchstats.streams_resets\n# TYPE node_zfs_zfetch_streams_resets untyped\nnode_zfs_zfetch_streams_resets 0\n# HELP node_zfs_zfetch_stride_hits kstat.zfs.misc.zfetchstats.stride_hits\n# TYPE node_zfs_zfetch_stride_hits untyped\nnode_zfs_zfetch_stride_hits 7.06799e+06\n# HELP node_zfs_zfetch_stride_misses kstat.zfs.misc.zfetchstats.stride_misses\n# TYPE node_zfs_zfetch_stride_misses untyped\nnode_zfs_zfetch_stride_misses 0\n# HELP node_zfs_zil_zil_commit_count kstat.zfs.misc.zil.zil_commit_count\n# TYPE node_zfs_zil_zil_commit_count untyped\nnode_zfs_zil_zil_commit_count 10\n# HELP node_zfs_zil_zil_commit_writer_count kstat.zfs.misc.zil.zil_commit_writer_count\n# TYPE node_zfs_zil_zil_commit_writer_count untyped\nnode_zfs_zil_zil_commit_writer_count 0\n# HELP node_zfs_zil_zil_itx_copied_bytes kstat.zfs.misc.zil.zil_itx_copied_bytes\n# TYPE node_zfs_zil_zil_itx_copied_bytes untyped\nnode_zfs_zil_zil_itx_copied_bytes 0\n# HELP node_zfs_zil_zil_itx_copied_count kstat.zfs.misc.zil.zil_itx_copied_count\n# TYPE node_zfs_zil_zil_itx_copied_count untyped\nnode_zfs_zil_zil_itx_copied_count 0\n# HELP node_zfs_zil_zil_itx_count kstat.zfs.misc.zil.zil_itx_count\n# TYPE node_zfs_zil_zil_itx_count untyped\nnode_zfs_zil_zil_itx_count 0\n# HELP node_zfs_zil_zil_itx_indirect_bytes kstat.zfs.misc.zil.zil_itx_indirect_bytes\n# TYPE node_zfs_zil_zil_itx_indirect_bytes untyped\nnode_zfs_zil_zil_itx_indirect_bytes 0\n# HELP node_zfs_zil_zil_itx_indirect_count kstat.zfs.misc.zil.zil_itx_indirect_count\n# TYPE node_zfs_zil_zil_itx_indirect_count untyped\nnode_zfs_zil_zil_itx_indirect_count 0\n# HELP node_zfs_zil_zil_itx_metaslab_normal_bytes kstat.zfs.misc.zil.zil_itx_metaslab_normal_bytes\n# TYPE node_zfs_zil_zil_itx_metaslab_normal_bytes untyped\nnode_zfs_zil_zil_itx_metaslab_normal_bytes 0\n# HELP node_zfs_zil_zil_itx_metaslab_normal_count kstat.zfs.misc.zil.zil_itx_metaslab_normal_count\n# TYPE node_zfs_zil_zil_itx_metaslab_normal_count untyped\nnode_zfs_zil_zil_itx_metaslab_normal_count 0\n# HELP node_zfs_zil_zil_itx_metaslab_slog_bytes kstat.zfs.misc.zil.zil_itx_metaslab_slog_bytes\n# TYPE node_zfs_zil_zil_itx_metaslab_slog_bytes untyped\nnode_zfs_zil_zil_itx_metaslab_slog_bytes 0\n# HELP node_zfs_zil_zil_itx_metaslab_slog_count kstat.zfs.misc.zil.zil_itx_metaslab_slog_count\n# TYPE node_zfs_zil_zil_itx_metaslab_slog_count untyped\nnode_zfs_zil_zil_itx_metaslab_slog_count 0\n# HELP node_zfs_zil_zil_itx_needcopy_bytes kstat.zfs.misc.zil.zil_itx_needcopy_bytes\n# TYPE node_zfs_zil_zil_itx_needcopy_bytes untyped\nnode_zfs_zil_zil_itx_needcopy_bytes 1.8446744073709537e+19\n# HELP node_zfs_zil_zil_itx_needcopy_count kstat.zfs.misc.zil.zil_itx_needcopy_count\n# TYPE node_zfs_zil_zil_itx_needcopy_count untyped\nnode_zfs_zil_zil_itx_needcopy_count 0\n# HELP node_zfs_zpool_dataset_nread kstat.zfs.misc.objset.nread\n# TYPE node_zfs_zpool_dataset_nread untyped\nnode_zfs_zpool_dataset_nread{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_nread{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 28\nnode_zfs_zpool_dataset_nread{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_nread{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 28\nnode_zfs_zpool_dataset_nread{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_nread{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 28\n# HELP node_zfs_zpool_dataset_nunlinked kstat.zfs.misc.objset.nunlinked\n# TYPE node_zfs_zpool_dataset_nunlinked untyped\nnode_zfs_zpool_dataset_nunlinked{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_nunlinked{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 3\nnode_zfs_zpool_dataset_nunlinked{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_nunlinked{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 3\nnode_zfs_zpool_dataset_nunlinked{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_nunlinked{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 14\n# HELP node_zfs_zpool_dataset_nunlinks kstat.zfs.misc.objset.nunlinks\n# TYPE node_zfs_zpool_dataset_nunlinks untyped\nnode_zfs_zpool_dataset_nunlinks{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_nunlinks{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 3\nnode_zfs_zpool_dataset_nunlinks{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_nunlinks{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 3\nnode_zfs_zpool_dataset_nunlinks{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_nunlinks{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 14\n# HELP node_zfs_zpool_dataset_nwritten kstat.zfs.misc.objset.nwritten\n# TYPE node_zfs_zpool_dataset_nwritten untyped\nnode_zfs_zpool_dataset_nwritten{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_nwritten{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 12302\nnode_zfs_zpool_dataset_nwritten{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_nwritten{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 12302\nnode_zfs_zpool_dataset_nwritten{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_nwritten{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 32806\n# HELP node_zfs_zpool_dataset_reads kstat.zfs.misc.objset.reads\n# TYPE node_zfs_zpool_dataset_reads untyped\nnode_zfs_zpool_dataset_reads{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_reads{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 2\nnode_zfs_zpool_dataset_reads{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_reads{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 2\nnode_zfs_zpool_dataset_reads{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_reads{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 2\n# HELP node_zfs_zpool_dataset_writes kstat.zfs.misc.objset.writes\n# TYPE node_zfs_zpool_dataset_writes untyped\nnode_zfs_zpool_dataset_writes{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_writes{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 4\nnode_zfs_zpool_dataset_writes{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_writes{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 4\nnode_zfs_zpool_dataset_writes{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_writes{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 10\n# HELP node_zfs_zpool_nread kstat.zfs.misc.io.nread\n# TYPE node_zfs_zpool_nread untyped\nnode_zfs_zpool_nread{zpool=\"pool1\"} 1.88416e+06\nnode_zfs_zpool_nread{zpool=\"pool3\"} 1.88416e+06\nnode_zfs_zpool_nread{zpool=\"poolz1\"} 2.82624e+06\n# HELP node_zfs_zpool_nwritten kstat.zfs.misc.io.nwritten\n# TYPE node_zfs_zpool_nwritten untyped\nnode_zfs_zpool_nwritten{zpool=\"pool1\"} 3.206144e+06\nnode_zfs_zpool_nwritten{zpool=\"pool3\"} 3.206144e+06\nnode_zfs_zpool_nwritten{zpool=\"poolz1\"} 2.680501248e+09\n# HELP node_zfs_zpool_rcnt kstat.zfs.misc.io.rcnt\n# TYPE node_zfs_zpool_rcnt untyped\nnode_zfs_zpool_rcnt{zpool=\"pool1\"} 0\nnode_zfs_zpool_rcnt{zpool=\"pool3\"} 0\nnode_zfs_zpool_rcnt{zpool=\"poolz1\"} 0\n# HELP node_zfs_zpool_reads kstat.zfs.misc.io.reads\n# TYPE node_zfs_zpool_reads untyped\nnode_zfs_zpool_reads{zpool=\"pool1\"} 22\nnode_zfs_zpool_reads{zpool=\"pool3\"} 22\nnode_zfs_zpool_reads{zpool=\"poolz1\"} 33\n# HELP node_zfs_zpool_rlentime kstat.zfs.misc.io.rlentime\n# TYPE node_zfs_zpool_rlentime untyped\nnode_zfs_zpool_rlentime{zpool=\"pool1\"} 1.04112268e+08\nnode_zfs_zpool_rlentime{zpool=\"pool3\"} 1.04112268e+08\nnode_zfs_zpool_rlentime{zpool=\"poolz1\"} 6.472105124093e+12\n# HELP node_zfs_zpool_rtime kstat.zfs.misc.io.rtime\n# TYPE node_zfs_zpool_rtime untyped\nnode_zfs_zpool_rtime{zpool=\"pool1\"} 2.4168078e+07\nnode_zfs_zpool_rtime{zpool=\"pool3\"} 2.4168078e+07\nnode_zfs_zpool_rtime{zpool=\"poolz1\"} 9.82909164e+09\n# HELP node_zfs_zpool_rupdate kstat.zfs.misc.io.rupdate\n# TYPE node_zfs_zpool_rupdate untyped\nnode_zfs_zpool_rupdate{zpool=\"pool1\"} 7.921048984922e+13\nnode_zfs_zpool_rupdate{zpool=\"pool3\"} 7.921048984922e+13\nnode_zfs_zpool_rupdate{zpool=\"poolz1\"} 1.10734831944501e+14\n# HELP node_zfs_zpool_state kstat.zfs.misc.state\n# TYPE node_zfs_zpool_state gauge\nnode_zfs_zpool_state{state=\"degraded\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"degraded\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"degraded\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"degraded\",zpool=\"poolz1\"} 1\nnode_zfs_zpool_state{state=\"faulted\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"faulted\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"faulted\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"faulted\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"offline\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"offline\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"offline\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"offline\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"online\",zpool=\"pool1\"} 1\nnode_zfs_zpool_state{state=\"online\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"online\",zpool=\"pool3\"} 1\nnode_zfs_zpool_state{state=\"online\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"removed\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"removed\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"removed\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"removed\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"suspended\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"suspended\",zpool=\"pool2\"} 1\nnode_zfs_zpool_state{state=\"suspended\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"suspended\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"unavail\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"unavail\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"unavail\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"unavail\",zpool=\"poolz1\"} 0\n# HELP node_zfs_zpool_wcnt kstat.zfs.misc.io.wcnt\n# TYPE node_zfs_zpool_wcnt untyped\nnode_zfs_zpool_wcnt{zpool=\"pool1\"} 0\nnode_zfs_zpool_wcnt{zpool=\"pool3\"} 0\nnode_zfs_zpool_wcnt{zpool=\"poolz1\"} 0\n# HELP node_zfs_zpool_wlentime kstat.zfs.misc.io.wlentime\n# TYPE node_zfs_zpool_wlentime untyped\nnode_zfs_zpool_wlentime{zpool=\"pool1\"} 1.04112268e+08\nnode_zfs_zpool_wlentime{zpool=\"pool3\"} 1.04112268e+08\nnode_zfs_zpool_wlentime{zpool=\"poolz1\"} 6.472105124093e+12\n# HELP node_zfs_zpool_writes kstat.zfs.misc.io.writes\n# TYPE node_zfs_zpool_writes untyped\nnode_zfs_zpool_writes{zpool=\"pool1\"} 132\nnode_zfs_zpool_writes{zpool=\"pool3\"} 132\nnode_zfs_zpool_writes{zpool=\"poolz1\"} 25294\n# HELP node_zfs_zpool_wtime kstat.zfs.misc.io.wtime\n# TYPE node_zfs_zpool_wtime untyped\nnode_zfs_zpool_wtime{zpool=\"pool1\"} 7.155162e+06\nnode_zfs_zpool_wtime{zpool=\"pool3\"} 7.155162e+06\nnode_zfs_zpool_wtime{zpool=\"poolz1\"} 9.673715628e+09\n# HELP node_zfs_zpool_wupdate kstat.zfs.misc.io.wupdate\n# TYPE node_zfs_zpool_wupdate untyped\nnode_zfs_zpool_wupdate{zpool=\"pool1\"} 7.9210489694949e+13\nnode_zfs_zpool_wupdate{zpool=\"pool3\"} 7.9210489694949e+13\nnode_zfs_zpool_wupdate{zpool=\"poolz1\"} 1.10734831833266e+14\n# HELP node_zoneinfo_high_pages Zone watermark pages_high\n# TYPE node_zoneinfo_high_pages gauge\nnode_zoneinfo_high_pages{node=\"0\",zone=\"DMA\"} 14\nnode_zoneinfo_high_pages{node=\"0\",zone=\"DMA32\"} 2122\nnode_zoneinfo_high_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_high_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_high_pages{node=\"0\",zone=\"Normal\"} 31113\n# HELP node_zoneinfo_low_pages Zone watermark pages_low\n# TYPE node_zoneinfo_low_pages gauge\nnode_zoneinfo_low_pages{node=\"0\",zone=\"DMA\"} 11\nnode_zoneinfo_low_pages{node=\"0\",zone=\"DMA32\"} 1600\nnode_zoneinfo_low_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_low_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_low_pages{node=\"0\",zone=\"Normal\"} 23461\n# HELP node_zoneinfo_managed_pages Present pages managed by the buddy system\n# TYPE node_zoneinfo_managed_pages gauge\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"DMA\"} 3973\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"DMA32\"} 530339\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"Normal\"} 7.654794e+06\n# HELP node_zoneinfo_min_pages Zone watermark pages_min\n# TYPE node_zoneinfo_min_pages gauge\nnode_zoneinfo_min_pages{node=\"0\",zone=\"DMA\"} 8\nnode_zoneinfo_min_pages{node=\"0\",zone=\"DMA32\"} 1078\nnode_zoneinfo_min_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_min_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_min_pages{node=\"0\",zone=\"Normal\"} 15809\n# HELP node_zoneinfo_nr_active_anon_pages Number of anonymous pages recently more used\n# TYPE node_zoneinfo_nr_active_anon_pages gauge\nnode_zoneinfo_nr_active_anon_pages{node=\"0\",zone=\"DMA\"} 1.175853e+06\n# HELP node_zoneinfo_nr_active_file_pages Number of active pages with file-backing\n# TYPE node_zoneinfo_nr_active_file_pages gauge\nnode_zoneinfo_nr_active_file_pages{node=\"0\",zone=\"DMA\"} 688810\n# HELP node_zoneinfo_nr_anon_pages Number of anonymous pages currently used by the system\n# TYPE node_zoneinfo_nr_anon_pages gauge\nnode_zoneinfo_nr_anon_pages{node=\"0\",zone=\"DMA\"} 1.156608e+06\n# HELP node_zoneinfo_nr_anon_transparent_hugepages Number of anonymous transparent huge pages currently used by the system\n# TYPE node_zoneinfo_nr_anon_transparent_hugepages gauge\nnode_zoneinfo_nr_anon_transparent_hugepages{node=\"0\",zone=\"DMA\"} 0\n# HELP node_zoneinfo_nr_dirtied_total Page dirtyings since bootup\n# TYPE node_zoneinfo_nr_dirtied_total counter\nnode_zoneinfo_nr_dirtied_total{node=\"0\",zone=\"DMA\"} 1.189097e+06\n# HELP node_zoneinfo_nr_dirty_pages Number of dirty pages\n# TYPE node_zoneinfo_nr_dirty_pages gauge\nnode_zoneinfo_nr_dirty_pages{node=\"0\",zone=\"DMA\"} 103\n# HELP node_zoneinfo_nr_file_pages Number of file pages\n# TYPE node_zoneinfo_nr_file_pages gauge\nnode_zoneinfo_nr_file_pages{node=\"0\",zone=\"DMA\"} 1.740118e+06\n# HELP node_zoneinfo_nr_free_pages Total number of free pages in the zone\n# TYPE node_zoneinfo_nr_free_pages gauge\nnode_zoneinfo_nr_free_pages{node=\"0\",zone=\"DMA\"} 2949\nnode_zoneinfo_nr_free_pages{node=\"0\",zone=\"DMA32\"} 528427\nnode_zoneinfo_nr_free_pages{node=\"0\",zone=\"Normal\"} 4.539739e+06\n# HELP node_zoneinfo_nr_inactive_anon_pages Number of anonymous pages recently less used\n# TYPE node_zoneinfo_nr_inactive_anon_pages gauge\nnode_zoneinfo_nr_inactive_anon_pages{node=\"0\",zone=\"DMA\"} 95612\n# HELP node_zoneinfo_nr_inactive_file_pages Number of inactive pages with file-backing\n# TYPE node_zoneinfo_nr_inactive_file_pages gauge\nnode_zoneinfo_nr_inactive_file_pages{node=\"0\",zone=\"DMA\"} 723339\n# HELP node_zoneinfo_nr_isolated_anon_pages Temporary isolated pages from anon lru\n# TYPE node_zoneinfo_nr_isolated_anon_pages gauge\nnode_zoneinfo_nr_isolated_anon_pages{node=\"0\",zone=\"DMA\"} 0\n# HELP node_zoneinfo_nr_isolated_file_pages Temporary isolated pages from file lru\n# TYPE node_zoneinfo_nr_isolated_file_pages gauge\nnode_zoneinfo_nr_isolated_file_pages{node=\"0\",zone=\"DMA\"} 0\n# HELP node_zoneinfo_nr_kernel_stacks Number of kernel stacks\n# TYPE node_zoneinfo_nr_kernel_stacks gauge\nnode_zoneinfo_nr_kernel_stacks{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_nr_kernel_stacks{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_nr_kernel_stacks{node=\"0\",zone=\"Normal\"} 18864\n# HELP node_zoneinfo_nr_mapped_pages Number of mapped pages\n# TYPE node_zoneinfo_nr_mapped_pages gauge\nnode_zoneinfo_nr_mapped_pages{node=\"0\",zone=\"DMA\"} 423143\n# HELP node_zoneinfo_nr_shmem_pages Number of shmem pages (included tmpfs/GEM pages)\n# TYPE node_zoneinfo_nr_shmem_pages gauge\nnode_zoneinfo_nr_shmem_pages{node=\"0\",zone=\"DMA\"} 330517\n# HELP node_zoneinfo_nr_slab_reclaimable_pages Number of reclaimable slab pages\n# TYPE node_zoneinfo_nr_slab_reclaimable_pages gauge\nnode_zoneinfo_nr_slab_reclaimable_pages{node=\"0\",zone=\"DMA\"} 121763\n# HELP node_zoneinfo_nr_slab_unreclaimable_pages Number of unreclaimable slab pages\n# TYPE node_zoneinfo_nr_slab_unreclaimable_pages gauge\nnode_zoneinfo_nr_slab_unreclaimable_pages{node=\"0\",zone=\"DMA\"} 56182\n# HELP node_zoneinfo_nr_unevictable_pages Number of unevictable pages\n# TYPE node_zoneinfo_nr_unevictable_pages gauge\nnode_zoneinfo_nr_unevictable_pages{node=\"0\",zone=\"DMA\"} 213111\n# HELP node_zoneinfo_nr_writeback_pages Number of writeback pages\n# TYPE node_zoneinfo_nr_writeback_pages gauge\nnode_zoneinfo_nr_writeback_pages{node=\"0\",zone=\"DMA\"} 0\n# HELP node_zoneinfo_nr_written_total Page writings since bootup\n# TYPE node_zoneinfo_nr_written_total counter\nnode_zoneinfo_nr_written_total{node=\"0\",zone=\"DMA\"} 1.181554e+06\n# HELP node_zoneinfo_numa_foreign_total Was intended here, hit elsewhere\n# TYPE node_zoneinfo_numa_foreign_total counter\nnode_zoneinfo_numa_foreign_total{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_numa_foreign_total{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_numa_foreign_total{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_numa_hit_total Allocated in intended node\n# TYPE node_zoneinfo_numa_hit_total counter\nnode_zoneinfo_numa_hit_total{node=\"0\",zone=\"DMA\"} 1\nnode_zoneinfo_numa_hit_total{node=\"0\",zone=\"DMA32\"} 13\nnode_zoneinfo_numa_hit_total{node=\"0\",zone=\"Normal\"} 6.2836441e+07\n# HELP node_zoneinfo_numa_interleave_total Interleaver preferred this zone\n# TYPE node_zoneinfo_numa_interleave_total counter\nnode_zoneinfo_numa_interleave_total{node=\"0\",zone=\"DMA\"} 1\nnode_zoneinfo_numa_interleave_total{node=\"0\",zone=\"DMA32\"} 1\nnode_zoneinfo_numa_interleave_total{node=\"0\",zone=\"Normal\"} 23174\n# HELP node_zoneinfo_numa_local_total Allocation from local node\n# TYPE node_zoneinfo_numa_local_total counter\nnode_zoneinfo_numa_local_total{node=\"0\",zone=\"DMA\"} 1\nnode_zoneinfo_numa_local_total{node=\"0\",zone=\"DMA32\"} 13\nnode_zoneinfo_numa_local_total{node=\"0\",zone=\"Normal\"} 6.2836441e+07\n# HELP node_zoneinfo_numa_miss_total Allocated in non intended node\n# TYPE node_zoneinfo_numa_miss_total counter\nnode_zoneinfo_numa_miss_total{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_numa_miss_total{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_numa_miss_total{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_numa_other_total Allocation from other node\n# TYPE node_zoneinfo_numa_other_total counter\nnode_zoneinfo_numa_other_total{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_numa_other_total{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_numa_other_total{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_present_pages Physical pages existing within the zone\n# TYPE node_zoneinfo_present_pages gauge\nnode_zoneinfo_present_pages{node=\"0\",zone=\"DMA\"} 3997\nnode_zoneinfo_present_pages{node=\"0\",zone=\"DMA32\"} 546847\nnode_zoneinfo_present_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_present_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_present_pages{node=\"0\",zone=\"Normal\"} 7.806976e+06\n# HELP node_zoneinfo_protection_0 Protection array 0. field\n# TYPE node_zoneinfo_protection_0 gauge\nnode_zoneinfo_protection_0{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_protection_0{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_protection_0{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_0{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_0{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_protection_1 Protection array 1. field\n# TYPE node_zoneinfo_protection_1 gauge\nnode_zoneinfo_protection_1{node=\"0\",zone=\"DMA\"} 2039\nnode_zoneinfo_protection_1{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_protection_1{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_1{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_1{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_protection_2 Protection array 2. field\n# TYPE node_zoneinfo_protection_2 gauge\nnode_zoneinfo_protection_2{node=\"0\",zone=\"DMA\"} 31932\nnode_zoneinfo_protection_2{node=\"0\",zone=\"DMA32\"} 29893\nnode_zoneinfo_protection_2{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_2{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_2{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_protection_3 Protection array 3. field\n# TYPE node_zoneinfo_protection_3 gauge\nnode_zoneinfo_protection_3{node=\"0\",zone=\"DMA\"} 31932\nnode_zoneinfo_protection_3{node=\"0\",zone=\"DMA32\"} 29893\nnode_zoneinfo_protection_3{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_3{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_3{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_protection_4 Protection array 4. field\n# TYPE node_zoneinfo_protection_4 gauge\nnode_zoneinfo_protection_4{node=\"0\",zone=\"DMA\"} 31932\nnode_zoneinfo_protection_4{node=\"0\",zone=\"DMA32\"} 29893\nnode_zoneinfo_protection_4{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_4{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_4{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_spanned_pages Total pages spanned by the zone, including holes\n# TYPE node_zoneinfo_spanned_pages gauge\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"DMA\"} 4095\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"DMA32\"} 1.04448e+06\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"Normal\"} 7.806976e+06\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\n# HELP process_network_receive_bytes_total Number of bytes received by the process over the network.\n# TYPE process_network_receive_bytes_total counter\n# HELP process_network_transmit_bytes_total Number of bytes sent by the process over the network.\n# TYPE process_network_transmit_bytes_total counter\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\n# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.\n# TYPE process_virtual_memory_max_bytes gauge\n# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.\n# TYPE promhttp_metric_handler_errors_total counter\npromhttp_metric_handler_errors_total{cause=\"encoding\"} 0\npromhttp_metric_handler_errors_total{cause=\"gathering\"} 0\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/e2e-output-darwin.txt",
    "content": "# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\n# HELP node_buddyinfo_blocks Count of free blocks according to size.\n# TYPE node_buddyinfo_blocks gauge\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA32\"} 759\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"Normal\"} 4381\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA32\"} 572\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"Normal\"} 1093\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA\"} 3\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA32\"} 791\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"Normal\"} 185\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA32\"} 475\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"Normal\"} 1530\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA\"} 2\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA32\"} 194\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"Normal\"} 567\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA32\"} 45\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"Normal\"} 102\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA32\"} 12\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"Normal\"} 4\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"Normal\"} 0\n# HELP node_disk_read_errors_total The total number of read errors.\n# TYPE node_disk_read_errors_total counter\nnode_disk_read_errors_total{device=\"disk0\"} 0\nnode_disk_read_errors_total{device=\"disk4\"} 0\n# HELP node_disk_read_retries_total The total number of read retries.\n# TYPE node_disk_read_retries_total counter\nnode_disk_read_retries_total{device=\"disk0\"} 0\nnode_disk_read_retries_total{device=\"disk4\"} 0\n# HELP node_disk_write_errors_total The total number of write errors.\n# TYPE node_disk_write_errors_total counter\nnode_disk_write_errors_total{device=\"disk0\"} 0\nnode_disk_write_errors_total{device=\"disk4\"} 0\n# HELP node_disk_write_retries_total The total number of write retries.\n# TYPE node_disk_write_retries_total counter\nnode_disk_write_retries_total{device=\"disk0\"} 0\nnode_disk_write_retries_total{device=\"disk4\"} 0\n# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.\n# TYPE node_exporter_build_info gauge\n# HELP node_memory_swap_total_bytes Memory information field swap_total_bytes.\n# TYPE node_memory_swap_total_bytes gauge\nnode_memory_swap_total_bytes 0\n# HELP node_memory_swap_used_bytes Memory information field swap_used_bytes.\n# TYPE node_memory_swap_used_bytes gauge\nnode_memory_swap_used_bytes 0\n# HELP node_memory_total_bytes Memory information field total_bytes.\n# TYPE node_memory_total_bytes gauge\nnode_memory_total_bytes 7.516192768e+09\n# HELP node_network_noproto_total Network device statistic noproto.\n# TYPE node_network_noproto_total counter\nnode_network_noproto_total{device=\"lo0\"} 0\n# HELP node_network_receive_drop_total Network device statistic receive_drop.\n# TYPE node_network_receive_drop_total counter\nnode_network_receive_drop_total{device=\"lo0\"} 0\n# HELP node_network_receive_errs_total Network device statistic receive_errs.\n# TYPE node_network_receive_errs_total counter\nnode_network_receive_errs_total{device=\"lo0\"} 0\n# HELP node_network_receive_packets_total Network device statistic receive_packets.\n# TYPE node_network_receive_packets_total counter\n# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.\n# TYPE node_network_transmit_bytes_total counter\n# HELP node_network_transmit_colls_total Network device statistic transmit_colls.\n# TYPE node_network_transmit_colls_total counter\nnode_network_transmit_colls_total{device=\"lo0\"} 0\n# HELP node_network_transmit_errs_total Network device statistic transmit_errs.\n# TYPE node_network_transmit_errs_total counter\nnode_network_transmit_errs_total{device=\"lo0\"} 0\n# HELP node_network_transmit_packets_total Network device statistic transmit_packets.\n# TYPE node_network_transmit_packets_total counter\n# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.\n# TYPE node_os_info gauge\nnode_os_info{build_id=\"\",id=\"ubuntu\",id_like=\"debian\",image_id=\"\",image_version=\"\",name=\"Ubuntu\",pretty_name=\"Ubuntu 20.04.2 LTS\",variant=\"\",variant_id=\"\",version=\"20.04.2 LTS (Focal Fossa)\",version_codename=\"focal\",version_id=\"20.04\"} 1\n# HELP node_os_version Metric containing the major.minor part of the OS version.\n# TYPE node_os_version gauge\nnode_os_version{id=\"ubuntu\",id_like=\"debian\",name=\"Ubuntu\"} 20.04\n# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.\n# TYPE node_scrape_collector_duration_seconds gauge\n# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.\n# TYPE node_scrape_collector_success gauge\nnode_scrape_collector_success{collector=\"boottime\"} 1\nnode_scrape_collector_success{collector=\"buddyinfo\"} 1\nnode_scrape_collector_success{collector=\"cpu\"} 1\nnode_scrape_collector_success{collector=\"diskstats\"} 1\nnode_scrape_collector_success{collector=\"loadavg\"} 1\nnode_scrape_collector_success{collector=\"meminfo\"} 1\nnode_scrape_collector_success{collector=\"netdev\"} 1\nnode_scrape_collector_success{collector=\"os\"} 1\nnode_scrape_collector_success{collector=\"powersupplyclass\"} 1\nnode_scrape_collector_success{collector=\"textfile\"} 1\nnode_scrape_collector_success{collector=\"thermal\"} 0\nnode_scrape_collector_success{collector=\"time\"} 1\nnode_scrape_collector_success{collector=\"xfrm\"} 1\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP node_time_seconds System time in seconds since epoch (1970).\n# TYPE node_time_seconds gauge\n# HELP node_time_zone_offset_seconds System time zone offset in seconds.\n# TYPE node_time_zone_offset_seconds gauge\n# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n# TYPE node_xfrm_acquire_error_packets_total counter\nnode_xfrm_acquire_error_packets_total 24532\n# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n# TYPE node_xfrm_fwd_hdr_error_packets_total counter\nnode_xfrm_fwd_hdr_error_packets_total 6654\n# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n# TYPE node_xfrm_in_buffer_error_packets_total counter\nnode_xfrm_in_buffer_error_packets_total 2\n# HELP node_xfrm_in_error_packets_total All errors not matched by other\n# TYPE node_xfrm_in_error_packets_total counter\nnode_xfrm_in_error_packets_total 1\n# HELP node_xfrm_in_hdr_error_packets_total Header error\n# TYPE node_xfrm_in_hdr_error_packets_total counter\nnode_xfrm_in_hdr_error_packets_total 4\n# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n# TYPE node_xfrm_in_no_pols_packets_total counter\nnode_xfrm_in_no_pols_packets_total 65432\n# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n# TYPE node_xfrm_in_no_states_packets_total counter\nnode_xfrm_in_no_states_packets_total 3\n# HELP node_xfrm_in_pol_block_packets_total Policy discards\n# TYPE node_xfrm_in_pol_block_packets_total counter\nnode_xfrm_in_pol_block_packets_total 100\n# HELP node_xfrm_in_pol_error_packets_total Policy error\n# TYPE node_xfrm_in_pol_error_packets_total counter\nnode_xfrm_in_pol_error_packets_total 10000\n# HELP node_xfrm_in_state_expired_packets_total State is expired\n# TYPE node_xfrm_in_state_expired_packets_total counter\nnode_xfrm_in_state_expired_packets_total 7\n# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n# TYPE node_xfrm_in_state_invalid_packets_total counter\nnode_xfrm_in_state_invalid_packets_total 55555\n# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n# TYPE node_xfrm_in_state_mismatch_packets_total counter\nnode_xfrm_in_state_mismatch_packets_total 23451\n# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_in_state_mode_error_packets_total counter\nnode_xfrm_in_state_mode_error_packets_total 100\n# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n# TYPE node_xfrm_in_state_proto_error_packets_total counter\nnode_xfrm_in_state_proto_error_packets_total 40\n# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n# TYPE node_xfrm_in_state_seq_error_packets_total counter\nnode_xfrm_in_state_seq_error_packets_total 6000\n# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\nnode_xfrm_in_tmpl_mismatch_packets_total 51\n# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n# TYPE node_xfrm_out_bundle_check_error_packets_total counter\nnode_xfrm_out_bundle_check_error_packets_total 555\n# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\nnode_xfrm_out_bundle_gen_error_packets_total 43321\n# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n# TYPE node_xfrm_out_error_packets_total counter\nnode_xfrm_out_error_packets_total 1e+06\n# HELP node_xfrm_out_no_states_packets_total No state is found\n# TYPE node_xfrm_out_no_states_packets_total counter\nnode_xfrm_out_no_states_packets_total 869\n# HELP node_xfrm_out_pol_block_packets_total Policy discards\n# TYPE node_xfrm_out_pol_block_packets_total counter\nnode_xfrm_out_pol_block_packets_total 43456\n# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n# TYPE node_xfrm_out_pol_dead_packets_total counter\nnode_xfrm_out_pol_dead_packets_total 7656\n# HELP node_xfrm_out_pol_error_packets_total Policy error\n# TYPE node_xfrm_out_pol_error_packets_total counter\nnode_xfrm_out_pol_error_packets_total 1454\n# HELP node_xfrm_out_state_expired_packets_total State is expired\n# TYPE node_xfrm_out_state_expired_packets_total counter\nnode_xfrm_out_state_expired_packets_total 565\n# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n# TYPE node_xfrm_out_state_invalid_packets_total counter\nnode_xfrm_out_state_invalid_packets_total 28765\n# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_out_state_mode_error_packets_total counter\nnode_xfrm_out_state_mode_error_packets_total 8\n# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n# TYPE node_xfrm_out_state_proto_error_packets_total counter\nnode_xfrm_out_state_proto_error_packets_total 4542\n# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n# TYPE node_xfrm_out_state_seq_error_packets_total counter\nnode_xfrm_out_state_seq_error_packets_total 543\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\n# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.\n# TYPE process_virtual_memory_max_bytes gauge\n# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.\n# TYPE promhttp_metric_handler_errors_total counter\npromhttp_metric_handler_errors_total{cause=\"encoding\"} 0\npromhttp_metric_handler_errors_total{cause=\"gathering\"} 0\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/e2e-output-dragonfly.txt",
    "content": "# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\n# HELP node_buddyinfo_blocks Count of free blocks according to size.\n# TYPE node_buddyinfo_blocks gauge\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA32\"} 759\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"Normal\"} 4381\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA32\"} 572\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"Normal\"} 1093\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA\"} 3\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA32\"} 791\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"Normal\"} 185\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA32\"} 475\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"Normal\"} 1530\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA\"} 2\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA32\"} 194\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"Normal\"} 567\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA32\"} 45\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"Normal\"} 102\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA32\"} 12\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"Normal\"} 4\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"Normal\"} 0\n# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.\n# TYPE node_exporter_build_info gauge\n# HELP node_network_receive_drop_total Network device statistic receive_drop.\n# TYPE node_network_receive_drop_total counter\nnode_network_receive_drop_total{device=\"lo0\"} 0\n# HELP node_network_receive_errs_total Network device statistic receive_errs.\n# TYPE node_network_receive_errs_total counter\nnode_network_receive_errs_total{device=\"lo0\"} 0\n# HELP node_network_receive_packets_total Network device statistic receive_packets.\n# TYPE node_network_receive_packets_total counter\n# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.\n# TYPE node_network_transmit_bytes_total counter\n# HELP node_network_transmit_drop_total Network device statistic transmit_drop.\n# TYPE node_network_transmit_drop_total counter\nnode_network_transmit_drop_total{device=\"lo0\"} 0\n# HELP node_network_transmit_errs_total Network device statistic transmit_errs.\n# TYPE node_network_transmit_errs_total counter\nnode_network_transmit_errs_total{device=\"lo0\"} 0\n# HELP node_network_transmit_packets_total Network device statistic transmit_packets.\n# TYPE node_network_transmit_packets_total counter\n# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.\n# TYPE node_os_info gauge\nnode_os_info{build_id=\"\",id=\"ubuntu\",id_like=\"debian\",image_id=\"\",image_version=\"\",name=\"Ubuntu\",pretty_name=\"Ubuntu 20.04.2 LTS\",variant=\"\",variant_id=\"\",version=\"20.04.2 LTS (Focal Fossa)\",version_codename=\"focal\",version_id=\"20.04\"} 1\n# HELP node_os_version Metric containing the major.minor part of the OS version.\n# TYPE node_os_version gauge\nnode_os_version{id=\"ubuntu\",id_like=\"debian\",name=\"Ubuntu\"} 20.04\n# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.\n# TYPE node_scrape_collector_duration_seconds gauge\n# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.\n# TYPE node_scrape_collector_success gauge\nnode_scrape_collector_success{collector=\"boottime\"} 1\nnode_scrape_collector_success{collector=\"buddyinfo\"} 1\nnode_scrape_collector_success{collector=\"cpu\"} 1\nnode_scrape_collector_success{collector=\"exec\"} 1\nnode_scrape_collector_success{collector=\"loadavg\"} 1\nnode_scrape_collector_success{collector=\"meminfo\"} 0\nnode_scrape_collector_success{collector=\"netdev\"} 1\nnode_scrape_collector_success{collector=\"os\"} 1\nnode_scrape_collector_success{collector=\"textfile\"} 1\nnode_scrape_collector_success{collector=\"time\"} 1\nnode_scrape_collector_success{collector=\"xfrm\"} 1\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP node_time_seconds System time in seconds since epoch (1970).\n# TYPE node_time_seconds gauge\n# HELP node_time_zone_offset_seconds System time zone offset in seconds.\n# TYPE node_time_zone_offset_seconds gauge\n# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n# TYPE node_xfrm_acquire_error_packets_total counter\nnode_xfrm_acquire_error_packets_total 24532\n# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n# TYPE node_xfrm_fwd_hdr_error_packets_total counter\nnode_xfrm_fwd_hdr_error_packets_total 6654\n# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n# TYPE node_xfrm_in_buffer_error_packets_total counter\nnode_xfrm_in_buffer_error_packets_total 2\n# HELP node_xfrm_in_error_packets_total All errors not matched by other\n# TYPE node_xfrm_in_error_packets_total counter\nnode_xfrm_in_error_packets_total 1\n# HELP node_xfrm_in_hdr_error_packets_total Header error\n# TYPE node_xfrm_in_hdr_error_packets_total counter\nnode_xfrm_in_hdr_error_packets_total 4\n# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n# TYPE node_xfrm_in_no_pols_packets_total counter\nnode_xfrm_in_no_pols_packets_total 65432\n# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n# TYPE node_xfrm_in_no_states_packets_total counter\nnode_xfrm_in_no_states_packets_total 3\n# HELP node_xfrm_in_pol_block_packets_total Policy discards\n# TYPE node_xfrm_in_pol_block_packets_total counter\nnode_xfrm_in_pol_block_packets_total 100\n# HELP node_xfrm_in_pol_error_packets_total Policy error\n# TYPE node_xfrm_in_pol_error_packets_total counter\nnode_xfrm_in_pol_error_packets_total 10000\n# HELP node_xfrm_in_state_expired_packets_total State is expired\n# TYPE node_xfrm_in_state_expired_packets_total counter\nnode_xfrm_in_state_expired_packets_total 7\n# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n# TYPE node_xfrm_in_state_invalid_packets_total counter\nnode_xfrm_in_state_invalid_packets_total 55555\n# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n# TYPE node_xfrm_in_state_mismatch_packets_total counter\nnode_xfrm_in_state_mismatch_packets_total 23451\n# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_in_state_mode_error_packets_total counter\nnode_xfrm_in_state_mode_error_packets_total 100\n# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n# TYPE node_xfrm_in_state_proto_error_packets_total counter\nnode_xfrm_in_state_proto_error_packets_total 40\n# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n# TYPE node_xfrm_in_state_seq_error_packets_total counter\nnode_xfrm_in_state_seq_error_packets_total 6000\n# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\nnode_xfrm_in_tmpl_mismatch_packets_total 51\n# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n# TYPE node_xfrm_out_bundle_check_error_packets_total counter\nnode_xfrm_out_bundle_check_error_packets_total 555\n# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\nnode_xfrm_out_bundle_gen_error_packets_total 43321\n# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n# TYPE node_xfrm_out_error_packets_total counter\nnode_xfrm_out_error_packets_total 1e+06\n# HELP node_xfrm_out_no_states_packets_total No state is found\n# TYPE node_xfrm_out_no_states_packets_total counter\nnode_xfrm_out_no_states_packets_total 869\n# HELP node_xfrm_out_pol_block_packets_total Policy discards\n# TYPE node_xfrm_out_pol_block_packets_total counter\nnode_xfrm_out_pol_block_packets_total 43456\n# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n# TYPE node_xfrm_out_pol_dead_packets_total counter\nnode_xfrm_out_pol_dead_packets_total 7656\n# HELP node_xfrm_out_pol_error_packets_total Policy error\n# TYPE node_xfrm_out_pol_error_packets_total counter\nnode_xfrm_out_pol_error_packets_total 1454\n# HELP node_xfrm_out_state_expired_packets_total State is expired\n# TYPE node_xfrm_out_state_expired_packets_total counter\nnode_xfrm_out_state_expired_packets_total 565\n# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n# TYPE node_xfrm_out_state_invalid_packets_total counter\nnode_xfrm_out_state_invalid_packets_total 28765\n# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_out_state_mode_error_packets_total counter\nnode_xfrm_out_state_mode_error_packets_total 8\n# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n# TYPE node_xfrm_out_state_proto_error_packets_total counter\nnode_xfrm_out_state_proto_error_packets_total 4542\n# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n# TYPE node_xfrm_out_state_seq_error_packets_total counter\nnode_xfrm_out_state_seq_error_packets_total 543\n# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.\n# TYPE promhttp_metric_handler_errors_total counter\npromhttp_metric_handler_errors_total{cause=\"encoding\"} 0\npromhttp_metric_handler_errors_total{cause=\"gathering\"} 0\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/e2e-output-freebsd.txt",
    "content": "# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\n# HELP node_buddyinfo_blocks Count of free blocks according to size.\n# TYPE node_buddyinfo_blocks gauge\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA32\"} 759\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"Normal\"} 4381\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA32\"} 572\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"Normal\"} 1093\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA\"} 3\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA32\"} 791\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"Normal\"} 185\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA32\"} 475\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"Normal\"} 1530\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA\"} 2\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA32\"} 194\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"Normal\"} 567\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA32\"} 45\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"Normal\"} 102\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA32\"} 12\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"Normal\"} 4\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"Normal\"} 0\n# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.\n# TYPE node_exporter_build_info gauge\n# HELP node_memory_swap_in_bytes_total Bytes paged in from swap devices\n# TYPE node_memory_swap_in_bytes_total counter\nnode_memory_swap_in_bytes_total 0\n# HELP node_memory_swap_out_bytes_total Bytes paged out to swap devices\n# TYPE node_memory_swap_out_bytes_total counter\nnode_memory_swap_out_bytes_total 0\n# HELP node_memory_swap_size_bytes Total swap memory size\n# TYPE node_memory_swap_size_bytes gauge\nnode_memory_swap_size_bytes 1.073741824e+09\n# HELP node_memory_swap_used_bytes Currently allocated swap\n# TYPE node_memory_swap_used_bytes gauge\nnode_memory_swap_used_bytes 0\n# HELP node_memory_user_wired_bytes Locked in memory by user, mlock, etc\n# TYPE node_memory_user_wired_bytes gauge\nnode_memory_user_wired_bytes 0\n# HELP node_netisr_bindthreads netisr threads bound to CPUs\n# TYPE node_netisr_bindthreads gauge\nnode_netisr_bindthreads 0\n# HELP node_netisr_defaultqlimit netisr default queue limit\n# TYPE node_netisr_defaultqlimit gauge\nnode_netisr_defaultqlimit 256\n# HELP node_netisr_maxprot netisr maximum protocols\n# TYPE node_netisr_maxprot gauge\nnode_netisr_maxprot 16\n# HELP node_netisr_maxqlimit netisr maximum queue limit\n# TYPE node_netisr_maxqlimit gauge\nnode_netisr_maxqlimit 10240\n# HELP node_netisr_maxthreads netisr maximum thread count\n# TYPE node_netisr_maxthreads gauge\nnode_netisr_maxthreads 1\n# HELP node_netisr_numthreads netisr current thread count\n# TYPE node_netisr_numthreads gauge\nnode_netisr_numthreads 1\n# HELP node_network_receive_drop_total Network device statistic receive_drop.\n# TYPE node_network_receive_drop_total counter\nnode_network_receive_drop_total{device=\"lo0\"} 0\n# HELP node_network_receive_errs_total Network device statistic receive_errs.\n# TYPE node_network_receive_errs_total counter\nnode_network_receive_errs_total{device=\"lo0\"} 0\n# HELP node_network_receive_packets_total Network device statistic receive_packets.\n# TYPE node_network_receive_packets_total counter\n# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.\n# TYPE node_network_transmit_bytes_total counter\n# HELP node_network_transmit_drop_total Network device statistic transmit_drop.\n# TYPE node_network_transmit_drop_total counter\nnode_network_transmit_drop_total{device=\"lo0\"} 0\n# HELP node_network_transmit_errs_total Network device statistic transmit_errs.\n# TYPE node_network_transmit_errs_total counter\nnode_network_transmit_errs_total{device=\"lo0\"} 0\n# HELP node_network_transmit_packets_total Network device statistic transmit_packets.\n# TYPE node_network_transmit_packets_total counter\n# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.\n# TYPE node_os_info gauge\nnode_os_info{build_id=\"\",id=\"ubuntu\",id_like=\"debian\",image_id=\"\",image_version=\"\",name=\"Ubuntu\",pretty_name=\"Ubuntu 20.04.2 LTS\",variant=\"\",variant_id=\"\",version=\"20.04.2 LTS (Focal Fossa)\",version_codename=\"focal\",version_id=\"20.04\"} 1\n# HELP node_os_version Metric containing the major.minor part of the OS version.\n# TYPE node_os_version gauge\nnode_os_version{id=\"ubuntu\",id_like=\"debian\",name=\"Ubuntu\"} 20.04\n# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.\n# TYPE node_scrape_collector_duration_seconds gauge\n# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.\n# TYPE node_scrape_collector_success gauge\nnode_scrape_collector_success{collector=\"boottime\"} 1\nnode_scrape_collector_success{collector=\"buddyinfo\"} 1\nnode_scrape_collector_success{collector=\"cpu\"} 1\nnode_scrape_collector_success{collector=\"exec\"} 1\nnode_scrape_collector_success{collector=\"loadavg\"} 1\nnode_scrape_collector_success{collector=\"meminfo\"} 1\nnode_scrape_collector_success{collector=\"netdev\"} 1\nnode_scrape_collector_success{collector=\"netisr\"} 1\nnode_scrape_collector_success{collector=\"netstat\"} 1\nnode_scrape_collector_success{collector=\"os\"} 1\nnode_scrape_collector_success{collector=\"textfile\"} 1\nnode_scrape_collector_success{collector=\"time\"} 1\nnode_scrape_collector_success{collector=\"xfrm\"} 1\nnode_scrape_collector_success{collector=\"zfs\"} 1\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP node_time_seconds System time in seconds since epoch (1970).\n# TYPE node_time_seconds gauge\n# HELP node_time_zone_offset_seconds System time zone offset in seconds.\n# TYPE node_time_zone_offset_seconds gauge\n# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n# TYPE node_xfrm_acquire_error_packets_total counter\nnode_xfrm_acquire_error_packets_total 24532\n# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n# TYPE node_xfrm_fwd_hdr_error_packets_total counter\nnode_xfrm_fwd_hdr_error_packets_total 6654\n# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n# TYPE node_xfrm_in_buffer_error_packets_total counter\nnode_xfrm_in_buffer_error_packets_total 2\n# HELP node_xfrm_in_error_packets_total All errors not matched by other\n# TYPE node_xfrm_in_error_packets_total counter\nnode_xfrm_in_error_packets_total 1\n# HELP node_xfrm_in_hdr_error_packets_total Header error\n# TYPE node_xfrm_in_hdr_error_packets_total counter\nnode_xfrm_in_hdr_error_packets_total 4\n# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n# TYPE node_xfrm_in_no_pols_packets_total counter\nnode_xfrm_in_no_pols_packets_total 65432\n# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n# TYPE node_xfrm_in_no_states_packets_total counter\nnode_xfrm_in_no_states_packets_total 3\n# HELP node_xfrm_in_pol_block_packets_total Policy discards\n# TYPE node_xfrm_in_pol_block_packets_total counter\nnode_xfrm_in_pol_block_packets_total 100\n# HELP node_xfrm_in_pol_error_packets_total Policy error\n# TYPE node_xfrm_in_pol_error_packets_total counter\nnode_xfrm_in_pol_error_packets_total 10000\n# HELP node_xfrm_in_state_expired_packets_total State is expired\n# TYPE node_xfrm_in_state_expired_packets_total counter\nnode_xfrm_in_state_expired_packets_total 7\n# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n# TYPE node_xfrm_in_state_invalid_packets_total counter\nnode_xfrm_in_state_invalid_packets_total 55555\n# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n# TYPE node_xfrm_in_state_mismatch_packets_total counter\nnode_xfrm_in_state_mismatch_packets_total 23451\n# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_in_state_mode_error_packets_total counter\nnode_xfrm_in_state_mode_error_packets_total 100\n# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n# TYPE node_xfrm_in_state_proto_error_packets_total counter\nnode_xfrm_in_state_proto_error_packets_total 40\n# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n# TYPE node_xfrm_in_state_seq_error_packets_total counter\nnode_xfrm_in_state_seq_error_packets_total 6000\n# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\nnode_xfrm_in_tmpl_mismatch_packets_total 51\n# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n# TYPE node_xfrm_out_bundle_check_error_packets_total counter\nnode_xfrm_out_bundle_check_error_packets_total 555\n# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\nnode_xfrm_out_bundle_gen_error_packets_total 43321\n# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n# TYPE node_xfrm_out_error_packets_total counter\nnode_xfrm_out_error_packets_total 1e+06\n# HELP node_xfrm_out_no_states_packets_total No state is found\n# TYPE node_xfrm_out_no_states_packets_total counter\nnode_xfrm_out_no_states_packets_total 869\n# HELP node_xfrm_out_pol_block_packets_total Policy discards\n# TYPE node_xfrm_out_pol_block_packets_total counter\nnode_xfrm_out_pol_block_packets_total 43456\n# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n# TYPE node_xfrm_out_pol_dead_packets_total counter\nnode_xfrm_out_pol_dead_packets_total 7656\n# HELP node_xfrm_out_pol_error_packets_total Policy error\n# TYPE node_xfrm_out_pol_error_packets_total counter\nnode_xfrm_out_pol_error_packets_total 1454\n# HELP node_xfrm_out_state_expired_packets_total State is expired\n# TYPE node_xfrm_out_state_expired_packets_total counter\nnode_xfrm_out_state_expired_packets_total 565\n# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n# TYPE node_xfrm_out_state_invalid_packets_total counter\nnode_xfrm_out_state_invalid_packets_total 28765\n# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_out_state_mode_error_packets_total counter\nnode_xfrm_out_state_mode_error_packets_total 8\n# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n# TYPE node_xfrm_out_state_proto_error_packets_total counter\nnode_xfrm_out_state_proto_error_packets_total 4542\n# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n# TYPE node_xfrm_out_state_seq_error_packets_total counter\nnode_xfrm_out_state_seq_error_packets_total 543\n# HELP node_zfs_arcstats_c_min_bytes ZFS ARC minimum size\n# TYPE node_zfs_arcstats_c_min_bytes gauge\nnode_zfs_arcstats_c_min_bytes 1.99743232e+08\n# HELP node_zfs_arcstats_mfu_ghost_size ZFS ARC MFU ghost size\n# TYPE node_zfs_arcstats_mfu_ghost_size gauge\nnode_zfs_arcstats_mfu_ghost_size 0\n# HELP node_zfs_arcstats_mru_ghost_hits_total ZFS ARC MRU ghost hits\n# TYPE node_zfs_arcstats_mru_ghost_hits_total counter\nnode_zfs_arcstats_mru_ghost_hits_total 0\n# HELP node_zfs_arcstats_pm_bytes ZFS ARC meta MRU target frac\n# TYPE node_zfs_arcstats_pm_bytes gauge\nnode_zfs_arcstats_pm_bytes 2.147483648e+09\n# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.\n# TYPE promhttp_metric_handler_errors_total counter\npromhttp_metric_handler_errors_total{cause=\"encoding\"} 0\npromhttp_metric_handler_errors_total{cause=\"gathering\"} 0\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/e2e-output-netbsd.txt",
    "content": "# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\n# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.\n# TYPE node_exporter_build_info gauge\n# HELP node_memory_swap_size_bytes Memory information field swap_size_bytes.\n# TYPE node_memory_swap_size_bytes gauge\nnode_memory_swap_size_bytes 6.442426368e+09\n# HELP node_memory_swap_used_bytes Memory information field swap_used_bytes.\n# TYPE node_memory_swap_used_bytes gauge\nnode_memory_swap_used_bytes 0\n# HELP node_memory_swapped_in_pages_bytes_total Memory information field swapped_in_pages_bytes_total.\n# TYPE node_memory_swapped_in_pages_bytes_total counter\nnode_memory_swapped_in_pages_bytes_total 0\n# HELP node_memory_swapped_out_pages_bytes_total Memory information field swapped_out_pages_bytes_total.\n# TYPE node_memory_swapped_out_pages_bytes_total counter\nnode_memory_swapped_out_pages_bytes_total 0\n# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.\n# TYPE node_os_info gauge\nnode_os_info{build_id=\"\",id=\"ubuntu\",id_like=\"debian\",image_id=\"\",image_version=\"\",name=\"Ubuntu\",pretty_name=\"Ubuntu 20.04.2 LTS\",variant=\"\",variant_id=\"\",version=\"20.04.2 LTS (Focal Fossa)\",version_codename=\"focal\",version_id=\"20.04\"} 1\n# HELP node_os_version Metric containing the major.minor part of the OS version.\n# TYPE node_os_version gauge\nnode_os_version{id=\"ubuntu\",id_like=\"debian\",name=\"Ubuntu\"} 20.04\n# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.\n# TYPE node_scrape_collector_duration_seconds gauge\n# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.\n# TYPE node_scrape_collector_success gauge\nnode_scrape_collector_success{collector=\"boottime\"} 1\nnode_scrape_collector_success{collector=\"cpu\"} 0\nnode_scrape_collector_success{collector=\"loadavg\"} 1\nnode_scrape_collector_success{collector=\"meminfo\"} 1\nnode_scrape_collector_success{collector=\"os\"} 1\nnode_scrape_collector_success{collector=\"textfile\"} 1\nnode_scrape_collector_success{collector=\"time\"} 1\nnode_scrape_collector_success{collector=\"xfrm\"} 1\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP node_time_seconds System time in seconds since epoch (1970).\n# TYPE node_time_seconds gauge\n# HELP node_time_zone_offset_seconds System time zone offset in seconds.\n# TYPE node_time_zone_offset_seconds gauge\n# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n# TYPE node_xfrm_acquire_error_packets_total counter\nnode_xfrm_acquire_error_packets_total 24532\n# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n# TYPE node_xfrm_fwd_hdr_error_packets_total counter\nnode_xfrm_fwd_hdr_error_packets_total 6654\n# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n# TYPE node_xfrm_in_buffer_error_packets_total counter\nnode_xfrm_in_buffer_error_packets_total 2\n# HELP node_xfrm_in_error_packets_total All errors not matched by other\n# TYPE node_xfrm_in_error_packets_total counter\nnode_xfrm_in_error_packets_total 1\n# HELP node_xfrm_in_hdr_error_packets_total Header error\n# TYPE node_xfrm_in_hdr_error_packets_total counter\nnode_xfrm_in_hdr_error_packets_total 4\n# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n# TYPE node_xfrm_in_no_pols_packets_total counter\nnode_xfrm_in_no_pols_packets_total 65432\n# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n# TYPE node_xfrm_in_no_states_packets_total counter\nnode_xfrm_in_no_states_packets_total 3\n# HELP node_xfrm_in_pol_block_packets_total Policy discards\n# TYPE node_xfrm_in_pol_block_packets_total counter\nnode_xfrm_in_pol_block_packets_total 100\n# HELP node_xfrm_in_pol_error_packets_total Policy error\n# TYPE node_xfrm_in_pol_error_packets_total counter\nnode_xfrm_in_pol_error_packets_total 10000\n# HELP node_xfrm_in_state_expired_packets_total State is expired\n# TYPE node_xfrm_in_state_expired_packets_total counter\nnode_xfrm_in_state_expired_packets_total 7\n# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n# TYPE node_xfrm_in_state_invalid_packets_total counter\nnode_xfrm_in_state_invalid_packets_total 55555\n# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n# TYPE node_xfrm_in_state_mismatch_packets_total counter\nnode_xfrm_in_state_mismatch_packets_total 23451\n# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_in_state_mode_error_packets_total counter\nnode_xfrm_in_state_mode_error_packets_total 100\n# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n# TYPE node_xfrm_in_state_proto_error_packets_total counter\nnode_xfrm_in_state_proto_error_packets_total 40\n# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n# TYPE node_xfrm_in_state_seq_error_packets_total counter\nnode_xfrm_in_state_seq_error_packets_total 6000\n# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\nnode_xfrm_in_tmpl_mismatch_packets_total 51\n# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n# TYPE node_xfrm_out_bundle_check_error_packets_total counter\nnode_xfrm_out_bundle_check_error_packets_total 555\n# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\nnode_xfrm_out_bundle_gen_error_packets_total 43321\n# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n# TYPE node_xfrm_out_error_packets_total counter\nnode_xfrm_out_error_packets_total 1e+06\n# HELP node_xfrm_out_no_states_packets_total No state is found\n# TYPE node_xfrm_out_no_states_packets_total counter\nnode_xfrm_out_no_states_packets_total 869\n# HELP node_xfrm_out_pol_block_packets_total Policy discards\n# TYPE node_xfrm_out_pol_block_packets_total counter\nnode_xfrm_out_pol_block_packets_total 43456\n# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n# TYPE node_xfrm_out_pol_dead_packets_total counter\nnode_xfrm_out_pol_dead_packets_total 7656\n# HELP node_xfrm_out_pol_error_packets_total Policy error\n# TYPE node_xfrm_out_pol_error_packets_total counter\nnode_xfrm_out_pol_error_packets_total 1454\n# HELP node_xfrm_out_state_expired_packets_total State is expired\n# TYPE node_xfrm_out_state_expired_packets_total counter\nnode_xfrm_out_state_expired_packets_total 565\n# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n# TYPE node_xfrm_out_state_invalid_packets_total counter\nnode_xfrm_out_state_invalid_packets_total 28765\n# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_out_state_mode_error_packets_total counter\nnode_xfrm_out_state_mode_error_packets_total 8\n# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n# TYPE node_xfrm_out_state_proto_error_packets_total counter\nnode_xfrm_out_state_proto_error_packets_total 4542\n# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n# TYPE node_xfrm_out_state_seq_error_packets_total counter\nnode_xfrm_out_state_seq_error_packets_total 543\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\n# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.\n# TYPE promhttp_metric_handler_errors_total counter\npromhttp_metric_handler_errors_total{cause=\"encoding\"} 0\npromhttp_metric_handler_errors_total{cause=\"gathering\"} 0\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/e2e-output-openbsd.txt",
    "content": "# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\n# HELP node_buddyinfo_blocks Count of free blocks according to size.\n# TYPE node_buddyinfo_blocks gauge\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA32\"} 759\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"Normal\"} 4381\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA32\"} 572\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"Normal\"} 1093\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA\"} 3\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA32\"} 791\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"Normal\"} 185\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA32\"} 475\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"Normal\"} 1530\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA\"} 2\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA32\"} 194\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"Normal\"} 567\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA32\"} 45\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"Normal\"} 102\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA32\"} 12\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"Normal\"} 4\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"Normal\"} 0\n# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.\n# TYPE node_exporter_build_info gauge\n# HELP node_memory_swap_size_bytes Memory information field swap_size_bytes.\n# TYPE node_memory_swap_size_bytes gauge\nnode_memory_swap_size_bytes 6.693941248e+09\n# HELP node_memory_swap_used_bytes Memory information field swap_used_bytes.\n# TYPE node_memory_swap_used_bytes gauge\nnode_memory_swap_used_bytes 0\n# HELP node_memory_swapped_in_pages_bytes_total Memory information field swapped_in_pages_bytes_total.\n# TYPE node_memory_swapped_in_pages_bytes_total counter\nnode_memory_swapped_in_pages_bytes_total 0\n# HELP node_memory_swapped_out_pages_bytes_total Memory information field swapped_out_pages_bytes_total.\n# TYPE node_memory_swapped_out_pages_bytes_total counter\nnode_memory_swapped_out_pages_bytes_total 0\n# HELP node_network_noproto_total Network device statistic noproto.\n# TYPE node_network_noproto_total counter\nnode_network_noproto_total{device=\"lo0\"} 0\nnode_network_noproto_total{device=\"pflog0\"} 0\n# HELP node_network_receive_drop_total Network device statistic receive_drop.\n# TYPE node_network_receive_drop_total counter\nnode_network_receive_drop_total{device=\"lo0\"} 0\nnode_network_receive_drop_total{device=\"pflog0\"} 0\n# HELP node_network_receive_errs_total Network device statistic receive_errs.\n# TYPE node_network_receive_errs_total counter\nnode_network_receive_errs_total{device=\"lo0\"} 0\nnode_network_receive_errs_total{device=\"pflog0\"} 0\n# HELP node_network_receive_packets_total Network device statistic receive_packets.\n# TYPE node_network_receive_packets_total counter\n# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.\n# TYPE node_network_transmit_bytes_total counter\n# HELP node_network_transmit_colls_total Network device statistic transmit_colls.\n# TYPE node_network_transmit_colls_total counter\nnode_network_transmit_colls_total{device=\"lo0\"} 0\nnode_network_transmit_colls_total{device=\"pflog0\"} 0\n# HELP node_network_transmit_drop_total Network device statistic transmit_drop.\n# TYPE node_network_transmit_drop_total counter\nnode_network_transmit_drop_total{device=\"lo0\"} 0\nnode_network_transmit_drop_total{device=\"pflog0\"} 0\n# HELP node_network_transmit_errs_total Network device statistic transmit_errs.\n# TYPE node_network_transmit_errs_total counter\nnode_network_transmit_errs_total{device=\"lo0\"} 0\nnode_network_transmit_errs_total{device=\"pflog0\"} 0\n# HELP node_network_transmit_packets_total Network device statistic transmit_packets.\n# TYPE node_network_transmit_packets_total counter\n# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.\n# TYPE node_os_info gauge\nnode_os_info{build_id=\"\",id=\"ubuntu\",id_like=\"debian\",image_id=\"\",image_version=\"\",name=\"Ubuntu\",pretty_name=\"Ubuntu 20.04.2 LTS\",variant=\"\",variant_id=\"\",version=\"20.04.2 LTS (Focal Fossa)\",version_codename=\"focal\",version_id=\"20.04\"} 1\n# HELP node_os_version Metric containing the major.minor part of the OS version.\n# TYPE node_os_version gauge\nnode_os_version{id=\"ubuntu\",id_like=\"debian\",name=\"Ubuntu\"} 20.04\n# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.\n# TYPE node_scrape_collector_duration_seconds gauge\n# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.\n# TYPE node_scrape_collector_success gauge\nnode_scrape_collector_success{collector=\"boottime\"} 1\nnode_scrape_collector_success{collector=\"buddyinfo\"} 1\nnode_scrape_collector_success{collector=\"cpu\"} 1\nnode_scrape_collector_success{collector=\"diskstats\"} 1\nnode_scrape_collector_success{collector=\"interrupts\"} 1\nnode_scrape_collector_success{collector=\"loadavg\"} 1\nnode_scrape_collector_success{collector=\"meminfo\"} 1\nnode_scrape_collector_success{collector=\"netdev\"} 1\nnode_scrape_collector_success{collector=\"os\"} 1\nnode_scrape_collector_success{collector=\"textfile\"} 1\nnode_scrape_collector_success{collector=\"time\"} 1\nnode_scrape_collector_success{collector=\"xfrm\"} 1\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP node_time_seconds System time in seconds since epoch (1970).\n# TYPE node_time_seconds gauge\n# HELP node_time_zone_offset_seconds System time zone offset in seconds.\n# TYPE node_time_zone_offset_seconds gauge\n# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n# TYPE node_xfrm_acquire_error_packets_total counter\nnode_xfrm_acquire_error_packets_total 24532\n# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n# TYPE node_xfrm_fwd_hdr_error_packets_total counter\nnode_xfrm_fwd_hdr_error_packets_total 6654\n# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n# TYPE node_xfrm_in_buffer_error_packets_total counter\nnode_xfrm_in_buffer_error_packets_total 2\n# HELP node_xfrm_in_error_packets_total All errors not matched by other\n# TYPE node_xfrm_in_error_packets_total counter\nnode_xfrm_in_error_packets_total 1\n# HELP node_xfrm_in_hdr_error_packets_total Header error\n# TYPE node_xfrm_in_hdr_error_packets_total counter\nnode_xfrm_in_hdr_error_packets_total 4\n# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n# TYPE node_xfrm_in_no_pols_packets_total counter\nnode_xfrm_in_no_pols_packets_total 65432\n# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n# TYPE node_xfrm_in_no_states_packets_total counter\nnode_xfrm_in_no_states_packets_total 3\n# HELP node_xfrm_in_pol_block_packets_total Policy discards\n# TYPE node_xfrm_in_pol_block_packets_total counter\nnode_xfrm_in_pol_block_packets_total 100\n# HELP node_xfrm_in_pol_error_packets_total Policy error\n# TYPE node_xfrm_in_pol_error_packets_total counter\nnode_xfrm_in_pol_error_packets_total 10000\n# HELP node_xfrm_in_state_expired_packets_total State is expired\n# TYPE node_xfrm_in_state_expired_packets_total counter\nnode_xfrm_in_state_expired_packets_total 7\n# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n# TYPE node_xfrm_in_state_invalid_packets_total counter\nnode_xfrm_in_state_invalid_packets_total 55555\n# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n# TYPE node_xfrm_in_state_mismatch_packets_total counter\nnode_xfrm_in_state_mismatch_packets_total 23451\n# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_in_state_mode_error_packets_total counter\nnode_xfrm_in_state_mode_error_packets_total 100\n# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n# TYPE node_xfrm_in_state_proto_error_packets_total counter\nnode_xfrm_in_state_proto_error_packets_total 40\n# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n# TYPE node_xfrm_in_state_seq_error_packets_total counter\nnode_xfrm_in_state_seq_error_packets_total 6000\n# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\nnode_xfrm_in_tmpl_mismatch_packets_total 51\n# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n# TYPE node_xfrm_out_bundle_check_error_packets_total counter\nnode_xfrm_out_bundle_check_error_packets_total 555\n# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\nnode_xfrm_out_bundle_gen_error_packets_total 43321\n# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n# TYPE node_xfrm_out_error_packets_total counter\nnode_xfrm_out_error_packets_total 1e+06\n# HELP node_xfrm_out_no_states_packets_total No state is found\n# TYPE node_xfrm_out_no_states_packets_total counter\nnode_xfrm_out_no_states_packets_total 869\n# HELP node_xfrm_out_pol_block_packets_total Policy discards\n# TYPE node_xfrm_out_pol_block_packets_total counter\nnode_xfrm_out_pol_block_packets_total 43456\n# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n# TYPE node_xfrm_out_pol_dead_packets_total counter\nnode_xfrm_out_pol_dead_packets_total 7656\n# HELP node_xfrm_out_pol_error_packets_total Policy error\n# TYPE node_xfrm_out_pol_error_packets_total counter\nnode_xfrm_out_pol_error_packets_total 1454\n# HELP node_xfrm_out_state_expired_packets_total State is expired\n# TYPE node_xfrm_out_state_expired_packets_total counter\nnode_xfrm_out_state_expired_packets_total 565\n# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n# TYPE node_xfrm_out_state_invalid_packets_total counter\nnode_xfrm_out_state_invalid_packets_total 28765\n# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_out_state_mode_error_packets_total counter\nnode_xfrm_out_state_mode_error_packets_total 8\n# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n# TYPE node_xfrm_out_state_proto_error_packets_total counter\nnode_xfrm_out_state_proto_error_packets_total 4542\n# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n# TYPE node_xfrm_out_state_seq_error_packets_total counter\nnode_xfrm_out_state_seq_error_packets_total 543\n# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.\n# TYPE promhttp_metric_handler_errors_total counter\npromhttp_metric_handler_errors_total{cause=\"encoding\"} 0\npromhttp_metric_handler_errors_total{cause=\"gathering\"} 0\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/e2e-output-solaris.txt",
    "content": "# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\n# HELP node_buddyinfo_blocks Count of free blocks according to size.\n# TYPE node_buddyinfo_blocks gauge\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA32\"} 759\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"Normal\"} 4381\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA32\"} 572\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"Normal\"} 1093\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA\"} 3\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA32\"} 791\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"Normal\"} 185\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA32\"} 475\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"Normal\"} 1530\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA\"} 2\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA32\"} 194\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"Normal\"} 567\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA32\"} 45\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"Normal\"} 102\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA32\"} 12\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"Normal\"} 4\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"Normal\"} 0\n# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.\n# TYPE node_exporter_build_info gauge\n# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.\n# TYPE node_os_info gauge\nnode_os_info{build_id=\"\",id=\"ubuntu\",id_like=\"debian\",image_id=\"\",image_version=\"\",name=\"Ubuntu\",pretty_name=\"Ubuntu 20.04.2 LTS\",variant=\"\",variant_id=\"\",version=\"20.04.2 LTS (Focal Fossa)\",version_codename=\"focal\",version_id=\"20.04\"} 1\n# HELP node_os_version Metric containing the major.minor part of the OS version.\n# TYPE node_os_version gauge\nnode_os_version{id=\"ubuntu\",id_like=\"debian\",name=\"Ubuntu\"} 20.04\n# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.\n# TYPE node_scrape_collector_duration_seconds gauge\n# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.\n# TYPE node_scrape_collector_success gauge\nnode_scrape_collector_success{collector=\"boottime\"} 1\nnode_scrape_collector_success{collector=\"buddyinfo\"} 1\nnode_scrape_collector_success{collector=\"cpu\"} 0\nnode_scrape_collector_success{collector=\"cpufreq\"} 1\nnode_scrape_collector_success{collector=\"loadavg\"} 1\nnode_scrape_collector_success{collector=\"os\"} 1\nnode_scrape_collector_success{collector=\"textfile\"} 1\nnode_scrape_collector_success{collector=\"time\"} 1\nnode_scrape_collector_success{collector=\"xfrm\"} 1\nnode_scrape_collector_success{collector=\"zfs\"} 0\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP node_time_seconds System time in seconds since epoch (1970).\n# TYPE node_time_seconds gauge\n# HELP node_time_zone_offset_seconds System time zone offset in seconds.\n# TYPE node_time_zone_offset_seconds gauge\n# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n# TYPE node_xfrm_acquire_error_packets_total counter\nnode_xfrm_acquire_error_packets_total 24532\n# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n# TYPE node_xfrm_fwd_hdr_error_packets_total counter\nnode_xfrm_fwd_hdr_error_packets_total 6654\n# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n# TYPE node_xfrm_in_buffer_error_packets_total counter\nnode_xfrm_in_buffer_error_packets_total 2\n# HELP node_xfrm_in_error_packets_total All errors not matched by other\n# TYPE node_xfrm_in_error_packets_total counter\nnode_xfrm_in_error_packets_total 1\n# HELP node_xfrm_in_hdr_error_packets_total Header error\n# TYPE node_xfrm_in_hdr_error_packets_total counter\nnode_xfrm_in_hdr_error_packets_total 4\n# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n# TYPE node_xfrm_in_no_pols_packets_total counter\nnode_xfrm_in_no_pols_packets_total 65432\n# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n# TYPE node_xfrm_in_no_states_packets_total counter\nnode_xfrm_in_no_states_packets_total 3\n# HELP node_xfrm_in_pol_block_packets_total Policy discards\n# TYPE node_xfrm_in_pol_block_packets_total counter\nnode_xfrm_in_pol_block_packets_total 100\n# HELP node_xfrm_in_pol_error_packets_total Policy error\n# TYPE node_xfrm_in_pol_error_packets_total counter\nnode_xfrm_in_pol_error_packets_total 10000\n# HELP node_xfrm_in_state_expired_packets_total State is expired\n# TYPE node_xfrm_in_state_expired_packets_total counter\nnode_xfrm_in_state_expired_packets_total 7\n# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n# TYPE node_xfrm_in_state_invalid_packets_total counter\nnode_xfrm_in_state_invalid_packets_total 55555\n# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n# TYPE node_xfrm_in_state_mismatch_packets_total counter\nnode_xfrm_in_state_mismatch_packets_total 23451\n# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_in_state_mode_error_packets_total counter\nnode_xfrm_in_state_mode_error_packets_total 100\n# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n# TYPE node_xfrm_in_state_proto_error_packets_total counter\nnode_xfrm_in_state_proto_error_packets_total 40\n# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n# TYPE node_xfrm_in_state_seq_error_packets_total counter\nnode_xfrm_in_state_seq_error_packets_total 6000\n# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\nnode_xfrm_in_tmpl_mismatch_packets_total 51\n# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n# TYPE node_xfrm_out_bundle_check_error_packets_total counter\nnode_xfrm_out_bundle_check_error_packets_total 555\n# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\nnode_xfrm_out_bundle_gen_error_packets_total 43321\n# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n# TYPE node_xfrm_out_error_packets_total counter\nnode_xfrm_out_error_packets_total 1e+06\n# HELP node_xfrm_out_no_states_packets_total No state is found\n# TYPE node_xfrm_out_no_states_packets_total counter\nnode_xfrm_out_no_states_packets_total 869\n# HELP node_xfrm_out_pol_block_packets_total Policy discards\n# TYPE node_xfrm_out_pol_block_packets_total counter\nnode_xfrm_out_pol_block_packets_total 43456\n# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n# TYPE node_xfrm_out_pol_dead_packets_total counter\nnode_xfrm_out_pol_dead_packets_total 7656\n# HELP node_xfrm_out_pol_error_packets_total Policy error\n# TYPE node_xfrm_out_pol_error_packets_total counter\nnode_xfrm_out_pol_error_packets_total 1454\n# HELP node_xfrm_out_state_expired_packets_total State is expired\n# TYPE node_xfrm_out_state_expired_packets_total counter\nnode_xfrm_out_state_expired_packets_total 565\n# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n# TYPE node_xfrm_out_state_invalid_packets_total counter\nnode_xfrm_out_state_invalid_packets_total 28765\n# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_out_state_mode_error_packets_total counter\nnode_xfrm_out_state_mode_error_packets_total 8\n# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n# TYPE node_xfrm_out_state_proto_error_packets_total counter\nnode_xfrm_out_state_proto_error_packets_total 4542\n# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n# TYPE node_xfrm_out_state_seq_error_packets_total counter\nnode_xfrm_out_state_seq_error_packets_total 543\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\n# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.\n# TYPE promhttp_metric_handler_errors_total counter\npromhttp_metric_handler_errors_total{cause=\"encoding\"} 0\npromhttp_metric_handler_errors_total{cause=\"gathering\"} 0\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/e2e-output.txt",
    "content": "# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.\n# TYPE go_gc_duration_seconds summary\n# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.\n# TYPE go_gc_gogc_percent gauge\n# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.\n# TYPE go_gc_gomemlimit_bytes gauge\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\n# HELP go_info Information about the Go environment.\n# TYPE go_info gauge\n# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_alloc_bytes gauge\n# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.\n# TYPE go_memstats_alloc_bytes_total counter\n# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.\n# TYPE go_memstats_buck_hash_sys_bytes gauge\n# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_frees_total counter\n# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.\n# TYPE go_memstats_gc_sys_bytes gauge\n# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.\n# TYPE go_memstats_heap_alloc_bytes gauge\n# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_idle_bytes gauge\n# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes\n# TYPE go_memstats_heap_inuse_bytes gauge\n# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.\n# TYPE go_memstats_heap_objects gauge\n# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.\n# TYPE go_memstats_heap_released_bytes gauge\n# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.\n# TYPE go_memstats_heap_sys_bytes gauge\n# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.\n# TYPE go_memstats_last_gc_time_seconds gauge\n# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.\n# TYPE go_memstats_mallocs_total counter\n# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.\n# TYPE go_memstats_mcache_inuse_bytes gauge\n# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.\n# TYPE go_memstats_mcache_sys_bytes gauge\n# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.\n# TYPE go_memstats_mspan_inuse_bytes gauge\n# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.\n# TYPE go_memstats_mspan_sys_bytes gauge\n# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.\n# TYPE go_memstats_next_gc_bytes gauge\n# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.\n# TYPE go_memstats_other_sys_bytes gauge\n# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.\n# TYPE go_memstats_stack_inuse_bytes gauge\n# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.\n# TYPE go_memstats_stack_sys_bytes gauge\n# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.\n# TYPE go_memstats_sys_bytes gauge\n# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.\n# TYPE go_sched_gomaxprocs_threads gauge\n# HELP go_threads Number of OS threads created.\n# TYPE go_threads gauge\n# HELP node_arp_entries ARP entries by device\n# TYPE node_arp_entries gauge\nnode_arp_entries{device=\"eth0\"} 3\nnode_arp_entries{device=\"eth1\"} 3\n# HELP node_bcache_active_journal_entries Number of journal entries that are newer than the index.\n# TYPE node_bcache_active_journal_entries gauge\nnode_bcache_active_journal_entries{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 1\n# HELP node_bcache_average_key_size_sectors Average data per key in the btree (sectors).\n# TYPE node_bcache_average_key_size_sectors gauge\nnode_bcache_average_key_size_sectors{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_btree_cache_size_bytes Amount of memory currently used by the btree cache.\n# TYPE node_bcache_btree_cache_size_bytes gauge\nnode_bcache_btree_cache_size_bytes{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_btree_nodes Total nodes in the btree.\n# TYPE node_bcache_btree_nodes gauge\nnode_bcache_btree_nodes{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_btree_read_average_duration_seconds Average btree read duration.\n# TYPE node_bcache_btree_read_average_duration_seconds gauge\nnode_bcache_btree_read_average_duration_seconds{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 1.305e-06\n# HELP node_bcache_bypassed_bytes_total Amount of IO (both reads and writes) that has bypassed the cache.\n# TYPE node_bcache_bypassed_bytes_total counter\nnode_bcache_bypassed_bytes_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, usable for writeback (may contain clean cached data).\n# TYPE node_bcache_cache_available_percent gauge\nnode_bcache_cache_available_percent{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 100\n# HELP node_bcache_cache_bypass_hits_total Hits for IO intended to skip the cache.\n# TYPE node_bcache_cache_bypass_hits_total counter\nnode_bcache_cache_bypass_hits_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_bypass_misses_total Misses for IO intended to skip the cache.\n# TYPE node_bcache_cache_bypass_misses_total counter\nnode_bcache_cache_bypass_misses_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_hits_total Hits counted per individual IO as bcache sees them.\n# TYPE node_bcache_cache_hits_total counter\nnode_bcache_cache_hits_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 546\n# HELP node_bcache_cache_miss_collisions_total Instances where data insertion from cache miss raced with write (data already present).\n# TYPE node_bcache_cache_miss_collisions_total counter\nnode_bcache_cache_miss_collisions_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_misses_total Misses counted per individual IO as bcache sees them.\n# TYPE node_bcache_cache_misses_total counter\nnode_bcache_cache_misses_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_read_races_total Counts instances where while data was being read from the cache, the bucket was reused and invalidated - i.e. where the pointer was stale after the read completed.\n# TYPE node_bcache_cache_read_races_total counter\nnode_bcache_cache_read_races_total{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_cache_readaheads_total Count of times readahead occurred.\n# TYPE node_bcache_cache_readaheads_total counter\nnode_bcache_cache_readaheads_total{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 13\n# HELP node_bcache_congested Congestion.\n# TYPE node_bcache_congested gauge\nnode_bcache_congested{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_dirty_data_bytes Amount of dirty data for this backing device in the cache.\n# TYPE node_bcache_dirty_data_bytes gauge\nnode_bcache_dirty_data_bytes{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_dirty_target_bytes Current dirty data target threshold for this backing device in bytes.\n# TYPE node_bcache_dirty_target_bytes gauge\nnode_bcache_dirty_target_bytes{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 2.189426688e+10\n# HELP node_bcache_io_errors Number of errors that have occurred, decayed by io_error_halflife.\n# TYPE node_bcache_io_errors gauge\nnode_bcache_io_errors{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_metadata_written_bytes_total Sum of all non data writes (btree writes and all other metadata).\n# TYPE node_bcache_metadata_written_bytes_total counter\nnode_bcache_metadata_written_bytes_total{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 512\n# HELP node_bcache_priority_stats_metadata_percent Bcache's metadata overhead.\n# TYPE node_bcache_priority_stats_metadata_percent gauge\nnode_bcache_priority_stats_metadata_percent{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_priority_stats_unused_percent The percentage of the cache that doesn't contain any data.\n# TYPE node_bcache_priority_stats_unused_percent gauge\nnode_bcache_priority_stats_unused_percent{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 99\n# HELP node_bcache_root_usage_percent Percentage of the root btree node in use (tree depth increases if too high).\n# TYPE node_bcache_root_usage_percent gauge\nnode_bcache_root_usage_percent{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_tree_depth Depth of the btree.\n# TYPE node_bcache_tree_depth gauge\nnode_bcache_tree_depth{uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcache_writeback_change Last writeback rate change step for this backing device.\n# TYPE node_bcache_writeback_change gauge\nnode_bcache_writeback_change{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 329204\n# HELP node_bcache_writeback_rate Current writeback rate for this backing device in bytes.\n# TYPE node_bcache_writeback_rate gauge\nnode_bcache_writeback_rate{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 1.150976e+06\n# HELP node_bcache_writeback_rate_integral_term Current result of integral controller, part of writeback rate\n# TYPE node_bcache_writeback_rate_integral_term gauge\nnode_bcache_writeback_rate_integral_term{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 808960\n# HELP node_bcache_writeback_rate_proportional_term Current result of proportional controller, part of writeback rate\n# TYPE node_bcache_writeback_rate_proportional_term gauge\nnode_bcache_writeback_rate_proportional_term{backing_device=\"bdev0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 437748\n# HELP node_bcache_written_bytes_total Sum of all data that has been written to the cache.\n# TYPE node_bcache_written_bytes_total counter\nnode_bcache_written_bytes_total{cache_device=\"cache0\",uuid=\"deaddd54-c735-46d5-868e-f331c5fd7c74\"} 0\n# HELP node_bcachefs_accounting_key_to_wb_slowpath_total Bcachefs counter accounting_key_to_wb_slowpath since filesystem creation.\n# TYPE node_bcachefs_accounting_key_to_wb_slowpath_total counter\nnode_bcachefs_accounting_key_to_wb_slowpath_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.4105502e+07\n# HELP node_bcachefs_bkey_pack_pos_fail_total Bcachefs counter bkey_pack_pos_fail since filesystem creation.\n# TYPE node_bcachefs_bkey_pack_pos_fail_total counter\nnode_bcachefs_bkey_pack_pos_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_btree_cache_cannibalize_lock_fail_total Bcachefs counter btree_cache_cannibalize_lock_fail since filesystem creation.\n# TYPE node_bcachefs_btree_cache_cannibalize_lock_fail_total counter\nnode_bcachefs_btree_cache_cannibalize_lock_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 24213\n# HELP node_bcachefs_btree_cache_cannibalize_lock_total Bcachefs counter btree_cache_cannibalize_lock since filesystem creation.\n# TYPE node_bcachefs_btree_cache_cannibalize_lock_total counter\nnode_bcachefs_btree_cache_cannibalize_lock_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.2061408e+07\n# HELP node_bcachefs_btree_cache_cannibalize_total Bcachefs counter btree_cache_cannibalize since filesystem creation.\n# TYPE node_bcachefs_btree_cache_cannibalize_total counter\nnode_bcachefs_btree_cache_cannibalize_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.6587339e+07\n# HELP node_bcachefs_btree_cache_cannibalize_unlock_total Bcachefs counter btree_cache_cannibalize_unlock since filesystem creation.\n# TYPE node_bcachefs_btree_cache_cannibalize_unlock_total counter\nnode_bcachefs_btree_cache_cannibalize_unlock_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.6260384e+07\n# HELP node_bcachefs_btree_cache_reap_total Bcachefs counter btree_cache_reap since filesystem creation.\n# TYPE node_bcachefs_btree_cache_reap_total counter\nnode_bcachefs_btree_cache_reap_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.9068459e+07\n# HELP node_bcachefs_btree_cache_scan_total Bcachefs counter btree_cache_scan since filesystem creation.\n# TYPE node_bcachefs_btree_cache_scan_total counter\nnode_bcachefs_btree_cache_scan_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 427545\n# HELP node_bcachefs_btree_cache_size_bytes Btree cache memory usage in bytes.\n# TYPE node_bcachefs_btree_cache_size_bytes gauge\nnode_bcachefs_btree_cache_size_bytes{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.201170739e+09\n# HELP node_bcachefs_btree_key_cache_fill_total Bcachefs counter btree_key_cache_fill since filesystem creation.\n# TYPE node_bcachefs_btree_key_cache_fill_total counter\nnode_bcachefs_btree_key_cache_fill_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.69308144e+08\n# HELP node_bcachefs_btree_node_alloc_total Bcachefs counter btree_node_alloc since filesystem creation.\n# TYPE node_bcachefs_btree_node_alloc_total counter\nnode_bcachefs_btree_node_alloc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 8.665587e+06\n# HELP node_bcachefs_btree_node_compact_total Bcachefs counter btree_node_compact since filesystem creation.\n# TYPE node_bcachefs_btree_node_compact_total counter\nnode_bcachefs_btree_node_compact_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.554425e+06\n# HELP node_bcachefs_btree_node_free_total Bcachefs counter btree_node_free since filesystem creation.\n# TYPE node_bcachefs_btree_node_free_total counter\nnode_bcachefs_btree_node_free_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.4112667e+07\n# HELP node_bcachefs_btree_node_merge_attempt_total Bcachefs counter btree_node_merge_attempt since filesystem creation.\n# TYPE node_bcachefs_btree_node_merge_attempt_total counter\nnode_bcachefs_btree_node_merge_attempt_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.5868895e+07\n# HELP node_bcachefs_btree_node_merge_total Bcachefs counter btree_node_merge since filesystem creation.\n# TYPE node_bcachefs_btree_node_merge_total counter\nnode_bcachefs_btree_node_merge_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 559684\n# HELP node_bcachefs_btree_node_read_total Bcachefs counter btree_node_read since filesystem creation.\n# TYPE node_bcachefs_btree_node_read_total counter\nnode_bcachefs_btree_node_read_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.0225874e+07\n# HELP node_bcachefs_btree_node_rewrite_total Bcachefs counter btree_node_rewrite since filesystem creation.\n# TYPE node_bcachefs_btree_node_rewrite_total counter\nnode_bcachefs_btree_node_rewrite_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.130316e+06\n# HELP node_bcachefs_btree_node_set_root_total Bcachefs counter btree_node_set_root since filesystem creation.\n# TYPE node_bcachefs_btree_node_set_root_total counter\nnode_bcachefs_btree_node_set_root_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 77958\n# HELP node_bcachefs_btree_node_split_total Bcachefs counter btree_node_split since filesystem creation.\n# TYPE node_bcachefs_btree_node_split_total counter\nnode_bcachefs_btree_node_split_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 710571\n# HELP node_bcachefs_btree_node_write_total Bcachefs counter btree_node_write since filesystem creation.\n# TYPE node_bcachefs_btree_node_write_total counter\nnode_bcachefs_btree_node_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.4796849e+08\n# HELP node_bcachefs_btree_path_relock_fail_total Bcachefs counter btree_path_relock_fail since filesystem creation.\n# TYPE node_bcachefs_btree_path_relock_fail_total counter\nnode_bcachefs_btree_path_relock_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.6213103e+07\n# HELP node_bcachefs_btree_path_upgrade_fail_total Bcachefs counter btree_path_upgrade_fail since filesystem creation.\n# TYPE node_bcachefs_btree_path_upgrade_fail_total counter\nnode_bcachefs_btree_path_upgrade_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.103667e+06\n# HELP node_bcachefs_btree_reserve_get_fail_total Bcachefs counter btree_reserve_get_fail since filesystem creation.\n# TYPE node_bcachefs_btree_reserve_get_fail_total counter\nnode_bcachefs_btree_reserve_get_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 11706\n# HELP node_bcachefs_btree_write_average_size_bytes Average btree write size by type.\n# TYPE node_bcachefs_btree_write_average_size_bytes gauge\nnode_bcachefs_btree_write_average_size_bytes{type=\"cache_reclaim\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 720\nnode_bcachefs_btree_write_average_size_bytes{type=\"init_next_bset\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 28876\nnode_bcachefs_btree_write_average_size_bytes{type=\"initial\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 102400\nnode_bcachefs_btree_write_average_size_bytes{type=\"interior\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1290\nnode_bcachefs_btree_write_average_size_bytes{type=\"journal_reclaim\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 697\n# HELP node_bcachefs_btree_writes_total Number of btree writes by type.\n# TYPE node_bcachefs_btree_writes_total counter\nnode_bcachefs_btree_writes_total{type=\"cache_reclaim\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 14401\nnode_bcachefs_btree_writes_total{type=\"init_next_bset\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.055926e+06\nnode_bcachefs_btree_writes_total{type=\"initial\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.298401e+06\nnode_bcachefs_btree_writes_total{type=\"interior\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.035363e+06\nnode_bcachefs_btree_writes_total{type=\"journal_reclaim\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.6903805e+07\n# HELP node_bcachefs_bucket_alloc_fail_total Bcachefs counter bucket_alloc_fail since filesystem creation.\n# TYPE node_bcachefs_bucket_alloc_fail_total counter\nnode_bcachefs_bucket_alloc_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.1156091e+07\n# HELP node_bcachefs_bucket_alloc_from_stripe_total Bcachefs counter bucket_alloc_from_stripe since filesystem creation.\n# TYPE node_bcachefs_bucket_alloc_from_stripe_total counter\nnode_bcachefs_bucket_alloc_from_stripe_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_bucket_alloc_total Bcachefs counter bucket_alloc since filesystem creation.\n# TYPE node_bcachefs_bucket_alloc_total counter\nnode_bcachefs_bucket_alloc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.7363674e+07\n# HELP node_bcachefs_bucket_discard_fast_total Bcachefs counter bucket_discard_fast since filesystem creation.\n# TYPE node_bcachefs_bucket_discard_fast_total counter\nnode_bcachefs_bucket_discard_fast_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 10204\n# HELP node_bcachefs_bucket_discard_fast_worker_total Bcachefs counter bucket_discard_fast_worker since filesystem creation.\n# TYPE node_bcachefs_bucket_discard_fast_worker_total counter\nnode_bcachefs_bucket_discard_fast_worker_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4012\n# HELP node_bcachefs_bucket_discard_total Bcachefs counter bucket_discard since filesystem creation.\n# TYPE node_bcachefs_bucket_discard_total counter\nnode_bcachefs_bucket_discard_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.4751388e+07\n# HELP node_bcachefs_bucket_discard_worker_total Bcachefs counter bucket_discard_worker since filesystem creation.\n# TYPE node_bcachefs_bucket_discard_worker_total counter\nnode_bcachefs_bucket_discard_worker_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.021501e+06\n# HELP node_bcachefs_bucket_invalidate_total Bcachefs counter bucket_invalidate since filesystem creation.\n# TYPE node_bcachefs_bucket_invalidate_total counter\nnode_bcachefs_bucket_invalidate_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.483205e+06\n# HELP node_bcachefs_cached_ptr_drop_total Bcachefs counter cached_ptr_drop since filesystem creation.\n# TYPE node_bcachefs_cached_ptr_drop_total counter\nnode_bcachefs_cached_ptr_drop_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.201170739e+09\n# HELP node_bcachefs_compression_compressed_bytes Compressed size by algorithm.\n# TYPE node_bcachefs_compression_compressed_bytes gauge\nnode_bcachefs_compression_compressed_bytes{algorithm=\"gzip\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_compression_compressed_bytes{algorithm=\"incompressible\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.187472557998e+13\nnode_bcachefs_compression_compressed_bytes{algorithm=\"lz4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.2505975193e+10\nnode_bcachefs_compression_compressed_bytes{algorithm=\"lz4_old\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_compression_compressed_bytes{algorithm=\"zstd\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.42665652224e+11\n# HELP node_bcachefs_compression_uncompressed_bytes Uncompressed size by algorithm.\n# TYPE node_bcachefs_compression_uncompressed_bytes gauge\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"gzip\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"incompressible\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.187472557998e+13\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"lz4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.6450417868e+10\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"lz4_old\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_compression_uncompressed_bytes{algorithm=\"zstd\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.47466319872e+11\n# HELP node_bcachefs_copygc_total Bcachefs counter copygc since filesystem creation.\n# TYPE node_bcachefs_copygc_total counter\nnode_bcachefs_copygc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 424790\n# HELP node_bcachefs_copygc_wait_obsolete_total Bcachefs counter copygc_wait_obsolete since filesystem creation.\n# TYPE node_bcachefs_copygc_wait_obsolete_total counter\nnode_bcachefs_copygc_wait_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 537321\n# HELP node_bcachefs_data_read_bounce_total Bcachefs counter data_read_bounce since filesystem creation.\n# TYPE node_bcachefs_data_read_bounce_total counter\nnode_bcachefs_data_read_bounce_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.5052058e+08\n# HELP node_bcachefs_data_read_fail_and_poison_total Bcachefs counter data_read_fail_and_poison since filesystem creation.\n# TYPE node_bcachefs_data_read_fail_and_poison_total counter\nnode_bcachefs_data_read_fail_and_poison_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_data_read_hole_total Bcachefs counter data_read_hole since filesystem creation.\n# TYPE node_bcachefs_data_read_hole_total counter\nnode_bcachefs_data_read_hole_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.858174650941e+12\n# HELP node_bcachefs_data_read_inline_total Bcachefs counter data_read_inline since filesystem creation.\n# TYPE node_bcachefs_data_read_inline_total counter\nnode_bcachefs_data_read_inline_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.5998753177e+10\n# HELP node_bcachefs_data_read_narrow_crcs_fail_total Bcachefs counter data_read_narrow_crcs_fail since filesystem creation.\n# TYPE node_bcachefs_data_read_narrow_crcs_fail_total counter\nnode_bcachefs_data_read_narrow_crcs_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1779\n# HELP node_bcachefs_data_read_narrow_crcs_total Bcachefs counter data_read_narrow_crcs since filesystem creation.\n# TYPE node_bcachefs_data_read_narrow_crcs_total counter\nnode_bcachefs_data_read_narrow_crcs_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 18529\n# HELP node_bcachefs_data_read_nopromote_already_promoted_total Bcachefs counter data_read_nopromote_already_promoted since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_already_promoted_total counter\nnode_bcachefs_data_read_nopromote_already_promoted_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.11037452e+08\n# HELP node_bcachefs_data_read_nopromote_congested_total Bcachefs counter data_read_nopromote_congested since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_congested_total counter\nnode_bcachefs_data_read_nopromote_congested_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.913847e+06\n# HELP node_bcachefs_data_read_nopromote_may_not_total Bcachefs counter data_read_nopromote_may_not since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_may_not_total counter\nnode_bcachefs_data_read_nopromote_may_not_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.0206095e+07\n# HELP node_bcachefs_data_read_nopromote_total Bcachefs counter data_read_nopromote since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_total counter\nnode_bcachefs_data_read_nopromote_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.42468868e+08\n# HELP node_bcachefs_data_read_nopromote_unwritten_total Bcachefs counter data_read_nopromote_unwritten since filesystem creation.\n# TYPE node_bcachefs_data_read_nopromote_unwritten_total counter\nnode_bcachefs_data_read_nopromote_unwritten_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_data_read_promote_total Bcachefs counter data_read_promote since filesystem creation.\n# TYPE node_bcachefs_data_read_promote_total counter\nnode_bcachefs_data_read_promote_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.19833053184e+11\n# HELP node_bcachefs_data_read_retry_total Bcachefs counter data_read_retry since filesystem creation.\n# TYPE node_bcachefs_data_read_retry_total counter\nnode_bcachefs_data_read_retry_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.2404675e+07\n# HELP node_bcachefs_data_read_reuse_race_total Bcachefs counter data_read_reuse_race since filesystem creation.\n# TYPE node_bcachefs_data_read_reuse_race_total counter\nnode_bcachefs_data_read_reuse_race_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 201095\n# HELP node_bcachefs_data_read_split_total Bcachefs counter data_read_split since filesystem creation.\n# TYPE node_bcachefs_data_read_split_total counter\nnode_bcachefs_data_read_split_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.18590695e+08\n# HELP node_bcachefs_data_read_total Bcachefs counter data_read since filesystem creation.\n# TYPE node_bcachefs_data_read_total counter\nnode_bcachefs_data_read_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.8928267436032e+13\n# HELP node_bcachefs_data_update_fail_total Bcachefs counter data_update_fail since filesystem creation.\n# TYPE node_bcachefs_data_update_fail_total counter\nnode_bcachefs_data_update_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.138166333e+09\n# HELP node_bcachefs_data_update_in_flight_total Bcachefs counter data_update_in_flight since filesystem creation.\n# TYPE node_bcachefs_data_update_in_flight_total counter\nnode_bcachefs_data_update_in_flight_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.978784e+06\n# HELP node_bcachefs_data_update_key_fail_total Bcachefs counter data_update_key_fail since filesystem creation.\n# TYPE node_bcachefs_data_update_key_fail_total counter\nnode_bcachefs_data_update_key_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.4373939404e+10\n# HELP node_bcachefs_data_update_key_total Bcachefs counter data_update_key since filesystem creation.\n# TYPE node_bcachefs_data_update_key_total counter\nnode_bcachefs_data_update_key_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.00275460453171e+14\n# HELP node_bcachefs_data_update_no_io_total Bcachefs counter data_update_no_io since filesystem creation.\n# TYPE node_bcachefs_data_update_no_io_total counter\nnode_bcachefs_data_update_no_io_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.00824357273e+11\n# HELP node_bcachefs_data_update_noop_obsolete_total Bcachefs counter data_update_noop_obsolete since filesystem creation.\n# TYPE node_bcachefs_data_update_noop_obsolete_total counter\nnode_bcachefs_data_update_noop_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_data_update_pred_total Bcachefs counter data_update_pred since filesystem creation.\n# TYPE node_bcachefs_data_update_pred_total counter\nnode_bcachefs_data_update_pred_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.947802324992e+13\n# HELP node_bcachefs_data_update_read_total Bcachefs counter data_update_read since filesystem creation.\n# TYPE node_bcachefs_data_update_read_total counter\nnode_bcachefs_data_update_read_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 8.9390295338188e+13\n# HELP node_bcachefs_data_update_start_fail_obsolete_total Bcachefs counter data_update_start_fail_obsolete since filesystem creation.\n# TYPE node_bcachefs_data_update_start_fail_obsolete_total counter\nnode_bcachefs_data_update_start_fail_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.14018822443e+11\n# HELP node_bcachefs_data_update_total Bcachefs counter data_update since filesystem creation.\n# TYPE node_bcachefs_data_update_total counter\nnode_bcachefs_data_update_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.4206847997116416e+16\n# HELP node_bcachefs_data_update_useless_write_fail_total Bcachefs counter data_update_useless_write_fail since filesystem creation.\n# TYPE node_bcachefs_data_update_useless_write_fail_total counter\nnode_bcachefs_data_update_useless_write_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.30428461e+09\n# HELP node_bcachefs_data_update_write_total Bcachefs counter data_update_write since filesystem creation.\n# TYPE node_bcachefs_data_update_write_total counter\nnode_bcachefs_data_update_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.7163493018828e+13\n# HELP node_bcachefs_data_write_total Bcachefs counter data_write since filesystem creation.\n# TYPE node_bcachefs_data_write_total counter\nnode_bcachefs_data_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.0780769764966e+13\n# HELP node_bcachefs_device_bucket_size_bytes Bucket size in bytes.\n# TYPE node_bcachefs_device_bucket_size_bytes gauge\nnode_bcachefs_device_bucket_size_bytes{device=\"10\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 524288\nnode_bcachefs_device_bucket_size_bytes{device=\"4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.097152e+06\nnode_bcachefs_device_bucket_size_bytes{device=\"6\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.097152e+06\nnode_bcachefs_device_bucket_size_bytes{device=\"7\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.097152e+06\nnode_bcachefs_device_bucket_size_bytes{device=\"8\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.097152e+06\n# HELP node_bcachefs_device_buckets Total number of buckets.\n# TYPE node_bcachefs_device_buckets gauge\nnode_bcachefs_device_buckets{device=\"10\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 953880\nnode_bcachefs_device_buckets{device=\"4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.629824e+06\nnode_bcachefs_device_buckets{device=\"6\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 953864\nnode_bcachefs_device_buckets{device=\"7\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.907723e+06\nnode_bcachefs_device_buckets{device=\"8\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.384637e+06\n# HELP node_bcachefs_device_durability Device durability setting.\n# TYPE node_bcachefs_device_durability gauge\nnode_bcachefs_device_durability{device=\"10\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_durability{device=\"4\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_durability{device=\"6\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_durability{device=\"7\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_durability{device=\"8\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\n# HELP node_bcachefs_device_info Device information.\n# TYPE node_bcachefs_device_info gauge\nnode_bcachefs_device_info{device=\"10\",label=\"disk-10\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_info{device=\"4\",label=\"disk-4\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_info{device=\"6\",label=\"disk-6\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_info{device=\"7\",label=\"disk-7\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_info{device=\"8\",label=\"disk-8\",state=\"[rw] ro evacuating spare\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\n# HELP node_bcachefs_device_io_done_bytes_total IO bytes by operation type and data type.\n# TYPE node_bcachefs_device_io_done_bytes_total counter\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.24288e+06\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 16384\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.193358848e+09\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 589824\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 8.912896e+06\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.767671263232e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.82753624064e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"btree\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"cached\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.432028966912e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"journal\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_discard\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"need_gc_gens\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"parity\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 645120\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 645120\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 677376\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 645120\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 86016\nnode_bcachefs_device_io_done_bytes_total{data_type=\"sb\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 645120\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"stripe\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"unstriped\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"10\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.02313054208e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"10\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.52377698304e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"4\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.770452246528e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"4\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.258285805568e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"6\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.10019098624e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"6\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.62070339584e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"7\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.53932742656e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"7\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.8382641152e+11\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"8\",operation=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.115020546048e+12\nnode_bcachefs_device_io_done_bytes_total{data_type=\"user\",device=\"8\",operation=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.072510210048e+12\n# HELP node_bcachefs_device_io_errors_total IO errors by error type.\n# TYPE node_bcachefs_device_io_errors_total counter\nnode_bcachefs_device_io_errors_total{device=\"10\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"10\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"10\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"4\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"4\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 197416\nnode_bcachefs_device_io_errors_total{device=\"4\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 205\nnode_bcachefs_device_io_errors_total{device=\"6\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5\nnode_bcachefs_device_io_errors_total{device=\"6\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 18828\nnode_bcachefs_device_io_errors_total{device=\"6\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\nnode_bcachefs_device_io_errors_total{device=\"7\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 18\nnode_bcachefs_device_io_errors_total{device=\"7\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"7\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"8\",type=\"checksum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"8\",type=\"read\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\nnode_bcachefs_device_io_errors_total{device=\"8\",type=\"write\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_error_throw_total Bcachefs counter error_throw since filesystem creation.\n# TYPE node_bcachefs_error_throw_total counter\nnode_bcachefs_error_throw_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.719910958e+09\n# HELP node_bcachefs_errors_total Error count by error type.\n# TYPE node_bcachefs_errors_total counter\nnode_bcachefs_errors_total{error_type=\"accounting_mismatch\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6\nnode_bcachefs_errors_total{error_type=\"alloc_key_cached_sectors_wrong\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4537\nnode_bcachefs_errors_total{error_type=\"alloc_key_data_type_wrong\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4415\nnode_bcachefs_errors_total{error_type=\"alloc_key_dirty_sectors_wrong\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4538\nnode_bcachefs_errors_total{error_type=\"alloc_key_to_missing_lru_entry\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4517\nnode_bcachefs_errors_total{error_type=\"backpointer_to_missing_ptr\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 45480\nnode_bcachefs_errors_total{error_type=\"bset_bad_csum\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"btree_node_data_missing\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"btree_node_topology_bad_max_key\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"extent_io_opts_not_set\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.1299659571772285e+19\nnode_bcachefs_errors_total{error_type=\"extent_ptrs_all_invalid\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"extent_ptrs_all_invalid_but_cached\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 44612\nnode_bcachefs_errors_total{error_type=\"lru_entry_bad\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4537\nnode_bcachefs_errors_total{error_type=\"ptr_to_missing_backpointer\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 44112\nnode_bcachefs_errors_total{error_type=\"reconcile_work_incorrectly_set\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 113913\nnode_bcachefs_errors_total{error_type=\"subvol_missing\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 194\nnode_bcachefs_errors_total{error_type=\"validate_error_in_commit\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\nnode_bcachefs_errors_total{error_type=\"vfs_bad_inode_rm\",uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 121\n# HELP node_bcachefs_evacuate_bucket_total Bcachefs counter evacuate_bucket since filesystem creation.\n# TYPE node_bcachefs_evacuate_bucket_total counter\nnode_bcachefs_evacuate_bucket_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.735247e+06\n# HELP node_bcachefs_fsync_total Bcachefs counter fsync since filesystem creation.\n# TYPE node_bcachefs_fsync_total counter\nnode_bcachefs_fsync_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.515147e+06\n# HELP node_bcachefs_gc_gens_end_total Bcachefs counter gc_gens_end since filesystem creation.\n# TYPE node_bcachefs_gc_gens_end_total counter\nnode_bcachefs_gc_gens_end_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3\n# HELP node_bcachefs_gc_gens_start_total Bcachefs counter gc_gens_start since filesystem creation.\n# TYPE node_bcachefs_gc_gens_start_total counter\nnode_bcachefs_gc_gens_start_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3\n# HELP node_bcachefs_info Filesystem information.\n# TYPE node_bcachefs_info gauge\nnode_bcachefs_info{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1\n# HELP node_bcachefs_journal_full_total Bcachefs counter journal_full since filesystem creation.\n# TYPE node_bcachefs_journal_full_total counter\nnode_bcachefs_journal_full_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 94587\n# HELP node_bcachefs_journal_reclaim_finish_total Bcachefs counter journal_reclaim_finish since filesystem creation.\n# TYPE node_bcachefs_journal_reclaim_finish_total counter\nnode_bcachefs_journal_reclaim_finish_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.06994135e+08\n# HELP node_bcachefs_journal_reclaim_start_total Bcachefs counter journal_reclaim_start since filesystem creation.\n# TYPE node_bcachefs_journal_reclaim_start_total counter\nnode_bcachefs_journal_reclaim_start_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.06994135e+08\n# HELP node_bcachefs_journal_res_get_blocked_total Bcachefs counter journal_res_get_blocked since filesystem creation.\n# TYPE node_bcachefs_journal_res_get_blocked_total counter\nnode_bcachefs_journal_res_get_blocked_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 74696\n# HELP node_bcachefs_journal_write_total Bcachefs counter journal_write since filesystem creation.\n# TYPE node_bcachefs_journal_write_total counter\nnode_bcachefs_journal_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.5458801e+07\n# HELP node_bcachefs_open_bucket_alloc_fail_total Bcachefs counter open_bucket_alloc_fail since filesystem creation.\n# TYPE node_bcachefs_open_bucket_alloc_fail_total counter\nnode_bcachefs_open_bucket_alloc_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_btree_total Bcachefs counter reconcile_btree since filesystem creation.\n# TYPE node_bcachefs_reconcile_btree_total counter\nnode_bcachefs_reconcile_btree_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.158221066e+09\n# HELP node_bcachefs_reconcile_clear_scan_total Bcachefs counter reconcile_clear_scan since filesystem creation.\n# TYPE node_bcachefs_reconcile_clear_scan_total counter\nnode_bcachefs_reconcile_clear_scan_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 11\n# HELP node_bcachefs_reconcile_data_total Bcachefs counter reconcile_data since filesystem creation.\n# TYPE node_bcachefs_reconcile_data_total counter\nnode_bcachefs_reconcile_data_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_phys_total Bcachefs counter reconcile_phys since filesystem creation.\n# TYPE node_bcachefs_reconcile_phys_total counter\nnode_bcachefs_reconcile_phys_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.9928939526553e+13\n# HELP node_bcachefs_reconcile_scan_device_total Bcachefs counter reconcile_scan_device since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_device_total counter\nnode_bcachefs_reconcile_scan_device_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 8.3562883710976e+13\n# HELP node_bcachefs_reconcile_scan_fs_total Bcachefs counter reconcile_scan_fs since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_fs_total counter\nnode_bcachefs_reconcile_scan_fs_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_scan_inum_total Bcachefs counter reconcile_scan_inum since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_inum_total counter\nnode_bcachefs_reconcile_scan_inum_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_scan_metadata_total Bcachefs counter reconcile_scan_metadata since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_metadata_total counter\nnode_bcachefs_reconcile_scan_metadata_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_scan_pending_total Bcachefs counter reconcile_scan_pending since filesystem creation.\n# TYPE node_bcachefs_reconcile_scan_pending_total counter\nnode_bcachefs_reconcile_scan_pending_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_reconcile_set_pending_total Bcachefs counter reconcile_set_pending since filesystem creation.\n# TYPE node_bcachefs_reconcile_set_pending_total counter\nnode_bcachefs_reconcile_set_pending_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 3.1138512896e+10\n# HELP node_bcachefs_sectors_alloc_total Bcachefs counter sectors_alloc since filesystem creation.\n# TYPE node_bcachefs_sectors_alloc_total counter\nnode_bcachefs_sectors_alloc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.2534432556646e+13\n# HELP node_bcachefs_stripe_alloc_total Bcachefs counter stripe_alloc since filesystem creation.\n# TYPE node_bcachefs_stripe_alloc_total counter\nnode_bcachefs_stripe_alloc_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_create_fail_total Bcachefs counter stripe_create_fail since filesystem creation.\n# TYPE node_bcachefs_stripe_create_fail_total counter\nnode_bcachefs_stripe_create_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_create_total Bcachefs counter stripe_create since filesystem creation.\n# TYPE node_bcachefs_stripe_create_total counter\nnode_bcachefs_stripe_create_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_delete_total Bcachefs counter stripe_delete since filesystem creation.\n# TYPE node_bcachefs_stripe_delete_total counter\nnode_bcachefs_stripe_delete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_reuse_total Bcachefs counter stripe_reuse since filesystem creation.\n# TYPE node_bcachefs_stripe_reuse_total counter\nnode_bcachefs_stripe_reuse_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_update_bucket_total Bcachefs counter stripe_update_bucket since filesystem creation.\n# TYPE node_bcachefs_stripe_update_bucket_total counter\nnode_bcachefs_stripe_update_bucket_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_update_extent_fail_total Bcachefs counter stripe_update_extent_fail since filesystem creation.\n# TYPE node_bcachefs_stripe_update_extent_fail_total counter\nnode_bcachefs_stripe_update_extent_fail_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_stripe_update_extent_total Bcachefs counter stripe_update_extent since filesystem creation.\n# TYPE node_bcachefs_stripe_update_extent_total counter\nnode_bcachefs_stripe_update_extent_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_sync_fs_total Bcachefs counter sync_fs since filesystem creation.\n# TYPE node_bcachefs_sync_fs_total counter\nnode_bcachefs_sync_fs_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 42023\n# HELP node_bcachefs_trans_blocked_journal_reclaim_total Bcachefs counter trans_blocked_journal_reclaim since filesystem creation.\n# TYPE node_bcachefs_trans_blocked_journal_reclaim_total counter\nnode_bcachefs_trans_blocked_journal_reclaim_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 78\n# HELP node_bcachefs_trans_restart_btree_node_reused_total Bcachefs counter trans_restart_btree_node_reused since filesystem creation.\n# TYPE node_bcachefs_trans_restart_btree_node_reused_total counter\nnode_bcachefs_trans_restart_btree_node_reused_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 53354\n# HELP node_bcachefs_trans_restart_btree_node_split_total Bcachefs counter trans_restart_btree_node_split since filesystem creation.\n# TYPE node_bcachefs_trans_restart_btree_node_split_total counter\nnode_bcachefs_trans_restart_btree_node_split_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 100190\n# HELP node_bcachefs_trans_restart_fault_inject_total Bcachefs counter trans_restart_fault_inject since filesystem creation.\n# TYPE node_bcachefs_trans_restart_fault_inject_total counter\nnode_bcachefs_trans_restart_fault_inject_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_injected_total Bcachefs counter trans_restart_injected since filesystem creation.\n# TYPE node_bcachefs_trans_restart_injected_total counter\nnode_bcachefs_trans_restart_injected_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_iter_upgrade_total Bcachefs counter trans_restart_iter_upgrade since filesystem creation.\n# TYPE node_bcachefs_trans_restart_iter_upgrade_total counter\nnode_bcachefs_trans_restart_iter_upgrade_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_journal_preres_get_total Bcachefs counter trans_restart_journal_preres_get since filesystem creation.\n# TYPE node_bcachefs_trans_restart_journal_preres_get_total counter\nnode_bcachefs_trans_restart_journal_preres_get_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_journal_reclaim_total Bcachefs counter trans_restart_journal_reclaim since filesystem creation.\n# TYPE node_bcachefs_trans_restart_journal_reclaim_total counter\nnode_bcachefs_trans_restart_journal_reclaim_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_journal_res_get_total Bcachefs counter trans_restart_journal_res_get since filesystem creation.\n# TYPE node_bcachefs_trans_restart_journal_res_get_total counter\nnode_bcachefs_trans_restart_journal_res_get_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_key_cache_key_realloced_total Bcachefs counter trans_restart_key_cache_key_realloced since filesystem creation.\n# TYPE node_bcachefs_trans_restart_key_cache_key_realloced_total counter\nnode_bcachefs_trans_restart_key_cache_key_realloced_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_key_cache_raced_total Bcachefs counter trans_restart_key_cache_raced since filesystem creation.\n# TYPE node_bcachefs_trans_restart_key_cache_raced_total counter\nnode_bcachefs_trans_restart_key_cache_raced_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_key_cache_upgrade_total Bcachefs counter trans_restart_key_cache_upgrade since filesystem creation.\n# TYPE node_bcachefs_trans_restart_key_cache_upgrade_total counter\nnode_bcachefs_trans_restart_key_cache_upgrade_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_mark_replicas_total Bcachefs counter trans_restart_mark_replicas since filesystem creation.\n# TYPE node_bcachefs_trans_restart_mark_replicas_total counter\nnode_bcachefs_trans_restart_mark_replicas_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_mem_realloced_total Bcachefs counter trans_restart_mem_realloced since filesystem creation.\n# TYPE node_bcachefs_trans_restart_mem_realloced_total counter\nnode_bcachefs_trans_restart_mem_realloced_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6111\n# HELP node_bcachefs_trans_restart_memory_allocation_failure_total Bcachefs counter trans_restart_memory_allocation_failure since filesystem creation.\n# TYPE node_bcachefs_trans_restart_memory_allocation_failure_total counter\nnode_bcachefs_trans_restart_memory_allocation_failure_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.7513334e+07\n# HELP node_bcachefs_trans_restart_relock_after_fill_total Bcachefs counter trans_restart_relock_after_fill since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_after_fill_total counter\nnode_bcachefs_trans_restart_relock_after_fill_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_relock_key_cache_fill_obsolete_total Bcachefs counter trans_restart_relock_key_cache_fill_obsolete since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_key_cache_fill_obsolete_total counter\nnode_bcachefs_trans_restart_relock_key_cache_fill_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_relock_next_node_total Bcachefs counter trans_restart_relock_next_node since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_next_node_total counter\nnode_bcachefs_trans_restart_relock_next_node_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 22087\n# HELP node_bcachefs_trans_restart_relock_parent_for_fill_obsolete_total Bcachefs counter trans_restart_relock_parent_for_fill_obsolete since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_parent_for_fill_obsolete_total counter\nnode_bcachefs_trans_restart_relock_parent_for_fill_obsolete_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2581\n# HELP node_bcachefs_trans_restart_relock_path_intent_total Bcachefs counter trans_restart_relock_path_intent since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_path_intent_total counter\nnode_bcachefs_trans_restart_relock_path_intent_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 298090\n# HELP node_bcachefs_trans_restart_relock_path_total Bcachefs counter trans_restart_relock_path since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_path_total counter\nnode_bcachefs_trans_restart_relock_path_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.752728e+07\n# HELP node_bcachefs_trans_restart_relock_total Bcachefs counter trans_restart_relock since filesystem creation.\n# TYPE node_bcachefs_trans_restart_relock_total counter\nnode_bcachefs_trans_restart_relock_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2.806875e+06\n# HELP node_bcachefs_trans_restart_split_race_total Bcachefs counter trans_restart_split_race since filesystem creation.\n# TYPE node_bcachefs_trans_restart_split_race_total counter\nnode_bcachefs_trans_restart_split_race_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_too_many_iters_total Bcachefs counter trans_restart_too_many_iters since filesystem creation.\n# TYPE node_bcachefs_trans_restart_too_many_iters_total counter\nnode_bcachefs_trans_restart_too_many_iters_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_traverse_total Bcachefs counter trans_restart_traverse since filesystem creation.\n# TYPE node_bcachefs_trans_restart_traverse_total counter\nnode_bcachefs_trans_restart_traverse_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_upgrade_total Bcachefs counter trans_restart_upgrade since filesystem creation.\n# TYPE node_bcachefs_trans_restart_upgrade_total counter\nnode_bcachefs_trans_restart_upgrade_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.055154e+06\n# HELP node_bcachefs_trans_restart_would_deadlock_recursion_limit_total Bcachefs counter trans_restart_would_deadlock_recursion_limit since filesystem creation.\n# TYPE node_bcachefs_trans_restart_would_deadlock_recursion_limit_total counter\nnode_bcachefs_trans_restart_would_deadlock_recursion_limit_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 0\n# HELP node_bcachefs_trans_restart_would_deadlock_total Bcachefs counter trans_restart_would_deadlock since filesystem creation.\n# TYPE node_bcachefs_trans_restart_would_deadlock_total counter\nnode_bcachefs_trans_restart_would_deadlock_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 1.025983e+06\n# HELP node_bcachefs_trans_restart_would_deadlock_write_total Bcachefs counter trans_restart_would_deadlock_write since filesystem creation.\n# TYPE node_bcachefs_trans_restart_would_deadlock_write_total counter\nnode_bcachefs_trans_restart_would_deadlock_write_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 2\n# HELP node_bcachefs_trans_restart_write_buffer_flush_total Bcachefs counter trans_restart_write_buffer_flush since filesystem creation.\n# TYPE node_bcachefs_trans_restart_write_buffer_flush_total counter\nnode_bcachefs_trans_restart_write_buffer_flush_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 5.1706894e+07\n# HELP node_bcachefs_trans_traverse_all_total Bcachefs counter trans_traverse_all since filesystem creation.\n# TYPE node_bcachefs_trans_traverse_all_total counter\nnode_bcachefs_trans_traverse_all_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 7.8477746e+07\n# HELP node_bcachefs_transaction_commit_total Bcachefs counter transaction_commit since filesystem creation.\n# TYPE node_bcachefs_transaction_commit_total counter\nnode_bcachefs_transaction_commit_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.338059022e+09\n# HELP node_bcachefs_write_buffer_flush_slowpath_total Bcachefs counter write_buffer_flush_slowpath since filesystem creation.\n# TYPE node_bcachefs_write_buffer_flush_slowpath_total counter\nnode_bcachefs_write_buffer_flush_slowpath_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 21031\n# HELP node_bcachefs_write_buffer_flush_sync_total Bcachefs counter write_buffer_flush_sync since filesystem creation.\n# TYPE node_bcachefs_write_buffer_flush_sync_total counter\nnode_bcachefs_write_buffer_flush_sync_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 6.024402e+06\n# HELP node_bcachefs_write_buffer_flush_total Bcachefs counter write_buffer_flush since filesystem creation.\n# TYPE node_bcachefs_write_buffer_flush_total counter\nnode_bcachefs_write_buffer_flush_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.8370568e+07\n# HELP node_bcachefs_write_buffer_maybe_flush_total Bcachefs counter write_buffer_maybe_flush since filesystem creation.\n# TYPE node_bcachefs_write_buffer_maybe_flush_total counter\nnode_bcachefs_write_buffer_maybe_flush_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 4.7412849e+07\n# HELP node_bcachefs_write_super_total Bcachefs counter write_super since filesystem creation.\n# TYPE node_bcachefs_write_super_total counter\nnode_bcachefs_write_super_total{uuid=\"deadbeef-1234-5678-9012-abcdefabcdef\"} 30277\n# HELP node_bonding_active Number of active slaves per bonding interface.\n# TYPE node_bonding_active gauge\nnode_bonding_active{master=\"bond0\"} 0\nnode_bonding_active{master=\"dmz\"} 2\nnode_bonding_active{master=\"int\"} 1\n# HELP node_bonding_slaves Number of configured slaves per bonding interface.\n# TYPE node_bonding_slaves gauge\nnode_bonding_slaves{master=\"bond0\"} 0\nnode_bonding_slaves{master=\"dmz\"} 2\nnode_bonding_slaves{master=\"int\"} 2\n# HELP node_boot_time_seconds Node boot time, in unixtime.\n# TYPE node_boot_time_seconds gauge\nnode_boot_time_seconds 1.418183276e+09\n# HELP node_btrfs_allocation_ratio Data allocation ratio for a layout/data type\n# TYPE node_btrfs_allocation_ratio gauge\nnode_btrfs_allocation_ratio{block_group_type=\"data\",mode=\"raid0\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1\nnode_btrfs_allocation_ratio{block_group_type=\"data\",mode=\"raid5\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.3333333333333333\nnode_btrfs_allocation_ratio{block_group_type=\"metadata\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 2\nnode_btrfs_allocation_ratio{block_group_type=\"metadata\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 2\nnode_btrfs_allocation_ratio{block_group_type=\"system\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 2\nnode_btrfs_allocation_ratio{block_group_type=\"system\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 2\n# HELP node_btrfs_commit_seconds_total Sum of the duration of all commits, in seconds.\n# TYPE node_btrfs_commit_seconds_total counter\nnode_btrfs_commit_seconds_total{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 47836.09\nnode_btrfs_commit_seconds_total{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_commits_total The total number of commits that have occurred.\n# TYPE node_btrfs_commits_total counter\nnode_btrfs_commits_total{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 258051\nnode_btrfs_commits_total{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_device_size_bytes Size of a device that is part of the filesystem.\n# TYPE node_btrfs_device_size_bytes gauge\nnode_btrfs_device_size_bytes{device=\"loop22\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop23\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop24\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop25\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop25\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.073741824e+10\nnode_btrfs_device_size_bytes{device=\"loop26\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1.073741824e+10\n# HELP node_btrfs_global_rsv_size_bytes Size of global reserve.\n# TYPE node_btrfs_global_rsv_size_bytes gauge\nnode_btrfs_global_rsv_size_bytes{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1.6777216e+07\nnode_btrfs_global_rsv_size_bytes{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.6777216e+07\n# HELP node_btrfs_info Filesystem information\n# TYPE node_btrfs_info gauge\nnode_btrfs_info{label=\"\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1\nnode_btrfs_info{label=\"fixture\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1\n# HELP node_btrfs_last_commit_seconds Duration of the most recent commit, in seconds.\n# TYPE node_btrfs_last_commit_seconds gauge\nnode_btrfs_last_commit_seconds{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1\nnode_btrfs_last_commit_seconds{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_max_commit_seconds Duration of the slowest commit, in seconds.\n# TYPE node_btrfs_max_commit_seconds gauge\nnode_btrfs_max_commit_seconds{uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 51.462\nnode_btrfs_max_commit_seconds{uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_reserved_bytes Amount of space reserved for a data type\n# TYPE node_btrfs_reserved_bytes gauge\nnode_btrfs_reserved_bytes{block_group_type=\"data\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"data\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"metadata\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"metadata\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"system\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 0\nnode_btrfs_reserved_bytes{block_group_type=\"system\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\n# HELP node_btrfs_size_bytes Amount of space allocated for a layout/data type\n# TYPE node_btrfs_size_bytes gauge\nnode_btrfs_size_bytes{block_group_type=\"data\",mode=\"raid0\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 2.147483648e+09\nnode_btrfs_size_bytes{block_group_type=\"data\",mode=\"raid5\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 6.44087808e+08\nnode_btrfs_size_bytes{block_group_type=\"metadata\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 1.073741824e+09\nnode_btrfs_size_bytes{block_group_type=\"metadata\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 4.29391872e+08\nnode_btrfs_size_bytes{block_group_type=\"system\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 8.388608e+06\nnode_btrfs_size_bytes{block_group_type=\"system\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 1.6777216e+07\n# HELP node_btrfs_used_bytes Amount of used space by a layout/data type\n# TYPE node_btrfs_used_bytes gauge\nnode_btrfs_used_bytes{block_group_type=\"data\",mode=\"raid0\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 8.08189952e+08\nnode_btrfs_used_bytes{block_group_type=\"data\",mode=\"raid5\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 0\nnode_btrfs_used_bytes{block_group_type=\"metadata\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 933888\nnode_btrfs_used_bytes{block_group_type=\"metadata\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 114688\nnode_btrfs_used_bytes{block_group_type=\"system\",mode=\"raid1\",uuid=\"0abb23a9-579b-43e6-ad30-227ef47fcb9d\"} 16384\nnode_btrfs_used_bytes{block_group_type=\"system\",mode=\"raid6\",uuid=\"7f07c59f-6136-449c-ab87-e1cf2328731b\"} 16384\n# HELP node_buddyinfo_blocks Count of free blocks according to size.\n# TYPE node_buddyinfo_blocks gauge\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"DMA32\"} 759\nnode_buddyinfo_blocks{node=\"0\",size=\"0\",zone=\"Normal\"} 4381\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"DMA32\"} 572\nnode_buddyinfo_blocks{node=\"0\",size=\"1\",zone=\"Normal\"} 1093\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA\"} 3\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"10\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"DMA32\"} 791\nnode_buddyinfo_blocks{node=\"0\",size=\"2\",zone=\"Normal\"} 185\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"DMA32\"} 475\nnode_buddyinfo_blocks{node=\"0\",size=\"3\",zone=\"Normal\"} 1530\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA\"} 2\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"DMA32\"} 194\nnode_buddyinfo_blocks{node=\"0\",size=\"4\",zone=\"Normal\"} 567\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"DMA32\"} 45\nnode_buddyinfo_blocks{node=\"0\",size=\"5\",zone=\"Normal\"} 102\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"DMA32\"} 12\nnode_buddyinfo_blocks{node=\"0\",size=\"6\",zone=\"Normal\"} 4\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"7\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"8\",zone=\"Normal\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA\"} 1\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"DMA32\"} 0\nnode_buddyinfo_blocks{node=\"0\",size=\"9\",zone=\"Normal\"} 0\n# HELP node_cgroups_cgroups Current cgroup number of the subsystem.\n# TYPE node_cgroups_cgroups gauge\nnode_cgroups_cgroups{subsys_name=\"blkio\"} 170\nnode_cgroups_cgroups{subsys_name=\"cpu\"} 172\nnode_cgroups_cgroups{subsys_name=\"cpuacct\"} 172\nnode_cgroups_cgroups{subsys_name=\"cpuset\"} 47\nnode_cgroups_cgroups{subsys_name=\"devices\"} 170\nnode_cgroups_cgroups{subsys_name=\"freezer\"} 47\nnode_cgroups_cgroups{subsys_name=\"hugetlb\"} 47\nnode_cgroups_cgroups{subsys_name=\"memory\"} 234\nnode_cgroups_cgroups{subsys_name=\"net_cls\"} 47\nnode_cgroups_cgroups{subsys_name=\"perf_event\"} 47\nnode_cgroups_cgroups{subsys_name=\"pids\"} 170\nnode_cgroups_cgroups{subsys_name=\"rdma\"} 1\n# HELP node_cgroups_enabled Current cgroup number of the subsystem.\n# TYPE node_cgroups_enabled gauge\nnode_cgroups_enabled{subsys_name=\"blkio\"} 1\nnode_cgroups_enabled{subsys_name=\"cpu\"} 1\nnode_cgroups_enabled{subsys_name=\"cpuacct\"} 1\nnode_cgroups_enabled{subsys_name=\"cpuset\"} 1\nnode_cgroups_enabled{subsys_name=\"devices\"} 1\nnode_cgroups_enabled{subsys_name=\"freezer\"} 1\nnode_cgroups_enabled{subsys_name=\"hugetlb\"} 1\nnode_cgroups_enabled{subsys_name=\"memory\"} 1\nnode_cgroups_enabled{subsys_name=\"net_cls\"} 1\nnode_cgroups_enabled{subsys_name=\"perf_event\"} 1\nnode_cgroups_enabled{subsys_name=\"pids\"} 1\nnode_cgroups_enabled{subsys_name=\"rdma\"} 1\n# HELP node_context_switches_total Total number of context switches.\n# TYPE node_context_switches_total counter\nnode_context_switches_total 3.8014093e+07\n# HELP node_cooling_device_cur_state Current throttle state of the cooling device\n# TYPE node_cooling_device_cur_state gauge\nnode_cooling_device_cur_state{name=\"0\",type=\"Processor\"} 0\n# HELP node_cooling_device_max_state Maximum throttle state of the cooling device\n# TYPE node_cooling_device_max_state gauge\nnode_cooling_device_max_state{name=\"0\",type=\"Processor\"} 3\n# HELP node_cpu_bug_info The `bugs` field of CPU information from /proc/cpuinfo taken from the first core.\n# TYPE node_cpu_bug_info gauge\nnode_cpu_bug_info{bug=\"cpu_meltdown\"} 1\nnode_cpu_bug_info{bug=\"mds\"} 1\nnode_cpu_bug_info{bug=\"spectre_v1\"} 1\nnode_cpu_bug_info{bug=\"spectre_v2\"} 1\n# HELP node_cpu_core_throttles_total Number of times this CPU core has been throttled.\n# TYPE node_cpu_core_throttles_total counter\nnode_cpu_core_throttles_total{core=\"0\",package=\"0\"} 5\nnode_cpu_core_throttles_total{core=\"0\",package=\"1\"} 0\nnode_cpu_core_throttles_total{core=\"1\",package=\"0\"} 0\nnode_cpu_core_throttles_total{core=\"1\",package=\"1\"} 9\n# HELP node_cpu_flag_info The `flags` field of CPU information from /proc/cpuinfo taken from the first core.\n# TYPE node_cpu_flag_info gauge\nnode_cpu_flag_info{flag=\"aes\"} 1\nnode_cpu_flag_info{flag=\"avx\"} 1\nnode_cpu_flag_info{flag=\"avx2\"} 1\nnode_cpu_flag_info{flag=\"constant_tsc\"} 1\n# HELP node_cpu_frequency_hertz CPU frequency in hertz from /proc/cpuinfo.\n# TYPE node_cpu_frequency_hertz gauge\nnode_cpu_frequency_hertz{core=\"0\",cpu=\"0\",package=\"0\"} 7.99998e+08\nnode_cpu_frequency_hertz{core=\"0\",cpu=\"4\",package=\"0\"} 7.99989e+08\nnode_cpu_frequency_hertz{core=\"1\",cpu=\"1\",package=\"0\"} 8.00037e+08\nnode_cpu_frequency_hertz{core=\"1\",cpu=\"5\",package=\"0\"} 8.00083e+08\nnode_cpu_frequency_hertz{core=\"2\",cpu=\"2\",package=\"0\"} 8.0001e+08\nnode_cpu_frequency_hertz{core=\"2\",cpu=\"6\",package=\"0\"} 8.00017e+08\nnode_cpu_frequency_hertz{core=\"3\",cpu=\"3\",package=\"0\"} 8.00028e+08\nnode_cpu_frequency_hertz{core=\"3\",cpu=\"7\",package=\"0\"} 8.0003e+08\n# HELP node_cpu_guest_seconds_total Seconds the CPUs spent in guests (VMs) for each mode.\n# TYPE node_cpu_guest_seconds_total counter\nnode_cpu_guest_seconds_total{cpu=\"0\",mode=\"nice\"} 0.01\nnode_cpu_guest_seconds_total{cpu=\"0\",mode=\"user\"} 0.02\nnode_cpu_guest_seconds_total{cpu=\"1\",mode=\"nice\"} 0.02\nnode_cpu_guest_seconds_total{cpu=\"1\",mode=\"user\"} 0.03\nnode_cpu_guest_seconds_total{cpu=\"2\",mode=\"nice\"} 0.03\nnode_cpu_guest_seconds_total{cpu=\"2\",mode=\"user\"} 0.04\nnode_cpu_guest_seconds_total{cpu=\"3\",mode=\"nice\"} 0.04\nnode_cpu_guest_seconds_total{cpu=\"3\",mode=\"user\"} 0.05\nnode_cpu_guest_seconds_total{cpu=\"4\",mode=\"nice\"} 0.05\nnode_cpu_guest_seconds_total{cpu=\"4\",mode=\"user\"} 0.06\nnode_cpu_guest_seconds_total{cpu=\"5\",mode=\"nice\"} 0.06\nnode_cpu_guest_seconds_total{cpu=\"5\",mode=\"user\"} 0.07\nnode_cpu_guest_seconds_total{cpu=\"6\",mode=\"nice\"} 0.07\nnode_cpu_guest_seconds_total{cpu=\"6\",mode=\"user\"} 0.08\nnode_cpu_guest_seconds_total{cpu=\"7\",mode=\"nice\"} 0.08\nnode_cpu_guest_seconds_total{cpu=\"7\",mode=\"user\"} 0.09\n# HELP node_cpu_info CPU information from /proc/cpuinfo.\n# TYPE node_cpu_info gauge\nnode_cpu_info{cachesize=\"8192 KB\",core=\"0\",cpu=\"0\",family=\"6\",microcode=\"0xb4\",model=\"142\",model_name=\"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\",package=\"0\",stepping=\"10\",vendor=\"GenuineIntel\"} 1\nnode_cpu_info{cachesize=\"8192 KB\",core=\"0\",cpu=\"4\",family=\"6\",microcode=\"0xb4\",model=\"142\",model_name=\"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\",package=\"0\",stepping=\"10\",vendor=\"GenuineIntel\"} 1\nnode_cpu_info{cachesize=\"8192 KB\",core=\"1\",cpu=\"1\",family=\"6\",microcode=\"0xb4\",model=\"142\",model_name=\"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\",package=\"0\",stepping=\"10\",vendor=\"GenuineIntel\"} 1\nnode_cpu_info{cachesize=\"8192 KB\",core=\"1\",cpu=\"5\",family=\"6\",microcode=\"0xb4\",model=\"142\",model_name=\"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\",package=\"0\",stepping=\"10\",vendor=\"GenuineIntel\"} 1\nnode_cpu_info{cachesize=\"8192 KB\",core=\"2\",cpu=\"2\",family=\"6\",microcode=\"0xb4\",model=\"142\",model_name=\"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\",package=\"0\",stepping=\"10\",vendor=\"GenuineIntel\"} 1\nnode_cpu_info{cachesize=\"8192 KB\",core=\"2\",cpu=\"6\",family=\"6\",microcode=\"0xb4\",model=\"142\",model_name=\"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\",package=\"0\",stepping=\"10\",vendor=\"GenuineIntel\"} 1\nnode_cpu_info{cachesize=\"8192 KB\",core=\"3\",cpu=\"3\",family=\"6\",microcode=\"0xb4\",model=\"142\",model_name=\"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\",package=\"0\",stepping=\"10\",vendor=\"GenuineIntel\"} 1\nnode_cpu_info{cachesize=\"8192 KB\",core=\"3\",cpu=\"7\",family=\"6\",microcode=\"0xb4\",model=\"142\",model_name=\"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\",package=\"0\",stepping=\"10\",vendor=\"GenuineIntel\"} 1\n# HELP node_cpu_isolated Whether each core is isolated, information from /sys/devices/system/cpu/isolated.\n# TYPE node_cpu_isolated gauge\nnode_cpu_isolated{cpu=\"1\"} 1\nnode_cpu_isolated{cpu=\"3\"} 1\nnode_cpu_isolated{cpu=\"4\"} 1\nnode_cpu_isolated{cpu=\"5\"} 1\nnode_cpu_isolated{cpu=\"9\"} 1\n# HELP node_cpu_package_throttles_total Number of times this CPU package has been throttled.\n# TYPE node_cpu_package_throttles_total counter\nnode_cpu_package_throttles_total{package=\"0\"} 30\nnode_cpu_package_throttles_total{package=\"1\"} 6\n# HELP node_cpu_scaling_frequency_hertz Current scaled CPU thread frequency in hertz.\n# TYPE node_cpu_scaling_frequency_hertz gauge\nnode_cpu_scaling_frequency_hertz{cpu=\"0\"} 1.699981e+09\nnode_cpu_scaling_frequency_hertz{cpu=\"1\"} 1.699981e+09\nnode_cpu_scaling_frequency_hertz{cpu=\"2\"} 8e+06\nnode_cpu_scaling_frequency_hertz{cpu=\"3\"} 8e+06\n# HELP node_cpu_scaling_frequency_max_hertz Maximum scaled CPU thread frequency in hertz.\n# TYPE node_cpu_scaling_frequency_max_hertz gauge\nnode_cpu_scaling_frequency_max_hertz{cpu=\"0\"} 3.7e+09\nnode_cpu_scaling_frequency_max_hertz{cpu=\"1\"} 3.7e+09\nnode_cpu_scaling_frequency_max_hertz{cpu=\"2\"} 4.2e+09\nnode_cpu_scaling_frequency_max_hertz{cpu=\"3\"} 4.2e+09\n# HELP node_cpu_scaling_frequency_min_hertz Minimum scaled CPU thread frequency in hertz.\n# TYPE node_cpu_scaling_frequency_min_hertz gauge\nnode_cpu_scaling_frequency_min_hertz{cpu=\"0\"} 8e+08\nnode_cpu_scaling_frequency_min_hertz{cpu=\"1\"} 8e+08\nnode_cpu_scaling_frequency_min_hertz{cpu=\"2\"} 1e+06\nnode_cpu_scaling_frequency_min_hertz{cpu=\"3\"} 1e+06\n# HELP node_cpu_scaling_governor Current enabled CPU frequency governor.\n# TYPE node_cpu_scaling_governor gauge\nnode_cpu_scaling_governor{cpu=\"0\",governor=\"performance\"} 0\nnode_cpu_scaling_governor{cpu=\"0\",governor=\"powersave\"} 1\nnode_cpu_scaling_governor{cpu=\"1\",governor=\"performance\"} 0\nnode_cpu_scaling_governor{cpu=\"1\",governor=\"powersave\"} 1\nnode_cpu_scaling_governor{cpu=\"2\",governor=\"performance\"} 0\nnode_cpu_scaling_governor{cpu=\"2\",governor=\"powersave\"} 1\nnode_cpu_scaling_governor{cpu=\"3\",governor=\"performance\"} 0\nnode_cpu_scaling_governor{cpu=\"3\",governor=\"powersave\"} 1\n# HELP node_cpu_seconds_total Seconds the CPUs spent in each mode.\n# TYPE node_cpu_seconds_total counter\nnode_cpu_seconds_total{cpu=\"0\",mode=\"idle\"} 10870.69\nnode_cpu_seconds_total{cpu=\"0\",mode=\"iowait\"} 2.2\nnode_cpu_seconds_total{cpu=\"0\",mode=\"irq\"} 0.01\nnode_cpu_seconds_total{cpu=\"0\",mode=\"nice\"} 0.19\nnode_cpu_seconds_total{cpu=\"0\",mode=\"softirq\"} 34.1\nnode_cpu_seconds_total{cpu=\"0\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"0\",mode=\"system\"} 210.45\nnode_cpu_seconds_total{cpu=\"0\",mode=\"user\"} 444.9\nnode_cpu_seconds_total{cpu=\"1\",mode=\"idle\"} 11107.87\nnode_cpu_seconds_total{cpu=\"1\",mode=\"iowait\"} 5.91\nnode_cpu_seconds_total{cpu=\"1\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"1\",mode=\"nice\"} 0.23\nnode_cpu_seconds_total{cpu=\"1\",mode=\"softirq\"} 0.46\nnode_cpu_seconds_total{cpu=\"1\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"1\",mode=\"system\"} 164.74\nnode_cpu_seconds_total{cpu=\"1\",mode=\"user\"} 478.69\nnode_cpu_seconds_total{cpu=\"2\",mode=\"idle\"} 11123.21\nnode_cpu_seconds_total{cpu=\"2\",mode=\"iowait\"} 4.41\nnode_cpu_seconds_total{cpu=\"2\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"2\",mode=\"nice\"} 0.36\nnode_cpu_seconds_total{cpu=\"2\",mode=\"softirq\"} 3.26\nnode_cpu_seconds_total{cpu=\"2\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"2\",mode=\"system\"} 159.16\nnode_cpu_seconds_total{cpu=\"2\",mode=\"user\"} 465.04\nnode_cpu_seconds_total{cpu=\"3\",mode=\"idle\"} 11132.3\nnode_cpu_seconds_total{cpu=\"3\",mode=\"iowait\"} 5.33\nnode_cpu_seconds_total{cpu=\"3\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"3\",mode=\"nice\"} 1.02\nnode_cpu_seconds_total{cpu=\"3\",mode=\"softirq\"} 0.6\nnode_cpu_seconds_total{cpu=\"3\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"3\",mode=\"system\"} 156.83\nnode_cpu_seconds_total{cpu=\"3\",mode=\"user\"} 470.54\nnode_cpu_seconds_total{cpu=\"4\",mode=\"idle\"} 11403.21\nnode_cpu_seconds_total{cpu=\"4\",mode=\"iowait\"} 2.17\nnode_cpu_seconds_total{cpu=\"4\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"4\",mode=\"nice\"} 0.25\nnode_cpu_seconds_total{cpu=\"4\",mode=\"softirq\"} 0.08\nnode_cpu_seconds_total{cpu=\"4\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"4\",mode=\"system\"} 107.76\nnode_cpu_seconds_total{cpu=\"4\",mode=\"user\"} 284.13\nnode_cpu_seconds_total{cpu=\"5\",mode=\"idle\"} 11362.7\nnode_cpu_seconds_total{cpu=\"5\",mode=\"iowait\"} 6.72\nnode_cpu_seconds_total{cpu=\"5\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"5\",mode=\"nice\"} 1.01\nnode_cpu_seconds_total{cpu=\"5\",mode=\"softirq\"} 0.3\nnode_cpu_seconds_total{cpu=\"5\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"5\",mode=\"system\"} 115.86\nnode_cpu_seconds_total{cpu=\"5\",mode=\"user\"} 292.71\nnode_cpu_seconds_total{cpu=\"6\",mode=\"idle\"} 11397.21\nnode_cpu_seconds_total{cpu=\"6\",mode=\"iowait\"} 3.19\nnode_cpu_seconds_total{cpu=\"6\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"6\",mode=\"nice\"} 0.36\nnode_cpu_seconds_total{cpu=\"6\",mode=\"softirq\"} 0.29\nnode_cpu_seconds_total{cpu=\"6\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"6\",mode=\"system\"} 102.76\nnode_cpu_seconds_total{cpu=\"6\",mode=\"user\"} 291.52\nnode_cpu_seconds_total{cpu=\"7\",mode=\"idle\"} 11392.82\nnode_cpu_seconds_total{cpu=\"7\",mode=\"iowait\"} 5.55\nnode_cpu_seconds_total{cpu=\"7\",mode=\"irq\"} 0\nnode_cpu_seconds_total{cpu=\"7\",mode=\"nice\"} 2.68\nnode_cpu_seconds_total{cpu=\"7\",mode=\"softirq\"} 0.31\nnode_cpu_seconds_total{cpu=\"7\",mode=\"steal\"} 0\nnode_cpu_seconds_total{cpu=\"7\",mode=\"system\"} 101.64\nnode_cpu_seconds_total{cpu=\"7\",mode=\"user\"} 290.98\n# HELP node_cpu_vulnerabilities_info Details of each CPU vulnerability reported by sysfs. The value of the series is an int encoded state of the vulnerability. The same state is stored as a string in the label\n# TYPE node_cpu_vulnerabilities_info gauge\nnode_cpu_vulnerabilities_info{codename=\"itlb_multihit\",mitigation=\"\",state=\"not affected\"} 1\nnode_cpu_vulnerabilities_info{codename=\"mds\",mitigation=\"\",state=\"vulnerable\"} 1\nnode_cpu_vulnerabilities_info{codename=\"retbleed\",mitigation=\"untrained return thunk; SMT enabled with STIBP protection\",state=\"mitigation\"} 1\nnode_cpu_vulnerabilities_info{codename=\"spectre_v1\",mitigation=\"usercopy/swapgs barriers and __user pointer sanitization\",state=\"mitigation\"} 1\nnode_cpu_vulnerabilities_info{codename=\"spectre_v2\",mitigation=\"Retpolines, IBPB: conditional, STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected\",state=\"mitigation\"} 1\n# HELP node_disk_ata_rotation_rate_rpm ATA disk rotation rate in RPMs (0 for SSDs).\n# TYPE node_disk_ata_rotation_rate_rpm gauge\nnode_disk_ata_rotation_rate_rpm{device=\"sda\"} 7200\nnode_disk_ata_rotation_rate_rpm{device=\"sdb\"} 0\nnode_disk_ata_rotation_rate_rpm{device=\"sdc\"} 0\n# HELP node_disk_ata_write_cache ATA disk has a write cache.\n# TYPE node_disk_ata_write_cache gauge\nnode_disk_ata_write_cache{device=\"sda\"} 1\nnode_disk_ata_write_cache{device=\"sdb\"} 1\nnode_disk_ata_write_cache{device=\"sdc\"} 1\n# HELP node_disk_ata_write_cache_enabled ATA disk has its write cache enabled.\n# TYPE node_disk_ata_write_cache_enabled gauge\nnode_disk_ata_write_cache_enabled{device=\"sda\"} 0\nnode_disk_ata_write_cache_enabled{device=\"sdb\"} 1\nnode_disk_ata_write_cache_enabled{device=\"sdc\"} 0\n# HELP node_disk_device_mapper_info Info about disk device mapper.\n# TYPE node_disk_device_mapper_info gauge\nnode_disk_device_mapper_info{device=\"dm-0\",lv_layer=\"\",lv_name=\"\",name=\"nvme0n1_crypt\",uuid=\"CRYPT-LUKS2-jolaulot80fy9zsiobkxyxo7y2dqeho2-nvme0n1_crypt\",vg_name=\"\"} 1\nnode_disk_device_mapper_info{device=\"dm-1\",lv_layer=\"\",lv_name=\"swap_1\",name=\"system-swap_1\",uuid=\"LVM-wbGqQEBL9SxrW2DLntJwgg8fAv946hw3Tvjqh0v31fWgxEtD4BoHO0lROWFUY65T\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-2\",lv_layer=\"\",lv_name=\"root\",name=\"system-root\",uuid=\"LVM-NWEDo8q5ABDyJuC3F8veKNyWfYmeIBfFMS4MF3HakzUhkk7ekDm6fJTHkl2fYHe7\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-3\",lv_layer=\"\",lv_name=\"var\",name=\"system-var\",uuid=\"LVM-hrxHo0rlZ6U95ku5841Lpd17bS1Z7V7lrtEE60DVgE6YEOCdS9gcDGyonWim4hGP\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-4\",lv_layer=\"\",lv_name=\"tmp\",name=\"system-tmp\",uuid=\"LVM-XTNGOHjPWLHcxmJmVu5cWTXEtuzqDeBkdEHAZW5q9LxWQ2d4mb5CchUQzUPJpl8H\",vg_name=\"system\"} 1\nnode_disk_device_mapper_info{device=\"dm-5\",lv_layer=\"\",lv_name=\"home\",name=\"system-home\",uuid=\"LVM-MtoJaWTpjWRXlUnNFlpxZauTEuYlMvGFutigEzCCrfj8CNh6jCRi5LQJXZCpLjPf\",vg_name=\"system\"} 1\n# HELP node_disk_discard_time_seconds_total This is the total number of seconds spent by all discards.\n# TYPE node_disk_discard_time_seconds_total counter\nnode_disk_discard_time_seconds_total{device=\"sdb\"} 11.13\nnode_disk_discard_time_seconds_total{device=\"sdc\"} 11.13\n# HELP node_disk_discarded_sectors_total The total number of sectors discarded successfully.\n# TYPE node_disk_discarded_sectors_total counter\nnode_disk_discarded_sectors_total{device=\"sdb\"} 1.925173784e+09\nnode_disk_discarded_sectors_total{device=\"sdc\"} 1.25173784e+08\n# HELP node_disk_discards_completed_total The total number of discards completed successfully.\n# TYPE node_disk_discards_completed_total counter\nnode_disk_discards_completed_total{device=\"sdb\"} 68851\nnode_disk_discards_completed_total{device=\"sdc\"} 18851\n# HELP node_disk_discards_merged_total The total number of discards merged.\n# TYPE node_disk_discards_merged_total counter\nnode_disk_discards_merged_total{device=\"sdb\"} 0\nnode_disk_discards_merged_total{device=\"sdc\"} 0\n# HELP node_disk_filesystem_info Info about disk filesystem.\n# TYPE node_disk_filesystem_info gauge\nnode_disk_filesystem_info{device=\"dm-0\",type=\"LVM2_member\",usage=\"raid\",uuid=\"c3C3uW-gD96-Yw69-c1CJ-5MwT-6ysM-mST0vB\",version=\"LVM2 001\"} 1\nnode_disk_filesystem_info{device=\"dm-1\",type=\"swap\",usage=\"other\",uuid=\"5272bb60-04b5-49cd-b730-be57c7604450\",version=\"1\"} 1\nnode_disk_filesystem_info{device=\"dm-2\",type=\"ext4\",usage=\"filesystem\",uuid=\"3deafd0d-faff-4695-8d15-51061ae1f51b\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-3\",type=\"ext4\",usage=\"filesystem\",uuid=\"5c772222-f7d4-4c8e-87e8-e97df6b7a45e\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-4\",type=\"ext4\",usage=\"filesystem\",uuid=\"a9479d44-60e1-4015-a1e5-bb065e6dd11b\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"dm-5\",type=\"ext4\",usage=\"filesystem\",uuid=\"b05b726a-c718-4c4d-8641-7c73a7696d83\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"mmcblk0p1\",type=\"vfat\",usage=\"filesystem\",uuid=\"6284-658D\",version=\"FAT32\"} 1\nnode_disk_filesystem_info{device=\"mmcblk0p2\",type=\"ext4\",usage=\"filesystem\",uuid=\"83324ce8-a6f3-4e35-ad64-dbb3d6b87a32\",version=\"1.0\"} 1\nnode_disk_filesystem_info{device=\"sda\",type=\"LVM2_member\",usage=\"raid\",uuid=\"cVVv6j-HSA2-IY33-1Jmj-dO2H-YL7w-b4Oxqw\",version=\"LVM2 001\"} 1\nnode_disk_filesystem_info{device=\"sdc\",type=\"LVM2_member\",usage=\"raid\",uuid=\"QFy9W7-Brj3-hQ6v-AF8i-3Zqg-n3Vs-kGY4vb\",version=\"LVM2 001\"} 1\n# HELP node_disk_flush_requests_time_seconds_total This is the total number of seconds spent by all flush requests.\n# TYPE node_disk_flush_requests_time_seconds_total counter\nnode_disk_flush_requests_time_seconds_total{device=\"sdc\"} 1.944\n# HELP node_disk_flush_requests_total The total number of flush requests completed successfully\n# TYPE node_disk_flush_requests_total counter\nnode_disk_flush_requests_total{device=\"sdc\"} 1555\n# HELP node_disk_info Info of /sys/block/<block_device>.\n# TYPE node_disk_info gauge\nnode_disk_info{device=\"dm-0\",major=\"252\",minor=\"0\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-1\",major=\"252\",minor=\"1\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-2\",major=\"252\",minor=\"2\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-3\",major=\"252\",minor=\"3\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-4\",major=\"252\",minor=\"4\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"dm-5\",major=\"252\",minor=\"5\",model=\"\",path=\"\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0\",major=\"179\",minor=\"0\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0p1\",major=\"179\",minor=\"1\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"mmcblk0p2\",major=\"179\",minor=\"2\",model=\"\",path=\"platform-df2969f3.mmc\",revision=\"\",rotational=\"0\",serial=\"0x83e36d93\",wwn=\"\"} 1\nnode_disk_info{device=\"nvme0n1\",major=\"259\",minor=\"0\",model=\"SAMSUNG EHFTF55LURSY-000Y9\",path=\"pci-0000:02:00.0-nvme-1\",revision=\"4NBTUY95\",rotational=\"0\",serial=\"S252B6CU1HG3M1\",wwn=\"eui.p3vbbiejx5aae2r3\"} 1\nnode_disk_info{device=\"sda\",major=\"8\",minor=\"0\",model=\"TOSHIBA_KSDB4U86\",path=\"pci-0000:3b:00.0-sas-phy7-lun-0\",revision=\"0102\",rotational=\"1\",serial=\"2160A0D5FVGG\",wwn=\"0x7c72382b8de36a64\"} 1\nnode_disk_info{device=\"sdb\",major=\"8\",minor=\"16\",model=\"SuperMicro_SSD\",path=\"pci-0000:00:1f.2-ata-1\",revision=\"0R\",rotational=\"0\",serial=\"SMC0E1B87ABBB16BD84E\",wwn=\"0xe1b87abbb16bd84e\"} 1\nnode_disk_info{device=\"sdc\",major=\"8\",minor=\"32\",model=\"INTEL_SSDS9X9SI0\",path=\"pci-0000:00:1f.2-ata-4\",revision=\"0100\",rotational=\"0\",serial=\"3EWB5Y25CWQWA7EH1U\",wwn=\"0x58907ddc573a5de\"} 1\nnode_disk_info{device=\"sr0\",major=\"11\",minor=\"0\",model=\"Virtual_CDROM0\",path=\"pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0\",revision=\"1.00\",rotational=\"0\",serial=\"AAAABBBBCCCC1\",wwn=\"\"} 1\nnode_disk_info{device=\"vda\",major=\"254\",minor=\"0\",model=\"\",path=\"pci-0000:00:06.0\",revision=\"\",rotational=\"0\",serial=\"\",wwn=\"\"} 1\n# HELP node_disk_io_now The number of I/Os currently in progress.\n# TYPE node_disk_io_now gauge\nnode_disk_io_now{device=\"dm-0\"} 0\nnode_disk_io_now{device=\"dm-1\"} 0\nnode_disk_io_now{device=\"dm-2\"} 0\nnode_disk_io_now{device=\"dm-3\"} 0\nnode_disk_io_now{device=\"dm-4\"} 0\nnode_disk_io_now{device=\"dm-5\"} 0\nnode_disk_io_now{device=\"mmcblk0\"} 0\nnode_disk_io_now{device=\"mmcblk0p1\"} 0\nnode_disk_io_now{device=\"mmcblk0p2\"} 0\nnode_disk_io_now{device=\"nvme0n1\"} 0\nnode_disk_io_now{device=\"sda\"} 0\nnode_disk_io_now{device=\"sdb\"} 0\nnode_disk_io_now{device=\"sdc\"} 0\nnode_disk_io_now{device=\"sr0\"} 0\nnode_disk_io_now{device=\"vda\"} 0\n# HELP node_disk_io_time_seconds_total Total seconds spent doing I/Os.\n# TYPE node_disk_io_time_seconds_total counter\nnode_disk_io_time_seconds_total{device=\"dm-0\"} 11325.968\nnode_disk_io_time_seconds_total{device=\"dm-1\"} 0.076\nnode_disk_io_time_seconds_total{device=\"dm-2\"} 65.4\nnode_disk_io_time_seconds_total{device=\"dm-3\"} 0.016\nnode_disk_io_time_seconds_total{device=\"dm-4\"} 0.024\nnode_disk_io_time_seconds_total{device=\"dm-5\"} 58.848\nnode_disk_io_time_seconds_total{device=\"mmcblk0\"} 0.136\nnode_disk_io_time_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_io_time_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_io_time_seconds_total{device=\"nvme0n1\"} 222.766\nnode_disk_io_time_seconds_total{device=\"sda\"} 9653.880000000001\nnode_disk_io_time_seconds_total{device=\"sdb\"} 60.730000000000004\nnode_disk_io_time_seconds_total{device=\"sdc\"} 10.73\nnode_disk_io_time_seconds_total{device=\"sr0\"} 0\nnode_disk_io_time_seconds_total{device=\"vda\"} 41614.592000000004\n# HELP node_disk_io_time_weighted_seconds_total The weighted # of seconds spent doing I/Os.\n# TYPE node_disk_io_time_weighted_seconds_total counter\nnode_disk_io_time_weighted_seconds_total{device=\"dm-0\"} 1.206301256e+06\nnode_disk_io_time_weighted_seconds_total{device=\"dm-1\"} 0.084\nnode_disk_io_time_weighted_seconds_total{device=\"dm-2\"} 129.416\nnode_disk_io_time_weighted_seconds_total{device=\"dm-3\"} 0.10400000000000001\nnode_disk_io_time_weighted_seconds_total{device=\"dm-4\"} 0.044\nnode_disk_io_time_weighted_seconds_total{device=\"dm-5\"} 105.632\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0\"} 0.156\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_io_time_weighted_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_io_time_weighted_seconds_total{device=\"nvme0n1\"} 1032.546\nnode_disk_io_time_weighted_seconds_total{device=\"sda\"} 82621.804\nnode_disk_io_time_weighted_seconds_total{device=\"sdb\"} 67.07000000000001\nnode_disk_io_time_weighted_seconds_total{device=\"sdc\"} 17.07\nnode_disk_io_time_weighted_seconds_total{device=\"sr0\"} 0\nnode_disk_io_time_weighted_seconds_total{device=\"vda\"} 2.0778722280000001e+06\n# HELP node_disk_read_bytes_total The total number of bytes read successfully.\n# TYPE node_disk_read_bytes_total counter\nnode_disk_read_bytes_total{device=\"dm-0\"} 5.13708655616e+11\nnode_disk_read_bytes_total{device=\"dm-1\"} 1.589248e+06\nnode_disk_read_bytes_total{device=\"dm-2\"} 1.578752e+08\nnode_disk_read_bytes_total{device=\"dm-3\"} 1.98144e+06\nnode_disk_read_bytes_total{device=\"dm-4\"} 529408\nnode_disk_read_bytes_total{device=\"dm-5\"} 4.3150848e+07\nnode_disk_read_bytes_total{device=\"mmcblk0\"} 798720\nnode_disk_read_bytes_total{device=\"mmcblk0p1\"} 81920\nnode_disk_read_bytes_total{device=\"mmcblk0p2\"} 389120\nnode_disk_read_bytes_total{device=\"nvme0n1\"} 2.377714176e+09\nnode_disk_read_bytes_total{device=\"sda\"} 5.13713216512e+11\nnode_disk_read_bytes_total{device=\"sdb\"} 4.944782848e+09\nnode_disk_read_bytes_total{device=\"sdc\"} 8.48782848e+08\nnode_disk_read_bytes_total{device=\"sr0\"} 0\nnode_disk_read_bytes_total{device=\"vda\"} 1.6727491584e+10\n# HELP node_disk_read_time_seconds_total The total number of seconds spent by all reads.\n# TYPE node_disk_read_time_seconds_total counter\nnode_disk_read_time_seconds_total{device=\"dm-0\"} 46229.572\nnode_disk_read_time_seconds_total{device=\"dm-1\"} 0.084\nnode_disk_read_time_seconds_total{device=\"dm-2\"} 6.5360000000000005\nnode_disk_read_time_seconds_total{device=\"dm-3\"} 0.10400000000000001\nnode_disk_read_time_seconds_total{device=\"dm-4\"} 0.028\nnode_disk_read_time_seconds_total{device=\"dm-5\"} 0.924\nnode_disk_read_time_seconds_total{device=\"mmcblk0\"} 0.156\nnode_disk_read_time_seconds_total{device=\"mmcblk0p1\"} 0.024\nnode_disk_read_time_seconds_total{device=\"mmcblk0p2\"} 0.068\nnode_disk_read_time_seconds_total{device=\"nvme0n1\"} 21.650000000000002\nnode_disk_read_time_seconds_total{device=\"sda\"} 18492.372\nnode_disk_read_time_seconds_total{device=\"sdb\"} 0.084\nnode_disk_read_time_seconds_total{device=\"sdc\"} 0.014\nnode_disk_read_time_seconds_total{device=\"sr0\"} 0\nnode_disk_read_time_seconds_total{device=\"vda\"} 8655.768\n# HELP node_disk_reads_completed_total The total number of reads completed successfully.\n# TYPE node_disk_reads_completed_total counter\nnode_disk_reads_completed_total{device=\"dm-0\"} 5.9910002e+07\nnode_disk_reads_completed_total{device=\"dm-1\"} 388\nnode_disk_reads_completed_total{device=\"dm-2\"} 11571\nnode_disk_reads_completed_total{device=\"dm-3\"} 3870\nnode_disk_reads_completed_total{device=\"dm-4\"} 392\nnode_disk_reads_completed_total{device=\"dm-5\"} 3729\nnode_disk_reads_completed_total{device=\"mmcblk0\"} 192\nnode_disk_reads_completed_total{device=\"mmcblk0p1\"} 17\nnode_disk_reads_completed_total{device=\"mmcblk0p2\"} 95\nnode_disk_reads_completed_total{device=\"nvme0n1\"} 47114\nnode_disk_reads_completed_total{device=\"sda\"} 2.5354637e+07\nnode_disk_reads_completed_total{device=\"sdb\"} 326552\nnode_disk_reads_completed_total{device=\"sdc\"} 126552\nnode_disk_reads_completed_total{device=\"sr0\"} 0\nnode_disk_reads_completed_total{device=\"vda\"} 1.775784e+06\n# HELP node_disk_reads_merged_total The total number of reads merged.\n# TYPE node_disk_reads_merged_total counter\nnode_disk_reads_merged_total{device=\"dm-0\"} 0\nnode_disk_reads_merged_total{device=\"dm-1\"} 0\nnode_disk_reads_merged_total{device=\"dm-2\"} 0\nnode_disk_reads_merged_total{device=\"dm-3\"} 0\nnode_disk_reads_merged_total{device=\"dm-4\"} 0\nnode_disk_reads_merged_total{device=\"dm-5\"} 0\nnode_disk_reads_merged_total{device=\"mmcblk0\"} 3\nnode_disk_reads_merged_total{device=\"mmcblk0p1\"} 3\nnode_disk_reads_merged_total{device=\"mmcblk0p2\"} 0\nnode_disk_reads_merged_total{device=\"nvme0n1\"} 4\nnode_disk_reads_merged_total{device=\"sda\"} 3.4367663e+07\nnode_disk_reads_merged_total{device=\"sdb\"} 841\nnode_disk_reads_merged_total{device=\"sdc\"} 141\nnode_disk_reads_merged_total{device=\"sr0\"} 0\nnode_disk_reads_merged_total{device=\"vda\"} 15386\n# HELP node_disk_write_time_seconds_total This is the total number of seconds spent by all writes.\n# TYPE node_disk_write_time_seconds_total counter\nnode_disk_write_time_seconds_total{device=\"dm-0\"} 1.1585578e+06\nnode_disk_write_time_seconds_total{device=\"dm-1\"} 0\nnode_disk_write_time_seconds_total{device=\"dm-2\"} 122.884\nnode_disk_write_time_seconds_total{device=\"dm-3\"} 0\nnode_disk_write_time_seconds_total{device=\"dm-4\"} 0.016\nnode_disk_write_time_seconds_total{device=\"dm-5\"} 104.684\nnode_disk_write_time_seconds_total{device=\"mmcblk0\"} 0\nnode_disk_write_time_seconds_total{device=\"mmcblk0p1\"} 0\nnode_disk_write_time_seconds_total{device=\"mmcblk0p2\"} 0\nnode_disk_write_time_seconds_total{device=\"nvme0n1\"} 1011.053\nnode_disk_write_time_seconds_total{device=\"sda\"} 63877.96\nnode_disk_write_time_seconds_total{device=\"sdb\"} 5.007\nnode_disk_write_time_seconds_total{device=\"sdc\"} 1.0070000000000001\nnode_disk_write_time_seconds_total{device=\"sr0\"} 0\nnode_disk_write_time_seconds_total{device=\"vda\"} 2.069221364e+06\n# HELP node_disk_writes_completed_total The total number of writes completed successfully.\n# TYPE node_disk_writes_completed_total counter\nnode_disk_writes_completed_total{device=\"dm-0\"} 3.9231014e+07\nnode_disk_writes_completed_total{device=\"dm-1\"} 74\nnode_disk_writes_completed_total{device=\"dm-2\"} 153522\nnode_disk_writes_completed_total{device=\"dm-3\"} 0\nnode_disk_writes_completed_total{device=\"dm-4\"} 38\nnode_disk_writes_completed_total{device=\"dm-5\"} 98918\nnode_disk_writes_completed_total{device=\"mmcblk0\"} 0\nnode_disk_writes_completed_total{device=\"mmcblk0p1\"} 0\nnode_disk_writes_completed_total{device=\"mmcblk0p2\"} 0\nnode_disk_writes_completed_total{device=\"nvme0n1\"} 1.07832e+06\nnode_disk_writes_completed_total{device=\"sda\"} 2.8444756e+07\nnode_disk_writes_completed_total{device=\"sdb\"} 41822\nnode_disk_writes_completed_total{device=\"sdc\"} 11822\nnode_disk_writes_completed_total{device=\"sr0\"} 0\nnode_disk_writes_completed_total{device=\"vda\"} 6.038856e+06\n# HELP node_disk_writes_merged_total The number of writes merged.\n# TYPE node_disk_writes_merged_total counter\nnode_disk_writes_merged_total{device=\"dm-0\"} 0\nnode_disk_writes_merged_total{device=\"dm-1\"} 0\nnode_disk_writes_merged_total{device=\"dm-2\"} 0\nnode_disk_writes_merged_total{device=\"dm-3\"} 0\nnode_disk_writes_merged_total{device=\"dm-4\"} 0\nnode_disk_writes_merged_total{device=\"dm-5\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0p1\"} 0\nnode_disk_writes_merged_total{device=\"mmcblk0p2\"} 0\nnode_disk_writes_merged_total{device=\"nvme0n1\"} 43950\nnode_disk_writes_merged_total{device=\"sda\"} 1.1134226e+07\nnode_disk_writes_merged_total{device=\"sdb\"} 2895\nnode_disk_writes_merged_total{device=\"sdc\"} 1895\nnode_disk_writes_merged_total{device=\"sr0\"} 0\nnode_disk_writes_merged_total{device=\"vda\"} 2.0711856e+07\n# HELP node_disk_written_bytes_total The total number of bytes written successfully.\n# TYPE node_disk_written_bytes_total counter\nnode_disk_written_bytes_total{device=\"dm-0\"} 2.5891680256e+11\nnode_disk_written_bytes_total{device=\"dm-1\"} 303104\nnode_disk_written_bytes_total{device=\"dm-2\"} 2.607828992e+09\nnode_disk_written_bytes_total{device=\"dm-3\"} 0\nnode_disk_written_bytes_total{device=\"dm-4\"} 70144\nnode_disk_written_bytes_total{device=\"dm-5\"} 5.89664256e+08\nnode_disk_written_bytes_total{device=\"mmcblk0\"} 0\nnode_disk_written_bytes_total{device=\"mmcblk0p1\"} 0\nnode_disk_written_bytes_total{device=\"mmcblk0p2\"} 0\nnode_disk_written_bytes_total{device=\"nvme0n1\"} 2.0199236096e+10\nnode_disk_written_bytes_total{device=\"sda\"} 2.58916880384e+11\nnode_disk_written_bytes_total{device=\"sdb\"} 1.01012736e+09\nnode_disk_written_bytes_total{device=\"sdc\"} 8.852736e+07\nnode_disk_written_bytes_total{device=\"sr0\"} 0\nnode_disk_written_bytes_total{device=\"vda\"} 1.0938236928e+11\n# HELP node_dmi_info A metric with a constant '1' value labeled by bios_date, bios_release, bios_vendor, bios_version, board_asset_tag, board_name, board_serial, board_vendor, board_version, chassis_asset_tag, chassis_serial, chassis_vendor, chassis_version, product_family, product_name, product_serial, product_sku, product_uuid, product_version, system_vendor if provided by DMI.\n# TYPE node_dmi_info gauge\nnode_dmi_info{bios_date=\"04/12/2021\",bios_release=\"2.2\",bios_vendor=\"Dell Inc.\",bios_version=\"2.2.4\",board_name=\"07PXPY\",board_serial=\".7N62AI2.GRTCL6944100GP.\",board_vendor=\"Dell Inc.\",board_version=\"A01\",chassis_asset_tag=\"\",chassis_serial=\"7N62AI2\",chassis_vendor=\"Dell Inc.\",chassis_version=\"\",product_family=\"PowerEdge\",product_name=\"PowerEdge R6515\",product_serial=\"7N62AI2\",product_sku=\"SKU=NotProvided;ModelName=PowerEdge R6515\",product_uuid=\"83340ca8-cb49-4474-8c29-d2088ca84dd9\",product_version=\"�\u001c[�\",system_vendor=\"Dell Inc.\"} 1\n# HELP node_drbd_activitylog_writes_total Number of updates of the activity log area of the meta data.\n# TYPE node_drbd_activitylog_writes_total counter\nnode_drbd_activitylog_writes_total{device=\"drbd1\"} 1100\n# HELP node_drbd_application_pending Number of block I/O requests forwarded to DRBD, but not yet answered by DRBD.\n# TYPE node_drbd_application_pending gauge\nnode_drbd_application_pending{device=\"drbd1\"} 12348\n# HELP node_drbd_bitmap_writes_total Number of updates of the bitmap area of the meta data.\n# TYPE node_drbd_bitmap_writes_total counter\nnode_drbd_bitmap_writes_total{device=\"drbd1\"} 221\n# HELP node_drbd_connected Whether DRBD is connected to the peer.\n# TYPE node_drbd_connected gauge\nnode_drbd_connected{device=\"drbd1\"} 1\n# HELP node_drbd_disk_read_bytes_total Net data read from local hard disk; in bytes.\n# TYPE node_drbd_disk_read_bytes_total counter\nnode_drbd_disk_read_bytes_total{device=\"drbd1\"} 1.2154539008e+11\n# HELP node_drbd_disk_state_is_up_to_date Whether the disk of the node is up to date.\n# TYPE node_drbd_disk_state_is_up_to_date gauge\nnode_drbd_disk_state_is_up_to_date{device=\"drbd1\",node=\"local\"} 1\nnode_drbd_disk_state_is_up_to_date{device=\"drbd1\",node=\"remote\"} 1\n# HELP node_drbd_disk_written_bytes_total Net data written on local hard disk; in bytes.\n# TYPE node_drbd_disk_written_bytes_total counter\nnode_drbd_disk_written_bytes_total{device=\"drbd1\"} 2.8941845504e+10\n# HELP node_drbd_epochs Number of Epochs currently on the fly.\n# TYPE node_drbd_epochs gauge\nnode_drbd_epochs{device=\"drbd1\"} 1\n# HELP node_drbd_local_pending Number of open requests to the local I/O sub-system.\n# TYPE node_drbd_local_pending gauge\nnode_drbd_local_pending{device=\"drbd1\"} 12345\n# HELP node_drbd_network_received_bytes_total Total number of bytes received via the network.\n# TYPE node_drbd_network_received_bytes_total counter\nnode_drbd_network_received_bytes_total{device=\"drbd1\"} 1.0961011e+07\n# HELP node_drbd_network_sent_bytes_total Total number of bytes sent via the network.\n# TYPE node_drbd_network_sent_bytes_total counter\nnode_drbd_network_sent_bytes_total{device=\"drbd1\"} 1.7740228608e+10\n# HELP node_drbd_node_role_is_primary Whether the role of the node is in the primary state.\n# TYPE node_drbd_node_role_is_primary gauge\nnode_drbd_node_role_is_primary{device=\"drbd1\",node=\"local\"} 1\nnode_drbd_node_role_is_primary{device=\"drbd1\",node=\"remote\"} 1\n# HELP node_drbd_out_of_sync_bytes Amount of data known to be out of sync; in bytes.\n# TYPE node_drbd_out_of_sync_bytes gauge\nnode_drbd_out_of_sync_bytes{device=\"drbd1\"} 1.2645376e+07\n# HELP node_drbd_remote_pending Number of requests sent to the peer, but that have not yet been answered by the latter.\n# TYPE node_drbd_remote_pending gauge\nnode_drbd_remote_pending{device=\"drbd1\"} 12346\n# HELP node_drbd_remote_unacknowledged Number of requests received by the peer via the network connection, but that have not yet been answered.\n# TYPE node_drbd_remote_unacknowledged gauge\nnode_drbd_remote_unacknowledged{device=\"drbd1\"} 12347\n# HELP node_edac_correctable_errors_total Total correctable memory errors.\n# TYPE node_edac_correctable_errors_total counter\nnode_edac_correctable_errors_total{controller=\"0\"} 1\n# HELP node_edac_csrow_correctable_errors_total Total correctable memory errors for this csrow.\n# TYPE node_edac_csrow_correctable_errors_total counter\nnode_edac_csrow_correctable_errors_total{controller=\"0\",csrow=\"0\"} 3\nnode_edac_csrow_correctable_errors_total{controller=\"0\",csrow=\"unknown\"} 2\n# HELP node_edac_csrow_uncorrectable_errors_total Total uncorrectable memory errors for this csrow.\n# TYPE node_edac_csrow_uncorrectable_errors_total counter\nnode_edac_csrow_uncorrectable_errors_total{controller=\"0\",csrow=\"0\"} 4\nnode_edac_csrow_uncorrectable_errors_total{controller=\"0\",csrow=\"unknown\"} 6\n# HELP node_edac_uncorrectable_errors_total Total uncorrectable memory errors.\n# TYPE node_edac_uncorrectable_errors_total counter\nnode_edac_uncorrectable_errors_total{controller=\"0\"} 5\n# HELP node_entropy_available_bits Bits of available entropy.\n# TYPE node_entropy_available_bits gauge\nnode_entropy_available_bits 1337\n# HELP node_entropy_pool_size_bits Bits of entropy pool.\n# TYPE node_entropy_pool_size_bits gauge\nnode_entropy_pool_size_bits 4096\n# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.\n# TYPE node_exporter_build_info gauge\n# HELP node_fibrechannel_dumped_frames_total Number of dumped frames\n# TYPE node_fibrechannel_dumped_frames_total counter\nnode_fibrechannel_dumped_frames_total{fc_host=\"host1\"} 0\n# HELP node_fibrechannel_error_frames_total Number of errors in frames\n# TYPE node_fibrechannel_error_frames_total counter\nnode_fibrechannel_error_frames_total{fc_host=\"host0\"} 0\nnode_fibrechannel_error_frames_total{fc_host=\"host1\"} 19\n# HELP node_fibrechannel_fcp_packet_aborts_total Number of aborted packets\n# TYPE node_fibrechannel_fcp_packet_aborts_total counter\nnode_fibrechannel_fcp_packet_aborts_total{fc_host=\"host0\"} 19\n# HELP node_fibrechannel_info Non-numeric data from /sys/class/fc_host/<host>, value is always 1.\n# TYPE node_fibrechannel_info gauge\nnode_fibrechannel_info{dev_loss_tmo=\"\",fabric_name=\"\",fc_host=\"host1\",port_id=\"\",port_name=\"\",port_state=\"\",port_type=\"\",speed=\"8 Gbit\",supported_classes=\"\",supported_speeds=\"\",symbolic_name=\"\"} 1\nnode_fibrechannel_info{dev_loss_tmo=\"30\",fabric_name=\"0\",fc_host=\"host0\",port_id=\"000002\",port_name=\"1000e0071bce95f2\",port_state=\"Online\",port_type=\"Point-To-Point (direct nport connection)\",speed=\"16 Gbit\",supported_classes=\"Class 3\",supported_speeds=\"4 Gbit, 8 Gbit, 16 Gbit\",symbolic_name=\"Emulex SN1100E2P FV12.4.270.3 DV12.4.0.0. HN:gotest. OS:Linux\"} 1\n# HELP node_fibrechannel_invalid_crc_total Invalid Cyclic Redundancy Check count\n# TYPE node_fibrechannel_invalid_crc_total counter\nnode_fibrechannel_invalid_crc_total{fc_host=\"host0\"} 2\nnode_fibrechannel_invalid_crc_total{fc_host=\"host1\"} 32\n# HELP node_fibrechannel_invalid_tx_words_total Number of invalid words transmitted by host port\n# TYPE node_fibrechannel_invalid_tx_words_total counter\nnode_fibrechannel_invalid_tx_words_total{fc_host=\"host0\"} 8\nnode_fibrechannel_invalid_tx_words_total{fc_host=\"host1\"} 128\n# HELP node_fibrechannel_link_failure_total Number of times the host port link has failed\n# TYPE node_fibrechannel_link_failure_total counter\nnode_fibrechannel_link_failure_total{fc_host=\"host0\"} 9\nnode_fibrechannel_link_failure_total{fc_host=\"host1\"} 144\n# HELP node_fibrechannel_loss_of_signal_total Number of times signal has been lost\n# TYPE node_fibrechannel_loss_of_signal_total counter\nnode_fibrechannel_loss_of_signal_total{fc_host=\"host0\"} 17\nnode_fibrechannel_loss_of_signal_total{fc_host=\"host1\"} 272\n# HELP node_fibrechannel_loss_of_sync_total Number of failures on either bit or transmission word boundaries\n# TYPE node_fibrechannel_loss_of_sync_total counter\nnode_fibrechannel_loss_of_sync_total{fc_host=\"host0\"} 16\nnode_fibrechannel_loss_of_sync_total{fc_host=\"host1\"} 256\n# HELP node_fibrechannel_nos_total Number Not_Operational Primitive Sequence received by host port\n# TYPE node_fibrechannel_nos_total counter\nnode_fibrechannel_nos_total{fc_host=\"host0\"} 18\nnode_fibrechannel_nos_total{fc_host=\"host1\"} 288\n# HELP node_fibrechannel_rx_frames_total Number of frames received\n# TYPE node_fibrechannel_rx_frames_total counter\nnode_fibrechannel_rx_frames_total{fc_host=\"host0\"} 3\nnode_fibrechannel_rx_frames_total{fc_host=\"host1\"} 48\n# HELP node_fibrechannel_rx_words_total Number of words received by host port\n# TYPE node_fibrechannel_rx_words_total counter\nnode_fibrechannel_rx_words_total{fc_host=\"host0\"} 4\nnode_fibrechannel_rx_words_total{fc_host=\"host1\"} 64\n# HELP node_fibrechannel_seconds_since_last_reset_total Number of seconds since last host port reset\n# TYPE node_fibrechannel_seconds_since_last_reset_total counter\nnode_fibrechannel_seconds_since_last_reset_total{fc_host=\"host0\"} 7\nnode_fibrechannel_seconds_since_last_reset_total{fc_host=\"host1\"} 112\n# HELP node_fibrechannel_tx_frames_total Number of frames transmitted by host port\n# TYPE node_fibrechannel_tx_frames_total counter\nnode_fibrechannel_tx_frames_total{fc_host=\"host0\"} 5\nnode_fibrechannel_tx_frames_total{fc_host=\"host1\"} 80\n# HELP node_fibrechannel_tx_words_total Number of words transmitted by host port\n# TYPE node_fibrechannel_tx_words_total counter\nnode_fibrechannel_tx_words_total{fc_host=\"host0\"} 6\nnode_fibrechannel_tx_words_total{fc_host=\"host1\"} 96\n# HELP node_filefd_allocated File descriptor statistics: allocated.\n# TYPE node_filefd_allocated gauge\nnode_filefd_allocated 1024\n# HELP node_filefd_maximum File descriptor statistics: maximum.\n# TYPE node_filefd_maximum gauge\nnode_filefd_maximum 1.631329e+06\n# HELP node_forks_total Total number of forks.\n# TYPE node_forks_total counter\nnode_forks_total 26442\n# HELP node_hwmon_chip_names Annotation metric for human-readable chip names\n# TYPE node_hwmon_chip_names gauge\nnode_hwmon_chip_names{chip=\"nct6779\",chip_name=\"nct6779\"} 1\nnode_hwmon_chip_names{chip=\"platform_coretemp_0\",chip_name=\"coretemp\"} 1\nnode_hwmon_chip_names{chip=\"platform_coretemp_1\",chip_name=\"coretemp\"} 1\n# HELP node_hwmon_fan_alarm Hardware sensor alarm status (fan)\n# TYPE node_hwmon_fan_alarm gauge\nnode_hwmon_fan_alarm{chip=\"nct6779\",sensor=\"fan2\"} 0\n# HELP node_hwmon_fan_beep_enabled Hardware monitor sensor has beeping enabled\n# TYPE node_hwmon_fan_beep_enabled gauge\nnode_hwmon_fan_beep_enabled{chip=\"nct6779\",sensor=\"fan2\"} 0\n# HELP node_hwmon_fan_manual Hardware monitor fan element manual\n# TYPE node_hwmon_fan_manual gauge\nnode_hwmon_fan_manual{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 0\nnode_hwmon_fan_manual{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 0\n# HELP node_hwmon_fan_max_rpm Hardware monitor for fan revolutions per minute (max)\n# TYPE node_hwmon_fan_max_rpm gauge\nnode_hwmon_fan_max_rpm{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 6156\nnode_hwmon_fan_max_rpm{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 5700\n# HELP node_hwmon_fan_min_rpm Hardware monitor for fan revolutions per minute (min)\n# TYPE node_hwmon_fan_min_rpm gauge\nnode_hwmon_fan_min_rpm{chip=\"nct6779\",sensor=\"fan2\"} 0\nnode_hwmon_fan_min_rpm{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 2160\nnode_hwmon_fan_min_rpm{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 2000\n# HELP node_hwmon_fan_output Hardware monitor fan element output\n# TYPE node_hwmon_fan_output gauge\nnode_hwmon_fan_output{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 2160\nnode_hwmon_fan_output{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 2000\n# HELP node_hwmon_fan_pulses Hardware monitor fan element pulses\n# TYPE node_hwmon_fan_pulses gauge\nnode_hwmon_fan_pulses{chip=\"nct6779\",sensor=\"fan2\"} 2\n# HELP node_hwmon_fan_rpm Hardware monitor for fan revolutions per minute (input)\n# TYPE node_hwmon_fan_rpm gauge\nnode_hwmon_fan_rpm{chip=\"nct6779\",sensor=\"fan2\"} 1098\nnode_hwmon_fan_rpm{chip=\"platform_applesmc_768\",sensor=\"fan1\"} 0\nnode_hwmon_fan_rpm{chip=\"platform_applesmc_768\",sensor=\"fan2\"} 1998\n# HELP node_hwmon_fan_target_rpm Hardware monitor for fan revolutions per minute (target)\n# TYPE node_hwmon_fan_target_rpm gauge\nnode_hwmon_fan_target_rpm{chip=\"nct6779\",sensor=\"fan2\"} 27000\n# HELP node_hwmon_fan_tolerance Hardware monitor fan element tolerance\n# TYPE node_hwmon_fan_tolerance gauge\nnode_hwmon_fan_tolerance{chip=\"nct6779\",sensor=\"fan2\"} 0\n# HELP node_hwmon_freq_freq_mhz Hardware monitor for GPU frequency in MHz\n# TYPE node_hwmon_freq_freq_mhz gauge\nnode_hwmon_freq_freq_mhz{chip=\"hwmon4\",sensor=\"mclk\"} 300\nnode_hwmon_freq_freq_mhz{chip=\"hwmon4\",sensor=\"sclk\"} 214\n# HELP node_hwmon_in_alarm Hardware sensor alarm status (in)\n# TYPE node_hwmon_in_alarm gauge\nnode_hwmon_in_alarm{chip=\"nct6779\",sensor=\"in0\"} 0\nnode_hwmon_in_alarm{chip=\"nct6779\",sensor=\"in1\"} 1\n# HELP node_hwmon_in_beep_enabled Hardware monitor sensor has beeping enabled\n# TYPE node_hwmon_in_beep_enabled gauge\nnode_hwmon_in_beep_enabled{chip=\"nct6779\",sensor=\"in0\"} 0\nnode_hwmon_in_beep_enabled{chip=\"nct6779\",sensor=\"in1\"} 0\n# HELP node_hwmon_in_max_volts Hardware monitor for voltage (max)\n# TYPE node_hwmon_in_max_volts gauge\nnode_hwmon_in_max_volts{chip=\"nct6779\",sensor=\"in0\"} 1.744\nnode_hwmon_in_max_volts{chip=\"nct6779\",sensor=\"in1\"} 0\n# HELP node_hwmon_in_min_volts Hardware monitor for voltage (min)\n# TYPE node_hwmon_in_min_volts gauge\nnode_hwmon_in_min_volts{chip=\"nct6779\",sensor=\"in0\"} 0\nnode_hwmon_in_min_volts{chip=\"nct6779\",sensor=\"in1\"} 0\n# HELP node_hwmon_in_volts Hardware monitor for voltage (input)\n# TYPE node_hwmon_in_volts gauge\nnode_hwmon_in_volts{chip=\"nct6779\",sensor=\"in0\"} 0.792\nnode_hwmon_in_volts{chip=\"nct6779\",sensor=\"in1\"} 1.024\n# HELP node_hwmon_intrusion_alarm Hardware sensor alarm status (intrusion)\n# TYPE node_hwmon_intrusion_alarm gauge\nnode_hwmon_intrusion_alarm{chip=\"nct6779\",sensor=\"intrusion0\"} 1\nnode_hwmon_intrusion_alarm{chip=\"nct6779\",sensor=\"intrusion1\"} 1\n# HELP node_hwmon_intrusion_beep_enabled Hardware monitor sensor has beeping enabled\n# TYPE node_hwmon_intrusion_beep_enabled gauge\nnode_hwmon_intrusion_beep_enabled{chip=\"nct6779\",sensor=\"intrusion0\"} 0\nnode_hwmon_intrusion_beep_enabled{chip=\"nct6779\",sensor=\"intrusion1\"} 0\n# HELP node_hwmon_pwm_auto_point1_pwm Hardware monitor pwm element auto_point1_pwm\n# TYPE node_hwmon_pwm_auto_point1_pwm gauge\nnode_hwmon_pwm_auto_point1_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 153\n# HELP node_hwmon_pwm_auto_point1_temp Hardware monitor pwm element auto_point1_temp\n# TYPE node_hwmon_pwm_auto_point1_temp gauge\nnode_hwmon_pwm_auto_point1_temp{chip=\"nct6779\",sensor=\"pwm1\"} 30000\n# HELP node_hwmon_pwm_auto_point2_pwm Hardware monitor pwm element auto_point2_pwm\n# TYPE node_hwmon_pwm_auto_point2_pwm gauge\nnode_hwmon_pwm_auto_point2_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 255\n# HELP node_hwmon_pwm_auto_point2_temp Hardware monitor pwm element auto_point2_temp\n# TYPE node_hwmon_pwm_auto_point2_temp gauge\nnode_hwmon_pwm_auto_point2_temp{chip=\"nct6779\",sensor=\"pwm1\"} 70000\n# HELP node_hwmon_pwm_auto_point3_pwm Hardware monitor pwm element auto_point3_pwm\n# TYPE node_hwmon_pwm_auto_point3_pwm gauge\nnode_hwmon_pwm_auto_point3_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 255\n# HELP node_hwmon_pwm_auto_point3_temp Hardware monitor pwm element auto_point3_temp\n# TYPE node_hwmon_pwm_auto_point3_temp gauge\nnode_hwmon_pwm_auto_point3_temp{chip=\"nct6779\",sensor=\"pwm1\"} 70000\n# HELP node_hwmon_pwm_auto_point4_pwm Hardware monitor pwm element auto_point4_pwm\n# TYPE node_hwmon_pwm_auto_point4_pwm gauge\nnode_hwmon_pwm_auto_point4_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 255\n# HELP node_hwmon_pwm_auto_point4_temp Hardware monitor pwm element auto_point4_temp\n# TYPE node_hwmon_pwm_auto_point4_temp gauge\nnode_hwmon_pwm_auto_point4_temp{chip=\"nct6779\",sensor=\"pwm1\"} 70000\n# HELP node_hwmon_pwm_auto_point5_pwm Hardware monitor pwm element auto_point5_pwm\n# TYPE node_hwmon_pwm_auto_point5_pwm gauge\nnode_hwmon_pwm_auto_point5_pwm{chip=\"nct6779\",sensor=\"pwm1\"} 255\n# HELP node_hwmon_pwm_auto_point5_temp Hardware monitor pwm element auto_point5_temp\n# TYPE node_hwmon_pwm_auto_point5_temp gauge\nnode_hwmon_pwm_auto_point5_temp{chip=\"nct6779\",sensor=\"pwm1\"} 75000\n# HELP node_hwmon_pwm_crit_temp_tolerance Hardware monitor pwm element crit_temp_tolerance\n# TYPE node_hwmon_pwm_crit_temp_tolerance gauge\nnode_hwmon_pwm_crit_temp_tolerance{chip=\"nct6779\",sensor=\"pwm1\"} 2000\n# HELP node_hwmon_pwm_enable Hardware monitor pwm element enable\n# TYPE node_hwmon_pwm_enable gauge\nnode_hwmon_pwm_enable{chip=\"nct6779\",sensor=\"pwm1\"} 5\n# HELP node_hwmon_pwm_floor Hardware monitor pwm element floor\n# TYPE node_hwmon_pwm_floor gauge\nnode_hwmon_pwm_floor{chip=\"nct6779\",sensor=\"pwm1\"} 1\n# HELP node_hwmon_pwm_mode Hardware monitor pwm element mode\n# TYPE node_hwmon_pwm_mode gauge\nnode_hwmon_pwm_mode{chip=\"nct6779\",sensor=\"pwm1\"} 1\n# HELP node_hwmon_pwm_start Hardware monitor pwm element start\n# TYPE node_hwmon_pwm_start gauge\nnode_hwmon_pwm_start{chip=\"nct6779\",sensor=\"pwm1\"} 1\n# HELP node_hwmon_pwm_step_down_time Hardware monitor pwm element step_down_time\n# TYPE node_hwmon_pwm_step_down_time gauge\nnode_hwmon_pwm_step_down_time{chip=\"nct6779\",sensor=\"pwm1\"} 100\n# HELP node_hwmon_pwm_step_up_time Hardware monitor pwm element step_up_time\n# TYPE node_hwmon_pwm_step_up_time gauge\nnode_hwmon_pwm_step_up_time{chip=\"nct6779\",sensor=\"pwm1\"} 100\n# HELP node_hwmon_pwm_stop_time Hardware monitor pwm element stop_time\n# TYPE node_hwmon_pwm_stop_time gauge\nnode_hwmon_pwm_stop_time{chip=\"nct6779\",sensor=\"pwm1\"} 6000\n# HELP node_hwmon_pwm_target_temp Hardware monitor pwm element target_temp\n# TYPE node_hwmon_pwm_target_temp gauge\nnode_hwmon_pwm_target_temp{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_temp_sel Hardware monitor pwm element temp_sel\n# TYPE node_hwmon_pwm_temp_sel gauge\nnode_hwmon_pwm_temp_sel{chip=\"nct6779\",sensor=\"pwm1\"} 7\n# HELP node_hwmon_pwm_temp_tolerance Hardware monitor pwm element temp_tolerance\n# TYPE node_hwmon_pwm_temp_tolerance gauge\nnode_hwmon_pwm_temp_tolerance{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_duty_base Hardware monitor pwm element weight_duty_base\n# TYPE node_hwmon_pwm_weight_duty_base gauge\nnode_hwmon_pwm_weight_duty_base{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_duty_step Hardware monitor pwm element weight_duty_step\n# TYPE node_hwmon_pwm_weight_duty_step gauge\nnode_hwmon_pwm_weight_duty_step{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_temp_sel Hardware monitor pwm element weight_temp_sel\n# TYPE node_hwmon_pwm_weight_temp_sel gauge\nnode_hwmon_pwm_weight_temp_sel{chip=\"nct6779\",sensor=\"pwm1\"} 1\n# HELP node_hwmon_pwm_weight_temp_step Hardware monitor pwm element weight_temp_step\n# TYPE node_hwmon_pwm_weight_temp_step gauge\nnode_hwmon_pwm_weight_temp_step{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_temp_step_base Hardware monitor pwm element weight_temp_step_base\n# TYPE node_hwmon_pwm_weight_temp_step_base gauge\nnode_hwmon_pwm_weight_temp_step_base{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_pwm_weight_temp_step_tol Hardware monitor pwm element weight_temp_step_tol\n# TYPE node_hwmon_pwm_weight_temp_step_tol gauge\nnode_hwmon_pwm_weight_temp_step_tol{chip=\"nct6779\",sensor=\"pwm1\"} 0\n# HELP node_hwmon_sensor_label Label for given chip and sensor\n# TYPE node_hwmon_sensor_label gauge\nnode_hwmon_sensor_label{chip=\"hwmon4\",label=\"foosensor\",sensor=\"temp1\"} 1\nnode_hwmon_sensor_label{chip=\"hwmon4\",label=\"foosensor\",sensor=\"temp2\"} 1\nnode_hwmon_sensor_label{chip=\"hwmon4\",label=\"mclk\",sensor=\"freq2\"} 1\nnode_hwmon_sensor_label{chip=\"hwmon4\",label=\"sclk\",sensor=\"freq1\"} 1\nnode_hwmon_sensor_label{chip=\"platform_applesmc_768\",label=\"Left side\",sensor=\"fan1\"} 1\nnode_hwmon_sensor_label{chip=\"platform_applesmc_768\",label=\"Right side\",sensor=\"fan2\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Core 0\",sensor=\"temp2\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Core 1\",sensor=\"temp3\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Core 2\",sensor=\"temp4\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Core 3\",sensor=\"temp5\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_0\",label=\"Physical id 0\",sensor=\"temp1\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Core 0\",sensor=\"temp2\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Core 1\",sensor=\"temp3\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Core 2\",sensor=\"temp4\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Core 3\",sensor=\"temp5\"} 1\nnode_hwmon_sensor_label{chip=\"platform_coretemp_1\",label=\"Physical id 0\",sensor=\"temp1\"} 1\n# HELP node_hwmon_temp_celsius Hardware monitor for temperature (input)\n# TYPE node_hwmon_temp_celsius gauge\nnode_hwmon_temp_celsius{chip=\"hwmon4\",sensor=\"temp1\"} 55\nnode_hwmon_temp_celsius{chip=\"hwmon4\",sensor=\"temp2\"} 54\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp1\"} 55\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp2\"} 54\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp3\"} 52\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp4\"} 53\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_0\",sensor=\"temp5\"} 50\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp1\"} 55\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp2\"} 54\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp3\"} 52\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp4\"} 53\nnode_hwmon_temp_celsius{chip=\"platform_coretemp_1\",sensor=\"temp5\"} 50\n# HELP node_hwmon_temp_crit_alarm_celsius Hardware monitor for temperature (crit_alarm)\n# TYPE node_hwmon_temp_crit_alarm_celsius gauge\nnode_hwmon_temp_crit_alarm_celsius{chip=\"hwmon4\",sensor=\"temp1\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"hwmon4\",sensor=\"temp2\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp1\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp2\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp3\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp4\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_0\",sensor=\"temp5\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp1\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp2\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp3\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp4\"} 0\nnode_hwmon_temp_crit_alarm_celsius{chip=\"platform_coretemp_1\",sensor=\"temp5\"} 0\n# HELP node_hwmon_temp_crit_celsius Hardware monitor for temperature (crit)\n# TYPE node_hwmon_temp_crit_celsius gauge\nnode_hwmon_temp_crit_celsius{chip=\"hwmon4\",sensor=\"temp1\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"hwmon4\",sensor=\"temp2\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp1\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp2\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp3\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp4\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_0\",sensor=\"temp5\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp1\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp2\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp3\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp4\"} 100\nnode_hwmon_temp_crit_celsius{chip=\"platform_coretemp_1\",sensor=\"temp5\"} 100\n# HELP node_hwmon_temp_max_celsius Hardware monitor for temperature (max)\n# TYPE node_hwmon_temp_max_celsius gauge\nnode_hwmon_temp_max_celsius{chip=\"hwmon4\",sensor=\"temp1\"} 100\nnode_hwmon_temp_max_celsius{chip=\"hwmon4\",sensor=\"temp2\"} 100\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp1\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp2\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp3\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp4\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_0\",sensor=\"temp5\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp1\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp2\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp3\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp4\"} 84\nnode_hwmon_temp_max_celsius{chip=\"platform_coretemp_1\",sensor=\"temp5\"} 84\n# HELP node_infiniband_info Non-numeric data from /sys/class/infiniband/<device>, value is always 1.\n# TYPE node_infiniband_info gauge\nnode_infiniband_info{board_id=\"I40IW Board ID\",device=\"i40iw0\",firmware_version=\"0.2\",hca_type=\"I40IW\"} 1\nnode_infiniband_info{board_id=\"SM_1141000001000\",device=\"mlx4_0\",firmware_version=\"2.31.5050\",hca_type=\"MT4099\"} 1\n# HELP node_infiniband_legacy_data_received_bytes_total Number of data octets received on all links\n# TYPE node_infiniband_legacy_data_received_bytes_total counter\nnode_infiniband_legacy_data_received_bytes_total{device=\"mlx4_0\",port=\"1\"} 1.8527668e+07\nnode_infiniband_legacy_data_received_bytes_total{device=\"mlx4_0\",port=\"2\"} 1.8527668e+07\n# HELP node_infiniband_legacy_data_transmitted_bytes_total Number of data octets transmitted on all links\n# TYPE node_infiniband_legacy_data_transmitted_bytes_total counter\nnode_infiniband_legacy_data_transmitted_bytes_total{device=\"mlx4_0\",port=\"1\"} 1.493376e+07\nnode_infiniband_legacy_data_transmitted_bytes_total{device=\"mlx4_0\",port=\"2\"} 1.493376e+07\n# HELP node_infiniband_legacy_multicast_packets_received_total Number of multicast packets received\n# TYPE node_infiniband_legacy_multicast_packets_received_total counter\nnode_infiniband_legacy_multicast_packets_received_total{device=\"mlx4_0\",port=\"1\"} 93\nnode_infiniband_legacy_multicast_packets_received_total{device=\"mlx4_0\",port=\"2\"} 93\n# HELP node_infiniband_legacy_multicast_packets_transmitted_total Number of multicast packets transmitted\n# TYPE node_infiniband_legacy_multicast_packets_transmitted_total counter\nnode_infiniband_legacy_multicast_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 16\nnode_infiniband_legacy_multicast_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 16\n# HELP node_infiniband_legacy_packets_received_total Number of data packets received on all links\n# TYPE node_infiniband_legacy_packets_received_total counter\nnode_infiniband_legacy_packets_received_total{device=\"mlx4_0\",port=\"1\"} 0\nnode_infiniband_legacy_packets_received_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_legacy_packets_transmitted_total Number of data packets received on all links\n# TYPE node_infiniband_legacy_packets_transmitted_total counter\nnode_infiniband_legacy_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 0\nnode_infiniband_legacy_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_legacy_unicast_packets_received_total Number of unicast packets received\n# TYPE node_infiniband_legacy_unicast_packets_received_total counter\nnode_infiniband_legacy_unicast_packets_received_total{device=\"mlx4_0\",port=\"1\"} 61148\nnode_infiniband_legacy_unicast_packets_received_total{device=\"mlx4_0\",port=\"2\"} 61148\n# HELP node_infiniband_legacy_unicast_packets_transmitted_total Number of unicast packets transmitted\n# TYPE node_infiniband_legacy_unicast_packets_transmitted_total counter\nnode_infiniband_legacy_unicast_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 61239\nnode_infiniband_legacy_unicast_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 61239\n# HELP node_infiniband_link_downed_total Number of times the link failed to recover from an error state and went down\n# TYPE node_infiniband_link_downed_total counter\nnode_infiniband_link_downed_total{device=\"mlx4_0\",port=\"1\"} 0\nnode_infiniband_link_downed_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_link_error_recovery_total Number of times the link successfully recovered from an error state\n# TYPE node_infiniband_link_error_recovery_total counter\nnode_infiniband_link_error_recovery_total{device=\"mlx4_0\",port=\"1\"} 0\nnode_infiniband_link_error_recovery_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_multicast_packets_received_total Number of multicast packets received (including errors)\n# TYPE node_infiniband_multicast_packets_received_total counter\nnode_infiniband_multicast_packets_received_total{device=\"mlx4_0\",port=\"1\"} 93\nnode_infiniband_multicast_packets_received_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_multicast_packets_transmitted_total Number of multicast packets transmitted (including errors)\n# TYPE node_infiniband_multicast_packets_transmitted_total counter\nnode_infiniband_multicast_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 16\nnode_infiniband_multicast_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_physical_state_id Physical state of the InfiniBand port (0: no change, 1: sleep, 2: polling, 3: disable, 4: shift, 5: link up, 6: link error recover, 7: phytest)\n# TYPE node_infiniband_physical_state_id gauge\nnode_infiniband_physical_state_id{device=\"i40iw0\",port=\"1\"} 5\nnode_infiniband_physical_state_id{device=\"mlx4_0\",port=\"1\"} 5\nnode_infiniband_physical_state_id{device=\"mlx4_0\",port=\"2\"} 5\n# HELP node_infiniband_port_constraint_errors_received_total Number of packets received on the switch physical port that are discarded\n# TYPE node_infiniband_port_constraint_errors_received_total counter\nnode_infiniband_port_constraint_errors_received_total{device=\"mlx4_0\",port=\"1\"} 0\n# HELP node_infiniband_port_constraint_errors_transmitted_total Number of packets not transmitted from the switch physical port\n# TYPE node_infiniband_port_constraint_errors_transmitted_total counter\nnode_infiniband_port_constraint_errors_transmitted_total{device=\"mlx4_0\",port=\"1\"} 0\n# HELP node_infiniband_port_data_received_bytes_total Number of data octets received on all links\n# TYPE node_infiniband_port_data_received_bytes_total counter\nnode_infiniband_port_data_received_bytes_total{device=\"mlx4_0\",port=\"1\"} 1.8527668e+07\nnode_infiniband_port_data_received_bytes_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_port_data_transmitted_bytes_total Number of data octets transmitted on all links\n# TYPE node_infiniband_port_data_transmitted_bytes_total counter\nnode_infiniband_port_data_transmitted_bytes_total{device=\"mlx4_0\",port=\"1\"} 1.493376e+07\nnode_infiniband_port_data_transmitted_bytes_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_port_discards_received_total Number of inbound packets discarded by the port because the port is down or congested\n# TYPE node_infiniband_port_discards_received_total counter\nnode_infiniband_port_discards_received_total{device=\"mlx4_0\",port=\"1\"} 0\n# HELP node_infiniband_port_discards_transmitted_total Number of outbound packets discarded by the port because the port is down or congested\n# TYPE node_infiniband_port_discards_transmitted_total counter\nnode_infiniband_port_discards_transmitted_total{device=\"mlx4_0\",port=\"1\"} 5\n# HELP node_infiniband_port_errors_received_total Number of packets containing an error that were received on this port\n# TYPE node_infiniband_port_errors_received_total counter\nnode_infiniband_port_errors_received_total{device=\"mlx4_0\",port=\"1\"} 0\n# HELP node_infiniband_port_packets_received_total Number of packets received on all VLs by this port (including errors)\n# TYPE node_infiniband_port_packets_received_total counter\nnode_infiniband_port_packets_received_total{device=\"mlx4_0\",port=\"1\"} 6.825908347e+09\n# HELP node_infiniband_port_packets_transmitted_total Number of packets transmitted on all VLs from this port (including errors)\n# TYPE node_infiniband_port_packets_transmitted_total counter\nnode_infiniband_port_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 6.235865e+06\n# HELP node_infiniband_port_transmit_wait_total Number of ticks during which the port had data to transmit but no data was sent during the entire tick\n# TYPE node_infiniband_port_transmit_wait_total counter\nnode_infiniband_port_transmit_wait_total{device=\"mlx4_0\",port=\"1\"} 4.294967295e+09\n# HELP node_infiniband_rate_bytes_per_second Maximum signal transfer rate\n# TYPE node_infiniband_rate_bytes_per_second gauge\nnode_infiniband_rate_bytes_per_second{device=\"i40iw0\",port=\"1\"} 1.25e+09\nnode_infiniband_rate_bytes_per_second{device=\"mlx4_0\",port=\"1\"} 5e+09\nnode_infiniband_rate_bytes_per_second{device=\"mlx4_0\",port=\"2\"} 5e+09\n# HELP node_infiniband_state_id State of the InfiniBand port (0: no change, 1: down, 2: init, 3: armed, 4: active, 5: act defer)\n# TYPE node_infiniband_state_id gauge\nnode_infiniband_state_id{device=\"i40iw0\",port=\"1\"} 4\nnode_infiniband_state_id{device=\"mlx4_0\",port=\"1\"} 4\nnode_infiniband_state_id{device=\"mlx4_0\",port=\"2\"} 4\n# HELP node_infiniband_unicast_packets_received_total Number of unicast packets received (including errors)\n# TYPE node_infiniband_unicast_packets_received_total counter\nnode_infiniband_unicast_packets_received_total{device=\"mlx4_0\",port=\"1\"} 61148\nnode_infiniband_unicast_packets_received_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_infiniband_unicast_packets_transmitted_total Number of unicast packets transmitted (including errors)\n# TYPE node_infiniband_unicast_packets_transmitted_total counter\nnode_infiniband_unicast_packets_transmitted_total{device=\"mlx4_0\",port=\"1\"} 61239\nnode_infiniband_unicast_packets_transmitted_total{device=\"mlx4_0\",port=\"2\"} 0\n# HELP node_interrupts_total Interrupt details.\n# TYPE node_interrupts_total counter\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"APIC ICR read retries\",type=\"RTR\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Function call interrupts\",type=\"CAL\"} 148554\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"IRQ work interrupts\",type=\"IWI\"} 1.509379e+06\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Local timer interrupts\",type=\"LOC\"} 1.74326351e+08\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Machine check exceptions\",type=\"MCE\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Machine check polls\",type=\"MCP\"} 2406\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Non-maskable interrupts\",type=\"NMI\"} 47\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Performance monitoring interrupts\",type=\"PMI\"} 47\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Rescheduling interrupts\",type=\"RES\"} 1.0847134e+07\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Spurious interrupts\",type=\"SPU\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"TLB shootdowns\",type=\"TLB\"} 1.0460334e+07\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Thermal event interrupts\",type=\"TRM\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"\",info=\"Threshold APIC interrupts\",type=\"THR\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"acpi\",info=\"IR-IO-APIC-fasteoi\",type=\"9\"} 398553\nnode_interrupts_total{cpu=\"0\",devices=\"ahci\",info=\"IR-PCI-MSI-edge\",type=\"43\"} 7.434032e+06\nnode_interrupts_total{cpu=\"0\",devices=\"dmar0\",info=\"DMAR_MSI-edge\",type=\"40\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"dmar1\",info=\"DMAR_MSI-edge\",type=\"41\"} 0\nnode_interrupts_total{cpu=\"0\",devices=\"ehci_hcd:usb1, mmc0\",info=\"IR-IO-APIC-fasteoi\",type=\"16\"} 328511\nnode_interrupts_total{cpu=\"0\",devices=\"ehci_hcd:usb2\",info=\"IR-IO-APIC-fasteoi\",type=\"23\"} 1.451445e+06\nnode_interrupts_total{cpu=\"0\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"1\"} 17960\nnode_interrupts_total{cpu=\"0\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"12\"} 380847\nnode_interrupts_total{cpu=\"0\",devices=\"i915\",info=\"IR-PCI-MSI-edge\",type=\"44\"} 140636\nnode_interrupts_total{cpu=\"0\",devices=\"iwlwifi\",info=\"IR-PCI-MSI-edge\",type=\"46\"} 4.3078464e+07\nnode_interrupts_total{cpu=\"0\",devices=\"mei_me\",info=\"IR-PCI-MSI-edge\",type=\"45\"} 4\nnode_interrupts_total{cpu=\"0\",devices=\"rtc0\",info=\"IR-IO-APIC-edge\",type=\"8\"} 1\nnode_interrupts_total{cpu=\"0\",devices=\"snd_hda_intel\",info=\"IR-PCI-MSI-edge\",type=\"47\"} 350\nnode_interrupts_total{cpu=\"0\",devices=\"timer\",info=\"IR-IO-APIC-edge\",type=\"0\"} 18\nnode_interrupts_total{cpu=\"0\",devices=\"xhci_hcd\",info=\"IR-PCI-MSI-edge\",type=\"42\"} 378324\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"APIC ICR read retries\",type=\"RTR\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Function call interrupts\",type=\"CAL\"} 157441\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"IRQ work interrupts\",type=\"IWI\"} 2.411776e+06\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Local timer interrupts\",type=\"LOC\"} 1.35776678e+08\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Machine check exceptions\",type=\"MCE\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Machine check polls\",type=\"MCP\"} 2399\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Non-maskable interrupts\",type=\"NMI\"} 5031\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Performance monitoring interrupts\",type=\"PMI\"} 5031\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Rescheduling interrupts\",type=\"RES\"} 9.111507e+06\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Spurious interrupts\",type=\"SPU\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"TLB shootdowns\",type=\"TLB\"} 9.918429e+06\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Thermal event interrupts\",type=\"TRM\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"\",info=\"Threshold APIC interrupts\",type=\"THR\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"acpi\",info=\"IR-IO-APIC-fasteoi\",type=\"9\"} 2320\nnode_interrupts_total{cpu=\"1\",devices=\"ahci\",info=\"IR-PCI-MSI-edge\",type=\"43\"} 8.092205e+06\nnode_interrupts_total{cpu=\"1\",devices=\"dmar0\",info=\"DMAR_MSI-edge\",type=\"40\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"dmar1\",info=\"DMAR_MSI-edge\",type=\"41\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"ehci_hcd:usb1, mmc0\",info=\"IR-IO-APIC-fasteoi\",type=\"16\"} 322879\nnode_interrupts_total{cpu=\"1\",devices=\"ehci_hcd:usb2\",info=\"IR-IO-APIC-fasteoi\",type=\"23\"} 3.333499e+06\nnode_interrupts_total{cpu=\"1\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"1\"} 105\nnode_interrupts_total{cpu=\"1\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"12\"} 1021\nnode_interrupts_total{cpu=\"1\",devices=\"i915\",info=\"IR-PCI-MSI-edge\",type=\"44\"} 226313\nnode_interrupts_total{cpu=\"1\",devices=\"iwlwifi\",info=\"IR-PCI-MSI-edge\",type=\"46\"} 130\nnode_interrupts_total{cpu=\"1\",devices=\"mei_me\",info=\"IR-PCI-MSI-edge\",type=\"45\"} 22\nnode_interrupts_total{cpu=\"1\",devices=\"rtc0\",info=\"IR-IO-APIC-edge\",type=\"8\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"snd_hda_intel\",info=\"IR-PCI-MSI-edge\",type=\"47\"} 224\nnode_interrupts_total{cpu=\"1\",devices=\"timer\",info=\"IR-IO-APIC-edge\",type=\"0\"} 0\nnode_interrupts_total{cpu=\"1\",devices=\"xhci_hcd\",info=\"IR-PCI-MSI-edge\",type=\"42\"} 1.734637e+06\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"APIC ICR read retries\",type=\"RTR\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Function call interrupts\",type=\"CAL\"} 142912\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"IRQ work interrupts\",type=\"IWI\"} 1.512975e+06\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Local timer interrupts\",type=\"LOC\"} 1.68393257e+08\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Machine check exceptions\",type=\"MCE\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Machine check polls\",type=\"MCP\"} 2399\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Non-maskable interrupts\",type=\"NMI\"} 6211\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Performance monitoring interrupts\",type=\"PMI\"} 6211\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Rescheduling interrupts\",type=\"RES\"} 1.5999335e+07\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Spurious interrupts\",type=\"SPU\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"TLB shootdowns\",type=\"TLB\"} 1.0494258e+07\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Thermal event interrupts\",type=\"TRM\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"\",info=\"Threshold APIC interrupts\",type=\"THR\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"acpi\",info=\"IR-IO-APIC-fasteoi\",type=\"9\"} 824\nnode_interrupts_total{cpu=\"2\",devices=\"ahci\",info=\"IR-PCI-MSI-edge\",type=\"43\"} 6.478877e+06\nnode_interrupts_total{cpu=\"2\",devices=\"dmar0\",info=\"DMAR_MSI-edge\",type=\"40\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"dmar1\",info=\"DMAR_MSI-edge\",type=\"41\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"ehci_hcd:usb1, mmc0\",info=\"IR-IO-APIC-fasteoi\",type=\"16\"} 293782\nnode_interrupts_total{cpu=\"2\",devices=\"ehci_hcd:usb2\",info=\"IR-IO-APIC-fasteoi\",type=\"23\"} 1.092032e+06\nnode_interrupts_total{cpu=\"2\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"1\"} 28\nnode_interrupts_total{cpu=\"2\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"12\"} 240\nnode_interrupts_total{cpu=\"2\",devices=\"i915\",info=\"IR-PCI-MSI-edge\",type=\"44\"} 347\nnode_interrupts_total{cpu=\"2\",devices=\"iwlwifi\",info=\"IR-PCI-MSI-edge\",type=\"46\"} 460171\nnode_interrupts_total{cpu=\"2\",devices=\"mei_me\",info=\"IR-PCI-MSI-edge\",type=\"45\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"rtc0\",info=\"IR-IO-APIC-edge\",type=\"8\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"snd_hda_intel\",info=\"IR-PCI-MSI-edge\",type=\"47\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"timer\",info=\"IR-IO-APIC-edge\",type=\"0\"} 0\nnode_interrupts_total{cpu=\"2\",devices=\"xhci_hcd\",info=\"IR-PCI-MSI-edge\",type=\"42\"} 440240\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"APIC ICR read retries\",type=\"RTR\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Function call interrupts\",type=\"CAL\"} 155528\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"IRQ work interrupts\",type=\"IWI\"} 2.428828e+06\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Local timer interrupts\",type=\"LOC\"} 1.30980079e+08\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Machine check exceptions\",type=\"MCE\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Machine check polls\",type=\"MCP\"} 2399\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Non-maskable interrupts\",type=\"NMI\"} 4968\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Performance monitoring interrupts\",type=\"PMI\"} 4968\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Rescheduling interrupts\",type=\"RES\"} 7.45726e+06\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Spurious interrupts\",type=\"SPU\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"TLB shootdowns\",type=\"TLB\"} 1.0345022e+07\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Thermal event interrupts\",type=\"TRM\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"\",info=\"Threshold APIC interrupts\",type=\"THR\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"acpi\",info=\"IR-IO-APIC-fasteoi\",type=\"9\"} 863\nnode_interrupts_total{cpu=\"3\",devices=\"ahci\",info=\"IR-PCI-MSI-edge\",type=\"43\"} 7.492252e+06\nnode_interrupts_total{cpu=\"3\",devices=\"dmar0\",info=\"DMAR_MSI-edge\",type=\"40\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"dmar1\",info=\"DMAR_MSI-edge\",type=\"41\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"ehci_hcd:usb1, mmc0\",info=\"IR-IO-APIC-fasteoi\",type=\"16\"} 351412\nnode_interrupts_total{cpu=\"3\",devices=\"ehci_hcd:usb2\",info=\"IR-IO-APIC-fasteoi\",type=\"23\"} 2.644609e+06\nnode_interrupts_total{cpu=\"3\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"1\"} 28\nnode_interrupts_total{cpu=\"3\",devices=\"i8042\",info=\"IR-IO-APIC-edge\",type=\"12\"} 198\nnode_interrupts_total{cpu=\"3\",devices=\"i915\",info=\"IR-PCI-MSI-edge\",type=\"44\"} 633\nnode_interrupts_total{cpu=\"3\",devices=\"iwlwifi\",info=\"IR-PCI-MSI-edge\",type=\"46\"} 290\nnode_interrupts_total{cpu=\"3\",devices=\"mei_me\",info=\"IR-PCI-MSI-edge\",type=\"45\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"rtc0\",info=\"IR-IO-APIC-edge\",type=\"8\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"snd_hda_intel\",info=\"IR-PCI-MSI-edge\",type=\"47\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"timer\",info=\"IR-IO-APIC-edge\",type=\"0\"} 0\nnode_interrupts_total{cpu=\"3\",devices=\"xhci_hcd\",info=\"IR-PCI-MSI-edge\",type=\"42\"} 2.434308e+06\n# HELP node_intr_total Total number of interrupts serviced.\n# TYPE node_intr_total counter\nnode_intr_total 8.885917e+06\n# HELP node_ipvs_backend_connections_active The current active connections by local and remote address.\n# TYPE node_ipvs_backend_connections_active gauge\nnode_ipvs_backend_connections_active{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 321\nnode_ipvs_backend_connections_active{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 64\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 1498\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 1499\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_backend_connections_inactive The current inactive connections by local and remote address.\n# TYPE node_ipvs_backend_connections_inactive gauge\nnode_ipvs_backend_connections_inactive{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 5\nnode_ipvs_backend_connections_inactive{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 1\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 2\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 1\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 2\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_backend_weight The current backend weight by local and remote address.\n# TYPE node_ipvs_backend_weight gauge\nnode_ipvs_backend_weight{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 20\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_connections_total The total number of connections made.\n# TYPE node_ipvs_connections_total counter\nnode_ipvs_connections_total 2.3765872e+07\n# HELP node_ipvs_incoming_bytes_total The total amount of incoming data.\n# TYPE node_ipvs_incoming_bytes_total counter\nnode_ipvs_incoming_bytes_total 8.9991519156915e+13\n# HELP node_ipvs_incoming_packets_total The total number of incoming packets.\n# TYPE node_ipvs_incoming_packets_total counter\nnode_ipvs_incoming_packets_total 3.811989221e+09\n# HELP node_ipvs_outgoing_bytes_total The total amount of outgoing data.\n# TYPE node_ipvs_outgoing_bytes_total counter\nnode_ipvs_outgoing_bytes_total 0\n# HELP node_ipvs_outgoing_packets_total The total number of outgoing packets.\n# TYPE node_ipvs_outgoing_packets_total counter\nnode_ipvs_outgoing_packets_total 0\n# HELP node_ksmd_full_scans_total ksmd 'full_scans' file.\n# TYPE node_ksmd_full_scans_total counter\nnode_ksmd_full_scans_total 323\n# HELP node_ksmd_merge_across_nodes ksmd 'merge_across_nodes' file.\n# TYPE node_ksmd_merge_across_nodes gauge\nnode_ksmd_merge_across_nodes 1\n# HELP node_ksmd_pages_shared ksmd 'pages_shared' file.\n# TYPE node_ksmd_pages_shared gauge\nnode_ksmd_pages_shared 1\n# HELP node_ksmd_pages_sharing ksmd 'pages_sharing' file.\n# TYPE node_ksmd_pages_sharing gauge\nnode_ksmd_pages_sharing 255\n# HELP node_ksmd_pages_to_scan ksmd 'pages_to_scan' file.\n# TYPE node_ksmd_pages_to_scan gauge\nnode_ksmd_pages_to_scan 100\n# HELP node_ksmd_pages_unshared ksmd 'pages_unshared' file.\n# TYPE node_ksmd_pages_unshared gauge\nnode_ksmd_pages_unshared 0\n# HELP node_ksmd_pages_volatile ksmd 'pages_volatile' file.\n# TYPE node_ksmd_pages_volatile gauge\nnode_ksmd_pages_volatile 0\n# HELP node_ksmd_run ksmd 'run' file.\n# TYPE node_ksmd_run gauge\nnode_ksmd_run 1\n# HELP node_ksmd_sleep_seconds ksmd 'sleep_millisecs' file.\n# TYPE node_ksmd_sleep_seconds gauge\nnode_ksmd_sleep_seconds 0.02\n# HELP node_lnstat_allocs_total linux network cache stats\n# TYPE node_lnstat_allocs_total counter\nnode_lnstat_allocs_total{cpu=\"0\",subsystem=\"arp_cache\"} 1\nnode_lnstat_allocs_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 240\nnode_lnstat_allocs_total{cpu=\"1\",subsystem=\"arp_cache\"} 13\nnode_lnstat_allocs_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 252\n# HELP node_lnstat_delete_list_total linux network cache stats\n# TYPE node_lnstat_delete_list_total counter\nnode_lnstat_delete_list_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_list_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_list_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_list_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_delete_total linux network cache stats\n# TYPE node_lnstat_delete_total counter\nnode_lnstat_delete_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_delete_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_destroys_total linux network cache stats\n# TYPE node_lnstat_destroys_total counter\nnode_lnstat_destroys_total{cpu=\"0\",subsystem=\"arp_cache\"} 2\nnode_lnstat_destroys_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 241\nnode_lnstat_destroys_total{cpu=\"1\",subsystem=\"arp_cache\"} 14\nnode_lnstat_destroys_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 253\n# HELP node_lnstat_drop_total linux network cache stats\n# TYPE node_lnstat_drop_total counter\nnode_lnstat_drop_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_drop_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_drop_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_drop_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_early_drop_total linux network cache stats\n# TYPE node_lnstat_early_drop_total counter\nnode_lnstat_early_drop_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_early_drop_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_early_drop_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_early_drop_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_entries_total linux network cache stats\n# TYPE node_lnstat_entries_total counter\nnode_lnstat_entries_total{cpu=\"0\",subsystem=\"arp_cache\"} 20\nnode_lnstat_entries_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 36\nnode_lnstat_entries_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 33\nnode_lnstat_entries_total{cpu=\"1\",subsystem=\"arp_cache\"} 20\nnode_lnstat_entries_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 36\nnode_lnstat_entries_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 33\nnode_lnstat_entries_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 33\nnode_lnstat_entries_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 33\n# HELP node_lnstat_expect_create_total linux network cache stats\n# TYPE node_lnstat_expect_create_total counter\nnode_lnstat_expect_create_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_create_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_create_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_create_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_expect_delete_total linux network cache stats\n# TYPE node_lnstat_expect_delete_total counter\nnode_lnstat_expect_delete_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_delete_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_delete_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_delete_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_expect_new_total linux network cache stats\n# TYPE node_lnstat_expect_new_total counter\nnode_lnstat_expect_new_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_new_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_new_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_expect_new_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_forced_gc_runs_total linux network cache stats\n# TYPE node_lnstat_forced_gc_runs_total counter\nnode_lnstat_forced_gc_runs_total{cpu=\"0\",subsystem=\"arp_cache\"} 10\nnode_lnstat_forced_gc_runs_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 249\nnode_lnstat_forced_gc_runs_total{cpu=\"1\",subsystem=\"arp_cache\"} 22\nnode_lnstat_forced_gc_runs_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 261\n# HELP node_lnstat_found_total linux network cache stats\n# TYPE node_lnstat_found_total counter\nnode_lnstat_found_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_found_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_found_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_found_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_hash_grows_total linux network cache stats\n# TYPE node_lnstat_hash_grows_total counter\nnode_lnstat_hash_grows_total{cpu=\"0\",subsystem=\"arp_cache\"} 3\nnode_lnstat_hash_grows_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 242\nnode_lnstat_hash_grows_total{cpu=\"1\",subsystem=\"arp_cache\"} 15\nnode_lnstat_hash_grows_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 254\n# HELP node_lnstat_hits_total linux network cache stats\n# TYPE node_lnstat_hits_total counter\nnode_lnstat_hits_total{cpu=\"0\",subsystem=\"arp_cache\"} 5\nnode_lnstat_hits_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 244\nnode_lnstat_hits_total{cpu=\"1\",subsystem=\"arp_cache\"} 17\nnode_lnstat_hits_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 256\n# HELP node_lnstat_icmp_error_total linux network cache stats\n# TYPE node_lnstat_icmp_error_total counter\nnode_lnstat_icmp_error_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_icmp_error_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_icmp_error_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_icmp_error_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_ignore_total linux network cache stats\n# TYPE node_lnstat_ignore_total counter\nnode_lnstat_ignore_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 22666\nnode_lnstat_ignore_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 22180\nnode_lnstat_ignore_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 22740\nnode_lnstat_ignore_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 22152\n# HELP node_lnstat_insert_failed_total linux network cache stats\n# TYPE node_lnstat_insert_failed_total counter\nnode_lnstat_insert_failed_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_failed_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_failed_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_failed_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_insert_total linux network cache stats\n# TYPE node_lnstat_insert_total counter\nnode_lnstat_insert_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_insert_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_invalid_total linux network cache stats\n# TYPE node_lnstat_invalid_total counter\nnode_lnstat_invalid_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 3\nnode_lnstat_invalid_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 2\nnode_lnstat_invalid_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 1\nnode_lnstat_invalid_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 47\n# HELP node_lnstat_lookups_total linux network cache stats\n# TYPE node_lnstat_lookups_total counter\nnode_lnstat_lookups_total{cpu=\"0\",subsystem=\"arp_cache\"} 4\nnode_lnstat_lookups_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 243\nnode_lnstat_lookups_total{cpu=\"1\",subsystem=\"arp_cache\"} 16\nnode_lnstat_lookups_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 255\n# HELP node_lnstat_new_total linux network cache stats\n# TYPE node_lnstat_new_total counter\nnode_lnstat_new_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_new_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_new_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_new_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_periodic_gc_runs_total linux network cache stats\n# TYPE node_lnstat_periodic_gc_runs_total counter\nnode_lnstat_periodic_gc_runs_total{cpu=\"0\",subsystem=\"arp_cache\"} 9\nnode_lnstat_periodic_gc_runs_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 248\nnode_lnstat_periodic_gc_runs_total{cpu=\"1\",subsystem=\"arp_cache\"} 21\nnode_lnstat_periodic_gc_runs_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 260\n# HELP node_lnstat_rcv_probes_mcast_total linux network cache stats\n# TYPE node_lnstat_rcv_probes_mcast_total counter\nnode_lnstat_rcv_probes_mcast_total{cpu=\"0\",subsystem=\"arp_cache\"} 7\nnode_lnstat_rcv_probes_mcast_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 246\nnode_lnstat_rcv_probes_mcast_total{cpu=\"1\",subsystem=\"arp_cache\"} 19\nnode_lnstat_rcv_probes_mcast_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 258\n# HELP node_lnstat_rcv_probes_ucast_total linux network cache stats\n# TYPE node_lnstat_rcv_probes_ucast_total counter\nnode_lnstat_rcv_probes_ucast_total{cpu=\"0\",subsystem=\"arp_cache\"} 8\nnode_lnstat_rcv_probes_ucast_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 247\nnode_lnstat_rcv_probes_ucast_total{cpu=\"1\",subsystem=\"arp_cache\"} 20\nnode_lnstat_rcv_probes_ucast_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 259\n# HELP node_lnstat_res_failed_total linux network cache stats\n# TYPE node_lnstat_res_failed_total counter\nnode_lnstat_res_failed_total{cpu=\"0\",subsystem=\"arp_cache\"} 6\nnode_lnstat_res_failed_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 245\nnode_lnstat_res_failed_total{cpu=\"1\",subsystem=\"arp_cache\"} 18\nnode_lnstat_res_failed_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 257\n# HELP node_lnstat_search_restart_total linux network cache stats\n# TYPE node_lnstat_search_restart_total counter\nnode_lnstat_search_restart_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_search_restart_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 2\nnode_lnstat_search_restart_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 1\nnode_lnstat_search_restart_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 4\n# HELP node_lnstat_searched_total linux network cache stats\n# TYPE node_lnstat_searched_total counter\nnode_lnstat_searched_total{cpu=\"0\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_searched_total{cpu=\"1\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_searched_total{cpu=\"2\",subsystem=\"nf_conntrack\"} 0\nnode_lnstat_searched_total{cpu=\"3\",subsystem=\"nf_conntrack\"} 0\n# HELP node_lnstat_table_fulls_total linux network cache stats\n# TYPE node_lnstat_table_fulls_total counter\nnode_lnstat_table_fulls_total{cpu=\"0\",subsystem=\"arp_cache\"} 12\nnode_lnstat_table_fulls_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 251\nnode_lnstat_table_fulls_total{cpu=\"1\",subsystem=\"arp_cache\"} 24\nnode_lnstat_table_fulls_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 263\n# HELP node_lnstat_unresolved_discards_total linux network cache stats\n# TYPE node_lnstat_unresolved_discards_total counter\nnode_lnstat_unresolved_discards_total{cpu=\"0\",subsystem=\"arp_cache\"} 11\nnode_lnstat_unresolved_discards_total{cpu=\"0\",subsystem=\"ndisc_cache\"} 250\nnode_lnstat_unresolved_discards_total{cpu=\"1\",subsystem=\"arp_cache\"} 23\nnode_lnstat_unresolved_discards_total{cpu=\"1\",subsystem=\"ndisc_cache\"} 262\n# HELP node_load1 1m load average.\n# TYPE node_load1 gauge\nnode_load1 0.21\n# HELP node_load15 15m load average.\n# TYPE node_load15 gauge\nnode_load15 0.39\n# HELP node_load5 5m load average.\n# TYPE node_load5 gauge\nnode_load5 0.37\n# HELP node_md_blocks Total number of blocks on device.\n# TYPE node_md_blocks gauge\nnode_md_blocks{device=\"md0\"} 248896\nnode_md_blocks{device=\"md00\"} 4.186624e+06\nnode_md_blocks{device=\"md10\"} 3.14159265e+08\nnode_md_blocks{device=\"md101\"} 322560\nnode_md_blocks{device=\"md11\"} 4.190208e+06\nnode_md_blocks{device=\"md12\"} 3.886394368e+09\nnode_md_blocks{device=\"md120\"} 2.095104e+06\nnode_md_blocks{device=\"md126\"} 1.855870976e+09\nnode_md_blocks{device=\"md127\"} 3.12319552e+08\nnode_md_blocks{device=\"md201\"} 1.993728e+06\nnode_md_blocks{device=\"md219\"} 7932\nnode_md_blocks{device=\"md3\"} 5.853468288e+09\nnode_md_blocks{device=\"md4\"} 4.883648e+06\nnode_md_blocks{device=\"md6\"} 1.95310144e+08\nnode_md_blocks{device=\"md7\"} 7.813735424e+09\nnode_md_blocks{device=\"md8\"} 1.95310144e+08\nnode_md_blocks{device=\"md9\"} 523968\n# HELP node_md_blocks_synced Number of blocks synced on device.\n# TYPE node_md_blocks_synced gauge\nnode_md_blocks_synced{device=\"md0\"} 248896\nnode_md_blocks_synced{device=\"md00\"} 4.186624e+06\nnode_md_blocks_synced{device=\"md10\"} 3.14159265e+08\nnode_md_blocks_synced{device=\"md101\"} 322560\nnode_md_blocks_synced{device=\"md11\"} 0\nnode_md_blocks_synced{device=\"md12\"} 3.886394368e+09\nnode_md_blocks_synced{device=\"md120\"} 2.095104e+06\nnode_md_blocks_synced{device=\"md126\"} 1.855870976e+09\nnode_md_blocks_synced{device=\"md127\"} 3.12319552e+08\nnode_md_blocks_synced{device=\"md201\"} 114176\nnode_md_blocks_synced{device=\"md219\"} 7932\nnode_md_blocks_synced{device=\"md3\"} 5.853468288e+09\nnode_md_blocks_synced{device=\"md4\"} 4.883648e+06\nnode_md_blocks_synced{device=\"md6\"} 1.6775552e+07\nnode_md_blocks_synced{device=\"md7\"} 7.813735424e+09\nnode_md_blocks_synced{device=\"md8\"} 1.6775552e+07\nnode_md_blocks_synced{device=\"md9\"} 0\n# HELP node_md_degraded Number of degraded disks on device.\n# TYPE node_md_degraded gauge\nnode_md_degraded{device=\"md0\"} 0\nnode_md_degraded{device=\"md1\"} 0\nnode_md_degraded{device=\"md10\"} 0\nnode_md_degraded{device=\"md4\"} 0\nnode_md_degraded{device=\"md5\"} 1\nnode_md_degraded{device=\"md6\"} 1\n# HELP node_md_disks Number of active/failed/spare disks of device.\n# TYPE node_md_disks gauge\nnode_md_disks{device=\"md0\",state=\"active\"} 2\nnode_md_disks{device=\"md0\",state=\"failed\"} 0\nnode_md_disks{device=\"md0\",state=\"spare\"} 0\nnode_md_disks{device=\"md00\",state=\"active\"} 1\nnode_md_disks{device=\"md00\",state=\"failed\"} 0\nnode_md_disks{device=\"md00\",state=\"spare\"} 0\nnode_md_disks{device=\"md10\",state=\"active\"} 2\nnode_md_disks{device=\"md10\",state=\"failed\"} 0\nnode_md_disks{device=\"md10\",state=\"spare\"} 0\nnode_md_disks{device=\"md101\",state=\"active\"} 3\nnode_md_disks{device=\"md101\",state=\"failed\"} 0\nnode_md_disks{device=\"md101\",state=\"spare\"} 0\nnode_md_disks{device=\"md11\",state=\"active\"} 2\nnode_md_disks{device=\"md11\",state=\"failed\"} 1\nnode_md_disks{device=\"md11\",state=\"spare\"} 2\nnode_md_disks{device=\"md12\",state=\"active\"} 2\nnode_md_disks{device=\"md12\",state=\"failed\"} 0\nnode_md_disks{device=\"md12\",state=\"spare\"} 0\nnode_md_disks{device=\"md120\",state=\"active\"} 2\nnode_md_disks{device=\"md120\",state=\"failed\"} 0\nnode_md_disks{device=\"md120\",state=\"spare\"} 0\nnode_md_disks{device=\"md126\",state=\"active\"} 2\nnode_md_disks{device=\"md126\",state=\"failed\"} 0\nnode_md_disks{device=\"md126\",state=\"spare\"} 0\nnode_md_disks{device=\"md127\",state=\"active\"} 2\nnode_md_disks{device=\"md127\",state=\"failed\"} 0\nnode_md_disks{device=\"md127\",state=\"spare\"} 0\nnode_md_disks{device=\"md201\",state=\"active\"} 2\nnode_md_disks{device=\"md201\",state=\"failed\"} 0\nnode_md_disks{device=\"md201\",state=\"spare\"} 0\nnode_md_disks{device=\"md219\",state=\"active\"} 0\nnode_md_disks{device=\"md219\",state=\"failed\"} 0\nnode_md_disks{device=\"md219\",state=\"spare\"} 3\nnode_md_disks{device=\"md3\",state=\"active\"} 8\nnode_md_disks{device=\"md3\",state=\"failed\"} 0\nnode_md_disks{device=\"md3\",state=\"spare\"} 2\nnode_md_disks{device=\"md4\",state=\"active\"} 0\nnode_md_disks{device=\"md4\",state=\"failed\"} 1\nnode_md_disks{device=\"md4\",state=\"spare\"} 1\nnode_md_disks{device=\"md6\",state=\"active\"} 1\nnode_md_disks{device=\"md6\",state=\"failed\"} 1\nnode_md_disks{device=\"md6\",state=\"spare\"} 1\nnode_md_disks{device=\"md7\",state=\"active\"} 3\nnode_md_disks{device=\"md7\",state=\"failed\"} 1\nnode_md_disks{device=\"md7\",state=\"spare\"} 0\nnode_md_disks{device=\"md8\",state=\"active\"} 2\nnode_md_disks{device=\"md8\",state=\"failed\"} 0\nnode_md_disks{device=\"md8\",state=\"spare\"} 2\nnode_md_disks{device=\"md9\",state=\"active\"} 4\nnode_md_disks{device=\"md9\",state=\"failed\"} 2\nnode_md_disks{device=\"md9\",state=\"spare\"} 1\n# HELP node_md_disks_required Total number of disks of device.\n# TYPE node_md_disks_required gauge\nnode_md_disks_required{device=\"md0\"} 2\nnode_md_disks_required{device=\"md00\"} 1\nnode_md_disks_required{device=\"md10\"} 2\nnode_md_disks_required{device=\"md101\"} 3\nnode_md_disks_required{device=\"md11\"} 2\nnode_md_disks_required{device=\"md12\"} 2\nnode_md_disks_required{device=\"md120\"} 2\nnode_md_disks_required{device=\"md126\"} 2\nnode_md_disks_required{device=\"md127\"} 2\nnode_md_disks_required{device=\"md201\"} 2\nnode_md_disks_required{device=\"md219\"} 0\nnode_md_disks_required{device=\"md3\"} 8\nnode_md_disks_required{device=\"md4\"} 0\nnode_md_disks_required{device=\"md6\"} 2\nnode_md_disks_required{device=\"md7\"} 4\nnode_md_disks_required{device=\"md8\"} 2\nnode_md_disks_required{device=\"md9\"} 4\n# HELP node_md_raid_disks Number of raid disks on device.\n# TYPE node_md_raid_disks gauge\nnode_md_raid_disks{device=\"md0\"} 2\nnode_md_raid_disks{device=\"md1\"} 2\nnode_md_raid_disks{device=\"md10\"} 4\nnode_md_raid_disks{device=\"md4\"} 3\nnode_md_raid_disks{device=\"md5\"} 3\nnode_md_raid_disks{device=\"md6\"} 4\n# HELP node_md_state Indicates the state of md-device.\n# TYPE node_md_state gauge\nnode_md_state{device=\"md0\",state=\"active\"} 1\nnode_md_state{device=\"md0\",state=\"check\"} 0\nnode_md_state{device=\"md0\",state=\"inactive\"} 0\nnode_md_state{device=\"md0\",state=\"recovering\"} 0\nnode_md_state{device=\"md0\",state=\"resync\"} 0\nnode_md_state{device=\"md00\",state=\"active\"} 1\nnode_md_state{device=\"md00\",state=\"check\"} 0\nnode_md_state{device=\"md00\",state=\"inactive\"} 0\nnode_md_state{device=\"md00\",state=\"recovering\"} 0\nnode_md_state{device=\"md00\",state=\"resync\"} 0\nnode_md_state{device=\"md10\",state=\"active\"} 1\nnode_md_state{device=\"md10\",state=\"check\"} 0\nnode_md_state{device=\"md10\",state=\"inactive\"} 0\nnode_md_state{device=\"md10\",state=\"recovering\"} 0\nnode_md_state{device=\"md10\",state=\"resync\"} 0\nnode_md_state{device=\"md101\",state=\"active\"} 1\nnode_md_state{device=\"md101\",state=\"check\"} 0\nnode_md_state{device=\"md101\",state=\"inactive\"} 0\nnode_md_state{device=\"md101\",state=\"recovering\"} 0\nnode_md_state{device=\"md101\",state=\"resync\"} 0\nnode_md_state{device=\"md11\",state=\"active\"} 0\nnode_md_state{device=\"md11\",state=\"check\"} 0\nnode_md_state{device=\"md11\",state=\"inactive\"} 0\nnode_md_state{device=\"md11\",state=\"recovering\"} 0\nnode_md_state{device=\"md11\",state=\"resync\"} 1\nnode_md_state{device=\"md12\",state=\"active\"} 1\nnode_md_state{device=\"md12\",state=\"check\"} 0\nnode_md_state{device=\"md12\",state=\"inactive\"} 0\nnode_md_state{device=\"md12\",state=\"recovering\"} 0\nnode_md_state{device=\"md12\",state=\"resync\"} 0\nnode_md_state{device=\"md120\",state=\"active\"} 1\nnode_md_state{device=\"md120\",state=\"check\"} 0\nnode_md_state{device=\"md120\",state=\"inactive\"} 0\nnode_md_state{device=\"md120\",state=\"recovering\"} 0\nnode_md_state{device=\"md120\",state=\"resync\"} 0\nnode_md_state{device=\"md126\",state=\"active\"} 1\nnode_md_state{device=\"md126\",state=\"check\"} 0\nnode_md_state{device=\"md126\",state=\"inactive\"} 0\nnode_md_state{device=\"md126\",state=\"recovering\"} 0\nnode_md_state{device=\"md126\",state=\"resync\"} 0\nnode_md_state{device=\"md127\",state=\"active\"} 1\nnode_md_state{device=\"md127\",state=\"check\"} 0\nnode_md_state{device=\"md127\",state=\"inactive\"} 0\nnode_md_state{device=\"md127\",state=\"recovering\"} 0\nnode_md_state{device=\"md127\",state=\"resync\"} 0\nnode_md_state{device=\"md201\",state=\"active\"} 0\nnode_md_state{device=\"md201\",state=\"check\"} 1\nnode_md_state{device=\"md201\",state=\"inactive\"} 0\nnode_md_state{device=\"md201\",state=\"recovering\"} 0\nnode_md_state{device=\"md201\",state=\"resync\"} 0\nnode_md_state{device=\"md219\",state=\"active\"} 0\nnode_md_state{device=\"md219\",state=\"check\"} 0\nnode_md_state{device=\"md219\",state=\"inactive\"} 1\nnode_md_state{device=\"md219\",state=\"recovering\"} 0\nnode_md_state{device=\"md219\",state=\"resync\"} 0\nnode_md_state{device=\"md3\",state=\"active\"} 1\nnode_md_state{device=\"md3\",state=\"check\"} 0\nnode_md_state{device=\"md3\",state=\"inactive\"} 0\nnode_md_state{device=\"md3\",state=\"recovering\"} 0\nnode_md_state{device=\"md3\",state=\"resync\"} 0\nnode_md_state{device=\"md4\",state=\"active\"} 0\nnode_md_state{device=\"md4\",state=\"check\"} 0\nnode_md_state{device=\"md4\",state=\"inactive\"} 1\nnode_md_state{device=\"md4\",state=\"recovering\"} 0\nnode_md_state{device=\"md4\",state=\"resync\"} 0\nnode_md_state{device=\"md6\",state=\"active\"} 0\nnode_md_state{device=\"md6\",state=\"check\"} 0\nnode_md_state{device=\"md6\",state=\"inactive\"} 0\nnode_md_state{device=\"md6\",state=\"recovering\"} 1\nnode_md_state{device=\"md6\",state=\"resync\"} 0\nnode_md_state{device=\"md7\",state=\"active\"} 1\nnode_md_state{device=\"md7\",state=\"check\"} 0\nnode_md_state{device=\"md7\",state=\"inactive\"} 0\nnode_md_state{device=\"md7\",state=\"recovering\"} 0\nnode_md_state{device=\"md7\",state=\"resync\"} 0\nnode_md_state{device=\"md8\",state=\"active\"} 0\nnode_md_state{device=\"md8\",state=\"check\"} 0\nnode_md_state{device=\"md8\",state=\"inactive\"} 0\nnode_md_state{device=\"md8\",state=\"recovering\"} 0\nnode_md_state{device=\"md8\",state=\"resync\"} 1\nnode_md_state{device=\"md9\",state=\"active\"} 0\nnode_md_state{device=\"md9\",state=\"check\"} 0\nnode_md_state{device=\"md9\",state=\"inactive\"} 0\nnode_md_state{device=\"md9\",state=\"recovering\"} 0\nnode_md_state{device=\"md9\",state=\"resync\"} 1\n# HELP node_memory_Active_anon_bytes Memory information field Active_anon_bytes.\n# TYPE node_memory_Active_anon_bytes gauge\nnode_memory_Active_anon_bytes 2.068484096e+09\n# HELP node_memory_Active_bytes Memory information field Active_bytes.\n# TYPE node_memory_Active_bytes gauge\nnode_memory_Active_bytes 2.287017984e+09\n# HELP node_memory_Active_file_bytes Memory information field Active_file_bytes.\n# TYPE node_memory_Active_file_bytes gauge\nnode_memory_Active_file_bytes 2.18533888e+08\n# HELP node_memory_AnonHugePages_bytes Memory information field AnonHugePages_bytes.\n# TYPE node_memory_AnonHugePages_bytes gauge\nnode_memory_AnonHugePages_bytes 0\n# HELP node_memory_AnonPages_bytes Memory information field AnonPages_bytes.\n# TYPE node_memory_AnonPages_bytes gauge\nnode_memory_AnonPages_bytes 2.298032128e+09\n# HELP node_memory_Bounce_bytes Memory information field Bounce_bytes.\n# TYPE node_memory_Bounce_bytes gauge\nnode_memory_Bounce_bytes 0\n# HELP node_memory_Buffers_bytes Memory information field Buffers_bytes.\n# TYPE node_memory_Buffers_bytes gauge\nnode_memory_Buffers_bytes 2.256896e+07\n# HELP node_memory_Cached_bytes Memory information field Cached_bytes.\n# TYPE node_memory_Cached_bytes gauge\nnode_memory_Cached_bytes 9.53229312e+08\n# HELP node_memory_CommitLimit_bytes Memory information field CommitLimit_bytes.\n# TYPE node_memory_CommitLimit_bytes gauge\nnode_memory_CommitLimit_bytes 6.210940928e+09\n# HELP node_memory_Committed_AS_bytes Memory information field Committed_AS_bytes.\n# TYPE node_memory_Committed_AS_bytes gauge\nnode_memory_Committed_AS_bytes 8.023486464e+09\n# HELP node_memory_DirectMap2M_bytes Memory information field DirectMap2M_bytes.\n# TYPE node_memory_DirectMap2M_bytes gauge\nnode_memory_DirectMap2M_bytes 3.787456512e+09\n# HELP node_memory_DirectMap4k_bytes Memory information field DirectMap4k_bytes.\n# TYPE node_memory_DirectMap4k_bytes gauge\nnode_memory_DirectMap4k_bytes 1.9011584e+08\n# HELP node_memory_Dirty_bytes Memory information field Dirty_bytes.\n# TYPE node_memory_Dirty_bytes gauge\nnode_memory_Dirty_bytes 1.077248e+06\n# HELP node_memory_HardwareCorrupted_bytes Memory information field HardwareCorrupted_bytes.\n# TYPE node_memory_HardwareCorrupted_bytes gauge\nnode_memory_HardwareCorrupted_bytes 0\n# HELP node_memory_HugePages_Free Memory information field HugePages_Free.\n# TYPE node_memory_HugePages_Free gauge\nnode_memory_HugePages_Free 0\n# HELP node_memory_HugePages_Rsvd Memory information field HugePages_Rsvd.\n# TYPE node_memory_HugePages_Rsvd gauge\nnode_memory_HugePages_Rsvd 0\n# HELP node_memory_HugePages_Surp Memory information field HugePages_Surp.\n# TYPE node_memory_HugePages_Surp gauge\nnode_memory_HugePages_Surp 0\n# HELP node_memory_HugePages_Total Memory information field HugePages_Total.\n# TYPE node_memory_HugePages_Total gauge\nnode_memory_HugePages_Total 0\n# HELP node_memory_Hugepagesize_bytes Memory information field Hugepagesize_bytes.\n# TYPE node_memory_Hugepagesize_bytes gauge\nnode_memory_Hugepagesize_bytes 2.097152e+06\n# HELP node_memory_Inactive_anon_bytes Memory information field Inactive_anon_bytes.\n# TYPE node_memory_Inactive_anon_bytes gauge\nnode_memory_Inactive_anon_bytes 9.04245248e+08\n# HELP node_memory_Inactive_bytes Memory information field Inactive_bytes.\n# TYPE node_memory_Inactive_bytes gauge\nnode_memory_Inactive_bytes 1.053417472e+09\n# HELP node_memory_Inactive_file_bytes Memory information field Inactive_file_bytes.\n# TYPE node_memory_Inactive_file_bytes gauge\nnode_memory_Inactive_file_bytes 1.49172224e+08\n# HELP node_memory_KernelStack_bytes Memory information field KernelStack_bytes.\n# TYPE node_memory_KernelStack_bytes gauge\nnode_memory_KernelStack_bytes 5.9392e+06\n# HELP node_memory_Mapped_bytes Memory information field Mapped_bytes.\n# TYPE node_memory_Mapped_bytes gauge\nnode_memory_Mapped_bytes 2.4496128e+08\n# HELP node_memory_MemFree_bytes Memory information field MemFree_bytes.\n# TYPE node_memory_MemFree_bytes gauge\nnode_memory_MemFree_bytes 2.30883328e+08\n# HELP node_memory_MemTotal_bytes Memory information field MemTotal_bytes.\n# TYPE node_memory_MemTotal_bytes gauge\nnode_memory_MemTotal_bytes 3.831959552e+09\n# HELP node_memory_Mlocked_bytes Memory information field Mlocked_bytes.\n# TYPE node_memory_Mlocked_bytes gauge\nnode_memory_Mlocked_bytes 32768\n# HELP node_memory_NFS_Unstable_bytes Memory information field NFS_Unstable_bytes.\n# TYPE node_memory_NFS_Unstable_bytes gauge\nnode_memory_NFS_Unstable_bytes 0\n# HELP node_memory_PageTables_bytes Memory information field PageTables_bytes.\n# TYPE node_memory_PageTables_bytes gauge\nnode_memory_PageTables_bytes 7.7017088e+07\n# HELP node_memory_SReclaimable_bytes Memory information field SReclaimable_bytes.\n# TYPE node_memory_SReclaimable_bytes gauge\nnode_memory_SReclaimable_bytes 4.5846528e+07\n# HELP node_memory_SUnreclaim_bytes Memory information field SUnreclaim_bytes.\n# TYPE node_memory_SUnreclaim_bytes gauge\nnode_memory_SUnreclaim_bytes 5.545984e+07\n# HELP node_memory_Shmem_bytes Memory information field Shmem_bytes.\n# TYPE node_memory_Shmem_bytes gauge\nnode_memory_Shmem_bytes 6.0809216e+08\n# HELP node_memory_Slab_bytes Memory information field Slab_bytes.\n# TYPE node_memory_Slab_bytes gauge\nnode_memory_Slab_bytes 1.01306368e+08\n# HELP node_memory_SwapCached_bytes Memory information field SwapCached_bytes.\n# TYPE node_memory_SwapCached_bytes gauge\nnode_memory_SwapCached_bytes 1.97124096e+08\n# HELP node_memory_SwapFree_bytes Memory information field SwapFree_bytes.\n# TYPE node_memory_SwapFree_bytes gauge\nnode_memory_SwapFree_bytes 3.23108864e+09\n# HELP node_memory_SwapTotal_bytes Memory information field SwapTotal_bytes.\n# TYPE node_memory_SwapTotal_bytes gauge\nnode_memory_SwapTotal_bytes 4.2949632e+09\n# HELP node_memory_Unevictable_bytes Memory information field Unevictable_bytes.\n# TYPE node_memory_Unevictable_bytes gauge\nnode_memory_Unevictable_bytes 32768\n# HELP node_memory_VmallocChunk_bytes Memory information field VmallocChunk_bytes.\n# TYPE node_memory_VmallocChunk_bytes gauge\nnode_memory_VmallocChunk_bytes 3.5183963009024e+13\n# HELP node_memory_VmallocTotal_bytes Memory information field VmallocTotal_bytes.\n# TYPE node_memory_VmallocTotal_bytes gauge\nnode_memory_VmallocTotal_bytes 3.5184372087808e+13\n# HELP node_memory_VmallocUsed_bytes Memory information field VmallocUsed_bytes.\n# TYPE node_memory_VmallocUsed_bytes gauge\nnode_memory_VmallocUsed_bytes 3.6130816e+08\n# HELP node_memory_WritebackTmp_bytes Memory information field WritebackTmp_bytes.\n# TYPE node_memory_WritebackTmp_bytes gauge\nnode_memory_WritebackTmp_bytes 0\n# HELP node_memory_Writeback_bytes Memory information field Writeback_bytes.\n# TYPE node_memory_Writeback_bytes gauge\nnode_memory_Writeback_bytes 0\n# HELP node_memory_numa_Active Memory information field Active.\n# TYPE node_memory_numa_Active gauge\nnode_memory_numa_Active{node=\"0\"} 5.58733312e+09\nnode_memory_numa_Active{node=\"1\"} 5.739003904e+09\nnode_memory_numa_Active{node=\"2\"} 5.739003904e+09\n# HELP node_memory_numa_Active_anon Memory information field Active_anon.\n# TYPE node_memory_numa_Active_anon gauge\nnode_memory_numa_Active_anon{node=\"0\"} 7.07915776e+08\nnode_memory_numa_Active_anon{node=\"1\"} 6.04635136e+08\nnode_memory_numa_Active_anon{node=\"2\"} 6.04635136e+08\n# HELP node_memory_numa_Active_file Memory information field Active_file.\n# TYPE node_memory_numa_Active_file gauge\nnode_memory_numa_Active_file{node=\"0\"} 4.879417344e+09\nnode_memory_numa_Active_file{node=\"1\"} 5.134368768e+09\nnode_memory_numa_Active_file{node=\"2\"} 5.134368768e+09\n# HELP node_memory_numa_AnonHugePages Memory information field AnonHugePages.\n# TYPE node_memory_numa_AnonHugePages gauge\nnode_memory_numa_AnonHugePages{node=\"0\"} 1.50994944e+08\nnode_memory_numa_AnonHugePages{node=\"1\"} 9.2274688e+07\nnode_memory_numa_AnonHugePages{node=\"2\"} 9.2274688e+07\n# HELP node_memory_numa_AnonPages Memory information field AnonPages.\n# TYPE node_memory_numa_AnonPages gauge\nnode_memory_numa_AnonPages{node=\"0\"} 8.07112704e+08\nnode_memory_numa_AnonPages{node=\"1\"} 6.88058368e+08\nnode_memory_numa_AnonPages{node=\"2\"} 6.88058368e+08\n# HELP node_memory_numa_Bounce Memory information field Bounce.\n# TYPE node_memory_numa_Bounce gauge\nnode_memory_numa_Bounce{node=\"0\"} 0\nnode_memory_numa_Bounce{node=\"1\"} 0\nnode_memory_numa_Bounce{node=\"2\"} 0\n# HELP node_memory_numa_Dirty Memory information field Dirty.\n# TYPE node_memory_numa_Dirty gauge\nnode_memory_numa_Dirty{node=\"0\"} 20480\nnode_memory_numa_Dirty{node=\"1\"} 122880\nnode_memory_numa_Dirty{node=\"2\"} 122880\n# HELP node_memory_numa_FilePages Memory information field FilePages.\n# TYPE node_memory_numa_FilePages gauge\nnode_memory_numa_FilePages{node=\"0\"} 7.1855017984e+10\nnode_memory_numa_FilePages{node=\"1\"} 8.5585088512e+10\nnode_memory_numa_FilePages{node=\"2\"} 8.5585088512e+10\n# HELP node_memory_numa_HugePages_Free Memory information field HugePages_Free.\n# TYPE node_memory_numa_HugePages_Free gauge\nnode_memory_numa_HugePages_Free{node=\"0\"} 0\nnode_memory_numa_HugePages_Free{node=\"1\"} 0\nnode_memory_numa_HugePages_Free{node=\"2\"} 0\n# HELP node_memory_numa_HugePages_Surp Memory information field HugePages_Surp.\n# TYPE node_memory_numa_HugePages_Surp gauge\nnode_memory_numa_HugePages_Surp{node=\"0\"} 0\nnode_memory_numa_HugePages_Surp{node=\"1\"} 0\nnode_memory_numa_HugePages_Surp{node=\"2\"} 0\n# HELP node_memory_numa_HugePages_Total Memory information field HugePages_Total.\n# TYPE node_memory_numa_HugePages_Total gauge\nnode_memory_numa_HugePages_Total{node=\"0\"} 0\nnode_memory_numa_HugePages_Total{node=\"1\"} 0\nnode_memory_numa_HugePages_Total{node=\"2\"} 0\n# HELP node_memory_numa_Inactive Memory information field Inactive.\n# TYPE node_memory_numa_Inactive gauge\nnode_memory_numa_Inactive{node=\"0\"} 6.0569788416e+10\nnode_memory_numa_Inactive{node=\"1\"} 7.3165406208e+10\nnode_memory_numa_Inactive{node=\"2\"} 7.3165406208e+10\n# HELP node_memory_numa_Inactive_anon Memory information field Inactive_anon.\n# TYPE node_memory_numa_Inactive_anon gauge\nnode_memory_numa_Inactive_anon{node=\"0\"} 3.48626944e+08\nnode_memory_numa_Inactive_anon{node=\"1\"} 2.91930112e+08\nnode_memory_numa_Inactive_anon{node=\"2\"} 2.91930112e+08\n# HELP node_memory_numa_Inactive_file Memory information field Inactive_file.\n# TYPE node_memory_numa_Inactive_file gauge\nnode_memory_numa_Inactive_file{node=\"0\"} 6.0221161472e+10\nnode_memory_numa_Inactive_file{node=\"1\"} 7.2873476096e+10\nnode_memory_numa_Inactive_file{node=\"2\"} 7.2873476096e+10\n# HELP node_memory_numa_KernelStack Memory information field KernelStack.\n# TYPE node_memory_numa_KernelStack gauge\nnode_memory_numa_KernelStack{node=\"0\"} 3.4832384e+07\nnode_memory_numa_KernelStack{node=\"1\"} 3.1850496e+07\nnode_memory_numa_KernelStack{node=\"2\"} 3.1850496e+07\n# HELP node_memory_numa_Mapped Memory information field Mapped.\n# TYPE node_memory_numa_Mapped gauge\nnode_memory_numa_Mapped{node=\"0\"} 9.1570176e+08\nnode_memory_numa_Mapped{node=\"1\"} 8.84850688e+08\nnode_memory_numa_Mapped{node=\"2\"} 8.84850688e+08\n# HELP node_memory_numa_MemFree Memory information field MemFree.\n# TYPE node_memory_numa_MemFree gauge\nnode_memory_numa_MemFree{node=\"0\"} 5.4303100928e+10\nnode_memory_numa_MemFree{node=\"1\"} 4.0586022912e+10\nnode_memory_numa_MemFree{node=\"2\"} 4.0586022912e+10\n# HELP node_memory_numa_MemTotal Memory information field MemTotal.\n# TYPE node_memory_numa_MemTotal gauge\nnode_memory_numa_MemTotal{node=\"0\"} 1.3740271616e+11\nnode_memory_numa_MemTotal{node=\"1\"} 1.37438953472e+11\nnode_memory_numa_MemTotal{node=\"2\"} 1.37438953472e+11\n# HELP node_memory_numa_MemUsed Memory information field MemUsed.\n# TYPE node_memory_numa_MemUsed gauge\nnode_memory_numa_MemUsed{node=\"0\"} 8.3099615232e+10\nnode_memory_numa_MemUsed{node=\"1\"} 9.685293056e+10\nnode_memory_numa_MemUsed{node=\"2\"} 9.685293056e+10\n# HELP node_memory_numa_Mlocked Memory information field Mlocked.\n# TYPE node_memory_numa_Mlocked gauge\nnode_memory_numa_Mlocked{node=\"0\"} 0\nnode_memory_numa_Mlocked{node=\"1\"} 0\nnode_memory_numa_Mlocked{node=\"2\"} 0\n# HELP node_memory_numa_NFS_Unstable Memory information field NFS_Unstable.\n# TYPE node_memory_numa_NFS_Unstable gauge\nnode_memory_numa_NFS_Unstable{node=\"0\"} 0\nnode_memory_numa_NFS_Unstable{node=\"1\"} 0\nnode_memory_numa_NFS_Unstable{node=\"2\"} 0\n# HELP node_memory_numa_PageTables Memory information field PageTables.\n# TYPE node_memory_numa_PageTables gauge\nnode_memory_numa_PageTables{node=\"0\"} 1.46743296e+08\nnode_memory_numa_PageTables{node=\"1\"} 1.27254528e+08\nnode_memory_numa_PageTables{node=\"2\"} 1.27254528e+08\n# HELP node_memory_numa_SReclaimable Memory information field SReclaimable.\n# TYPE node_memory_numa_SReclaimable gauge\nnode_memory_numa_SReclaimable{node=\"0\"} 4.580478976e+09\nnode_memory_numa_SReclaimable{node=\"1\"} 4.724822016e+09\nnode_memory_numa_SReclaimable{node=\"2\"} 4.724822016e+09\n# HELP node_memory_numa_SUnreclaim Memory information field SUnreclaim.\n# TYPE node_memory_numa_SUnreclaim gauge\nnode_memory_numa_SUnreclaim{node=\"0\"} 2.23352832e+09\nnode_memory_numa_SUnreclaim{node=\"1\"} 2.464391168e+09\nnode_memory_numa_SUnreclaim{node=\"2\"} 2.464391168e+09\n# HELP node_memory_numa_Shmem Memory information field Shmem.\n# TYPE node_memory_numa_Shmem gauge\nnode_memory_numa_Shmem{node=\"0\"} 4.900864e+07\nnode_memory_numa_Shmem{node=\"1\"} 8.968192e+07\nnode_memory_numa_Shmem{node=\"2\"} 8.968192e+07\n# HELP node_memory_numa_Slab Memory information field Slab.\n# TYPE node_memory_numa_Slab gauge\nnode_memory_numa_Slab{node=\"0\"} 6.814007296e+09\nnode_memory_numa_Slab{node=\"1\"} 7.189213184e+09\nnode_memory_numa_Slab{node=\"2\"} 7.189213184e+09\n# HELP node_memory_numa_Unevictable Memory information field Unevictable.\n# TYPE node_memory_numa_Unevictable gauge\nnode_memory_numa_Unevictable{node=\"0\"} 0\nnode_memory_numa_Unevictable{node=\"1\"} 0\nnode_memory_numa_Unevictable{node=\"2\"} 0\n# HELP node_memory_numa_Writeback Memory information field Writeback.\n# TYPE node_memory_numa_Writeback gauge\nnode_memory_numa_Writeback{node=\"0\"} 0\nnode_memory_numa_Writeback{node=\"1\"} 0\nnode_memory_numa_Writeback{node=\"2\"} 0\n# HELP node_memory_numa_WritebackTmp Memory information field WritebackTmp.\n# TYPE node_memory_numa_WritebackTmp gauge\nnode_memory_numa_WritebackTmp{node=\"0\"} 0\nnode_memory_numa_WritebackTmp{node=\"1\"} 0\nnode_memory_numa_WritebackTmp{node=\"2\"} 0\n# HELP node_memory_numa_interleave_hit_total Memory information field interleave_hit_total.\n# TYPE node_memory_numa_interleave_hit_total counter\nnode_memory_numa_interleave_hit_total{node=\"0\"} 57146\nnode_memory_numa_interleave_hit_total{node=\"1\"} 57286\nnode_memory_numa_interleave_hit_total{node=\"2\"} 7286\n# HELP node_memory_numa_local_node_total Memory information field local_node_total.\n# TYPE node_memory_numa_local_node_total counter\nnode_memory_numa_local_node_total{node=\"0\"} 1.93454780853e+11\nnode_memory_numa_local_node_total{node=\"1\"} 3.2671904655e+11\nnode_memory_numa_local_node_total{node=\"2\"} 2.671904655e+10\n# HELP node_memory_numa_numa_foreign_total Memory information field numa_foreign_total.\n# TYPE node_memory_numa_numa_foreign_total counter\nnode_memory_numa_numa_foreign_total{node=\"0\"} 5.98586233e+10\nnode_memory_numa_numa_foreign_total{node=\"1\"} 1.2624528e+07\nnode_memory_numa_numa_foreign_total{node=\"2\"} 2.624528e+06\n# HELP node_memory_numa_numa_hit_total Memory information field numa_hit_total.\n# TYPE node_memory_numa_numa_hit_total counter\nnode_memory_numa_numa_hit_total{node=\"0\"} 1.93460335812e+11\nnode_memory_numa_numa_hit_total{node=\"1\"} 3.26720946761e+11\nnode_memory_numa_numa_hit_total{node=\"2\"} 2.6720946761e+10\n# HELP node_memory_numa_numa_miss_total Memory information field numa_miss_total.\n# TYPE node_memory_numa_numa_miss_total counter\nnode_memory_numa_numa_miss_total{node=\"0\"} 1.2624528e+07\nnode_memory_numa_numa_miss_total{node=\"1\"} 5.9858626709e+10\nnode_memory_numa_numa_miss_total{node=\"2\"} 9.858626709e+09\n# HELP node_memory_numa_other_node_total Memory information field other_node_total.\n# TYPE node_memory_numa_other_node_total counter\nnode_memory_numa_other_node_total{node=\"0\"} 1.8179487e+07\nnode_memory_numa_other_node_total{node=\"1\"} 5.986052692e+10\nnode_memory_numa_other_node_total{node=\"2\"} 9.86052692e+09\n# HELP node_mountstats_nfs_age_seconds_total The age of the NFS mount in seconds.\n# TYPE node_mountstats_nfs_age_seconds_total counter\nnode_mountstats_nfs_age_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 13968\nnode_mountstats_nfs_age_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 13968\n# HELP node_mountstats_nfs_direct_read_bytes_total Number of bytes read using the read() syscall in O_DIRECT mode.\n# TYPE node_mountstats_nfs_direct_read_bytes_total counter\nnode_mountstats_nfs_direct_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_direct_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_direct_write_bytes_total Number of bytes written using the write() syscall in O_DIRECT mode.\n# TYPE node_mountstats_nfs_direct_write_bytes_total counter\nnode_mountstats_nfs_direct_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_direct_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_attribute_invalidate_total Number of times cached inode attributes are invalidated.\n# TYPE node_mountstats_nfs_event_attribute_invalidate_total counter\nnode_mountstats_nfs_event_attribute_invalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_attribute_invalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_data_invalidate_total Number of times an inode cache is cleared.\n# TYPE node_mountstats_nfs_event_data_invalidate_total counter\nnode_mountstats_nfs_event_data_invalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_data_invalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_dnode_revalidate_total Number of times cached dentry nodes are re-validated from the server.\n# TYPE node_mountstats_nfs_event_dnode_revalidate_total counter\nnode_mountstats_nfs_event_dnode_revalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 226\nnode_mountstats_nfs_event_dnode_revalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 226\n# HELP node_mountstats_nfs_event_inode_revalidate_total Number of times cached inode attributes are re-validated from the server.\n# TYPE node_mountstats_nfs_event_inode_revalidate_total counter\nnode_mountstats_nfs_event_inode_revalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 52\nnode_mountstats_nfs_event_inode_revalidate_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 52\n# HELP node_mountstats_nfs_event_jukebox_delay_total Number of times the NFS server indicated EJUKEBOX; retrieving data from offline storage.\n# TYPE node_mountstats_nfs_event_jukebox_delay_total counter\nnode_mountstats_nfs_event_jukebox_delay_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_jukebox_delay_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_pnfs_read_total Number of NFS v4.1+ pNFS reads.\n# TYPE node_mountstats_nfs_event_pnfs_read_total counter\nnode_mountstats_nfs_event_pnfs_read_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_pnfs_read_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_pnfs_write_total Number of NFS v4.1+ pNFS writes.\n# TYPE node_mountstats_nfs_event_pnfs_write_total counter\nnode_mountstats_nfs_event_pnfs_write_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_pnfs_write_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_short_read_total Number of times the NFS server gave less data than expected while reading.\n# TYPE node_mountstats_nfs_event_short_read_total counter\nnode_mountstats_nfs_event_short_read_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_short_read_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_short_write_total Number of times the NFS server wrote less data than expected while writing.\n# TYPE node_mountstats_nfs_event_short_write_total counter\nnode_mountstats_nfs_event_short_write_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_short_write_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_silly_rename_total Number of times a file was removed while still open by another process.\n# TYPE node_mountstats_nfs_event_silly_rename_total counter\nnode_mountstats_nfs_event_silly_rename_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_silly_rename_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_truncation_total Number of times files have been truncated.\n# TYPE node_mountstats_nfs_event_truncation_total counter\nnode_mountstats_nfs_event_truncation_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_truncation_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_access_total Number of times permissions have been checked.\n# TYPE node_mountstats_nfs_event_vfs_access_total counter\nnode_mountstats_nfs_event_vfs_access_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 398\nnode_mountstats_nfs_event_vfs_access_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 398\n# HELP node_mountstats_nfs_event_vfs_file_release_total Number of times files have been closed and released.\n# TYPE node_mountstats_nfs_event_vfs_file_release_total counter\nnode_mountstats_nfs_event_vfs_file_release_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 77\nnode_mountstats_nfs_event_vfs_file_release_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 77\n# HELP node_mountstats_nfs_event_vfs_flush_total Number of pending writes that have been forcefully flushed to the server.\n# TYPE node_mountstats_nfs_event_vfs_flush_total counter\nnode_mountstats_nfs_event_vfs_flush_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 77\nnode_mountstats_nfs_event_vfs_flush_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 77\n# HELP node_mountstats_nfs_event_vfs_fsync_total Number of times fsync() has been called on directories and files.\n# TYPE node_mountstats_nfs_event_vfs_fsync_total counter\nnode_mountstats_nfs_event_vfs_fsync_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_fsync_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_getdents_total Number of times directory entries have been read with getdents().\n# TYPE node_mountstats_nfs_event_vfs_getdents_total counter\nnode_mountstats_nfs_event_vfs_getdents_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_getdents_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_lock_total Number of times locking has been attempted on a file.\n# TYPE node_mountstats_nfs_event_vfs_lock_total counter\nnode_mountstats_nfs_event_vfs_lock_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_lock_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_lookup_total Number of times a directory lookup has occurred.\n# TYPE node_mountstats_nfs_event_vfs_lookup_total counter\nnode_mountstats_nfs_event_vfs_lookup_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 13\nnode_mountstats_nfs_event_vfs_lookup_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 13\n# HELP node_mountstats_nfs_event_vfs_open_total Number of times cached inode attributes are invalidated.\n# TYPE node_mountstats_nfs_event_vfs_open_total counter\nnode_mountstats_nfs_event_vfs_open_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 1\nnode_mountstats_nfs_event_vfs_open_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 1\n# HELP node_mountstats_nfs_event_vfs_read_page_total Number of pages read directly via mmap()'d files.\n# TYPE node_mountstats_nfs_event_vfs_read_page_total counter\nnode_mountstats_nfs_event_vfs_read_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_read_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_read_pages_total Number of times a group of pages have been read.\n# TYPE node_mountstats_nfs_event_vfs_read_pages_total counter\nnode_mountstats_nfs_event_vfs_read_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 331\nnode_mountstats_nfs_event_vfs_read_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 331\n# HELP node_mountstats_nfs_event_vfs_setattr_total Number of times directory entries have been read with getdents().\n# TYPE node_mountstats_nfs_event_vfs_setattr_total counter\nnode_mountstats_nfs_event_vfs_setattr_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_setattr_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_update_page_total Number of updates (and potential writes) to pages.\n# TYPE node_mountstats_nfs_event_vfs_update_page_total counter\nnode_mountstats_nfs_event_vfs_update_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_update_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_write_page_total Number of pages written directly via mmap()'d files.\n# TYPE node_mountstats_nfs_event_vfs_write_page_total counter\nnode_mountstats_nfs_event_vfs_write_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_vfs_write_page_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_event_vfs_write_pages_total Number of times a group of pages have been written.\n# TYPE node_mountstats_nfs_event_vfs_write_pages_total counter\nnode_mountstats_nfs_event_vfs_write_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 47\nnode_mountstats_nfs_event_vfs_write_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 47\n# HELP node_mountstats_nfs_event_write_extension_total Number of times a file has been grown due to writes beyond its existing end.\n# TYPE node_mountstats_nfs_event_write_extension_total counter\nnode_mountstats_nfs_event_write_extension_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_event_write_extension_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_major_timeouts_total Number of times a request has had a major timeout for a given operation.\n# TYPE node_mountstats_nfs_operations_major_timeouts_total counter\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_major_timeouts_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_queue_time_seconds_total Duration all requests spent queued for transmission for a given operation before they were sent, in seconds.\n# TYPE node_mountstats_nfs_operations_queue_time_seconds_total counter\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 9.007044786793922e+12\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 0.006\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 0.006\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_queue_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_received_bytes_total Number of bytes received for a given operation, including RPC headers and payload.\n# TYPE node_mountstats_nfs_operations_received_bytes_total counter\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 3.62996810236e+11\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 1.210292152e+09\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 1.210292152e+09\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_received_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_request_time_seconds_total Duration all requests took from when a request was enqueued to when it was completely handled for a given operation, in seconds.\n# TYPE node_mountstats_nfs_operations_request_time_seconds_total counter\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 1.953587717e+06\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 79.407\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 79.407\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_request_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_requests_total Number of requests performed for a given operation.\n# TYPE node_mountstats_nfs_operations_requests_total counter\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 2.927395007e+09\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 1298\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 1298\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_requests_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_response_time_seconds_total Duration all requests took to get a reply back after a request for a given operation was transmitted, in seconds.\n# TYPE node_mountstats_nfs_operations_response_time_seconds_total counter\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 1.667369447e+06\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 79.386\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 79.386\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_response_time_seconds_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_sent_bytes_total Number of bytes sent for a given operation, including RPC headers and payload.\n# TYPE node_mountstats_nfs_operations_sent_bytes_total counter\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 5.26931094212e+11\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 207680\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 207680\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_sent_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_operations_transmissions_total Number of times an actual RPC request has been transmitted for a given operation.\n# TYPE node_mountstats_nfs_operations_transmissions_total counter\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"ACCESS\",protocol=\"udp\"} 2.927394995e+09\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"NULL\",protocol=\"udp\"} 0\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"tcp\"} 1298\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"READ\",protocol=\"udp\"} 1298\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_operations_transmissions_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",operation=\"WRITE\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_read_bytes_total Number of bytes read using the read() syscall.\n# TYPE node_mountstats_nfs_read_bytes_total counter\nnode_mountstats_nfs_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 1.20764023e+09\nnode_mountstats_nfs_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 1.20764023e+09\n# HELP node_mountstats_nfs_read_pages_total Number of pages read directly via mmap()'d files.\n# TYPE node_mountstats_nfs_read_pages_total counter\nnode_mountstats_nfs_read_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 295483\nnode_mountstats_nfs_read_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 295483\n# HELP node_mountstats_nfs_total_read_bytes_total Number of bytes read from the NFS server, in total.\n# TYPE node_mountstats_nfs_total_read_bytes_total counter\nnode_mountstats_nfs_total_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 1.210214218e+09\nnode_mountstats_nfs_total_read_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 1.210214218e+09\n# HELP node_mountstats_nfs_total_write_bytes_total Number of bytes written to the NFS server, in total.\n# TYPE node_mountstats_nfs_total_write_bytes_total counter\nnode_mountstats_nfs_total_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_total_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_transport_backlog_queue_total Total number of items added to the RPC backlog queue.\n# TYPE node_mountstats_nfs_transport_backlog_queue_total counter\nnode_mountstats_nfs_transport_backlog_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 0\nnode_mountstats_nfs_transport_backlog_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_bad_transaction_ids_total Number of times the NFS server sent a response with a transaction ID unknown to this client.\n# TYPE node_mountstats_nfs_transport_bad_transaction_ids_total counter\nnode_mountstats_nfs_transport_bad_transaction_ids_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 0\nnode_mountstats_nfs_transport_bad_transaction_ids_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_bind_total Number of times the client has had to establish a connection from scratch to the NFS server.\n# TYPE node_mountstats_nfs_transport_bind_total counter\nnode_mountstats_nfs_transport_bind_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 0\nnode_mountstats_nfs_transport_bind_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_connect_total Number of times the client has made a TCP connection to the NFS server.\n# TYPE node_mountstats_nfs_transport_connect_total counter\nnode_mountstats_nfs_transport_connect_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 1\nnode_mountstats_nfs_transport_connect_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_idle_time_seconds Duration since the NFS mount last saw any RPC traffic, in seconds.\n# TYPE node_mountstats_nfs_transport_idle_time_seconds gauge\nnode_mountstats_nfs_transport_idle_time_seconds{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 11\nnode_mountstats_nfs_transport_idle_time_seconds{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 0\n# HELP node_mountstats_nfs_transport_maximum_rpc_slots Maximum number of simultaneously active RPC requests ever used.\n# TYPE node_mountstats_nfs_transport_maximum_rpc_slots gauge\nnode_mountstats_nfs_transport_maximum_rpc_slots{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 24\nnode_mountstats_nfs_transport_maximum_rpc_slots{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 24\n# HELP node_mountstats_nfs_transport_pending_queue_total Total number of items added to the RPC transmission pending queue.\n# TYPE node_mountstats_nfs_transport_pending_queue_total counter\nnode_mountstats_nfs_transport_pending_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 5726\nnode_mountstats_nfs_transport_pending_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 5726\n# HELP node_mountstats_nfs_transport_receives_total Number of RPC responses for this mount received from the NFS server.\n# TYPE node_mountstats_nfs_transport_receives_total counter\nnode_mountstats_nfs_transport_receives_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 6428\nnode_mountstats_nfs_transport_receives_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 6428\n# HELP node_mountstats_nfs_transport_sending_queue_total Total number of items added to the RPC transmission sending queue.\n# TYPE node_mountstats_nfs_transport_sending_queue_total counter\nnode_mountstats_nfs_transport_sending_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 26\nnode_mountstats_nfs_transport_sending_queue_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 26\n# HELP node_mountstats_nfs_transport_sends_total Number of RPC requests for this mount sent to the NFS server.\n# TYPE node_mountstats_nfs_transport_sends_total counter\nnode_mountstats_nfs_transport_sends_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\",transport=\"0\"} 6428\nnode_mountstats_nfs_transport_sends_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\",transport=\"0\"} 6428\n# HELP node_mountstats_nfs_write_bytes_total Number of bytes written using the write() syscall.\n# TYPE node_mountstats_nfs_write_bytes_total counter\nnode_mountstats_nfs_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_write_bytes_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_mountstats_nfs_write_pages_total Number of pages written directly via mmap()'d files.\n# TYPE node_mountstats_nfs_write_pages_total counter\nnode_mountstats_nfs_write_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"tcp\"} 0\nnode_mountstats_nfs_write_pages_total{export=\"192.168.1.1:/srv/test\",mountaddr=\"192.168.1.1\",protocol=\"udp\"} 0\n# HELP node_netstat_Icmp6_InErrors Statistic Icmp6InErrors.\n# TYPE node_netstat_Icmp6_InErrors untyped\nnode_netstat_Icmp6_InErrors 0\n# HELP node_netstat_Icmp6_InMsgs Statistic Icmp6InMsgs.\n# TYPE node_netstat_Icmp6_InMsgs untyped\nnode_netstat_Icmp6_InMsgs 0\n# HELP node_netstat_Icmp6_OutMsgs Statistic Icmp6OutMsgs.\n# TYPE node_netstat_Icmp6_OutMsgs untyped\nnode_netstat_Icmp6_OutMsgs 8\n# HELP node_netstat_Icmp_InErrors Statistic IcmpInErrors.\n# TYPE node_netstat_Icmp_InErrors untyped\nnode_netstat_Icmp_InErrors 0\n# HELP node_netstat_Icmp_InMsgs Statistic IcmpInMsgs.\n# TYPE node_netstat_Icmp_InMsgs untyped\nnode_netstat_Icmp_InMsgs 104\n# HELP node_netstat_Icmp_OutMsgs Statistic IcmpOutMsgs.\n# TYPE node_netstat_Icmp_OutMsgs untyped\nnode_netstat_Icmp_OutMsgs 120\n# HELP node_netstat_Ip6_InOctets Statistic Ip6InOctets.\n# TYPE node_netstat_Ip6_InOctets untyped\nnode_netstat_Ip6_InOctets 460\n# HELP node_netstat_Ip6_OutOctets Statistic Ip6OutOctets.\n# TYPE node_netstat_Ip6_OutOctets untyped\nnode_netstat_Ip6_OutOctets 536\n# HELP node_netstat_IpExt_InOctets Statistic IpExtInOctets.\n# TYPE node_netstat_IpExt_InOctets untyped\nnode_netstat_IpExt_InOctets 6.28639697e+09\n# HELP node_netstat_IpExt_OutOctets Statistic IpExtOutOctets.\n# TYPE node_netstat_IpExt_OutOctets untyped\nnode_netstat_IpExt_OutOctets 2.786264347e+09\n# HELP node_netstat_Ip_Forwarding Statistic IpForwarding.\n# TYPE node_netstat_Ip_Forwarding untyped\nnode_netstat_Ip_Forwarding 1\n# HELP node_netstat_TcpExt_ListenDrops Statistic TcpExtListenDrops.\n# TYPE node_netstat_TcpExt_ListenDrops untyped\nnode_netstat_TcpExt_ListenDrops 0\n# HELP node_netstat_TcpExt_ListenOverflows Statistic TcpExtListenOverflows.\n# TYPE node_netstat_TcpExt_ListenOverflows untyped\nnode_netstat_TcpExt_ListenOverflows 0\n# HELP node_netstat_TcpExt_SyncookiesFailed Statistic TcpExtSyncookiesFailed.\n# TYPE node_netstat_TcpExt_SyncookiesFailed untyped\nnode_netstat_TcpExt_SyncookiesFailed 2\n# HELP node_netstat_TcpExt_SyncookiesRecv Statistic TcpExtSyncookiesRecv.\n# TYPE node_netstat_TcpExt_SyncookiesRecv untyped\nnode_netstat_TcpExt_SyncookiesRecv 0\n# HELP node_netstat_TcpExt_SyncookiesSent Statistic TcpExtSyncookiesSent.\n# TYPE node_netstat_TcpExt_SyncookiesSent untyped\nnode_netstat_TcpExt_SyncookiesSent 0\n# HELP node_netstat_TcpExt_TCPOFOQueue Statistic TcpExtTCPOFOQueue.\n# TYPE node_netstat_TcpExt_TCPOFOQueue untyped\nnode_netstat_TcpExt_TCPOFOQueue 42\n# HELP node_netstat_TcpExt_TCPRcvQDrop Statistic TcpExtTCPRcvQDrop.\n# TYPE node_netstat_TcpExt_TCPRcvQDrop untyped\nnode_netstat_TcpExt_TCPRcvQDrop 131\n# HELP node_netstat_TcpExt_TCPTimeouts Statistic TcpExtTCPTimeouts.\n# TYPE node_netstat_TcpExt_TCPTimeouts untyped\nnode_netstat_TcpExt_TCPTimeouts 115\n# HELP node_netstat_Tcp_ActiveOpens Statistic TcpActiveOpens.\n# TYPE node_netstat_Tcp_ActiveOpens untyped\nnode_netstat_Tcp_ActiveOpens 3556\n# HELP node_netstat_Tcp_CurrEstab Statistic TcpCurrEstab.\n# TYPE node_netstat_Tcp_CurrEstab untyped\nnode_netstat_Tcp_CurrEstab 0\n# HELP node_netstat_Tcp_InErrs Statistic TcpInErrs.\n# TYPE node_netstat_Tcp_InErrs untyped\nnode_netstat_Tcp_InErrs 5\n# HELP node_netstat_Tcp_InSegs Statistic TcpInSegs.\n# TYPE node_netstat_Tcp_InSegs untyped\nnode_netstat_Tcp_InSegs 5.7252008e+07\n# HELP node_netstat_Tcp_OutRsts Statistic TcpOutRsts.\n# TYPE node_netstat_Tcp_OutRsts untyped\nnode_netstat_Tcp_OutRsts 1003\n# HELP node_netstat_Tcp_OutSegs Statistic TcpOutSegs.\n# TYPE node_netstat_Tcp_OutSegs untyped\nnode_netstat_Tcp_OutSegs 5.4915039e+07\n# HELP node_netstat_Tcp_PassiveOpens Statistic TcpPassiveOpens.\n# TYPE node_netstat_Tcp_PassiveOpens untyped\nnode_netstat_Tcp_PassiveOpens 230\n# HELP node_netstat_Tcp_RetransSegs Statistic TcpRetransSegs.\n# TYPE node_netstat_Tcp_RetransSegs untyped\nnode_netstat_Tcp_RetransSegs 227\n# HELP node_netstat_Udp6_InDatagrams Statistic Udp6InDatagrams.\n# TYPE node_netstat_Udp6_InDatagrams untyped\nnode_netstat_Udp6_InDatagrams 0\n# HELP node_netstat_Udp6_InErrors Statistic Udp6InErrors.\n# TYPE node_netstat_Udp6_InErrors untyped\nnode_netstat_Udp6_InErrors 0\n# HELP node_netstat_Udp6_NoPorts Statistic Udp6NoPorts.\n# TYPE node_netstat_Udp6_NoPorts untyped\nnode_netstat_Udp6_NoPorts 0\n# HELP node_netstat_Udp6_OutDatagrams Statistic Udp6OutDatagrams.\n# TYPE node_netstat_Udp6_OutDatagrams untyped\nnode_netstat_Udp6_OutDatagrams 0\n# HELP node_netstat_Udp6_RcvbufErrors Statistic Udp6RcvbufErrors.\n# TYPE node_netstat_Udp6_RcvbufErrors untyped\nnode_netstat_Udp6_RcvbufErrors 9\n# HELP node_netstat_Udp6_SndbufErrors Statistic Udp6SndbufErrors.\n# TYPE node_netstat_Udp6_SndbufErrors untyped\nnode_netstat_Udp6_SndbufErrors 8\n# HELP node_netstat_UdpLite6_InErrors Statistic UdpLite6InErrors.\n# TYPE node_netstat_UdpLite6_InErrors untyped\nnode_netstat_UdpLite6_InErrors 0\n# HELP node_netstat_UdpLite_InErrors Statistic UdpLiteInErrors.\n# TYPE node_netstat_UdpLite_InErrors untyped\nnode_netstat_UdpLite_InErrors 0\n# HELP node_netstat_Udp_InDatagrams Statistic UdpInDatagrams.\n# TYPE node_netstat_Udp_InDatagrams untyped\nnode_netstat_Udp_InDatagrams 88542\n# HELP node_netstat_Udp_InErrors Statistic UdpInErrors.\n# TYPE node_netstat_Udp_InErrors untyped\nnode_netstat_Udp_InErrors 0\n# HELP node_netstat_Udp_NoPorts Statistic UdpNoPorts.\n# TYPE node_netstat_Udp_NoPorts untyped\nnode_netstat_Udp_NoPorts 120\n# HELP node_netstat_Udp_OutDatagrams Statistic UdpOutDatagrams.\n# TYPE node_netstat_Udp_OutDatagrams untyped\nnode_netstat_Udp_OutDatagrams 53028\n# HELP node_netstat_Udp_RcvbufErrors Statistic UdpRcvbufErrors.\n# TYPE node_netstat_Udp_RcvbufErrors untyped\nnode_netstat_Udp_RcvbufErrors 9\n# HELP node_netstat_Udp_SndbufErrors Statistic UdpSndbufErrors.\n# TYPE node_netstat_Udp_SndbufErrors untyped\nnode_netstat_Udp_SndbufErrors 8\n# HELP node_network_address_assign_type Network device property: address_assign_type\n# TYPE node_network_address_assign_type gauge\nnode_network_address_assign_type{device=\"bond0\"} 3\nnode_network_address_assign_type{device=\"eth0\"} 3\n# HELP node_network_carrier Network device property: carrier\n# TYPE node_network_carrier gauge\nnode_network_carrier{device=\"bond0\"} 1\nnode_network_carrier{device=\"eth0\"} 1\n# HELP node_network_carrier_changes_total Network device property: carrier_changes_total\n# TYPE node_network_carrier_changes_total counter\nnode_network_carrier_changes_total{device=\"bond0\"} 2\nnode_network_carrier_changes_total{device=\"eth0\"} 2\n# HELP node_network_carrier_down_changes_total Network device property: carrier_down_changes_total\n# TYPE node_network_carrier_down_changes_total counter\nnode_network_carrier_down_changes_total{device=\"bond0\"} 1\nnode_network_carrier_down_changes_total{device=\"eth0\"} 1\n# HELP node_network_carrier_up_changes_total Network device property: carrier_up_changes_total\n# TYPE node_network_carrier_up_changes_total counter\nnode_network_carrier_up_changes_total{device=\"bond0\"} 1\nnode_network_carrier_up_changes_total{device=\"eth0\"} 1\n# HELP node_network_device_id Network device property: device_id\n# TYPE node_network_device_id gauge\nnode_network_device_id{device=\"bond0\"} 32\nnode_network_device_id{device=\"eth0\"} 32\n# HELP node_network_dormant Network device property: dormant\n# TYPE node_network_dormant gauge\nnode_network_dormant{device=\"bond0\"} 1\nnode_network_dormant{device=\"eth0\"} 1\n# HELP node_network_flags Network device property: flags\n# TYPE node_network_flags gauge\nnode_network_flags{device=\"bond0\"} 4867\nnode_network_flags{device=\"eth0\"} 4867\n# HELP node_network_iface_id Network device property: iface_id\n# TYPE node_network_iface_id gauge\nnode_network_iface_id{device=\"bond0\"} 2\nnode_network_iface_id{device=\"eth0\"} 2\n# HELP node_network_iface_link Network device property: iface_link\n# TYPE node_network_iface_link gauge\nnode_network_iface_link{device=\"bond0\"} 2\nnode_network_iface_link{device=\"eth0\"} 2\n# HELP node_network_iface_link_mode Network device property: iface_link_mode\n# TYPE node_network_iface_link_mode gauge\nnode_network_iface_link_mode{device=\"bond0\"} 1\nnode_network_iface_link_mode{device=\"eth0\"} 1\n# HELP node_network_info Non-numeric data from /sys/class/net/<iface>, value is always 1.\n# TYPE node_network_info gauge\nnode_network_info{address=\"01:01:01:01:01:01\",adminstate=\"up\",broadcast=\"ff:ff:ff:ff:ff:ff\",device=\"bond0\",duplex=\"full\",ifalias=\"\",operstate=\"up\"} 1\nnode_network_info{address=\"01:01:01:01:01:01\",adminstate=\"up\",broadcast=\"ff:ff:ff:ff:ff:ff\",device=\"eth0\",duplex=\"full\",ifalias=\"\",operstate=\"up\"} 1\n# HELP node_network_mtu_bytes Network device property: mtu_bytes\n# TYPE node_network_mtu_bytes gauge\nnode_network_mtu_bytes{device=\"bond0\"} 1500\nnode_network_mtu_bytes{device=\"eth0\"} 1500\n# HELP node_network_name_assign_type Network device property: name_assign_type\n# TYPE node_network_name_assign_type gauge\nnode_network_name_assign_type{device=\"bond0\"} 2\nnode_network_name_assign_type{device=\"eth0\"} 2\n# HELP node_network_net_dev_group Network device property: net_dev_group\n# TYPE node_network_net_dev_group gauge\nnode_network_net_dev_group{device=\"bond0\"} 0\nnode_network_net_dev_group{device=\"eth0\"} 0\n# HELP node_network_protocol_type Network device property: protocol_type\n# TYPE node_network_protocol_type gauge\nnode_network_protocol_type{device=\"bond0\"} 1\nnode_network_protocol_type{device=\"eth0\"} 1\n# HELP node_network_receive_bytes_total Network device statistic receive_bytes.\n# TYPE node_network_receive_bytes_total counter\n# HELP node_network_receive_compressed_total Network device statistic receive_compressed.\n# TYPE node_network_receive_compressed_total counter\nnode_network_receive_compressed_total{device=\"lo\"} 0\n# HELP node_network_receive_drop_total Network device statistic receive_drop.\n# TYPE node_network_receive_drop_total counter\nnode_network_receive_drop_total{device=\"lo\"} 0\n# HELP node_network_receive_errs_total Network device statistic receive_errs.\n# TYPE node_network_receive_errs_total counter\nnode_network_receive_errs_total{device=\"lo\"} 0\n# HELP node_network_receive_fifo_total Network device statistic receive_fifo.\n# TYPE node_network_receive_fifo_total counter\nnode_network_receive_fifo_total{device=\"lo\"} 0\n# HELP node_network_receive_frame_total Network device statistic receive_frame.\n# TYPE node_network_receive_frame_total counter\nnode_network_receive_frame_total{device=\"lo\"} 0\n# HELP node_network_receive_multicast_total Network device statistic receive_multicast.\n# TYPE node_network_receive_multicast_total counter\nnode_network_receive_multicast_total{device=\"lo\"} 0\n# HELP node_network_receive_nohandler_total Network device statistic receive_nohandler.\n# TYPE node_network_receive_nohandler_total counter\nnode_network_receive_nohandler_total{device=\"lo\"} 0\n# HELP node_network_receive_packets_total Network device statistic receive_packets.\n# TYPE node_network_receive_packets_total counter\n# HELP node_network_speed_bytes Network device property: speed_bytes\n# TYPE node_network_speed_bytes gauge\nnode_network_speed_bytes{device=\"eth0\"} 1.25e+08\n# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.\n# TYPE node_network_transmit_bytes_total counter\n# HELP node_network_transmit_carrier_total Network device statistic transmit_carrier.\n# TYPE node_network_transmit_carrier_total counter\nnode_network_transmit_carrier_total{device=\"lo\"} 0\n# HELP node_network_transmit_colls_total Network device statistic transmit_colls.\n# TYPE node_network_transmit_colls_total counter\nnode_network_transmit_colls_total{device=\"lo\"} 0\n# HELP node_network_transmit_compressed_total Network device statistic transmit_compressed.\n# TYPE node_network_transmit_compressed_total counter\nnode_network_transmit_compressed_total{device=\"lo\"} 0\n# HELP node_network_transmit_drop_total Network device statistic transmit_drop.\n# TYPE node_network_transmit_drop_total counter\nnode_network_transmit_drop_total{device=\"lo\"} 0\n# HELP node_network_transmit_errs_total Network device statistic transmit_errs.\n# TYPE node_network_transmit_errs_total counter\nnode_network_transmit_errs_total{device=\"lo\"} 0\n# HELP node_network_transmit_fifo_total Network device statistic transmit_fifo.\n# TYPE node_network_transmit_fifo_total counter\nnode_network_transmit_fifo_total{device=\"lo\"} 0\n# HELP node_network_transmit_packets_total Network device statistic transmit_packets.\n# TYPE node_network_transmit_packets_total counter\n# HELP node_network_transmit_queue_length Network device property: transmit_queue_length\n# TYPE node_network_transmit_queue_length gauge\nnode_network_transmit_queue_length{device=\"bond0\"} 1000\nnode_network_transmit_queue_length{device=\"eth0\"} 1000\n# HELP node_network_up Value is 1 if operstate is 'up', 0 otherwise.\n# TYPE node_network_up gauge\nnode_network_up{device=\"bond0\"} 1\nnode_network_up{device=\"eth0\"} 1\n# HELP node_nf_conntrack_entries Number of currently allocated flow entries for connection tracking.\n# TYPE node_nf_conntrack_entries gauge\nnode_nf_conntrack_entries 123\n# HELP node_nf_conntrack_entries_limit Maximum size of connection tracking table.\n# TYPE node_nf_conntrack_entries_limit gauge\nnode_nf_conntrack_entries_limit 65536\n# HELP node_nf_conntrack_stat_drop Number of packets dropped due to conntrack failure.\n# TYPE node_nf_conntrack_stat_drop gauge\nnode_nf_conntrack_stat_drop 0\n# HELP node_nf_conntrack_stat_early_drop Number of dropped conntrack entries to make room for new ones, if maximum table size was reached.\n# TYPE node_nf_conntrack_stat_early_drop gauge\nnode_nf_conntrack_stat_early_drop 0\n# HELP node_nf_conntrack_stat_found Number of searched entries which were successful.\n# TYPE node_nf_conntrack_stat_found gauge\nnode_nf_conntrack_stat_found 0\n# HELP node_nf_conntrack_stat_ignore Number of packets seen which are already connected to a conntrack entry.\n# TYPE node_nf_conntrack_stat_ignore gauge\nnode_nf_conntrack_stat_ignore 89738\n# HELP node_nf_conntrack_stat_insert Number of entries inserted into the list.\n# TYPE node_nf_conntrack_stat_insert gauge\nnode_nf_conntrack_stat_insert 0\n# HELP node_nf_conntrack_stat_insert_failed Number of entries for which list insertion was attempted but failed.\n# TYPE node_nf_conntrack_stat_insert_failed gauge\nnode_nf_conntrack_stat_insert_failed 0\n# HELP node_nf_conntrack_stat_invalid Number of packets seen which can not be tracked.\n# TYPE node_nf_conntrack_stat_invalid gauge\nnode_nf_conntrack_stat_invalid 53\n# HELP node_nf_conntrack_stat_search_restart Number of conntrack table lookups which had to be restarted due to hashtable resizes.\n# TYPE node_nf_conntrack_stat_search_restart gauge\nnode_nf_conntrack_stat_search_restart 7\n# HELP node_nfs_connections_total Total number of NFSd TCP connections.\n# TYPE node_nfs_connections_total counter\nnode_nfs_connections_total 45\n# HELP node_nfs_packets_total Total NFSd network packets (sent+received) by protocol type.\n# TYPE node_nfs_packets_total counter\nnode_nfs_packets_total{protocol=\"tcp\"} 69\nnode_nfs_packets_total{protocol=\"udp\"} 70\n# HELP node_nfs_requests_total Number of NFS procedures invoked.\n# TYPE node_nfs_requests_total counter\nnode_nfs_requests_total{method=\"Access\",proto=\"3\"} 1.17661341e+08\nnode_nfs_requests_total{method=\"Access\",proto=\"4\"} 58\nnode_nfs_requests_total{method=\"Allocate\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"BindConnToSession\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Clone\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Close\",proto=\"4\"} 28\nnode_nfs_requests_total{method=\"Commit\",proto=\"3\"} 23729\nnode_nfs_requests_total{method=\"Commit\",proto=\"4\"} 83\nnode_nfs_requests_total{method=\"Create\",proto=\"2\"} 52\nnode_nfs_requests_total{method=\"Create\",proto=\"3\"} 2.993289e+06\nnode_nfs_requests_total{method=\"Create\",proto=\"4\"} 15\nnode_nfs_requests_total{method=\"CreateSession\",proto=\"4\"} 32\nnode_nfs_requests_total{method=\"DeAllocate\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"DelegReturn\",proto=\"4\"} 97\nnode_nfs_requests_total{method=\"DestroyClientID\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"DestroySession\",proto=\"4\"} 67\nnode_nfs_requests_total{method=\"ExchangeID\",proto=\"4\"} 58\nnode_nfs_requests_total{method=\"FreeStateID\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"FsInfo\",proto=\"3\"} 2\nnode_nfs_requests_total{method=\"FsInfo\",proto=\"4\"} 68\nnode_nfs_requests_total{method=\"FsLocations\",proto=\"4\"} 32\nnode_nfs_requests_total{method=\"FsStat\",proto=\"2\"} 82\nnode_nfs_requests_total{method=\"FsStat\",proto=\"3\"} 13332\nnode_nfs_requests_total{method=\"FsidPresent\",proto=\"4\"} 11\nnode_nfs_requests_total{method=\"GetACL\",proto=\"4\"} 36\nnode_nfs_requests_total{method=\"GetAttr\",proto=\"2\"} 57\nnode_nfs_requests_total{method=\"GetAttr\",proto=\"3\"} 1.061909262e+09\nnode_nfs_requests_total{method=\"GetDeviceInfo\",proto=\"4\"} 1\nnode_nfs_requests_total{method=\"GetDeviceList\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"GetLeaseTime\",proto=\"4\"} 28\nnode_nfs_requests_total{method=\"Getattr\",proto=\"4\"} 88\nnode_nfs_requests_total{method=\"LayoutCommit\",proto=\"4\"} 26\nnode_nfs_requests_total{method=\"LayoutGet\",proto=\"4\"} 90\nnode_nfs_requests_total{method=\"LayoutReturn\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"LayoutStats\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Link\",proto=\"2\"} 17\nnode_nfs_requests_total{method=\"Link\",proto=\"3\"} 0\nnode_nfs_requests_total{method=\"Link\",proto=\"4\"} 21\nnode_nfs_requests_total{method=\"Lock\",proto=\"4\"} 39\nnode_nfs_requests_total{method=\"Lockt\",proto=\"4\"} 68\nnode_nfs_requests_total{method=\"Locku\",proto=\"4\"} 59\nnode_nfs_requests_total{method=\"Lookup\",proto=\"2\"} 71\nnode_nfs_requests_total{method=\"Lookup\",proto=\"3\"} 4.077635e+06\nnode_nfs_requests_total{method=\"Lookup\",proto=\"4\"} 29\nnode_nfs_requests_total{method=\"LookupRoot\",proto=\"4\"} 74\nnode_nfs_requests_total{method=\"MkDir\",proto=\"2\"} 50\nnode_nfs_requests_total{method=\"MkDir\",proto=\"3\"} 590\nnode_nfs_requests_total{method=\"MkNod\",proto=\"3\"} 0\nnode_nfs_requests_total{method=\"Null\",proto=\"2\"} 16\nnode_nfs_requests_total{method=\"Null\",proto=\"3\"} 0\nnode_nfs_requests_total{method=\"Null\",proto=\"4\"} 98\nnode_nfs_requests_total{method=\"Open\",proto=\"4\"} 85\nnode_nfs_requests_total{method=\"OpenConfirm\",proto=\"4\"} 23\nnode_nfs_requests_total{method=\"OpenDowngrade\",proto=\"4\"} 1\nnode_nfs_requests_total{method=\"OpenNoattr\",proto=\"4\"} 24\nnode_nfs_requests_total{method=\"PathConf\",proto=\"3\"} 1\nnode_nfs_requests_total{method=\"Pathconf\",proto=\"4\"} 53\nnode_nfs_requests_total{method=\"Read\",proto=\"2\"} 45\nnode_nfs_requests_total{method=\"Read\",proto=\"3\"} 2.9391916e+07\nnode_nfs_requests_total{method=\"Read\",proto=\"4\"} 51\nnode_nfs_requests_total{method=\"ReadDir\",proto=\"2\"} 70\nnode_nfs_requests_total{method=\"ReadDir\",proto=\"3\"} 3983\nnode_nfs_requests_total{method=\"ReadDir\",proto=\"4\"} 66\nnode_nfs_requests_total{method=\"ReadDirPlus\",proto=\"3\"} 92385\nnode_nfs_requests_total{method=\"ReadLink\",proto=\"2\"} 73\nnode_nfs_requests_total{method=\"ReadLink\",proto=\"3\"} 5\nnode_nfs_requests_total{method=\"ReadLink\",proto=\"4\"} 54\nnode_nfs_requests_total{method=\"ReclaimComplete\",proto=\"4\"} 35\nnode_nfs_requests_total{method=\"ReleaseLockowner\",proto=\"4\"} 85\nnode_nfs_requests_total{method=\"Remove\",proto=\"2\"} 83\nnode_nfs_requests_total{method=\"Remove\",proto=\"3\"} 7815\nnode_nfs_requests_total{method=\"Remove\",proto=\"4\"} 69\nnode_nfs_requests_total{method=\"Rename\",proto=\"2\"} 61\nnode_nfs_requests_total{method=\"Rename\",proto=\"3\"} 1130\nnode_nfs_requests_total{method=\"Rename\",proto=\"4\"} 96\nnode_nfs_requests_total{method=\"Renew\",proto=\"4\"} 83\nnode_nfs_requests_total{method=\"RmDir\",proto=\"2\"} 23\nnode_nfs_requests_total{method=\"RmDir\",proto=\"3\"} 15\nnode_nfs_requests_total{method=\"Root\",proto=\"2\"} 52\nnode_nfs_requests_total{method=\"Secinfo\",proto=\"4\"} 81\nnode_nfs_requests_total{method=\"SecinfoNoName\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Seek\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"Sequence\",proto=\"4\"} 13\nnode_nfs_requests_total{method=\"ServerCaps\",proto=\"4\"} 56\nnode_nfs_requests_total{method=\"SetACL\",proto=\"4\"} 49\nnode_nfs_requests_total{method=\"SetAttr\",proto=\"2\"} 74\nnode_nfs_requests_total{method=\"SetAttr\",proto=\"3\"} 48906\nnode_nfs_requests_total{method=\"SetClientID\",proto=\"4\"} 12\nnode_nfs_requests_total{method=\"SetClientIDConfirm\",proto=\"4\"} 84\nnode_nfs_requests_total{method=\"Setattr\",proto=\"4\"} 73\nnode_nfs_requests_total{method=\"StatFs\",proto=\"4\"} 86\nnode_nfs_requests_total{method=\"SymLink\",proto=\"2\"} 53\nnode_nfs_requests_total{method=\"SymLink\",proto=\"3\"} 0\nnode_nfs_requests_total{method=\"Symlink\",proto=\"4\"} 84\nnode_nfs_requests_total{method=\"TestStateID\",proto=\"4\"} 0\nnode_nfs_requests_total{method=\"WrCache\",proto=\"2\"} 86\nnode_nfs_requests_total{method=\"Write\",proto=\"2\"} 0\nnode_nfs_requests_total{method=\"Write\",proto=\"3\"} 2.570425e+06\nnode_nfs_requests_total{method=\"Write\",proto=\"4\"} 54\n# HELP node_nfs_rpc_authentication_refreshes_total Number of RPC authentication refreshes performed.\n# TYPE node_nfs_rpc_authentication_refreshes_total counter\nnode_nfs_rpc_authentication_refreshes_total 1.218815394e+09\n# HELP node_nfs_rpc_retransmissions_total Number of RPC transmissions performed.\n# TYPE node_nfs_rpc_retransmissions_total counter\nnode_nfs_rpc_retransmissions_total 374636\n# HELP node_nfs_rpcs_total Total number of RPCs performed.\n# TYPE node_nfs_rpcs_total counter\nnode_nfs_rpcs_total 1.218785755e+09\n# HELP node_nfsd_connections_total Total number of NFSd TCP connections.\n# TYPE node_nfsd_connections_total counter\nnode_nfsd_connections_total 1\n# HELP node_nfsd_disk_bytes_read_total Total NFSd bytes read.\n# TYPE node_nfsd_disk_bytes_read_total counter\nnode_nfsd_disk_bytes_read_total 1.572864e+08\n# HELP node_nfsd_disk_bytes_written_total Total NFSd bytes written.\n# TYPE node_nfsd_disk_bytes_written_total counter\nnode_nfsd_disk_bytes_written_total 72864\n# HELP node_nfsd_file_handles_stale_total Total number of NFSd stale file handles\n# TYPE node_nfsd_file_handles_stale_total counter\nnode_nfsd_file_handles_stale_total 0\n# HELP node_nfsd_packets_total Total NFSd network packets (sent+received) by protocol type.\n# TYPE node_nfsd_packets_total counter\nnode_nfsd_packets_total{proto=\"tcp\"} 917\nnode_nfsd_packets_total{proto=\"udp\"} 55\n# HELP node_nfsd_read_ahead_cache_not_found_total Total number of NFSd read ahead cache not found.\n# TYPE node_nfsd_read_ahead_cache_not_found_total counter\nnode_nfsd_read_ahead_cache_not_found_total 0\n# HELP node_nfsd_read_ahead_cache_size_blocks How large the read ahead cache is in blocks.\n# TYPE node_nfsd_read_ahead_cache_size_blocks gauge\nnode_nfsd_read_ahead_cache_size_blocks 32\n# HELP node_nfsd_reply_cache_hits_total Total number of NFSd Reply Cache hits (client lost server response).\n# TYPE node_nfsd_reply_cache_hits_total counter\nnode_nfsd_reply_cache_hits_total 0\n# HELP node_nfsd_reply_cache_misses_total Total number of NFSd Reply Cache an operation that requires caching (idempotent).\n# TYPE node_nfsd_reply_cache_misses_total counter\nnode_nfsd_reply_cache_misses_total 6\n# HELP node_nfsd_reply_cache_nocache_total Total number of NFSd Reply Cache non-idempotent operations (rename/delete/…).\n# TYPE node_nfsd_reply_cache_nocache_total counter\nnode_nfsd_reply_cache_nocache_total 18622\n# HELP node_nfsd_requests_total Total number NFSd Requests by method and protocol.\n# TYPE node_nfsd_requests_total counter\nnode_nfsd_requests_total{method=\"Access\",proto=\"3\"} 111\nnode_nfsd_requests_total{method=\"Access\",proto=\"4\"} 1098\nnode_nfsd_requests_total{method=\"Close\",proto=\"4\"} 2\nnode_nfsd_requests_total{method=\"Commit\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Commit\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Create\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Create\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Create\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"DelegPurge\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"DelegReturn\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"FsInfo\",proto=\"3\"} 2\nnode_nfsd_requests_total{method=\"FsStat\",proto=\"2\"} 2\nnode_nfsd_requests_total{method=\"FsStat\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"GetAttr\",proto=\"2\"} 69\nnode_nfsd_requests_total{method=\"GetAttr\",proto=\"3\"} 112\nnode_nfsd_requests_total{method=\"GetAttr\",proto=\"4\"} 8179\nnode_nfsd_requests_total{method=\"GetFH\",proto=\"4\"} 5896\nnode_nfsd_requests_total{method=\"Link\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Link\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Link\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Lock\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Lockt\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Locku\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Lookup\",proto=\"2\"} 4410\nnode_nfsd_requests_total{method=\"Lookup\",proto=\"3\"} 2719\nnode_nfsd_requests_total{method=\"Lookup\",proto=\"4\"} 5900\nnode_nfsd_requests_total{method=\"LookupRoot\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"MkDir\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"MkDir\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"MkNod\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Nverify\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Open\",proto=\"4\"} 2\nnode_nfsd_requests_total{method=\"OpenAttr\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"OpenConfirm\",proto=\"4\"} 2\nnode_nfsd_requests_total{method=\"OpenDgrd\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"PathConf\",proto=\"3\"} 1\nnode_nfsd_requests_total{method=\"PutFH\",proto=\"4\"} 9609\nnode_nfsd_requests_total{method=\"Read\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Read\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Read\",proto=\"4\"} 150\nnode_nfsd_requests_total{method=\"ReadDir\",proto=\"2\"} 99\nnode_nfsd_requests_total{method=\"ReadDir\",proto=\"3\"} 27\nnode_nfsd_requests_total{method=\"ReadDir\",proto=\"4\"} 1272\nnode_nfsd_requests_total{method=\"ReadDirPlus\",proto=\"3\"} 216\nnode_nfsd_requests_total{method=\"ReadLink\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"ReadLink\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"ReadLink\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"RelLockOwner\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Remove\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Remove\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Remove\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Rename\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Rename\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Rename\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"Renew\",proto=\"4\"} 1236\nnode_nfsd_requests_total{method=\"RestoreFH\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"RmDir\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"RmDir\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Root\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"SaveFH\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"SecInfo\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"SetAttr\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"SetAttr\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"SetAttr\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"SetClientID\",proto=\"4\"} 3\nnode_nfsd_requests_total{method=\"SetClientIDConfirm\",proto=\"4\"} 3\nnode_nfsd_requests_total{method=\"SymLink\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"SymLink\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Verify\",proto=\"4\"} 0\nnode_nfsd_requests_total{method=\"WdelegGetattr\",proto=\"4\"} 15\nnode_nfsd_requests_total{method=\"WrCache\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Write\",proto=\"2\"} 0\nnode_nfsd_requests_total{method=\"Write\",proto=\"3\"} 0\nnode_nfsd_requests_total{method=\"Write\",proto=\"4\"} 0\n# HELP node_nfsd_rpc_errors_total Total number of NFSd RPC errors by error type.\n# TYPE node_nfsd_rpc_errors_total counter\nnode_nfsd_rpc_errors_total{error=\"auth\"} 2\nnode_nfsd_rpc_errors_total{error=\"cInt\"} 0\nnode_nfsd_rpc_errors_total{error=\"fmt\"} 1\n# HELP node_nfsd_server_rpcs_total Total number of NFSd RPCs.\n# TYPE node_nfsd_server_rpcs_total counter\nnode_nfsd_server_rpcs_total 18628\n# HELP node_nfsd_server_threads Total number of NFSd kernel threads that are running.\n# TYPE node_nfsd_server_threads gauge\nnode_nfsd_server_threads 8\n# HELP node_nvme_info Non-numeric data from /sys/class/nvme/<device>, value is always 1.\n# TYPE node_nvme_info gauge\nnode_nvme_info{cntlid=\"1997\",device=\"nvme0\",firmware_revision=\"1B2QEXP7\",model=\"Samsung SSD 970 PRO 512GB\",serial=\"S680HF8N190894I\",state=\"live\"} 1\n# HELP node_nvme_namespace_capacity_bytes Capacity of the NVMe namespace in bytes. Computed as namespace_size * namespace_logical_block_size\n# TYPE node_nvme_namespace_capacity_bytes gauge\nnode_nvme_namespace_capacity_bytes{device=\"nvme0\",nsid=\"0\"} 1.6e+13\n# HELP node_nvme_namespace_info Information about NVMe namespaces. Value is always 1\n# TYPE node_nvme_namespace_info gauge\nnode_nvme_namespace_info{ana_state=\"optimized\",device=\"nvme0\",nsid=\"0\"} 1\n# HELP node_nvme_namespace_logical_block_size_bytes Logical block size of the NVMe namespace in bytes. Usually 4Kb. Available in /sys/class/nvme/<device>/<namespace>/queue/logical_block_size\n# TYPE node_nvme_namespace_logical_block_size_bytes gauge\nnode_nvme_namespace_logical_block_size_bytes{device=\"nvme0\",nsid=\"0\"} 4096\n# HELP node_nvme_namespace_size_bytes Size of the NVMe namespace in bytes. Available in /sys/class/nvme/<device>/<namespace>/size\n# TYPE node_nvme_namespace_size_bytes gauge\nnode_nvme_namespace_size_bytes{device=\"nvme0\",nsid=\"0\"} 1.6e+13\n# HELP node_nvme_namespace_used_bytes Used space of the NVMe namespace in bytes. Available in /sys/class/nvme/<device>/<namespace>/nuse\n# TYPE node_nvme_namespace_used_bytes gauge\nnode_nvme_namespace_used_bytes{device=\"nvme0\",nsid=\"0\"} 2e+12\n# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.\n# TYPE node_os_info gauge\nnode_os_info{build_id=\"\",id=\"ubuntu\",id_like=\"debian\",image_id=\"\",image_version=\"\",name=\"Ubuntu\",pretty_name=\"Ubuntu 20.04.2 LTS\",variant=\"\",variant_id=\"\",version=\"20.04.2 LTS (Focal Fossa)\",version_codename=\"focal\",version_id=\"20.04\"} 1\n# HELP node_os_version Metric containing the major.minor part of the OS version.\n# TYPE node_os_version gauge\nnode_os_version{id=\"ubuntu\",id_like=\"debian\",name=\"Ubuntu\"} 20.04\n# HELP node_pcidevice_current_link_transfers_per_second Value of current link's transfers per second (T/s)\n# TYPE node_pcidevice_current_link_transfers_per_second gauge\nnode_pcidevice_current_link_transfers_per_second{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8e+09\nnode_pcidevice_current_link_transfers_per_second{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 8e+09\nnode_pcidevice_current_link_transfers_per_second{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 5e+09\n# HELP node_pcidevice_current_link_width Value of current link's width (number of lanes)\n# TYPE node_pcidevice_current_link_width gauge\nnode_pcidevice_current_link_width{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 4\nnode_pcidevice_current_link_width{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_current_link_width{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 4\n# HELP node_pcidevice_d3cold_allowed Whether the PCIe device supports D3cold power state (0/1).\n# TYPE node_pcidevice_d3cold_allowed gauge\nnode_pcidevice_d3cold_allowed{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 1\nnode_pcidevice_d3cold_allowed{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1\nnode_pcidevice_d3cold_allowed{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 1\n# HELP node_pcidevice_info Non-numeric data from /sys/bus/pci/devices/<location>, value is always 1.\n# TYPE node_pcidevice_info gauge\nnode_pcidevice_info{bus=\"00\",class_id=\"0x060400\",device=\"02\",device_id=\"0x1634\",function=\"1\",parent_bus=\"*\",parent_device=\"*\",parent_function=\"*\",parent_segment=\"*\",revision=\"0x00\",segment=\"0000\",subsystem_device_id=\"0x5095\",subsystem_vendor_id=\"0x17aa\",vendor_id=\"0x1022\"} 1\nnode_pcidevice_info{bus=\"01\",class_id=\"0x010802\",device=\"00\",device_id=\"0x540a\",function=\"0\",parent_bus=\"00\",parent_device=\"02\",parent_function=\"1\",parent_segment=\"0000\",revision=\"0x01\",segment=\"0000\",subsystem_device_id=\"0x5021\",subsystem_vendor_id=\"0xc0a9\",vendor_id=\"0xc0a9\"} 1\nnode_pcidevice_info{bus=\"45\",class_id=\"0x020000\",device=\"00\",device_id=\"0x1521\",function=\"0\",parent_bus=\"40\",parent_device=\"01\",parent_function=\"3\",parent_segment=\"0000\",revision=\"0x01\",segment=\"0000\",subsystem_device_id=\"0x00a3\",subsystem_vendor_id=\"0x8086\",vendor_id=\"0x8086\"} 1\n# HELP node_pcidevice_max_link_transfers_per_second Value of maximum link's transfers per second (T/s)\n# TYPE node_pcidevice_max_link_transfers_per_second gauge\nnode_pcidevice_max_link_transfers_per_second{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8e+09\nnode_pcidevice_max_link_transfers_per_second{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1.6e+10\nnode_pcidevice_max_link_transfers_per_second{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 5e+09\n# HELP node_pcidevice_max_link_width Value of maximum link's width (number of lanes)\n# TYPE node_pcidevice_max_link_width gauge\nnode_pcidevice_max_link_width{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8\nnode_pcidevice_max_link_width{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_max_link_width{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 4\n# HELP node_pcidevice_numa_node NUMA node number for the PCI device. -1 indicates unknown or not available.\n# TYPE node_pcidevice_numa_node gauge\nnode_pcidevice_numa_node{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n# HELP node_pcidevice_power_state PCIe device power state, one of: D0, D1, D2, D3hot, D3cold, unknown or error.\n# TYPE node_pcidevice_power_state gauge\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"unknown\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"unknown\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"unknown\"} 0\n# HELP node_pcidevice_sriov_drivers_autoprobe Whether SR-IOV drivers autoprobe is enabled for the device (0/1).\n# TYPE node_pcidevice_sriov_drivers_autoprobe gauge\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 1\n# HELP node_pcidevice_sriov_numvfs Number of Virtual Functions (VFs) currently enabled for SR-IOV.\n# TYPE node_pcidevice_sriov_numvfs gauge\nnode_pcidevice_sriov_numvfs{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_numvfs{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_sriov_numvfs{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n# HELP node_pcidevice_sriov_totalvfs Total number of Virtual Functions (VFs) supported by the device.\n# TYPE node_pcidevice_sriov_totalvfs gauge\nnode_pcidevice_sriov_totalvfs{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_totalvfs{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 8\nnode_pcidevice_sriov_totalvfs{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 7\n# HELP node_pcidevice_sriov_vf_total_msix Total number of MSI-X vectors for Virtual Functions.\n# TYPE node_pcidevice_sriov_vf_total_msix gauge\nnode_pcidevice_sriov_vf_total_msix{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_vf_total_msix{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 16\nnode_pcidevice_sriov_vf_total_msix{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n# HELP node_power_supply_capacity capacity value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_capacity gauge\nnode_power_supply_capacity{power_supply=\"BAT0\"} 81\n# HELP node_power_supply_cyclecount cyclecount value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_cyclecount gauge\nnode_power_supply_cyclecount{power_supply=\"BAT0\"} 0\n# HELP node_power_supply_energy_full energy_full value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_energy_full gauge\nnode_power_supply_energy_full{power_supply=\"BAT0\"} 45.07\n# HELP node_power_supply_energy_full_design energy_full_design value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_energy_full_design gauge\nnode_power_supply_energy_full_design{power_supply=\"BAT0\"} 47.52\n# HELP node_power_supply_energy_watthour energy_watthour value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_energy_watthour gauge\nnode_power_supply_energy_watthour{power_supply=\"BAT0\"} 36.58\n# HELP node_power_supply_info info of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_info gauge\nnode_power_supply_info{power_supply=\"AC\",type=\"Mains\"} 1\nnode_power_supply_info{capacity_level=\"Normal\",manufacturer=\"LGC\",model_name=\"LNV-45N1��\",power_supply=\"BAT0\",serial_number=\"38109\",status=\"Discharging\",technology=\"Li-ion\",type=\"Battery\"} 1\n# HELP node_power_supply_online online value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_online gauge\nnode_power_supply_online{power_supply=\"AC\"} 0\n# HELP node_power_supply_power_watt power_watt value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_power_watt gauge\nnode_power_supply_power_watt{power_supply=\"BAT0\"} 5.002\n# HELP node_power_supply_present present value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_present gauge\nnode_power_supply_present{power_supply=\"BAT0\"} 1\n# HELP node_power_supply_voltage_min_design voltage_min_design value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_voltage_min_design gauge\nnode_power_supply_voltage_min_design{power_supply=\"BAT0\"} 10.8\n# HELP node_power_supply_voltage_volt voltage_volt value of /sys/class/power_supply/<power_supply>.\n# TYPE node_power_supply_voltage_volt gauge\nnode_power_supply_voltage_volt{power_supply=\"BAT0\"} 11.66\n# HELP node_pressure_cpu_waiting_seconds_total Total time in seconds that processes have waited for CPU time\n# TYPE node_pressure_cpu_waiting_seconds_total counter\nnode_pressure_cpu_waiting_seconds_total 14.036781000000001\n# HELP node_pressure_io_stalled_seconds_total Total time in seconds no process could make progress due to IO congestion\n# TYPE node_pressure_io_stalled_seconds_total counter\nnode_pressure_io_stalled_seconds_total 159.229614\n# HELP node_pressure_io_waiting_seconds_total Total time in seconds that processes have waited due to IO congestion\n# TYPE node_pressure_io_waiting_seconds_total counter\nnode_pressure_io_waiting_seconds_total 159.886802\n# HELP node_pressure_irq_stalled_seconds_total Total time in seconds no process could make progress due to IRQ congestion\n# TYPE node_pressure_irq_stalled_seconds_total counter\nnode_pressure_irq_stalled_seconds_total 0.008494\n# HELP node_pressure_memory_stalled_seconds_total Total time in seconds no process could make progress due to memory congestion\n# TYPE node_pressure_memory_stalled_seconds_total counter\nnode_pressure_memory_stalled_seconds_total 0\n# HELP node_pressure_memory_waiting_seconds_total Total time in seconds that processes have waited for memory\n# TYPE node_pressure_memory_waiting_seconds_total counter\nnode_pressure_memory_waiting_seconds_total 0\n# HELP node_processes_max_processes Number of max PIDs limit\n# TYPE node_processes_max_processes gauge\nnode_processes_max_processes 123\n# HELP node_processes_max_threads Limit of threads in the system\n# TYPE node_processes_max_threads gauge\nnode_processes_max_threads 7801\n# HELP node_processes_pids Number of PIDs\n# TYPE node_processes_pids gauge\nnode_processes_pids 3\n# HELP node_processes_state Number of processes in each state.\n# TYPE node_processes_state gauge\nnode_processes_state{state=\"I\"} 1\nnode_processes_state{state=\"S\"} 2\n# HELP node_processes_threads Allocated threads in system\n# TYPE node_processes_threads gauge\nnode_processes_threads 3\n# HELP node_procs_blocked Number of processes blocked waiting for I/O to complete.\n# TYPE node_procs_blocked gauge\nnode_procs_blocked 0\n# HELP node_procs_running Number of processes in runnable state.\n# TYPE node_procs_running gauge\nnode_procs_running 2\n# HELP node_qdisc_backlog Number of bytes currently in queue to be sent.\n# TYPE node_qdisc_backlog gauge\nnode_qdisc_backlog{device=\"eth0\",kind=\"pfifo_fast\"} 0\nnode_qdisc_backlog{device=\"wlan0\",kind=\"fq\"} 0\n# HELP node_qdisc_bytes_total Number of bytes sent.\n# TYPE node_qdisc_bytes_total counter\nnode_qdisc_bytes_total{device=\"eth0\",kind=\"pfifo_fast\"} 83\nnode_qdisc_bytes_total{device=\"wlan0\",kind=\"fq\"} 42\n# HELP node_qdisc_current_queue_length Number of packets currently in queue to be sent.\n# TYPE node_qdisc_current_queue_length gauge\nnode_qdisc_current_queue_length{device=\"eth0\",kind=\"pfifo_fast\"} 0\nnode_qdisc_current_queue_length{device=\"wlan0\",kind=\"fq\"} 0\n# HELP node_qdisc_drops_total Number of packets dropped.\n# TYPE node_qdisc_drops_total counter\nnode_qdisc_drops_total{device=\"eth0\",kind=\"pfifo_fast\"} 0\nnode_qdisc_drops_total{device=\"wlan0\",kind=\"fq\"} 1\n# HELP node_qdisc_overlimits_total Number of overlimit packets.\n# TYPE node_qdisc_overlimits_total counter\nnode_qdisc_overlimits_total{device=\"eth0\",kind=\"pfifo_fast\"} 0\nnode_qdisc_overlimits_total{device=\"wlan0\",kind=\"fq\"} 0\n# HELP node_qdisc_packets_total Number of packets sent.\n# TYPE node_qdisc_packets_total counter\nnode_qdisc_packets_total{device=\"eth0\",kind=\"pfifo_fast\"} 83\nnode_qdisc_packets_total{device=\"wlan0\",kind=\"fq\"} 42\n# HELP node_qdisc_requeues_total Number of packets dequeued, not transmitted, and requeued.\n# TYPE node_qdisc_requeues_total counter\nnode_qdisc_requeues_total{device=\"eth0\",kind=\"pfifo_fast\"} 2\nnode_qdisc_requeues_total{device=\"wlan0\",kind=\"fq\"} 1\n# HELP node_rapl_core_joules_total Current RAPL core value in joules\n# TYPE node_rapl_core_joules_total counter\nnode_rapl_core_joules_total{index=\"0\",path=\"collector/fixtures/sys/class/powercap/intel-rapl:0:0\"} 118821.284256\n# HELP node_rapl_package_joules_total Current RAPL package value in joules\n# TYPE node_rapl_package_joules_total counter\nnode_rapl_package_joules_total{index=\"0\",path=\"collector/fixtures/sys/class/powercap/intel-rapl:0\"} 240422.366267\n# HELP node_schedstat_running_seconds_total Number of seconds CPU spent running a process.\n# TYPE node_schedstat_running_seconds_total counter\nnode_schedstat_running_seconds_total{cpu=\"0\"} 2.045936778163039e+06\nnode_schedstat_running_seconds_total{cpu=\"1\"} 1.904686152592476e+06\n# HELP node_schedstat_timeslices_total Number of timeslices executed by CPU.\n# TYPE node_schedstat_timeslices_total counter\nnode_schedstat_timeslices_total{cpu=\"0\"} 4.767485306e+09\nnode_schedstat_timeslices_total{cpu=\"1\"} 5.145567945e+09\n# HELP node_schedstat_waiting_seconds_total Number of seconds spent by processing waiting for this CPU.\n# TYPE node_schedstat_waiting_seconds_total counter\nnode_schedstat_waiting_seconds_total{cpu=\"0\"} 343796.328169361\nnode_schedstat_waiting_seconds_total{cpu=\"1\"} 364107.263788241\n# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.\n# TYPE node_scrape_collector_duration_seconds gauge\n# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.\n# TYPE node_scrape_collector_success gauge\nnode_scrape_collector_success{collector=\"arp\"} 1\nnode_scrape_collector_success{collector=\"bcache\"} 1\nnode_scrape_collector_success{collector=\"bcachefs\"} 1\nnode_scrape_collector_success{collector=\"bonding\"} 1\nnode_scrape_collector_success{collector=\"btrfs\"} 1\nnode_scrape_collector_success{collector=\"buddyinfo\"} 1\nnode_scrape_collector_success{collector=\"cgroups\"} 1\nnode_scrape_collector_success{collector=\"conntrack\"} 1\nnode_scrape_collector_success{collector=\"cpu\"} 1\nnode_scrape_collector_success{collector=\"cpu_vulnerabilities\"} 1\nnode_scrape_collector_success{collector=\"cpufreq\"} 1\nnode_scrape_collector_success{collector=\"diskstats\"} 1\nnode_scrape_collector_success{collector=\"dmi\"} 1\nnode_scrape_collector_success{collector=\"drbd\"} 1\nnode_scrape_collector_success{collector=\"edac\"} 1\nnode_scrape_collector_success{collector=\"entropy\"} 1\nnode_scrape_collector_success{collector=\"fibrechannel\"} 1\nnode_scrape_collector_success{collector=\"filefd\"} 1\nnode_scrape_collector_success{collector=\"hwmon\"} 1\nnode_scrape_collector_success{collector=\"infiniband\"} 1\nnode_scrape_collector_success{collector=\"interrupts\"} 1\nnode_scrape_collector_success{collector=\"ipvs\"} 1\nnode_scrape_collector_success{collector=\"ksmd\"} 1\nnode_scrape_collector_success{collector=\"lnstat\"} 1\nnode_scrape_collector_success{collector=\"loadavg\"} 1\nnode_scrape_collector_success{collector=\"mdadm\"} 1\nnode_scrape_collector_success{collector=\"meminfo\"} 1\nnode_scrape_collector_success{collector=\"meminfo_numa\"} 1\nnode_scrape_collector_success{collector=\"mountstats\"} 1\nnode_scrape_collector_success{collector=\"netclass\"} 1\nnode_scrape_collector_success{collector=\"netdev\"} 1\nnode_scrape_collector_success{collector=\"netstat\"} 1\nnode_scrape_collector_success{collector=\"nfs\"} 1\nnode_scrape_collector_success{collector=\"nfsd\"} 1\nnode_scrape_collector_success{collector=\"nvme\"} 1\nnode_scrape_collector_success{collector=\"os\"} 1\nnode_scrape_collector_success{collector=\"pcidevice\"} 1\nnode_scrape_collector_success{collector=\"powersupplyclass\"} 1\nnode_scrape_collector_success{collector=\"pressure\"} 1\nnode_scrape_collector_success{collector=\"processes\"} 1\nnode_scrape_collector_success{collector=\"qdisc\"} 1\nnode_scrape_collector_success{collector=\"rapl\"} 1\nnode_scrape_collector_success{collector=\"schedstat\"} 1\nnode_scrape_collector_success{collector=\"slabinfo\"} 1\nnode_scrape_collector_success{collector=\"sockstat\"} 1\nnode_scrape_collector_success{collector=\"softirqs\"} 1\nnode_scrape_collector_success{collector=\"softnet\"} 1\nnode_scrape_collector_success{collector=\"stat\"} 1\nnode_scrape_collector_success{collector=\"sysctl\"} 1\nnode_scrape_collector_success{collector=\"tapestats\"} 1\nnode_scrape_collector_success{collector=\"textfile\"} 1\nnode_scrape_collector_success{collector=\"thermal_zone\"} 1\nnode_scrape_collector_success{collector=\"time\"} 1\nnode_scrape_collector_success{collector=\"udp_queues\"} 1\nnode_scrape_collector_success{collector=\"vmstat\"} 1\nnode_scrape_collector_success{collector=\"watchdog\"} 1\nnode_scrape_collector_success{collector=\"wifi\"} 1\nnode_scrape_collector_success{collector=\"xfrm\"} 1\nnode_scrape_collector_success{collector=\"xfs\"} 1\nnode_scrape_collector_success{collector=\"zfs\"} 1\nnode_scrape_collector_success{collector=\"zoneinfo\"} 1\n# HELP node_slabinfo_active_objects The number of objects that are currently active (i.e., in use).\n# TYPE node_slabinfo_active_objects gauge\nnode_slabinfo_active_objects{slab=\"dmaengine-unmap-128\"} 1206\nnode_slabinfo_active_objects{slab=\"kmalloc-8192\"} 132\nnode_slabinfo_active_objects{slab=\"kmem_cache\"} 320\nnode_slabinfo_active_objects{slab=\"tw_sock_TCP\"} 704\n# HELP node_slabinfo_object_size_bytes The size of objects in this slab, in bytes.\n# TYPE node_slabinfo_object_size_bytes gauge\nnode_slabinfo_object_size_bytes{slab=\"dmaengine-unmap-128\"} 1088\nnode_slabinfo_object_size_bytes{slab=\"kmalloc-8192\"} 8192\nnode_slabinfo_object_size_bytes{slab=\"kmem_cache\"} 256\nnode_slabinfo_object_size_bytes{slab=\"tw_sock_TCP\"} 256\n# HELP node_slabinfo_objects The total number of allocated objects (i.e., objects that are both in use and not in use).\n# TYPE node_slabinfo_objects gauge\nnode_slabinfo_objects{slab=\"dmaengine-unmap-128\"} 1320\nnode_slabinfo_objects{slab=\"kmalloc-8192\"} 148\nnode_slabinfo_objects{slab=\"kmem_cache\"} 320\nnode_slabinfo_objects{slab=\"tw_sock_TCP\"} 864\n# HELP node_slabinfo_objects_per_slab The number of objects stored in each slab.\n# TYPE node_slabinfo_objects_per_slab gauge\nnode_slabinfo_objects_per_slab{slab=\"dmaengine-unmap-128\"} 30\nnode_slabinfo_objects_per_slab{slab=\"kmalloc-8192\"} 4\nnode_slabinfo_objects_per_slab{slab=\"kmem_cache\"} 32\nnode_slabinfo_objects_per_slab{slab=\"tw_sock_TCP\"} 32\n# HELP node_slabinfo_pages_per_slab The number of pages allocated for each slab.\n# TYPE node_slabinfo_pages_per_slab gauge\nnode_slabinfo_pages_per_slab{slab=\"dmaengine-unmap-128\"} 8\nnode_slabinfo_pages_per_slab{slab=\"kmalloc-8192\"} 8\nnode_slabinfo_pages_per_slab{slab=\"kmem_cache\"} 2\nnode_slabinfo_pages_per_slab{slab=\"tw_sock_TCP\"} 2\n# HELP node_sockstat_FRAG6_inuse Number of FRAG6 sockets in state inuse.\n# TYPE node_sockstat_FRAG6_inuse gauge\nnode_sockstat_FRAG6_inuse 0\n# HELP node_sockstat_FRAG6_memory Number of FRAG6 sockets in state memory.\n# TYPE node_sockstat_FRAG6_memory gauge\nnode_sockstat_FRAG6_memory 0\n# HELP node_sockstat_FRAG_inuse Number of FRAG sockets in state inuse.\n# TYPE node_sockstat_FRAG_inuse gauge\nnode_sockstat_FRAG_inuse 0\n# HELP node_sockstat_FRAG_memory Number of FRAG sockets in state memory.\n# TYPE node_sockstat_FRAG_memory gauge\nnode_sockstat_FRAG_memory 0\n# HELP node_sockstat_RAW6_inuse Number of RAW6 sockets in state inuse.\n# TYPE node_sockstat_RAW6_inuse gauge\nnode_sockstat_RAW6_inuse 1\n# HELP node_sockstat_RAW_inuse Number of RAW sockets in state inuse.\n# TYPE node_sockstat_RAW_inuse gauge\nnode_sockstat_RAW_inuse 0\n# HELP node_sockstat_TCP6_inuse Number of TCP6 sockets in state inuse.\n# TYPE node_sockstat_TCP6_inuse gauge\nnode_sockstat_TCP6_inuse 17\n# HELP node_sockstat_TCP_alloc Number of TCP sockets in state alloc.\n# TYPE node_sockstat_TCP_alloc gauge\nnode_sockstat_TCP_alloc 17\n# HELP node_sockstat_TCP_inuse Number of TCP sockets in state inuse.\n# TYPE node_sockstat_TCP_inuse gauge\nnode_sockstat_TCP_inuse 4\n# HELP node_sockstat_TCP_mem Number of TCP sockets in state mem.\n# TYPE node_sockstat_TCP_mem gauge\nnode_sockstat_TCP_mem 1\n# HELP node_sockstat_TCP_mem_bytes Number of TCP sockets in state mem_bytes.\n# TYPE node_sockstat_TCP_mem_bytes gauge\nnode_sockstat_TCP_mem_bytes 4096\n# HELP node_sockstat_TCP_orphan Number of TCP sockets in state orphan.\n# TYPE node_sockstat_TCP_orphan gauge\nnode_sockstat_TCP_orphan 0\n# HELP node_sockstat_TCP_tw Number of TCP sockets in state tw.\n# TYPE node_sockstat_TCP_tw gauge\nnode_sockstat_TCP_tw 4\n# HELP node_sockstat_UDP6_inuse Number of UDP6 sockets in state inuse.\n# TYPE node_sockstat_UDP6_inuse gauge\nnode_sockstat_UDP6_inuse 9\n# HELP node_sockstat_UDPLITE6_inuse Number of UDPLITE6 sockets in state inuse.\n# TYPE node_sockstat_UDPLITE6_inuse gauge\nnode_sockstat_UDPLITE6_inuse 0\n# HELP node_sockstat_UDPLITE_inuse Number of UDPLITE sockets in state inuse.\n# TYPE node_sockstat_UDPLITE_inuse gauge\nnode_sockstat_UDPLITE_inuse 0\n# HELP node_sockstat_UDP_inuse Number of UDP sockets in state inuse.\n# TYPE node_sockstat_UDP_inuse gauge\nnode_sockstat_UDP_inuse 0\n# HELP node_sockstat_UDP_mem Number of UDP sockets in state mem.\n# TYPE node_sockstat_UDP_mem gauge\nnode_sockstat_UDP_mem 0\n# HELP node_sockstat_UDP_mem_bytes Number of UDP sockets in state mem_bytes.\n# TYPE node_sockstat_UDP_mem_bytes gauge\nnode_sockstat_UDP_mem_bytes 0\n# HELP node_sockstat_sockets_used Number of IPv4 sockets in use.\n# TYPE node_sockstat_sockets_used gauge\nnode_sockstat_sockets_used 229\n# HELP node_softirqs_functions_total Softirq counts per CPU.\n# TYPE node_softirqs_functions_total counter\nnode_softirqs_functions_total{cpu=\"0\",type=\"BLOCK\"} 23776\nnode_softirqs_functions_total{cpu=\"0\",type=\"HI\"} 7\nnode_softirqs_functions_total{cpu=\"0\",type=\"HRTIMER\"} 40\nnode_softirqs_functions_total{cpu=\"0\",type=\"IRQ_POLL\"} 0\nnode_softirqs_functions_total{cpu=\"0\",type=\"NET_RX\"} 43066\nnode_softirqs_functions_total{cpu=\"0\",type=\"NET_TX\"} 2301\nnode_softirqs_functions_total{cpu=\"0\",type=\"RCU\"} 155929\nnode_softirqs_functions_total{cpu=\"0\",type=\"SCHED\"} 378895\nnode_softirqs_functions_total{cpu=\"0\",type=\"TASKLET\"} 372\nnode_softirqs_functions_total{cpu=\"0\",type=\"TIMER\"} 424191\nnode_softirqs_functions_total{cpu=\"1\",type=\"BLOCK\"} 24115\nnode_softirqs_functions_total{cpu=\"1\",type=\"HI\"} 1\nnode_softirqs_functions_total{cpu=\"1\",type=\"HRTIMER\"} 346\nnode_softirqs_functions_total{cpu=\"1\",type=\"IRQ_POLL\"} 0\nnode_softirqs_functions_total{cpu=\"1\",type=\"NET_RX\"} 104508\nnode_softirqs_functions_total{cpu=\"1\",type=\"NET_TX\"} 2430\nnode_softirqs_functions_total{cpu=\"1\",type=\"RCU\"} 146631\nnode_softirqs_functions_total{cpu=\"1\",type=\"SCHED\"} 152852\nnode_softirqs_functions_total{cpu=\"1\",type=\"TASKLET\"} 1899\nnode_softirqs_functions_total{cpu=\"1\",type=\"TIMER\"} 108342\n# HELP node_softirqs_total Number of softirq calls.\n# TYPE node_softirqs_total counter\nnode_softirqs_total{vector=\"block\"} 186066\nnode_softirqs_total{vector=\"block_iopoll\"} 0\nnode_softirqs_total{vector=\"hi\"} 250191\nnode_softirqs_total{vector=\"hrtimer\"} 12499\nnode_softirqs_total{vector=\"net_rx\"} 211099\nnode_softirqs_total{vector=\"net_tx\"} 1647\nnode_softirqs_total{vector=\"rcu\"} 508444\nnode_softirqs_total{vector=\"sched\"} 622196\nnode_softirqs_total{vector=\"tasklet\"} 1.783454e+06\nnode_softirqs_total{vector=\"timer\"} 1.481983e+06\n# HELP node_softnet_backlog_len Softnet backlog status\n# TYPE node_softnet_backlog_len gauge\nnode_softnet_backlog_len{cpu=\"0\"} 0\nnode_softnet_backlog_len{cpu=\"1\"} 0\nnode_softnet_backlog_len{cpu=\"2\"} 0\nnode_softnet_backlog_len{cpu=\"3\"} 0\n# HELP node_softnet_cpu_collision_total Number of collision occur while obtaining device lock while transmitting\n# TYPE node_softnet_cpu_collision_total counter\nnode_softnet_cpu_collision_total{cpu=\"0\"} 0\nnode_softnet_cpu_collision_total{cpu=\"1\"} 0\nnode_softnet_cpu_collision_total{cpu=\"2\"} 0\nnode_softnet_cpu_collision_total{cpu=\"3\"} 0\n# HELP node_softnet_dropped_total Number of dropped packets\n# TYPE node_softnet_dropped_total counter\nnode_softnet_dropped_total{cpu=\"0\"} 0\nnode_softnet_dropped_total{cpu=\"1\"} 41\nnode_softnet_dropped_total{cpu=\"2\"} 0\nnode_softnet_dropped_total{cpu=\"3\"} 0\n# HELP node_softnet_flow_limit_count_total Number of times flow limit has been reached\n# TYPE node_softnet_flow_limit_count_total counter\nnode_softnet_flow_limit_count_total{cpu=\"0\"} 0\nnode_softnet_flow_limit_count_total{cpu=\"1\"} 0\nnode_softnet_flow_limit_count_total{cpu=\"2\"} 0\nnode_softnet_flow_limit_count_total{cpu=\"3\"} 0\n# HELP node_softnet_processed_total Number of processed packets\n# TYPE node_softnet_processed_total counter\nnode_softnet_processed_total{cpu=\"0\"} 299641\nnode_softnet_processed_total{cpu=\"1\"} 916354\nnode_softnet_processed_total{cpu=\"2\"} 5.577791e+06\nnode_softnet_processed_total{cpu=\"3\"} 3.113785e+06\n# HELP node_softnet_received_rps_total Number of times cpu woken up received_rps\n# TYPE node_softnet_received_rps_total counter\nnode_softnet_received_rps_total{cpu=\"0\"} 0\nnode_softnet_received_rps_total{cpu=\"1\"} 0\nnode_softnet_received_rps_total{cpu=\"2\"} 0\nnode_softnet_received_rps_total{cpu=\"3\"} 0\n# HELP node_softnet_times_squeezed_total Number of times processing packets ran out of quota\n# TYPE node_softnet_times_squeezed_total counter\nnode_softnet_times_squeezed_total{cpu=\"0\"} 1\nnode_softnet_times_squeezed_total{cpu=\"1\"} 10\nnode_softnet_times_squeezed_total{cpu=\"2\"} 85\nnode_softnet_times_squeezed_total{cpu=\"3\"} 50\n# HELP node_sysctl_fs_file_nr sysctl fs.file-nr\n# TYPE node_sysctl_fs_file_nr untyped\nnode_sysctl_fs_file_nr{index=\"0\"} 1024\nnode_sysctl_fs_file_nr{index=\"1\"} 0\nnode_sysctl_fs_file_nr{index=\"2\"} 1.631329e+06\n# HELP node_sysctl_fs_file_nr_current sysctl fs.file-nr, field 1\n# TYPE node_sysctl_fs_file_nr_current untyped\nnode_sysctl_fs_file_nr_current 0\n# HELP node_sysctl_fs_file_nr_max sysctl fs.file-nr, field 2\n# TYPE node_sysctl_fs_file_nr_max untyped\nnode_sysctl_fs_file_nr_max 1.631329e+06\n# HELP node_sysctl_fs_file_nr_total sysctl fs.file-nr, field 0\n# TYPE node_sysctl_fs_file_nr_total untyped\nnode_sysctl_fs_file_nr_total 1024\n# HELP node_sysctl_info sysctl info\n# TYPE node_sysctl_info gauge\nnode_sysctl_info{index=\"0\",name=\"kernel.seccomp.actions_avail\",value=\"kill_process\"} 1\nnode_sysctl_info{index=\"1\",name=\"kernel.seccomp.actions_avail\",value=\"kill_thread\"} 1\nnode_sysctl_info{index=\"2\",name=\"kernel.seccomp.actions_avail\",value=\"trap\"} 1\nnode_sysctl_info{index=\"3\",name=\"kernel.seccomp.actions_avail\",value=\"errno\"} 1\nnode_sysctl_info{index=\"4\",name=\"kernel.seccomp.actions_avail\",value=\"user_notif\"} 1\nnode_sysctl_info{index=\"5\",name=\"kernel.seccomp.actions_avail\",value=\"trace\"} 1\nnode_sysctl_info{index=\"6\",name=\"kernel.seccomp.actions_avail\",value=\"log\"} 1\nnode_sysctl_info{index=\"7\",name=\"kernel.seccomp.actions_avail\",value=\"allow\"} 1\n# HELP node_sysctl_kernel_threads_max sysctl kernel.threads-max\n# TYPE node_sysctl_kernel_threads_max untyped\nnode_sysctl_kernel_threads_max 7801\n# HELP node_tape_io_now The number of I/Os currently outstanding to this device.\n# TYPE node_tape_io_now gauge\nnode_tape_io_now{device=\"st0\"} 1\n# HELP node_tape_io_others_total The number of I/Os issued to the tape drive other than read or write commands. The time taken to complete these commands uses the following calculation io_time_seconds_total-read_time_seconds_total-write_time_seconds_total\n# TYPE node_tape_io_others_total counter\nnode_tape_io_others_total{device=\"st0\"} 1409\n# HELP node_tape_io_time_seconds_total The amount of time spent waiting for all I/O to complete (including read and write). This includes tape movement commands such as seeking between file or set marks and implicit tape movement such as when rewind on close tape devices are used.\n# TYPE node_tape_io_time_seconds_total counter\nnode_tape_io_time_seconds_total{device=\"st0\"} 9247.01108772\n# HELP node_tape_read_bytes_total The number of bytes read from the tape drive.\n# TYPE node_tape_read_bytes_total counter\nnode_tape_read_bytes_total{device=\"st0\"} 9.79383912e+08\n# HELP node_tape_read_time_seconds_total The amount of time spent waiting for read requests to complete.\n# TYPE node_tape_read_time_seconds_total counter\nnode_tape_read_time_seconds_total{device=\"st0\"} 33.788355744\n# HELP node_tape_reads_completed_total The number of read requests issued to the tape drive.\n# TYPE node_tape_reads_completed_total counter\nnode_tape_reads_completed_total{device=\"st0\"} 3741\n# HELP node_tape_residual_total The number of times during a read or write we found the residual amount to be non-zero. This should mean that a program is issuing a read larger thean the block size on tape. For write not all data made it to tape.\n# TYPE node_tape_residual_total counter\nnode_tape_residual_total{device=\"st0\"} 19\n# HELP node_tape_write_time_seconds_total The amount of time spent waiting for write requests to complete.\n# TYPE node_tape_write_time_seconds_total counter\nnode_tape_write_time_seconds_total{device=\"st0\"} 5233.597394395\n# HELP node_tape_writes_completed_total The number of write requests issued to the tape drive.\n# TYPE node_tape_writes_completed_total counter\nnode_tape_writes_completed_total{device=\"st0\"} 5.3772916e+07\n# HELP node_tape_written_bytes_total The number of bytes written to the tape drive.\n# TYPE node_tape_written_bytes_total counter\nnode_tape_written_bytes_total{device=\"st0\"} 1.496246784e+12\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP node_thermal_zone_temp Zone temperature in Celsius\n# TYPE node_thermal_zone_temp gauge\nnode_thermal_zone_temp{type=\"cpu-thermal\",zone=\"0\"} 12.376\n# HELP node_time_clocksource_available_info Available clocksources read from '/sys/devices/system/clocksource'.\n# TYPE node_time_clocksource_available_info gauge\nnode_time_clocksource_available_info{clocksource=\"acpi_pm\",device=\"0\"} 1\nnode_time_clocksource_available_info{clocksource=\"hpet\",device=\"0\"} 1\nnode_time_clocksource_available_info{clocksource=\"tsc\",device=\"0\"} 1\n# HELP node_time_clocksource_current_info Current clocksource read from '/sys/devices/system/clocksource'.\n# TYPE node_time_clocksource_current_info gauge\nnode_time_clocksource_current_info{clocksource=\"tsc\",device=\"0\"} 1\n# HELP node_time_seconds System time in seconds since epoch (1970).\n# TYPE node_time_seconds gauge\n# HELP node_time_zone_offset_seconds System time zone offset in seconds.\n# TYPE node_time_zone_offset_seconds gauge\n# HELP node_udp_queues Number of allocated memory in the kernel for UDP datagrams in bytes.\n# TYPE node_udp_queues gauge\nnode_udp_queues{ip=\"v4\",queue=\"rx\"} 0\nnode_udp_queues{ip=\"v4\",queue=\"tx\"} 21\n# HELP node_vmstat_oom_kill /proc/vmstat information field oom_kill.\n# TYPE node_vmstat_oom_kill untyped\nnode_vmstat_oom_kill 0\n# HELP node_vmstat_pgfault /proc/vmstat information field pgfault.\n# TYPE node_vmstat_pgfault untyped\nnode_vmstat_pgfault 2.320168809e+09\n# HELP node_vmstat_pgmajfault /proc/vmstat information field pgmajfault.\n# TYPE node_vmstat_pgmajfault untyped\nnode_vmstat_pgmajfault 507162\n# HELP node_vmstat_pgpgin /proc/vmstat information field pgpgin.\n# TYPE node_vmstat_pgpgin untyped\nnode_vmstat_pgpgin 7.344136e+06\n# HELP node_vmstat_pgpgout /proc/vmstat information field pgpgout.\n# TYPE node_vmstat_pgpgout untyped\nnode_vmstat_pgpgout 1.541180581e+09\n# HELP node_vmstat_pswpin /proc/vmstat information field pswpin.\n# TYPE node_vmstat_pswpin untyped\nnode_vmstat_pswpin 1476\n# HELP node_vmstat_pswpout /proc/vmstat information field pswpout.\n# TYPE node_vmstat_pswpout untyped\nnode_vmstat_pswpout 35045\n# HELP node_watchdog_access_cs0 Value of /sys/class/watchdog/<watchdog>/access_cs0\n# TYPE node_watchdog_access_cs0 gauge\nnode_watchdog_access_cs0{name=\"watchdog0\"} 0\n# HELP node_watchdog_bootstatus Value of /sys/class/watchdog/<watchdog>/bootstatus\n# TYPE node_watchdog_bootstatus gauge\nnode_watchdog_bootstatus{name=\"watchdog0\"} 1\n# HELP node_watchdog_fw_version Value of /sys/class/watchdog/<watchdog>/fw_version\n# TYPE node_watchdog_fw_version gauge\nnode_watchdog_fw_version{name=\"watchdog0\"} 2\n# HELP node_watchdog_info Info of /sys/class/watchdog/<watchdog>\n# TYPE node_watchdog_info gauge\nnode_watchdog_info{identity=\"\",name=\"watchdog1\",options=\"\",pretimeout_governor=\"\",state=\"\",status=\"\"} 1\nnode_watchdog_info{identity=\"Software Watchdog\",name=\"watchdog0\",options=\"0x8380\",pretimeout_governor=\"noop\",state=\"active\",status=\"0x8000\"} 1\n# HELP node_watchdog_nowayout Value of /sys/class/watchdog/<watchdog>/nowayout\n# TYPE node_watchdog_nowayout gauge\nnode_watchdog_nowayout{name=\"watchdog0\"} 0\n# HELP node_watchdog_pretimeout_seconds Value of /sys/class/watchdog/<watchdog>/pretimeout\n# TYPE node_watchdog_pretimeout_seconds gauge\nnode_watchdog_pretimeout_seconds{name=\"watchdog0\"} 120\n# HELP node_watchdog_timeleft_seconds Value of /sys/class/watchdog/<watchdog>/timeleft\n# TYPE node_watchdog_timeleft_seconds gauge\nnode_watchdog_timeleft_seconds{name=\"watchdog0\"} 300\n# HELP node_watchdog_timeout_seconds Value of /sys/class/watchdog/<watchdog>/timeout\n# TYPE node_watchdog_timeout_seconds gauge\nnode_watchdog_timeout_seconds{name=\"watchdog0\"} 60\n# HELP node_wifi_interface_frequency_hertz The current frequency a WiFi interface is operating at, in hertz.\n# TYPE node_wifi_interface_frequency_hertz gauge\nnode_wifi_interface_frequency_hertz{device=\"wlan0\"} 2.412e+09\nnode_wifi_interface_frequency_hertz{device=\"wlan1\"} 2.412e+09\n# HELP node_wifi_station_beacon_loss_total The total number of times a station has detected a beacon loss.\n# TYPE node_wifi_station_beacon_loss_total counter\nnode_wifi_station_beacon_loss_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 2\nnode_wifi_station_beacon_loss_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 1\n# HELP node_wifi_station_connected_seconds_total The total number of seconds a station has been connected to an access point.\n# TYPE node_wifi_station_connected_seconds_total counter\nnode_wifi_station_connected_seconds_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 60\nnode_wifi_station_connected_seconds_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 30\n# HELP node_wifi_station_inactive_seconds The number of seconds since any wireless activity has occurred on a station.\n# TYPE node_wifi_station_inactive_seconds gauge\nnode_wifi_station_inactive_seconds{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0.8\nnode_wifi_station_inactive_seconds{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0.4\n# HELP node_wifi_station_info Labeled WiFi interface station information as provided by the operating system.\n# TYPE node_wifi_station_info gauge\nnode_wifi_station_info{bssid=\"00:11:22:33:44:55\",device=\"wlan0\",mode=\"client\",ssid=\"Example\"} 1\n# HELP node_wifi_station_receive_bits_per_second The current WiFi receive bitrate of a station, in bits per second.\n# TYPE node_wifi_station_receive_bits_per_second gauge\nnode_wifi_station_receive_bits_per_second{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 2.56e+08\nnode_wifi_station_receive_bits_per_second{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 1.28e+08\n# HELP node_wifi_station_receive_bytes_total The total number of bytes received by a WiFi station.\n# TYPE node_wifi_station_receive_bytes_total counter\nnode_wifi_station_receive_bytes_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0\nnode_wifi_station_receive_bytes_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0\n# HELP node_wifi_station_received_packets_total The total number of packets received by a station.\n# TYPE node_wifi_station_received_packets_total counter\nnode_wifi_station_received_packets_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0\nnode_wifi_station_received_packets_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0\n# HELP node_wifi_station_signal_dbm The current WiFi signal strength, in decibel-milliwatts (dBm).\n# TYPE node_wifi_station_signal_dbm gauge\nnode_wifi_station_signal_dbm{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} -26\nnode_wifi_station_signal_dbm{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} -52\n# HELP node_wifi_station_transmit_bits_per_second The current WiFi transmit bitrate of a station, in bits per second.\n# TYPE node_wifi_station_transmit_bits_per_second gauge\nnode_wifi_station_transmit_bits_per_second{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 3.28e+08\nnode_wifi_station_transmit_bits_per_second{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 1.64e+08\n# HELP node_wifi_station_transmit_bytes_total The total number of bytes transmitted by a WiFi station.\n# TYPE node_wifi_station_transmit_bytes_total counter\nnode_wifi_station_transmit_bytes_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0\nnode_wifi_station_transmit_bytes_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0\n# HELP node_wifi_station_transmit_failed_total The total number of times a station has failed to send a packet.\n# TYPE node_wifi_station_transmit_failed_total counter\nnode_wifi_station_transmit_failed_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 4\nnode_wifi_station_transmit_failed_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 2\n# HELP node_wifi_station_transmit_retries_total The total number of times a station has had to retry while sending a packet.\n# TYPE node_wifi_station_transmit_retries_total counter\nnode_wifi_station_transmit_retries_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 20\nnode_wifi_station_transmit_retries_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 10\n# HELP node_wifi_station_transmitted_packets_total The total number of packets transmitted by a station.\n# TYPE node_wifi_station_transmitted_packets_total counter\nnode_wifi_station_transmitted_packets_total{device=\"wlan0\",mac_address=\"01:02:03:04:05:06\"} 0\nnode_wifi_station_transmitted_packets_total{device=\"wlan0\",mac_address=\"aa:bb:cc:dd:ee:ff\"} 0\n# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n# TYPE node_xfrm_acquire_error_packets_total counter\nnode_xfrm_acquire_error_packets_total 24532\n# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n# TYPE node_xfrm_fwd_hdr_error_packets_total counter\nnode_xfrm_fwd_hdr_error_packets_total 6654\n# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n# TYPE node_xfrm_in_buffer_error_packets_total counter\nnode_xfrm_in_buffer_error_packets_total 2\n# HELP node_xfrm_in_error_packets_total All errors not matched by other\n# TYPE node_xfrm_in_error_packets_total counter\nnode_xfrm_in_error_packets_total 1\n# HELP node_xfrm_in_hdr_error_packets_total Header error\n# TYPE node_xfrm_in_hdr_error_packets_total counter\nnode_xfrm_in_hdr_error_packets_total 4\n# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n# TYPE node_xfrm_in_no_pols_packets_total counter\nnode_xfrm_in_no_pols_packets_total 65432\n# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n# TYPE node_xfrm_in_no_states_packets_total counter\nnode_xfrm_in_no_states_packets_total 3\n# HELP node_xfrm_in_pol_block_packets_total Policy discards\n# TYPE node_xfrm_in_pol_block_packets_total counter\nnode_xfrm_in_pol_block_packets_total 100\n# HELP node_xfrm_in_pol_error_packets_total Policy error\n# TYPE node_xfrm_in_pol_error_packets_total counter\nnode_xfrm_in_pol_error_packets_total 10000\n# HELP node_xfrm_in_state_expired_packets_total State is expired\n# TYPE node_xfrm_in_state_expired_packets_total counter\nnode_xfrm_in_state_expired_packets_total 7\n# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n# TYPE node_xfrm_in_state_invalid_packets_total counter\nnode_xfrm_in_state_invalid_packets_total 55555\n# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n# TYPE node_xfrm_in_state_mismatch_packets_total counter\nnode_xfrm_in_state_mismatch_packets_total 23451\n# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_in_state_mode_error_packets_total counter\nnode_xfrm_in_state_mode_error_packets_total 100\n# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n# TYPE node_xfrm_in_state_proto_error_packets_total counter\nnode_xfrm_in_state_proto_error_packets_total 40\n# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n# TYPE node_xfrm_in_state_seq_error_packets_total counter\nnode_xfrm_in_state_seq_error_packets_total 6000\n# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\nnode_xfrm_in_tmpl_mismatch_packets_total 51\n# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n# TYPE node_xfrm_out_bundle_check_error_packets_total counter\nnode_xfrm_out_bundle_check_error_packets_total 555\n# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\nnode_xfrm_out_bundle_gen_error_packets_total 43321\n# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n# TYPE node_xfrm_out_error_packets_total counter\nnode_xfrm_out_error_packets_total 1e+06\n# HELP node_xfrm_out_no_states_packets_total No state is found\n# TYPE node_xfrm_out_no_states_packets_total counter\nnode_xfrm_out_no_states_packets_total 869\n# HELP node_xfrm_out_pol_block_packets_total Policy discards\n# TYPE node_xfrm_out_pol_block_packets_total counter\nnode_xfrm_out_pol_block_packets_total 43456\n# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n# TYPE node_xfrm_out_pol_dead_packets_total counter\nnode_xfrm_out_pol_dead_packets_total 7656\n# HELP node_xfrm_out_pol_error_packets_total Policy error\n# TYPE node_xfrm_out_pol_error_packets_total counter\nnode_xfrm_out_pol_error_packets_total 1454\n# HELP node_xfrm_out_state_expired_packets_total State is expired\n# TYPE node_xfrm_out_state_expired_packets_total counter\nnode_xfrm_out_state_expired_packets_total 565\n# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n# TYPE node_xfrm_out_state_invalid_packets_total counter\nnode_xfrm_out_state_invalid_packets_total 28765\n# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n# TYPE node_xfrm_out_state_mode_error_packets_total counter\nnode_xfrm_out_state_mode_error_packets_total 8\n# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n# TYPE node_xfrm_out_state_proto_error_packets_total counter\nnode_xfrm_out_state_proto_error_packets_total 4542\n# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n# TYPE node_xfrm_out_state_seq_error_packets_total counter\nnode_xfrm_out_state_seq_error_packets_total 543\n# HELP node_xfs_allocation_btree_compares_total Number of allocation B-tree compares for a filesystem.\n# TYPE node_xfs_allocation_btree_compares_total counter\nnode_xfs_allocation_btree_compares_total{device=\"sda1\"} 0\n# HELP node_xfs_allocation_btree_lookups_total Number of allocation B-tree lookups for a filesystem.\n# TYPE node_xfs_allocation_btree_lookups_total counter\nnode_xfs_allocation_btree_lookups_total{device=\"sda1\"} 0\n# HELP node_xfs_allocation_btree_records_deleted_total Number of allocation B-tree records deleted for a filesystem.\n# TYPE node_xfs_allocation_btree_records_deleted_total counter\nnode_xfs_allocation_btree_records_deleted_total{device=\"sda1\"} 0\n# HELP node_xfs_allocation_btree_records_inserted_total Number of allocation B-tree records inserted for a filesystem.\n# TYPE node_xfs_allocation_btree_records_inserted_total counter\nnode_xfs_allocation_btree_records_inserted_total{device=\"sda1\"} 0\n# HELP node_xfs_block_map_btree_compares_total Number of block map B-tree compares for a filesystem.\n# TYPE node_xfs_block_map_btree_compares_total counter\nnode_xfs_block_map_btree_compares_total{device=\"sda1\"} 0\n# HELP node_xfs_block_map_btree_lookups_total Number of block map B-tree lookups for a filesystem.\n# TYPE node_xfs_block_map_btree_lookups_total counter\nnode_xfs_block_map_btree_lookups_total{device=\"sda1\"} 0\n# HELP node_xfs_block_map_btree_records_deleted_total Number of block map B-tree records deleted for a filesystem.\n# TYPE node_xfs_block_map_btree_records_deleted_total counter\nnode_xfs_block_map_btree_records_deleted_total{device=\"sda1\"} 0\n# HELP node_xfs_block_map_btree_records_inserted_total Number of block map B-tree records inserted for a filesystem.\n# TYPE node_xfs_block_map_btree_records_inserted_total counter\nnode_xfs_block_map_btree_records_inserted_total{device=\"sda1\"} 0\n# HELP node_xfs_block_mapping_extent_list_compares_total Number of extent list compares for a filesystem.\n# TYPE node_xfs_block_mapping_extent_list_compares_total counter\nnode_xfs_block_mapping_extent_list_compares_total{device=\"sda1\"} 0\n# HELP node_xfs_block_mapping_extent_list_deletions_total Number of extent list deletions for a filesystem.\n# TYPE node_xfs_block_mapping_extent_list_deletions_total counter\nnode_xfs_block_mapping_extent_list_deletions_total{device=\"sda1\"} 1\n# HELP node_xfs_block_mapping_extent_list_insertions_total Number of extent list insertions for a filesystem.\n# TYPE node_xfs_block_mapping_extent_list_insertions_total counter\nnode_xfs_block_mapping_extent_list_insertions_total{device=\"sda1\"} 1\n# HELP node_xfs_block_mapping_extent_list_lookups_total Number of extent list lookups for a filesystem.\n# TYPE node_xfs_block_mapping_extent_list_lookups_total counter\nnode_xfs_block_mapping_extent_list_lookups_total{device=\"sda1\"} 91\n# HELP node_xfs_block_mapping_reads_total Number of block map for read operations for a filesystem.\n# TYPE node_xfs_block_mapping_reads_total counter\nnode_xfs_block_mapping_reads_total{device=\"sda1\"} 61\n# HELP node_xfs_block_mapping_unmaps_total Number of block unmaps (deletes) for a filesystem.\n# TYPE node_xfs_block_mapping_unmaps_total counter\nnode_xfs_block_mapping_unmaps_total{device=\"sda1\"} 1\n# HELP node_xfs_block_mapping_writes_total Number of block map for write operations for a filesystem.\n# TYPE node_xfs_block_mapping_writes_total counter\nnode_xfs_block_mapping_writes_total{device=\"sda1\"} 29\n# HELP node_xfs_directory_operation_create_total Number of times a new directory entry was created for a filesystem.\n# TYPE node_xfs_directory_operation_create_total counter\nnode_xfs_directory_operation_create_total{device=\"sda1\"} 2\n# HELP node_xfs_directory_operation_getdents_total Number of times the directory getdents operation was performed for a filesystem.\n# TYPE node_xfs_directory_operation_getdents_total counter\nnode_xfs_directory_operation_getdents_total{device=\"sda1\"} 52\n# HELP node_xfs_directory_operation_lookup_total Number of file name directory lookups which miss the operating systems directory name lookup cache.\n# TYPE node_xfs_directory_operation_lookup_total counter\nnode_xfs_directory_operation_lookup_total{device=\"sda1\"} 3\n# HELP node_xfs_directory_operation_remove_total Number of times an existing directory entry was created for a filesystem.\n# TYPE node_xfs_directory_operation_remove_total counter\nnode_xfs_directory_operation_remove_total{device=\"sda1\"} 1\n# HELP node_xfs_extent_allocation_blocks_allocated_total Number of blocks allocated for a filesystem.\n# TYPE node_xfs_extent_allocation_blocks_allocated_total counter\nnode_xfs_extent_allocation_blocks_allocated_total{device=\"sda1\"} 872\n# HELP node_xfs_extent_allocation_blocks_freed_total Number of blocks freed for a filesystem.\n# TYPE node_xfs_extent_allocation_blocks_freed_total counter\nnode_xfs_extent_allocation_blocks_freed_total{device=\"sda1\"} 0\n# HELP node_xfs_extent_allocation_extents_allocated_total Number of extents allocated for a filesystem.\n# TYPE node_xfs_extent_allocation_extents_allocated_total counter\nnode_xfs_extent_allocation_extents_allocated_total{device=\"sda1\"} 1\n# HELP node_xfs_extent_allocation_extents_freed_total Number of extents freed for a filesystem.\n# TYPE node_xfs_extent_allocation_extents_freed_total counter\nnode_xfs_extent_allocation_extents_freed_total{device=\"sda1\"} 0\n# HELP node_xfs_inode_operation_attempts_total Number of times the OS looked for an XFS inode in the inode cache.\n# TYPE node_xfs_inode_operation_attempts_total counter\nnode_xfs_inode_operation_attempts_total{device=\"sda1\"} 5\n# HELP node_xfs_inode_operation_attribute_changes_total Number of times the OS explicitly changed the attributes of an XFS inode.\n# TYPE node_xfs_inode_operation_attribute_changes_total counter\nnode_xfs_inode_operation_attribute_changes_total{device=\"sda1\"} 1\n# HELP node_xfs_inode_operation_duplicates_total Number of times the OS tried to add a missing XFS inode to the inode cache, but found it had already been added by another process.\n# TYPE node_xfs_inode_operation_duplicates_total counter\nnode_xfs_inode_operation_duplicates_total{device=\"sda1\"} 0\n# HELP node_xfs_inode_operation_found_total Number of times the OS looked for and found an XFS inode in the inode cache.\n# TYPE node_xfs_inode_operation_found_total counter\nnode_xfs_inode_operation_found_total{device=\"sda1\"} 1\n# HELP node_xfs_inode_operation_missed_total Number of times the OS looked for an XFS inode in the cache, but did not find it.\n# TYPE node_xfs_inode_operation_missed_total counter\nnode_xfs_inode_operation_missed_total{device=\"sda1\"} 4\n# HELP node_xfs_inode_operation_reclaims_total Number of times the OS reclaimed an XFS inode from the inode cache to free memory for another purpose.\n# TYPE node_xfs_inode_operation_reclaims_total counter\nnode_xfs_inode_operation_reclaims_total{device=\"sda1\"} 0\n# HELP node_xfs_inode_operation_recycled_total Number of times the OS found an XFS inode in the cache, but could not use it as it was being recycled.\n# TYPE node_xfs_inode_operation_recycled_total counter\nnode_xfs_inode_operation_recycled_total{device=\"sda1\"} 0\n# HELP node_xfs_read_calls_total Number of read(2) system calls made to files in a filesystem.\n# TYPE node_xfs_read_calls_total counter\nnode_xfs_read_calls_total{device=\"sda1\"} 0\n# HELP node_xfs_vnode_active_total Number of vnodes not on free lists for a filesystem.\n# TYPE node_xfs_vnode_active_total counter\nnode_xfs_vnode_active_total{device=\"sda1\"} 4\n# HELP node_xfs_vnode_allocate_total Number of times vn_alloc called for a filesystem.\n# TYPE node_xfs_vnode_allocate_total counter\nnode_xfs_vnode_allocate_total{device=\"sda1\"} 0\n# HELP node_xfs_vnode_get_total Number of times vn_get called for a filesystem.\n# TYPE node_xfs_vnode_get_total counter\nnode_xfs_vnode_get_total{device=\"sda1\"} 0\n# HELP node_xfs_vnode_hold_total Number of times vn_hold called for a filesystem.\n# TYPE node_xfs_vnode_hold_total counter\nnode_xfs_vnode_hold_total{device=\"sda1\"} 0\n# HELP node_xfs_vnode_reclaim_total Number of times vn_reclaim called for a filesystem.\n# TYPE node_xfs_vnode_reclaim_total counter\nnode_xfs_vnode_reclaim_total{device=\"sda1\"} 1\n# HELP node_xfs_vnode_release_total Number of times vn_rele called for a filesystem.\n# TYPE node_xfs_vnode_release_total counter\nnode_xfs_vnode_release_total{device=\"sda1\"} 1\n# HELP node_xfs_vnode_remove_total Number of times vn_remove called for a filesystem.\n# TYPE node_xfs_vnode_remove_total counter\nnode_xfs_vnode_remove_total{device=\"sda1\"} 1\n# HELP node_xfs_write_calls_total Number of write(2) system calls made to files in a filesystem.\n# TYPE node_xfs_write_calls_total counter\nnode_xfs_write_calls_total{device=\"sda1\"} 28\n# HELP node_zfs_abd_linear_cnt kstat.zfs.misc.abdstats.linear_cnt\n# TYPE node_zfs_abd_linear_cnt untyped\nnode_zfs_abd_linear_cnt 62\n# HELP node_zfs_abd_linear_data_size kstat.zfs.misc.abdstats.linear_data_size\n# TYPE node_zfs_abd_linear_data_size untyped\nnode_zfs_abd_linear_data_size 223232\n# HELP node_zfs_abd_scatter_chunk_waste kstat.zfs.misc.abdstats.scatter_chunk_waste\n# TYPE node_zfs_abd_scatter_chunk_waste untyped\nnode_zfs_abd_scatter_chunk_waste 0\n# HELP node_zfs_abd_scatter_cnt kstat.zfs.misc.abdstats.scatter_cnt\n# TYPE node_zfs_abd_scatter_cnt untyped\nnode_zfs_abd_scatter_cnt 1\n# HELP node_zfs_abd_scatter_data_size kstat.zfs.misc.abdstats.scatter_data_size\n# TYPE node_zfs_abd_scatter_data_size untyped\nnode_zfs_abd_scatter_data_size 16384\n# HELP node_zfs_abd_scatter_order_0 kstat.zfs.misc.abdstats.scatter_order_0\n# TYPE node_zfs_abd_scatter_order_0 untyped\nnode_zfs_abd_scatter_order_0 0\n# HELP node_zfs_abd_scatter_order_1 kstat.zfs.misc.abdstats.scatter_order_1\n# TYPE node_zfs_abd_scatter_order_1 untyped\nnode_zfs_abd_scatter_order_1 0\n# HELP node_zfs_abd_scatter_order_10 kstat.zfs.misc.abdstats.scatter_order_10\n# TYPE node_zfs_abd_scatter_order_10 untyped\nnode_zfs_abd_scatter_order_10 0\n# HELP node_zfs_abd_scatter_order_2 kstat.zfs.misc.abdstats.scatter_order_2\n# TYPE node_zfs_abd_scatter_order_2 untyped\nnode_zfs_abd_scatter_order_2 1\n# HELP node_zfs_abd_scatter_order_3 kstat.zfs.misc.abdstats.scatter_order_3\n# TYPE node_zfs_abd_scatter_order_3 untyped\nnode_zfs_abd_scatter_order_3 0\n# HELP node_zfs_abd_scatter_order_4 kstat.zfs.misc.abdstats.scatter_order_4\n# TYPE node_zfs_abd_scatter_order_4 untyped\nnode_zfs_abd_scatter_order_4 0\n# HELP node_zfs_abd_scatter_order_5 kstat.zfs.misc.abdstats.scatter_order_5\n# TYPE node_zfs_abd_scatter_order_5 untyped\nnode_zfs_abd_scatter_order_5 0\n# HELP node_zfs_abd_scatter_order_6 kstat.zfs.misc.abdstats.scatter_order_6\n# TYPE node_zfs_abd_scatter_order_6 untyped\nnode_zfs_abd_scatter_order_6 0\n# HELP node_zfs_abd_scatter_order_7 kstat.zfs.misc.abdstats.scatter_order_7\n# TYPE node_zfs_abd_scatter_order_7 untyped\nnode_zfs_abd_scatter_order_7 0\n# HELP node_zfs_abd_scatter_order_8 kstat.zfs.misc.abdstats.scatter_order_8\n# TYPE node_zfs_abd_scatter_order_8 untyped\nnode_zfs_abd_scatter_order_8 0\n# HELP node_zfs_abd_scatter_order_9 kstat.zfs.misc.abdstats.scatter_order_9\n# TYPE node_zfs_abd_scatter_order_9 untyped\nnode_zfs_abd_scatter_order_9 0\n# HELP node_zfs_abd_scatter_page_alloc_retry kstat.zfs.misc.abdstats.scatter_page_alloc_retry\n# TYPE node_zfs_abd_scatter_page_alloc_retry untyped\nnode_zfs_abd_scatter_page_alloc_retry 0\n# HELP node_zfs_abd_scatter_page_multi_chunk kstat.zfs.misc.abdstats.scatter_page_multi_chunk\n# TYPE node_zfs_abd_scatter_page_multi_chunk untyped\nnode_zfs_abd_scatter_page_multi_chunk 0\n# HELP node_zfs_abd_scatter_page_multi_zone kstat.zfs.misc.abdstats.scatter_page_multi_zone\n# TYPE node_zfs_abd_scatter_page_multi_zone untyped\nnode_zfs_abd_scatter_page_multi_zone 0\n# HELP node_zfs_abd_scatter_sg_table_retry kstat.zfs.misc.abdstats.scatter_sg_table_retry\n# TYPE node_zfs_abd_scatter_sg_table_retry untyped\nnode_zfs_abd_scatter_sg_table_retry 0\n# HELP node_zfs_abd_struct_size kstat.zfs.misc.abdstats.struct_size\n# TYPE node_zfs_abd_struct_size untyped\nnode_zfs_abd_struct_size 2520\n# HELP node_zfs_arc_anon_evictable_data kstat.zfs.misc.arcstats.anon_evictable_data\n# TYPE node_zfs_arc_anon_evictable_data untyped\nnode_zfs_arc_anon_evictable_data 0\n# HELP node_zfs_arc_anon_evictable_metadata kstat.zfs.misc.arcstats.anon_evictable_metadata\n# TYPE node_zfs_arc_anon_evictable_metadata untyped\nnode_zfs_arc_anon_evictable_metadata 0\n# HELP node_zfs_arc_anon_size kstat.zfs.misc.arcstats.anon_size\n# TYPE node_zfs_arc_anon_size untyped\nnode_zfs_arc_anon_size 1.91744e+06\n# HELP node_zfs_arc_arc_loaned_bytes kstat.zfs.misc.arcstats.arc_loaned_bytes\n# TYPE node_zfs_arc_arc_loaned_bytes untyped\nnode_zfs_arc_arc_loaned_bytes 0\n# HELP node_zfs_arc_arc_meta_limit kstat.zfs.misc.arcstats.arc_meta_limit\n# TYPE node_zfs_arc_arc_meta_limit untyped\nnode_zfs_arc_arc_meta_limit 6.275982336e+09\n# HELP node_zfs_arc_arc_meta_max kstat.zfs.misc.arcstats.arc_meta_max\n# TYPE node_zfs_arc_arc_meta_max untyped\nnode_zfs_arc_arc_meta_max 4.49286096e+08\n# HELP node_zfs_arc_arc_meta_min kstat.zfs.misc.arcstats.arc_meta_min\n# TYPE node_zfs_arc_arc_meta_min untyped\nnode_zfs_arc_arc_meta_min 1.6777216e+07\n# HELP node_zfs_arc_arc_meta_used kstat.zfs.misc.arcstats.arc_meta_used\n# TYPE node_zfs_arc_arc_meta_used untyped\nnode_zfs_arc_arc_meta_used 3.08103632e+08\n# HELP node_zfs_arc_arc_need_free kstat.zfs.misc.arcstats.arc_need_free\n# TYPE node_zfs_arc_arc_need_free untyped\nnode_zfs_arc_arc_need_free 0\n# HELP node_zfs_arc_arc_no_grow kstat.zfs.misc.arcstats.arc_no_grow\n# TYPE node_zfs_arc_arc_no_grow untyped\nnode_zfs_arc_arc_no_grow 0\n# HELP node_zfs_arc_arc_prune kstat.zfs.misc.arcstats.arc_prune\n# TYPE node_zfs_arc_arc_prune untyped\nnode_zfs_arc_arc_prune 0\n# HELP node_zfs_arc_arc_sys_free kstat.zfs.misc.arcstats.arc_sys_free\n# TYPE node_zfs_arc_arc_sys_free untyped\nnode_zfs_arc_arc_sys_free 2.61496832e+08\n# HELP node_zfs_arc_arc_tempreserve kstat.zfs.misc.arcstats.arc_tempreserve\n# TYPE node_zfs_arc_arc_tempreserve untyped\nnode_zfs_arc_arc_tempreserve 0\n# HELP node_zfs_arc_c kstat.zfs.misc.arcstats.c\n# TYPE node_zfs_arc_c untyped\nnode_zfs_arc_c 1.643208777e+09\n# HELP node_zfs_arc_c_max kstat.zfs.misc.arcstats.c_max\n# TYPE node_zfs_arc_c_max untyped\nnode_zfs_arc_c_max 8.367976448e+09\n# HELP node_zfs_arc_c_min kstat.zfs.misc.arcstats.c_min\n# TYPE node_zfs_arc_c_min untyped\nnode_zfs_arc_c_min 3.3554432e+07\n# HELP node_zfs_arc_data_size kstat.zfs.misc.arcstats.data_size\n# TYPE node_zfs_arc_data_size untyped\nnode_zfs_arc_data_size 1.29583616e+09\n# HELP node_zfs_arc_deleted kstat.zfs.misc.arcstats.deleted\n# TYPE node_zfs_arc_deleted untyped\nnode_zfs_arc_deleted 60403\n# HELP node_zfs_arc_demand_data_hits kstat.zfs.misc.arcstats.demand_data_hits\n# TYPE node_zfs_arc_demand_data_hits untyped\nnode_zfs_arc_demand_data_hits 7.221032e+06\n# HELP node_zfs_arc_demand_data_misses kstat.zfs.misc.arcstats.demand_data_misses\n# TYPE node_zfs_arc_demand_data_misses untyped\nnode_zfs_arc_demand_data_misses 73300\n# HELP node_zfs_arc_demand_metadata_hits kstat.zfs.misc.arcstats.demand_metadata_hits\n# TYPE node_zfs_arc_demand_metadata_hits untyped\nnode_zfs_arc_demand_metadata_hits 1.464353e+06\n# HELP node_zfs_arc_demand_metadata_misses kstat.zfs.misc.arcstats.demand_metadata_misses\n# TYPE node_zfs_arc_demand_metadata_misses untyped\nnode_zfs_arc_demand_metadata_misses 498170\n# HELP node_zfs_arc_duplicate_buffers kstat.zfs.misc.arcstats.duplicate_buffers\n# TYPE node_zfs_arc_duplicate_buffers untyped\nnode_zfs_arc_duplicate_buffers 0\n# HELP node_zfs_arc_duplicate_buffers_size kstat.zfs.misc.arcstats.duplicate_buffers_size\n# TYPE node_zfs_arc_duplicate_buffers_size untyped\nnode_zfs_arc_duplicate_buffers_size 0\n# HELP node_zfs_arc_duplicate_reads kstat.zfs.misc.arcstats.duplicate_reads\n# TYPE node_zfs_arc_duplicate_reads untyped\nnode_zfs_arc_duplicate_reads 0\n# HELP node_zfs_arc_evict_l2_cached kstat.zfs.misc.arcstats.evict_l2_cached\n# TYPE node_zfs_arc_evict_l2_cached untyped\nnode_zfs_arc_evict_l2_cached 0\n# HELP node_zfs_arc_evict_l2_eligible kstat.zfs.misc.arcstats.evict_l2_eligible\n# TYPE node_zfs_arc_evict_l2_eligible untyped\nnode_zfs_arc_evict_l2_eligible 8.99251456e+09\n# HELP node_zfs_arc_evict_l2_ineligible kstat.zfs.misc.arcstats.evict_l2_ineligible\n# TYPE node_zfs_arc_evict_l2_ineligible untyped\nnode_zfs_arc_evict_l2_ineligible 9.92552448e+08\n# HELP node_zfs_arc_evict_l2_skip kstat.zfs.misc.arcstats.evict_l2_skip\n# TYPE node_zfs_arc_evict_l2_skip untyped\nnode_zfs_arc_evict_l2_skip 0\n# HELP node_zfs_arc_evict_not_enough kstat.zfs.misc.arcstats.evict_not_enough\n# TYPE node_zfs_arc_evict_not_enough untyped\nnode_zfs_arc_evict_not_enough 680\n# HELP node_zfs_arc_evict_skip kstat.zfs.misc.arcstats.evict_skip\n# TYPE node_zfs_arc_evict_skip untyped\nnode_zfs_arc_evict_skip 2.265729e+06\n# HELP node_zfs_arc_hash_chain_max kstat.zfs.misc.arcstats.hash_chain_max\n# TYPE node_zfs_arc_hash_chain_max untyped\nnode_zfs_arc_hash_chain_max 3\n# HELP node_zfs_arc_hash_chains kstat.zfs.misc.arcstats.hash_chains\n# TYPE node_zfs_arc_hash_chains untyped\nnode_zfs_arc_hash_chains 412\n# HELP node_zfs_arc_hash_collisions kstat.zfs.misc.arcstats.hash_collisions\n# TYPE node_zfs_arc_hash_collisions untyped\nnode_zfs_arc_hash_collisions 50564\n# HELP node_zfs_arc_hash_elements kstat.zfs.misc.arcstats.hash_elements\n# TYPE node_zfs_arc_hash_elements untyped\nnode_zfs_arc_hash_elements 42359\n# HELP node_zfs_arc_hash_elements_max kstat.zfs.misc.arcstats.hash_elements_max\n# TYPE node_zfs_arc_hash_elements_max untyped\nnode_zfs_arc_hash_elements_max 88245\n# HELP node_zfs_arc_hdr_size kstat.zfs.misc.arcstats.hdr_size\n# TYPE node_zfs_arc_hdr_size untyped\nnode_zfs_arc_hdr_size 1.636108e+07\n# HELP node_zfs_arc_hits kstat.zfs.misc.arcstats.hits\n# TYPE node_zfs_arc_hits untyped\nnode_zfs_arc_hits 8.772612e+06\n# HELP node_zfs_arc_l2_abort_lowmem kstat.zfs.misc.arcstats.l2_abort_lowmem\n# TYPE node_zfs_arc_l2_abort_lowmem untyped\nnode_zfs_arc_l2_abort_lowmem 0\n# HELP node_zfs_arc_l2_asize kstat.zfs.misc.arcstats.l2_asize\n# TYPE node_zfs_arc_l2_asize untyped\nnode_zfs_arc_l2_asize 0\n# HELP node_zfs_arc_l2_cdata_free_on_write kstat.zfs.misc.arcstats.l2_cdata_free_on_write\n# TYPE node_zfs_arc_l2_cdata_free_on_write untyped\nnode_zfs_arc_l2_cdata_free_on_write 0\n# HELP node_zfs_arc_l2_cksum_bad kstat.zfs.misc.arcstats.l2_cksum_bad\n# TYPE node_zfs_arc_l2_cksum_bad untyped\nnode_zfs_arc_l2_cksum_bad 0\n# HELP node_zfs_arc_l2_compress_failures kstat.zfs.misc.arcstats.l2_compress_failures\n# TYPE node_zfs_arc_l2_compress_failures untyped\nnode_zfs_arc_l2_compress_failures 0\n# HELP node_zfs_arc_l2_compress_successes kstat.zfs.misc.arcstats.l2_compress_successes\n# TYPE node_zfs_arc_l2_compress_successes untyped\nnode_zfs_arc_l2_compress_successes 0\n# HELP node_zfs_arc_l2_compress_zeros kstat.zfs.misc.arcstats.l2_compress_zeros\n# TYPE node_zfs_arc_l2_compress_zeros untyped\nnode_zfs_arc_l2_compress_zeros 0\n# HELP node_zfs_arc_l2_evict_l1cached kstat.zfs.misc.arcstats.l2_evict_l1cached\n# TYPE node_zfs_arc_l2_evict_l1cached untyped\nnode_zfs_arc_l2_evict_l1cached 0\n# HELP node_zfs_arc_l2_evict_lock_retry kstat.zfs.misc.arcstats.l2_evict_lock_retry\n# TYPE node_zfs_arc_l2_evict_lock_retry untyped\nnode_zfs_arc_l2_evict_lock_retry 0\n# HELP node_zfs_arc_l2_evict_reading kstat.zfs.misc.arcstats.l2_evict_reading\n# TYPE node_zfs_arc_l2_evict_reading untyped\nnode_zfs_arc_l2_evict_reading 0\n# HELP node_zfs_arc_l2_feeds kstat.zfs.misc.arcstats.l2_feeds\n# TYPE node_zfs_arc_l2_feeds untyped\nnode_zfs_arc_l2_feeds 0\n# HELP node_zfs_arc_l2_free_on_write kstat.zfs.misc.arcstats.l2_free_on_write\n# TYPE node_zfs_arc_l2_free_on_write untyped\nnode_zfs_arc_l2_free_on_write 0\n# HELP node_zfs_arc_l2_hdr_size kstat.zfs.misc.arcstats.l2_hdr_size\n# TYPE node_zfs_arc_l2_hdr_size untyped\nnode_zfs_arc_l2_hdr_size 0\n# HELP node_zfs_arc_l2_hits kstat.zfs.misc.arcstats.l2_hits\n# TYPE node_zfs_arc_l2_hits untyped\nnode_zfs_arc_l2_hits 0\n# HELP node_zfs_arc_l2_io_error kstat.zfs.misc.arcstats.l2_io_error\n# TYPE node_zfs_arc_l2_io_error untyped\nnode_zfs_arc_l2_io_error 0\n# HELP node_zfs_arc_l2_misses kstat.zfs.misc.arcstats.l2_misses\n# TYPE node_zfs_arc_l2_misses untyped\nnode_zfs_arc_l2_misses 0\n# HELP node_zfs_arc_l2_read_bytes kstat.zfs.misc.arcstats.l2_read_bytes\n# TYPE node_zfs_arc_l2_read_bytes untyped\nnode_zfs_arc_l2_read_bytes 0\n# HELP node_zfs_arc_l2_rw_clash kstat.zfs.misc.arcstats.l2_rw_clash\n# TYPE node_zfs_arc_l2_rw_clash untyped\nnode_zfs_arc_l2_rw_clash 0\n# HELP node_zfs_arc_l2_size kstat.zfs.misc.arcstats.l2_size\n# TYPE node_zfs_arc_l2_size untyped\nnode_zfs_arc_l2_size 0\n# HELP node_zfs_arc_l2_write_bytes kstat.zfs.misc.arcstats.l2_write_bytes\n# TYPE node_zfs_arc_l2_write_bytes untyped\nnode_zfs_arc_l2_write_bytes 0\n# HELP node_zfs_arc_l2_writes_done kstat.zfs.misc.arcstats.l2_writes_done\n# TYPE node_zfs_arc_l2_writes_done untyped\nnode_zfs_arc_l2_writes_done 0\n# HELP node_zfs_arc_l2_writes_error kstat.zfs.misc.arcstats.l2_writes_error\n# TYPE node_zfs_arc_l2_writes_error untyped\nnode_zfs_arc_l2_writes_error 0\n# HELP node_zfs_arc_l2_writes_lock_retry kstat.zfs.misc.arcstats.l2_writes_lock_retry\n# TYPE node_zfs_arc_l2_writes_lock_retry untyped\nnode_zfs_arc_l2_writes_lock_retry 0\n# HELP node_zfs_arc_l2_writes_sent kstat.zfs.misc.arcstats.l2_writes_sent\n# TYPE node_zfs_arc_l2_writes_sent untyped\nnode_zfs_arc_l2_writes_sent 0\n# HELP node_zfs_arc_memory_available_bytes kstat.zfs.misc.arcstats.memory_available_bytes\n# TYPE node_zfs_arc_memory_available_bytes untyped\nnode_zfs_arc_memory_available_bytes -9.223372036854776e+17\n# HELP node_zfs_arc_memory_direct_count kstat.zfs.misc.arcstats.memory_direct_count\n# TYPE node_zfs_arc_memory_direct_count untyped\nnode_zfs_arc_memory_direct_count 542\n# HELP node_zfs_arc_memory_indirect_count kstat.zfs.misc.arcstats.memory_indirect_count\n# TYPE node_zfs_arc_memory_indirect_count untyped\nnode_zfs_arc_memory_indirect_count 3006\n# HELP node_zfs_arc_memory_throttle_count kstat.zfs.misc.arcstats.memory_throttle_count\n# TYPE node_zfs_arc_memory_throttle_count untyped\nnode_zfs_arc_memory_throttle_count 0\n# HELP node_zfs_arc_metadata_size kstat.zfs.misc.arcstats.metadata_size\n# TYPE node_zfs_arc_metadata_size untyped\nnode_zfs_arc_metadata_size 1.7529856e+08\n# HELP node_zfs_arc_mfu_evictable_data kstat.zfs.misc.arcstats.mfu_evictable_data\n# TYPE node_zfs_arc_mfu_evictable_data untyped\nnode_zfs_arc_mfu_evictable_data 1.017613824e+09\n# HELP node_zfs_arc_mfu_evictable_metadata kstat.zfs.misc.arcstats.mfu_evictable_metadata\n# TYPE node_zfs_arc_mfu_evictable_metadata untyped\nnode_zfs_arc_mfu_evictable_metadata 9.163776e+06\n# HELP node_zfs_arc_mfu_ghost_evictable_data kstat.zfs.misc.arcstats.mfu_ghost_evictable_data\n# TYPE node_zfs_arc_mfu_ghost_evictable_data untyped\nnode_zfs_arc_mfu_ghost_evictable_data 9.6731136e+07\n# HELP node_zfs_arc_mfu_ghost_evictable_metadata kstat.zfs.misc.arcstats.mfu_ghost_evictable_metadata\n# TYPE node_zfs_arc_mfu_ghost_evictable_metadata untyped\nnode_zfs_arc_mfu_ghost_evictable_metadata 8.205312e+06\n# HELP node_zfs_arc_mfu_ghost_hits kstat.zfs.misc.arcstats.mfu_ghost_hits\n# TYPE node_zfs_arc_mfu_ghost_hits untyped\nnode_zfs_arc_mfu_ghost_hits 821\n# HELP node_zfs_arc_mfu_ghost_size kstat.zfs.misc.arcstats.mfu_ghost_size\n# TYPE node_zfs_arc_mfu_ghost_size untyped\nnode_zfs_arc_mfu_ghost_size 1.04936448e+08\n# HELP node_zfs_arc_mfu_hits kstat.zfs.misc.arcstats.mfu_hits\n# TYPE node_zfs_arc_mfu_hits untyped\nnode_zfs_arc_mfu_hits 7.829854e+06\n# HELP node_zfs_arc_mfu_size kstat.zfs.misc.arcstats.mfu_size\n# TYPE node_zfs_arc_mfu_size untyped\nnode_zfs_arc_mfu_size 1.066623488e+09\n# HELP node_zfs_arc_misses kstat.zfs.misc.arcstats.misses\n# TYPE node_zfs_arc_misses untyped\nnode_zfs_arc_misses 604635\n# HELP node_zfs_arc_mru_evictable_data kstat.zfs.misc.arcstats.mru_evictable_data\n# TYPE node_zfs_arc_mru_evictable_data untyped\nnode_zfs_arc_mru_evictable_data 2.78091264e+08\n# HELP node_zfs_arc_mru_evictable_metadata kstat.zfs.misc.arcstats.mru_evictable_metadata\n# TYPE node_zfs_arc_mru_evictable_metadata untyped\nnode_zfs_arc_mru_evictable_metadata 1.8606592e+07\n# HELP node_zfs_arc_mru_ghost_evictable_data kstat.zfs.misc.arcstats.mru_ghost_evictable_data\n# TYPE node_zfs_arc_mru_ghost_evictable_data untyped\nnode_zfs_arc_mru_ghost_evictable_data 8.83765248e+08\n# HELP node_zfs_arc_mru_ghost_evictable_metadata kstat.zfs.misc.arcstats.mru_ghost_evictable_metadata\n# TYPE node_zfs_arc_mru_ghost_evictable_metadata untyped\nnode_zfs_arc_mru_ghost_evictable_metadata 1.1596288e+08\n# HELP node_zfs_arc_mru_ghost_hits kstat.zfs.misc.arcstats.mru_ghost_hits\n# TYPE node_zfs_arc_mru_ghost_hits untyped\nnode_zfs_arc_mru_ghost_hits 21100\n# HELP node_zfs_arc_mru_ghost_size kstat.zfs.misc.arcstats.mru_ghost_size\n# TYPE node_zfs_arc_mru_ghost_size untyped\nnode_zfs_arc_mru_ghost_size 9.99728128e+08\n# HELP node_zfs_arc_mru_hits kstat.zfs.misc.arcstats.mru_hits\n# TYPE node_zfs_arc_mru_hits untyped\nnode_zfs_arc_mru_hits 855535\n# HELP node_zfs_arc_mru_size kstat.zfs.misc.arcstats.mru_size\n# TYPE node_zfs_arc_mru_size untyped\nnode_zfs_arc_mru_size 4.02593792e+08\n# HELP node_zfs_arc_mutex_miss kstat.zfs.misc.arcstats.mutex_miss\n# TYPE node_zfs_arc_mutex_miss untyped\nnode_zfs_arc_mutex_miss 2\n# HELP node_zfs_arc_other_size kstat.zfs.misc.arcstats.other_size\n# TYPE node_zfs_arc_other_size untyped\nnode_zfs_arc_other_size 1.16443992e+08\n# HELP node_zfs_arc_p kstat.zfs.misc.arcstats.p\n# TYPE node_zfs_arc_p untyped\nnode_zfs_arc_p 5.16395305e+08\n# HELP node_zfs_arc_prefetch_data_hits kstat.zfs.misc.arcstats.prefetch_data_hits\n# TYPE node_zfs_arc_prefetch_data_hits untyped\nnode_zfs_arc_prefetch_data_hits 3615\n# HELP node_zfs_arc_prefetch_data_misses kstat.zfs.misc.arcstats.prefetch_data_misses\n# TYPE node_zfs_arc_prefetch_data_misses untyped\nnode_zfs_arc_prefetch_data_misses 17094\n# HELP node_zfs_arc_prefetch_metadata_hits kstat.zfs.misc.arcstats.prefetch_metadata_hits\n# TYPE node_zfs_arc_prefetch_metadata_hits untyped\nnode_zfs_arc_prefetch_metadata_hits 83612\n# HELP node_zfs_arc_prefetch_metadata_misses kstat.zfs.misc.arcstats.prefetch_metadata_misses\n# TYPE node_zfs_arc_prefetch_metadata_misses untyped\nnode_zfs_arc_prefetch_metadata_misses 16071\n# HELP node_zfs_arc_size kstat.zfs.misc.arcstats.size\n# TYPE node_zfs_arc_size untyped\nnode_zfs_arc_size 1.603939792e+09\n# HELP node_zfs_dbuf_dbuf_cache_count kstat.zfs.misc.dbufstats.dbuf_cache_count\n# TYPE node_zfs_dbuf_dbuf_cache_count untyped\nnode_zfs_dbuf_dbuf_cache_count 27\n# HELP node_zfs_dbuf_dbuf_cache_hiwater_bytes kstat.zfs.misc.dbufstats.dbuf_cache_hiwater_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_hiwater_bytes untyped\nnode_zfs_dbuf_dbuf_cache_hiwater_bytes 6.9117804e+07\n# HELP node_zfs_dbuf_dbuf_cache_level_0 kstat.zfs.misc.dbufstats.dbuf_cache_level_0\n# TYPE node_zfs_dbuf_dbuf_cache_level_0 untyped\nnode_zfs_dbuf_dbuf_cache_level_0 27\n# HELP node_zfs_dbuf_dbuf_cache_level_0_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_0_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_0_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_0_bytes 302080\n# HELP node_zfs_dbuf_dbuf_cache_level_1 kstat.zfs.misc.dbufstats.dbuf_cache_level_1\n# TYPE node_zfs_dbuf_dbuf_cache_level_1 untyped\nnode_zfs_dbuf_dbuf_cache_level_1 0\n# HELP node_zfs_dbuf_dbuf_cache_level_10 kstat.zfs.misc.dbufstats.dbuf_cache_level_10\n# TYPE node_zfs_dbuf_dbuf_cache_level_10 untyped\nnode_zfs_dbuf_dbuf_cache_level_10 0\n# HELP node_zfs_dbuf_dbuf_cache_level_10_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_10_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_10_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_10_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_11 kstat.zfs.misc.dbufstats.dbuf_cache_level_11\n# TYPE node_zfs_dbuf_dbuf_cache_level_11 untyped\nnode_zfs_dbuf_dbuf_cache_level_11 0\n# HELP node_zfs_dbuf_dbuf_cache_level_11_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_11_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_11_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_11_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_1_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_1_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_1_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_1_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_2 kstat.zfs.misc.dbufstats.dbuf_cache_level_2\n# TYPE node_zfs_dbuf_dbuf_cache_level_2 untyped\nnode_zfs_dbuf_dbuf_cache_level_2 0\n# HELP node_zfs_dbuf_dbuf_cache_level_2_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_2_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_2_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_2_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_3 kstat.zfs.misc.dbufstats.dbuf_cache_level_3\n# TYPE node_zfs_dbuf_dbuf_cache_level_3 untyped\nnode_zfs_dbuf_dbuf_cache_level_3 0\n# HELP node_zfs_dbuf_dbuf_cache_level_3_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_3_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_3_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_3_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_4 kstat.zfs.misc.dbufstats.dbuf_cache_level_4\n# TYPE node_zfs_dbuf_dbuf_cache_level_4 untyped\nnode_zfs_dbuf_dbuf_cache_level_4 0\n# HELP node_zfs_dbuf_dbuf_cache_level_4_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_4_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_4_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_4_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_5 kstat.zfs.misc.dbufstats.dbuf_cache_level_5\n# TYPE node_zfs_dbuf_dbuf_cache_level_5 untyped\nnode_zfs_dbuf_dbuf_cache_level_5 0\n# HELP node_zfs_dbuf_dbuf_cache_level_5_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_5_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_5_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_5_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_6 kstat.zfs.misc.dbufstats.dbuf_cache_level_6\n# TYPE node_zfs_dbuf_dbuf_cache_level_6 untyped\nnode_zfs_dbuf_dbuf_cache_level_6 0\n# HELP node_zfs_dbuf_dbuf_cache_level_6_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_6_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_6_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_6_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_7 kstat.zfs.misc.dbufstats.dbuf_cache_level_7\n# TYPE node_zfs_dbuf_dbuf_cache_level_7 untyped\nnode_zfs_dbuf_dbuf_cache_level_7 0\n# HELP node_zfs_dbuf_dbuf_cache_level_7_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_7_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_7_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_7_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_8 kstat.zfs.misc.dbufstats.dbuf_cache_level_8\n# TYPE node_zfs_dbuf_dbuf_cache_level_8 untyped\nnode_zfs_dbuf_dbuf_cache_level_8 0\n# HELP node_zfs_dbuf_dbuf_cache_level_8_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_8_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_8_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_8_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_level_9 kstat.zfs.misc.dbufstats.dbuf_cache_level_9\n# TYPE node_zfs_dbuf_dbuf_cache_level_9 untyped\nnode_zfs_dbuf_dbuf_cache_level_9 0\n# HELP node_zfs_dbuf_dbuf_cache_level_9_bytes kstat.zfs.misc.dbufstats.dbuf_cache_level_9_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_level_9_bytes untyped\nnode_zfs_dbuf_dbuf_cache_level_9_bytes 0\n# HELP node_zfs_dbuf_dbuf_cache_lowater_bytes kstat.zfs.misc.dbufstats.dbuf_cache_lowater_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_lowater_bytes untyped\nnode_zfs_dbuf_dbuf_cache_lowater_bytes 5.6550932e+07\n# HELP node_zfs_dbuf_dbuf_cache_max_bytes kstat.zfs.misc.dbufstats.dbuf_cache_max_bytes\n# TYPE node_zfs_dbuf_dbuf_cache_max_bytes untyped\nnode_zfs_dbuf_dbuf_cache_max_bytes 6.2834368e+07\n# HELP node_zfs_dbuf_dbuf_cache_size kstat.zfs.misc.dbufstats.dbuf_cache_size\n# TYPE node_zfs_dbuf_dbuf_cache_size untyped\nnode_zfs_dbuf_dbuf_cache_size 302080\n# HELP node_zfs_dbuf_dbuf_cache_size_max kstat.zfs.misc.dbufstats.dbuf_cache_size_max\n# TYPE node_zfs_dbuf_dbuf_cache_size_max untyped\nnode_zfs_dbuf_dbuf_cache_size_max 394240\n# HELP node_zfs_dbuf_dbuf_cache_total_evicts kstat.zfs.misc.dbufstats.dbuf_cache_total_evicts\n# TYPE node_zfs_dbuf_dbuf_cache_total_evicts untyped\nnode_zfs_dbuf_dbuf_cache_total_evicts 0\n# HELP node_zfs_dbuf_hash_chain_max kstat.zfs.misc.dbufstats.hash_chain_max\n# TYPE node_zfs_dbuf_hash_chain_max untyped\nnode_zfs_dbuf_hash_chain_max 0\n# HELP node_zfs_dbuf_hash_chains kstat.zfs.misc.dbufstats.hash_chains\n# TYPE node_zfs_dbuf_hash_chains untyped\nnode_zfs_dbuf_hash_chains 0\n# HELP node_zfs_dbuf_hash_collisions kstat.zfs.misc.dbufstats.hash_collisions\n# TYPE node_zfs_dbuf_hash_collisions untyped\nnode_zfs_dbuf_hash_collisions 0\n# HELP node_zfs_dbuf_hash_dbuf_level_0 kstat.zfs.misc.dbufstats.hash_dbuf_level_0\n# TYPE node_zfs_dbuf_hash_dbuf_level_0 untyped\nnode_zfs_dbuf_hash_dbuf_level_0 37\n# HELP node_zfs_dbuf_hash_dbuf_level_0_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_0_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_0_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_0_bytes 465920\n# HELP node_zfs_dbuf_hash_dbuf_level_1 kstat.zfs.misc.dbufstats.hash_dbuf_level_1\n# TYPE node_zfs_dbuf_hash_dbuf_level_1 untyped\nnode_zfs_dbuf_hash_dbuf_level_1 10\n# HELP node_zfs_dbuf_hash_dbuf_level_10 kstat.zfs.misc.dbufstats.hash_dbuf_level_10\n# TYPE node_zfs_dbuf_hash_dbuf_level_10 untyped\nnode_zfs_dbuf_hash_dbuf_level_10 0\n# HELP node_zfs_dbuf_hash_dbuf_level_10_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_10_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_10_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_10_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_11 kstat.zfs.misc.dbufstats.hash_dbuf_level_11\n# TYPE node_zfs_dbuf_hash_dbuf_level_11 untyped\nnode_zfs_dbuf_hash_dbuf_level_11 0\n# HELP node_zfs_dbuf_hash_dbuf_level_11_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_11_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_11_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_11_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_1_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_1_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_1_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_1_bytes 1.31072e+06\n# HELP node_zfs_dbuf_hash_dbuf_level_2 kstat.zfs.misc.dbufstats.hash_dbuf_level_2\n# TYPE node_zfs_dbuf_hash_dbuf_level_2 untyped\nnode_zfs_dbuf_hash_dbuf_level_2 2\n# HELP node_zfs_dbuf_hash_dbuf_level_2_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_2_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_2_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_2_bytes 262144\n# HELP node_zfs_dbuf_hash_dbuf_level_3 kstat.zfs.misc.dbufstats.hash_dbuf_level_3\n# TYPE node_zfs_dbuf_hash_dbuf_level_3 untyped\nnode_zfs_dbuf_hash_dbuf_level_3 2\n# HELP node_zfs_dbuf_hash_dbuf_level_3_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_3_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_3_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_3_bytes 262144\n# HELP node_zfs_dbuf_hash_dbuf_level_4 kstat.zfs.misc.dbufstats.hash_dbuf_level_4\n# TYPE node_zfs_dbuf_hash_dbuf_level_4 untyped\nnode_zfs_dbuf_hash_dbuf_level_4 2\n# HELP node_zfs_dbuf_hash_dbuf_level_4_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_4_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_4_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_4_bytes 262144\n# HELP node_zfs_dbuf_hash_dbuf_level_5 kstat.zfs.misc.dbufstats.hash_dbuf_level_5\n# TYPE node_zfs_dbuf_hash_dbuf_level_5 untyped\nnode_zfs_dbuf_hash_dbuf_level_5 2\n# HELP node_zfs_dbuf_hash_dbuf_level_5_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_5_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_5_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_5_bytes 262144\n# HELP node_zfs_dbuf_hash_dbuf_level_6 kstat.zfs.misc.dbufstats.hash_dbuf_level_6\n# TYPE node_zfs_dbuf_hash_dbuf_level_6 untyped\nnode_zfs_dbuf_hash_dbuf_level_6 0\n# HELP node_zfs_dbuf_hash_dbuf_level_6_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_6_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_6_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_6_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_7 kstat.zfs.misc.dbufstats.hash_dbuf_level_7\n# TYPE node_zfs_dbuf_hash_dbuf_level_7 untyped\nnode_zfs_dbuf_hash_dbuf_level_7 0\n# HELP node_zfs_dbuf_hash_dbuf_level_7_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_7_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_7_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_7_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_8 kstat.zfs.misc.dbufstats.hash_dbuf_level_8\n# TYPE node_zfs_dbuf_hash_dbuf_level_8 untyped\nnode_zfs_dbuf_hash_dbuf_level_8 0\n# HELP node_zfs_dbuf_hash_dbuf_level_8_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_8_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_8_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_8_bytes 0\n# HELP node_zfs_dbuf_hash_dbuf_level_9 kstat.zfs.misc.dbufstats.hash_dbuf_level_9\n# TYPE node_zfs_dbuf_hash_dbuf_level_9 untyped\nnode_zfs_dbuf_hash_dbuf_level_9 0\n# HELP node_zfs_dbuf_hash_dbuf_level_9_bytes kstat.zfs.misc.dbufstats.hash_dbuf_level_9_bytes\n# TYPE node_zfs_dbuf_hash_dbuf_level_9_bytes untyped\nnode_zfs_dbuf_hash_dbuf_level_9_bytes 0\n# HELP node_zfs_dbuf_hash_elements kstat.zfs.misc.dbufstats.hash_elements\n# TYPE node_zfs_dbuf_hash_elements untyped\nnode_zfs_dbuf_hash_elements 55\n# HELP node_zfs_dbuf_hash_elements_max kstat.zfs.misc.dbufstats.hash_elements_max\n# TYPE node_zfs_dbuf_hash_elements_max untyped\nnode_zfs_dbuf_hash_elements_max 55\n# HELP node_zfs_dbuf_hash_hits kstat.zfs.misc.dbufstats.hash_hits\n# TYPE node_zfs_dbuf_hash_hits untyped\nnode_zfs_dbuf_hash_hits 108807\n# HELP node_zfs_dbuf_hash_insert_race kstat.zfs.misc.dbufstats.hash_insert_race\n# TYPE node_zfs_dbuf_hash_insert_race untyped\nnode_zfs_dbuf_hash_insert_race 0\n# HELP node_zfs_dbuf_hash_misses kstat.zfs.misc.dbufstats.hash_misses\n# TYPE node_zfs_dbuf_hash_misses untyped\nnode_zfs_dbuf_hash_misses 1851\n# HELP node_zfs_dmu_tx_dmu_tx_assigned kstat.zfs.misc.dmu_tx.dmu_tx_assigned\n# TYPE node_zfs_dmu_tx_dmu_tx_assigned untyped\nnode_zfs_dmu_tx_dmu_tx_assigned 3.532844e+06\n# HELP node_zfs_dmu_tx_dmu_tx_delay kstat.zfs.misc.dmu_tx.dmu_tx_delay\n# TYPE node_zfs_dmu_tx_dmu_tx_delay untyped\nnode_zfs_dmu_tx_dmu_tx_delay 0\n# HELP node_zfs_dmu_tx_dmu_tx_dirty_delay kstat.zfs.misc.dmu_tx.dmu_tx_dirty_delay\n# TYPE node_zfs_dmu_tx_dmu_tx_dirty_delay untyped\nnode_zfs_dmu_tx_dmu_tx_dirty_delay 0\n# HELP node_zfs_dmu_tx_dmu_tx_dirty_over_max kstat.zfs.misc.dmu_tx.dmu_tx_dirty_over_max\n# TYPE node_zfs_dmu_tx_dmu_tx_dirty_over_max untyped\nnode_zfs_dmu_tx_dmu_tx_dirty_over_max 0\n# HELP node_zfs_dmu_tx_dmu_tx_dirty_throttle kstat.zfs.misc.dmu_tx.dmu_tx_dirty_throttle\n# TYPE node_zfs_dmu_tx_dmu_tx_dirty_throttle untyped\nnode_zfs_dmu_tx_dmu_tx_dirty_throttle 0\n# HELP node_zfs_dmu_tx_dmu_tx_error kstat.zfs.misc.dmu_tx.dmu_tx_error\n# TYPE node_zfs_dmu_tx_dmu_tx_error untyped\nnode_zfs_dmu_tx_dmu_tx_error 0\n# HELP node_zfs_dmu_tx_dmu_tx_group kstat.zfs.misc.dmu_tx.dmu_tx_group\n# TYPE node_zfs_dmu_tx_dmu_tx_group untyped\nnode_zfs_dmu_tx_dmu_tx_group 0\n# HELP node_zfs_dmu_tx_dmu_tx_memory_reclaim kstat.zfs.misc.dmu_tx.dmu_tx_memory_reclaim\n# TYPE node_zfs_dmu_tx_dmu_tx_memory_reclaim untyped\nnode_zfs_dmu_tx_dmu_tx_memory_reclaim 0\n# HELP node_zfs_dmu_tx_dmu_tx_memory_reserve kstat.zfs.misc.dmu_tx.dmu_tx_memory_reserve\n# TYPE node_zfs_dmu_tx_dmu_tx_memory_reserve untyped\nnode_zfs_dmu_tx_dmu_tx_memory_reserve 0\n# HELP node_zfs_dmu_tx_dmu_tx_quota kstat.zfs.misc.dmu_tx.dmu_tx_quota\n# TYPE node_zfs_dmu_tx_dmu_tx_quota untyped\nnode_zfs_dmu_tx_dmu_tx_quota 0\n# HELP node_zfs_dmu_tx_dmu_tx_suspended kstat.zfs.misc.dmu_tx.dmu_tx_suspended\n# TYPE node_zfs_dmu_tx_dmu_tx_suspended untyped\nnode_zfs_dmu_tx_dmu_tx_suspended 0\n# HELP node_zfs_dnode_dnode_alloc_next_block kstat.zfs.misc.dnodestats.dnode_alloc_next_block\n# TYPE node_zfs_dnode_dnode_alloc_next_block untyped\nnode_zfs_dnode_dnode_alloc_next_block 0\n# HELP node_zfs_dnode_dnode_alloc_next_chunk kstat.zfs.misc.dnodestats.dnode_alloc_next_chunk\n# TYPE node_zfs_dnode_dnode_alloc_next_chunk untyped\nnode_zfs_dnode_dnode_alloc_next_chunk 0\n# HELP node_zfs_dnode_dnode_alloc_race kstat.zfs.misc.dnodestats.dnode_alloc_race\n# TYPE node_zfs_dnode_dnode_alloc_race untyped\nnode_zfs_dnode_dnode_alloc_race 0\n# HELP node_zfs_dnode_dnode_allocate kstat.zfs.misc.dnodestats.dnode_allocate\n# TYPE node_zfs_dnode_dnode_allocate untyped\nnode_zfs_dnode_dnode_allocate 0\n# HELP node_zfs_dnode_dnode_buf_evict kstat.zfs.misc.dnodestats.dnode_buf_evict\n# TYPE node_zfs_dnode_dnode_buf_evict untyped\nnode_zfs_dnode_dnode_buf_evict 17\n# HELP node_zfs_dnode_dnode_hold_alloc_hits kstat.zfs.misc.dnodestats.dnode_hold_alloc_hits\n# TYPE node_zfs_dnode_dnode_hold_alloc_hits untyped\nnode_zfs_dnode_dnode_hold_alloc_hits 37617\n# HELP node_zfs_dnode_dnode_hold_alloc_interior kstat.zfs.misc.dnodestats.dnode_hold_alloc_interior\n# TYPE node_zfs_dnode_dnode_hold_alloc_interior untyped\nnode_zfs_dnode_dnode_hold_alloc_interior 0\n# HELP node_zfs_dnode_dnode_hold_alloc_lock_misses kstat.zfs.misc.dnodestats.dnode_hold_alloc_lock_misses\n# TYPE node_zfs_dnode_dnode_hold_alloc_lock_misses untyped\nnode_zfs_dnode_dnode_hold_alloc_lock_misses 0\n# HELP node_zfs_dnode_dnode_hold_alloc_lock_retry kstat.zfs.misc.dnodestats.dnode_hold_alloc_lock_retry\n# TYPE node_zfs_dnode_dnode_hold_alloc_lock_retry untyped\nnode_zfs_dnode_dnode_hold_alloc_lock_retry 0\n# HELP node_zfs_dnode_dnode_hold_alloc_misses kstat.zfs.misc.dnodestats.dnode_hold_alloc_misses\n# TYPE node_zfs_dnode_dnode_hold_alloc_misses untyped\nnode_zfs_dnode_dnode_hold_alloc_misses 0\n# HELP node_zfs_dnode_dnode_hold_alloc_type_none kstat.zfs.misc.dnodestats.dnode_hold_alloc_type_none\n# TYPE node_zfs_dnode_dnode_hold_alloc_type_none untyped\nnode_zfs_dnode_dnode_hold_alloc_type_none 0\n# HELP node_zfs_dnode_dnode_hold_dbuf_hold kstat.zfs.misc.dnodestats.dnode_hold_dbuf_hold\n# TYPE node_zfs_dnode_dnode_hold_dbuf_hold untyped\nnode_zfs_dnode_dnode_hold_dbuf_hold 0\n# HELP node_zfs_dnode_dnode_hold_dbuf_read kstat.zfs.misc.dnodestats.dnode_hold_dbuf_read\n# TYPE node_zfs_dnode_dnode_hold_dbuf_read untyped\nnode_zfs_dnode_dnode_hold_dbuf_read 0\n# HELP node_zfs_dnode_dnode_hold_free_hits kstat.zfs.misc.dnodestats.dnode_hold_free_hits\n# TYPE node_zfs_dnode_dnode_hold_free_hits untyped\nnode_zfs_dnode_dnode_hold_free_hits 0\n# HELP node_zfs_dnode_dnode_hold_free_lock_misses kstat.zfs.misc.dnodestats.dnode_hold_free_lock_misses\n# TYPE node_zfs_dnode_dnode_hold_free_lock_misses untyped\nnode_zfs_dnode_dnode_hold_free_lock_misses 0\n# HELP node_zfs_dnode_dnode_hold_free_lock_retry kstat.zfs.misc.dnodestats.dnode_hold_free_lock_retry\n# TYPE node_zfs_dnode_dnode_hold_free_lock_retry untyped\nnode_zfs_dnode_dnode_hold_free_lock_retry 0\n# HELP node_zfs_dnode_dnode_hold_free_misses kstat.zfs.misc.dnodestats.dnode_hold_free_misses\n# TYPE node_zfs_dnode_dnode_hold_free_misses untyped\nnode_zfs_dnode_dnode_hold_free_misses 0\n# HELP node_zfs_dnode_dnode_hold_free_overflow kstat.zfs.misc.dnodestats.dnode_hold_free_overflow\n# TYPE node_zfs_dnode_dnode_hold_free_overflow untyped\nnode_zfs_dnode_dnode_hold_free_overflow 0\n# HELP node_zfs_dnode_dnode_hold_free_refcount kstat.zfs.misc.dnodestats.dnode_hold_free_refcount\n# TYPE node_zfs_dnode_dnode_hold_free_refcount untyped\nnode_zfs_dnode_dnode_hold_free_refcount 0\n# HELP node_zfs_dnode_dnode_hold_free_txg kstat.zfs.misc.dnodestats.dnode_hold_free_txg\n# TYPE node_zfs_dnode_dnode_hold_free_txg untyped\nnode_zfs_dnode_dnode_hold_free_txg 0\n# HELP node_zfs_dnode_dnode_move_active kstat.zfs.misc.dnodestats.dnode_move_active\n# TYPE node_zfs_dnode_dnode_move_active untyped\nnode_zfs_dnode_dnode_move_active 0\n# HELP node_zfs_dnode_dnode_move_handle kstat.zfs.misc.dnodestats.dnode_move_handle\n# TYPE node_zfs_dnode_dnode_move_handle untyped\nnode_zfs_dnode_dnode_move_handle 0\n# HELP node_zfs_dnode_dnode_move_invalid kstat.zfs.misc.dnodestats.dnode_move_invalid\n# TYPE node_zfs_dnode_dnode_move_invalid untyped\nnode_zfs_dnode_dnode_move_invalid 0\n# HELP node_zfs_dnode_dnode_move_recheck1 kstat.zfs.misc.dnodestats.dnode_move_recheck1\n# TYPE node_zfs_dnode_dnode_move_recheck1 untyped\nnode_zfs_dnode_dnode_move_recheck1 0\n# HELP node_zfs_dnode_dnode_move_recheck2 kstat.zfs.misc.dnodestats.dnode_move_recheck2\n# TYPE node_zfs_dnode_dnode_move_recheck2 untyped\nnode_zfs_dnode_dnode_move_recheck2 0\n# HELP node_zfs_dnode_dnode_move_rwlock kstat.zfs.misc.dnodestats.dnode_move_rwlock\n# TYPE node_zfs_dnode_dnode_move_rwlock untyped\nnode_zfs_dnode_dnode_move_rwlock 0\n# HELP node_zfs_dnode_dnode_move_special kstat.zfs.misc.dnodestats.dnode_move_special\n# TYPE node_zfs_dnode_dnode_move_special untyped\nnode_zfs_dnode_dnode_move_special 0\n# HELP node_zfs_dnode_dnode_reallocate kstat.zfs.misc.dnodestats.dnode_reallocate\n# TYPE node_zfs_dnode_dnode_reallocate untyped\nnode_zfs_dnode_dnode_reallocate 0\n# HELP node_zfs_fm_erpt_dropped kstat.zfs.misc.fm.erpt-dropped\n# TYPE node_zfs_fm_erpt_dropped untyped\nnode_zfs_fm_erpt_dropped 18\n# HELP node_zfs_fm_erpt_set_failed kstat.zfs.misc.fm.erpt-set-failed\n# TYPE node_zfs_fm_erpt_set_failed untyped\nnode_zfs_fm_erpt_set_failed 0\n# HELP node_zfs_fm_fmri_set_failed kstat.zfs.misc.fm.fmri-set-failed\n# TYPE node_zfs_fm_fmri_set_failed untyped\nnode_zfs_fm_fmri_set_failed 0\n# HELP node_zfs_fm_payload_set_failed kstat.zfs.misc.fm.payload-set-failed\n# TYPE node_zfs_fm_payload_set_failed untyped\nnode_zfs_fm_payload_set_failed 0\n# HELP node_zfs_vdev_cache_delegations kstat.zfs.misc.vdev_cache_stats.delegations\n# TYPE node_zfs_vdev_cache_delegations untyped\nnode_zfs_vdev_cache_delegations 40\n# HELP node_zfs_vdev_cache_hits kstat.zfs.misc.vdev_cache_stats.hits\n# TYPE node_zfs_vdev_cache_hits untyped\nnode_zfs_vdev_cache_hits 0\n# HELP node_zfs_vdev_cache_misses kstat.zfs.misc.vdev_cache_stats.misses\n# TYPE node_zfs_vdev_cache_misses untyped\nnode_zfs_vdev_cache_misses 0\n# HELP node_zfs_vdev_mirror_non_rotating_linear kstat.zfs.misc.vdev_mirror_stats.non_rotating_linear\n# TYPE node_zfs_vdev_mirror_non_rotating_linear untyped\nnode_zfs_vdev_mirror_non_rotating_linear 0\n# HELP node_zfs_vdev_mirror_non_rotating_seek kstat.zfs.misc.vdev_mirror_stats.non_rotating_seek\n# TYPE node_zfs_vdev_mirror_non_rotating_seek untyped\nnode_zfs_vdev_mirror_non_rotating_seek 0\n# HELP node_zfs_vdev_mirror_preferred_found kstat.zfs.misc.vdev_mirror_stats.preferred_found\n# TYPE node_zfs_vdev_mirror_preferred_found untyped\nnode_zfs_vdev_mirror_preferred_found 0\n# HELP node_zfs_vdev_mirror_preferred_not_found kstat.zfs.misc.vdev_mirror_stats.preferred_not_found\n# TYPE node_zfs_vdev_mirror_preferred_not_found untyped\nnode_zfs_vdev_mirror_preferred_not_found 94\n# HELP node_zfs_vdev_mirror_rotating_linear kstat.zfs.misc.vdev_mirror_stats.rotating_linear\n# TYPE node_zfs_vdev_mirror_rotating_linear untyped\nnode_zfs_vdev_mirror_rotating_linear 0\n# HELP node_zfs_vdev_mirror_rotating_offset kstat.zfs.misc.vdev_mirror_stats.rotating_offset\n# TYPE node_zfs_vdev_mirror_rotating_offset untyped\nnode_zfs_vdev_mirror_rotating_offset 0\n# HELP node_zfs_vdev_mirror_rotating_seek kstat.zfs.misc.vdev_mirror_stats.rotating_seek\n# TYPE node_zfs_vdev_mirror_rotating_seek untyped\nnode_zfs_vdev_mirror_rotating_seek 0\n# HELP node_zfs_xuio_onloan_read_buf kstat.zfs.misc.xuio_stats.onloan_read_buf\n# TYPE node_zfs_xuio_onloan_read_buf untyped\nnode_zfs_xuio_onloan_read_buf 32\n# HELP node_zfs_xuio_onloan_write_buf kstat.zfs.misc.xuio_stats.onloan_write_buf\n# TYPE node_zfs_xuio_onloan_write_buf untyped\nnode_zfs_xuio_onloan_write_buf 0\n# HELP node_zfs_xuio_read_buf_copied kstat.zfs.misc.xuio_stats.read_buf_copied\n# TYPE node_zfs_xuio_read_buf_copied untyped\nnode_zfs_xuio_read_buf_copied 0\n# HELP node_zfs_xuio_read_buf_nocopy kstat.zfs.misc.xuio_stats.read_buf_nocopy\n# TYPE node_zfs_xuio_read_buf_nocopy untyped\nnode_zfs_xuio_read_buf_nocopy 0\n# HELP node_zfs_xuio_write_buf_copied kstat.zfs.misc.xuio_stats.write_buf_copied\n# TYPE node_zfs_xuio_write_buf_copied untyped\nnode_zfs_xuio_write_buf_copied 0\n# HELP node_zfs_xuio_write_buf_nocopy kstat.zfs.misc.xuio_stats.write_buf_nocopy\n# TYPE node_zfs_xuio_write_buf_nocopy untyped\nnode_zfs_xuio_write_buf_nocopy 0\n# HELP node_zfs_zfetch_bogus_streams kstat.zfs.misc.zfetchstats.bogus_streams\n# TYPE node_zfs_zfetch_bogus_streams untyped\nnode_zfs_zfetch_bogus_streams 0\n# HELP node_zfs_zfetch_colinear_hits kstat.zfs.misc.zfetchstats.colinear_hits\n# TYPE node_zfs_zfetch_colinear_hits untyped\nnode_zfs_zfetch_colinear_hits 0\n# HELP node_zfs_zfetch_colinear_misses kstat.zfs.misc.zfetchstats.colinear_misses\n# TYPE node_zfs_zfetch_colinear_misses untyped\nnode_zfs_zfetch_colinear_misses 11\n# HELP node_zfs_zfetch_hits kstat.zfs.misc.zfetchstats.hits\n# TYPE node_zfs_zfetch_hits untyped\nnode_zfs_zfetch_hits 7.067992e+06\n# HELP node_zfs_zfetch_misses kstat.zfs.misc.zfetchstats.misses\n# TYPE node_zfs_zfetch_misses untyped\nnode_zfs_zfetch_misses 11\n# HELP node_zfs_zfetch_reclaim_failures kstat.zfs.misc.zfetchstats.reclaim_failures\n# TYPE node_zfs_zfetch_reclaim_failures untyped\nnode_zfs_zfetch_reclaim_failures 11\n# HELP node_zfs_zfetch_reclaim_successes kstat.zfs.misc.zfetchstats.reclaim_successes\n# TYPE node_zfs_zfetch_reclaim_successes untyped\nnode_zfs_zfetch_reclaim_successes 0\n# HELP node_zfs_zfetch_streams_noresets kstat.zfs.misc.zfetchstats.streams_noresets\n# TYPE node_zfs_zfetch_streams_noresets untyped\nnode_zfs_zfetch_streams_noresets 2\n# HELP node_zfs_zfetch_streams_resets kstat.zfs.misc.zfetchstats.streams_resets\n# TYPE node_zfs_zfetch_streams_resets untyped\nnode_zfs_zfetch_streams_resets 0\n# HELP node_zfs_zfetch_stride_hits kstat.zfs.misc.zfetchstats.stride_hits\n# TYPE node_zfs_zfetch_stride_hits untyped\nnode_zfs_zfetch_stride_hits 7.06799e+06\n# HELP node_zfs_zfetch_stride_misses kstat.zfs.misc.zfetchstats.stride_misses\n# TYPE node_zfs_zfetch_stride_misses untyped\nnode_zfs_zfetch_stride_misses 0\n# HELP node_zfs_zil_zil_commit_count kstat.zfs.misc.zil.zil_commit_count\n# TYPE node_zfs_zil_zil_commit_count untyped\nnode_zfs_zil_zil_commit_count 10\n# HELP node_zfs_zil_zil_commit_writer_count kstat.zfs.misc.zil.zil_commit_writer_count\n# TYPE node_zfs_zil_zil_commit_writer_count untyped\nnode_zfs_zil_zil_commit_writer_count 0\n# HELP node_zfs_zil_zil_itx_copied_bytes kstat.zfs.misc.zil.zil_itx_copied_bytes\n# TYPE node_zfs_zil_zil_itx_copied_bytes untyped\nnode_zfs_zil_zil_itx_copied_bytes 0\n# HELP node_zfs_zil_zil_itx_copied_count kstat.zfs.misc.zil.zil_itx_copied_count\n# TYPE node_zfs_zil_zil_itx_copied_count untyped\nnode_zfs_zil_zil_itx_copied_count 0\n# HELP node_zfs_zil_zil_itx_count kstat.zfs.misc.zil.zil_itx_count\n# TYPE node_zfs_zil_zil_itx_count untyped\nnode_zfs_zil_zil_itx_count 0\n# HELP node_zfs_zil_zil_itx_indirect_bytes kstat.zfs.misc.zil.zil_itx_indirect_bytes\n# TYPE node_zfs_zil_zil_itx_indirect_bytes untyped\nnode_zfs_zil_zil_itx_indirect_bytes 0\n# HELP node_zfs_zil_zil_itx_indirect_count kstat.zfs.misc.zil.zil_itx_indirect_count\n# TYPE node_zfs_zil_zil_itx_indirect_count untyped\nnode_zfs_zil_zil_itx_indirect_count 0\n# HELP node_zfs_zil_zil_itx_metaslab_normal_bytes kstat.zfs.misc.zil.zil_itx_metaslab_normal_bytes\n# TYPE node_zfs_zil_zil_itx_metaslab_normal_bytes untyped\nnode_zfs_zil_zil_itx_metaslab_normal_bytes 0\n# HELP node_zfs_zil_zil_itx_metaslab_normal_count kstat.zfs.misc.zil.zil_itx_metaslab_normal_count\n# TYPE node_zfs_zil_zil_itx_metaslab_normal_count untyped\nnode_zfs_zil_zil_itx_metaslab_normal_count 0\n# HELP node_zfs_zil_zil_itx_metaslab_slog_bytes kstat.zfs.misc.zil.zil_itx_metaslab_slog_bytes\n# TYPE node_zfs_zil_zil_itx_metaslab_slog_bytes untyped\nnode_zfs_zil_zil_itx_metaslab_slog_bytes 0\n# HELP node_zfs_zil_zil_itx_metaslab_slog_count kstat.zfs.misc.zil.zil_itx_metaslab_slog_count\n# TYPE node_zfs_zil_zil_itx_metaslab_slog_count untyped\nnode_zfs_zil_zil_itx_metaslab_slog_count 0\n# HELP node_zfs_zil_zil_itx_needcopy_bytes kstat.zfs.misc.zil.zil_itx_needcopy_bytes\n# TYPE node_zfs_zil_zil_itx_needcopy_bytes untyped\nnode_zfs_zil_zil_itx_needcopy_bytes 1.8446744073709537e+19\n# HELP node_zfs_zil_zil_itx_needcopy_count kstat.zfs.misc.zil.zil_itx_needcopy_count\n# TYPE node_zfs_zil_zil_itx_needcopy_count untyped\nnode_zfs_zil_zil_itx_needcopy_count 0\n# HELP node_zfs_zpool_dataset_nread kstat.zfs.misc.objset.nread\n# TYPE node_zfs_zpool_dataset_nread untyped\nnode_zfs_zpool_dataset_nread{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_nread{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 28\nnode_zfs_zpool_dataset_nread{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_nread{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 28\nnode_zfs_zpool_dataset_nread{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_nread{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 28\n# HELP node_zfs_zpool_dataset_nunlinked kstat.zfs.misc.objset.nunlinked\n# TYPE node_zfs_zpool_dataset_nunlinked untyped\nnode_zfs_zpool_dataset_nunlinked{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_nunlinked{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 3\nnode_zfs_zpool_dataset_nunlinked{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_nunlinked{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 3\nnode_zfs_zpool_dataset_nunlinked{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_nunlinked{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 14\n# HELP node_zfs_zpool_dataset_nunlinks kstat.zfs.misc.objset.nunlinks\n# TYPE node_zfs_zpool_dataset_nunlinks untyped\nnode_zfs_zpool_dataset_nunlinks{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_nunlinks{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 3\nnode_zfs_zpool_dataset_nunlinks{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_nunlinks{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 3\nnode_zfs_zpool_dataset_nunlinks{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_nunlinks{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 14\n# HELP node_zfs_zpool_dataset_nwritten kstat.zfs.misc.objset.nwritten\n# TYPE node_zfs_zpool_dataset_nwritten untyped\nnode_zfs_zpool_dataset_nwritten{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_nwritten{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 12302\nnode_zfs_zpool_dataset_nwritten{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_nwritten{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 12302\nnode_zfs_zpool_dataset_nwritten{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_nwritten{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 32806\n# HELP node_zfs_zpool_dataset_reads kstat.zfs.misc.objset.reads\n# TYPE node_zfs_zpool_dataset_reads untyped\nnode_zfs_zpool_dataset_reads{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_reads{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 2\nnode_zfs_zpool_dataset_reads{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_reads{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 2\nnode_zfs_zpool_dataset_reads{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_reads{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 2\n# HELP node_zfs_zpool_dataset_writes kstat.zfs.misc.objset.writes\n# TYPE node_zfs_zpool_dataset_writes untyped\nnode_zfs_zpool_dataset_writes{dataset=\"pool1\",zpool=\"pool1\"} 0\nnode_zfs_zpool_dataset_writes{dataset=\"pool1/dataset1\",zpool=\"pool1\"} 4\nnode_zfs_zpool_dataset_writes{dataset=\"pool3\",zpool=\"pool3\"} 0\nnode_zfs_zpool_dataset_writes{dataset=\"pool3/dataset with  space\",zpool=\"pool3\"} 4\nnode_zfs_zpool_dataset_writes{dataset=\"poolz1\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_dataset_writes{dataset=\"poolz1/dataset1\",zpool=\"poolz1\"} 10\n# HELP node_zfs_zpool_nread kstat.zfs.misc.io.nread\n# TYPE node_zfs_zpool_nread untyped\nnode_zfs_zpool_nread{zpool=\"pool1\"} 1.88416e+06\nnode_zfs_zpool_nread{zpool=\"pool3\"} 1.88416e+06\nnode_zfs_zpool_nread{zpool=\"poolz1\"} 2.82624e+06\n# HELP node_zfs_zpool_nwritten kstat.zfs.misc.io.nwritten\n# TYPE node_zfs_zpool_nwritten untyped\nnode_zfs_zpool_nwritten{zpool=\"pool1\"} 3.206144e+06\nnode_zfs_zpool_nwritten{zpool=\"pool3\"} 3.206144e+06\nnode_zfs_zpool_nwritten{zpool=\"poolz1\"} 2.680501248e+09\n# HELP node_zfs_zpool_rcnt kstat.zfs.misc.io.rcnt\n# TYPE node_zfs_zpool_rcnt untyped\nnode_zfs_zpool_rcnt{zpool=\"pool1\"} 0\nnode_zfs_zpool_rcnt{zpool=\"pool3\"} 0\nnode_zfs_zpool_rcnt{zpool=\"poolz1\"} 0\n# HELP node_zfs_zpool_reads kstat.zfs.misc.io.reads\n# TYPE node_zfs_zpool_reads untyped\nnode_zfs_zpool_reads{zpool=\"pool1\"} 22\nnode_zfs_zpool_reads{zpool=\"pool3\"} 22\nnode_zfs_zpool_reads{zpool=\"poolz1\"} 33\n# HELP node_zfs_zpool_rlentime kstat.zfs.misc.io.rlentime\n# TYPE node_zfs_zpool_rlentime untyped\nnode_zfs_zpool_rlentime{zpool=\"pool1\"} 1.04112268e+08\nnode_zfs_zpool_rlentime{zpool=\"pool3\"} 1.04112268e+08\nnode_zfs_zpool_rlentime{zpool=\"poolz1\"} 6.472105124093e+12\n# HELP node_zfs_zpool_rtime kstat.zfs.misc.io.rtime\n# TYPE node_zfs_zpool_rtime untyped\nnode_zfs_zpool_rtime{zpool=\"pool1\"} 2.4168078e+07\nnode_zfs_zpool_rtime{zpool=\"pool3\"} 2.4168078e+07\nnode_zfs_zpool_rtime{zpool=\"poolz1\"} 9.82909164e+09\n# HELP node_zfs_zpool_rupdate kstat.zfs.misc.io.rupdate\n# TYPE node_zfs_zpool_rupdate untyped\nnode_zfs_zpool_rupdate{zpool=\"pool1\"} 7.921048984922e+13\nnode_zfs_zpool_rupdate{zpool=\"pool3\"} 7.921048984922e+13\nnode_zfs_zpool_rupdate{zpool=\"poolz1\"} 1.10734831944501e+14\n# HELP node_zfs_zpool_state kstat.zfs.misc.state\n# TYPE node_zfs_zpool_state gauge\nnode_zfs_zpool_state{state=\"degraded\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"degraded\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"degraded\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"degraded\",zpool=\"poolz1\"} 1\nnode_zfs_zpool_state{state=\"faulted\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"faulted\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"faulted\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"faulted\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"offline\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"offline\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"offline\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"offline\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"online\",zpool=\"pool1\"} 1\nnode_zfs_zpool_state{state=\"online\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"online\",zpool=\"pool3\"} 1\nnode_zfs_zpool_state{state=\"online\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"removed\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"removed\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"removed\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"removed\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"suspended\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"suspended\",zpool=\"pool2\"} 1\nnode_zfs_zpool_state{state=\"suspended\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"suspended\",zpool=\"poolz1\"} 0\nnode_zfs_zpool_state{state=\"unavail\",zpool=\"pool1\"} 0\nnode_zfs_zpool_state{state=\"unavail\",zpool=\"pool2\"} 0\nnode_zfs_zpool_state{state=\"unavail\",zpool=\"pool3\"} 0\nnode_zfs_zpool_state{state=\"unavail\",zpool=\"poolz1\"} 0\n# HELP node_zfs_zpool_wcnt kstat.zfs.misc.io.wcnt\n# TYPE node_zfs_zpool_wcnt untyped\nnode_zfs_zpool_wcnt{zpool=\"pool1\"} 0\nnode_zfs_zpool_wcnt{zpool=\"pool3\"} 0\nnode_zfs_zpool_wcnt{zpool=\"poolz1\"} 0\n# HELP node_zfs_zpool_wlentime kstat.zfs.misc.io.wlentime\n# TYPE node_zfs_zpool_wlentime untyped\nnode_zfs_zpool_wlentime{zpool=\"pool1\"} 1.04112268e+08\nnode_zfs_zpool_wlentime{zpool=\"pool3\"} 1.04112268e+08\nnode_zfs_zpool_wlentime{zpool=\"poolz1\"} 6.472105124093e+12\n# HELP node_zfs_zpool_writes kstat.zfs.misc.io.writes\n# TYPE node_zfs_zpool_writes untyped\nnode_zfs_zpool_writes{zpool=\"pool1\"} 132\nnode_zfs_zpool_writes{zpool=\"pool3\"} 132\nnode_zfs_zpool_writes{zpool=\"poolz1\"} 25294\n# HELP node_zfs_zpool_wtime kstat.zfs.misc.io.wtime\n# TYPE node_zfs_zpool_wtime untyped\nnode_zfs_zpool_wtime{zpool=\"pool1\"} 7.155162e+06\nnode_zfs_zpool_wtime{zpool=\"pool3\"} 7.155162e+06\nnode_zfs_zpool_wtime{zpool=\"poolz1\"} 9.673715628e+09\n# HELP node_zfs_zpool_wupdate kstat.zfs.misc.io.wupdate\n# TYPE node_zfs_zpool_wupdate untyped\nnode_zfs_zpool_wupdate{zpool=\"pool1\"} 7.9210489694949e+13\nnode_zfs_zpool_wupdate{zpool=\"pool3\"} 7.9210489694949e+13\nnode_zfs_zpool_wupdate{zpool=\"poolz1\"} 1.10734831833266e+14\n# HELP node_zoneinfo_high_pages Zone watermark pages_high\n# TYPE node_zoneinfo_high_pages gauge\nnode_zoneinfo_high_pages{node=\"0\",zone=\"DMA\"} 14\nnode_zoneinfo_high_pages{node=\"0\",zone=\"DMA32\"} 2122\nnode_zoneinfo_high_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_high_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_high_pages{node=\"0\",zone=\"Normal\"} 31113\n# HELP node_zoneinfo_low_pages Zone watermark pages_low\n# TYPE node_zoneinfo_low_pages gauge\nnode_zoneinfo_low_pages{node=\"0\",zone=\"DMA\"} 11\nnode_zoneinfo_low_pages{node=\"0\",zone=\"DMA32\"} 1600\nnode_zoneinfo_low_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_low_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_low_pages{node=\"0\",zone=\"Normal\"} 23461\n# HELP node_zoneinfo_managed_pages Present pages managed by the buddy system\n# TYPE node_zoneinfo_managed_pages gauge\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"DMA\"} 3973\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"DMA32\"} 530339\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_managed_pages{node=\"0\",zone=\"Normal\"} 7.654794e+06\n# HELP node_zoneinfo_min_pages Zone watermark pages_min\n# TYPE node_zoneinfo_min_pages gauge\nnode_zoneinfo_min_pages{node=\"0\",zone=\"DMA\"} 8\nnode_zoneinfo_min_pages{node=\"0\",zone=\"DMA32\"} 1078\nnode_zoneinfo_min_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_min_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_min_pages{node=\"0\",zone=\"Normal\"} 15809\n# HELP node_zoneinfo_nr_active_anon_pages Number of anonymous pages recently more used\n# TYPE node_zoneinfo_nr_active_anon_pages gauge\nnode_zoneinfo_nr_active_anon_pages{node=\"0\",zone=\"DMA\"} 1.175853e+06\n# HELP node_zoneinfo_nr_active_file_pages Number of active pages with file-backing\n# TYPE node_zoneinfo_nr_active_file_pages gauge\nnode_zoneinfo_nr_active_file_pages{node=\"0\",zone=\"DMA\"} 688810\n# HELP node_zoneinfo_nr_anon_pages Number of anonymous pages currently used by the system\n# TYPE node_zoneinfo_nr_anon_pages gauge\nnode_zoneinfo_nr_anon_pages{node=\"0\",zone=\"DMA\"} 1.156608e+06\n# HELP node_zoneinfo_nr_anon_transparent_hugepages Number of anonymous transparent huge pages currently used by the system\n# TYPE node_zoneinfo_nr_anon_transparent_hugepages gauge\nnode_zoneinfo_nr_anon_transparent_hugepages{node=\"0\",zone=\"DMA\"} 0\n# HELP node_zoneinfo_nr_dirtied_total Page dirtyings since bootup\n# TYPE node_zoneinfo_nr_dirtied_total counter\nnode_zoneinfo_nr_dirtied_total{node=\"0\",zone=\"DMA\"} 1.189097e+06\n# HELP node_zoneinfo_nr_dirty_pages Number of dirty pages\n# TYPE node_zoneinfo_nr_dirty_pages gauge\nnode_zoneinfo_nr_dirty_pages{node=\"0\",zone=\"DMA\"} 103\n# HELP node_zoneinfo_nr_file_pages Number of file pages\n# TYPE node_zoneinfo_nr_file_pages gauge\nnode_zoneinfo_nr_file_pages{node=\"0\",zone=\"DMA\"} 1.740118e+06\n# HELP node_zoneinfo_nr_free_pages Total number of free pages in the zone\n# TYPE node_zoneinfo_nr_free_pages gauge\nnode_zoneinfo_nr_free_pages{node=\"0\",zone=\"DMA\"} 2949\nnode_zoneinfo_nr_free_pages{node=\"0\",zone=\"DMA32\"} 528427\nnode_zoneinfo_nr_free_pages{node=\"0\",zone=\"Normal\"} 4.539739e+06\n# HELP node_zoneinfo_nr_inactive_anon_pages Number of anonymous pages recently less used\n# TYPE node_zoneinfo_nr_inactive_anon_pages gauge\nnode_zoneinfo_nr_inactive_anon_pages{node=\"0\",zone=\"DMA\"} 95612\n# HELP node_zoneinfo_nr_inactive_file_pages Number of inactive pages with file-backing\n# TYPE node_zoneinfo_nr_inactive_file_pages gauge\nnode_zoneinfo_nr_inactive_file_pages{node=\"0\",zone=\"DMA\"} 723339\n# HELP node_zoneinfo_nr_isolated_anon_pages Temporary isolated pages from anon lru\n# TYPE node_zoneinfo_nr_isolated_anon_pages gauge\nnode_zoneinfo_nr_isolated_anon_pages{node=\"0\",zone=\"DMA\"} 0\n# HELP node_zoneinfo_nr_isolated_file_pages Temporary isolated pages from file lru\n# TYPE node_zoneinfo_nr_isolated_file_pages gauge\nnode_zoneinfo_nr_isolated_file_pages{node=\"0\",zone=\"DMA\"} 0\n# HELP node_zoneinfo_nr_kernel_stacks Number of kernel stacks\n# TYPE node_zoneinfo_nr_kernel_stacks gauge\nnode_zoneinfo_nr_kernel_stacks{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_nr_kernel_stacks{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_nr_kernel_stacks{node=\"0\",zone=\"Normal\"} 18864\n# HELP node_zoneinfo_nr_mapped_pages Number of mapped pages\n# TYPE node_zoneinfo_nr_mapped_pages gauge\nnode_zoneinfo_nr_mapped_pages{node=\"0\",zone=\"DMA\"} 423143\n# HELP node_zoneinfo_nr_shmem_pages Number of shmem pages (included tmpfs/GEM pages)\n# TYPE node_zoneinfo_nr_shmem_pages gauge\nnode_zoneinfo_nr_shmem_pages{node=\"0\",zone=\"DMA\"} 330517\n# HELP node_zoneinfo_nr_slab_reclaimable_pages Number of reclaimable slab pages\n# TYPE node_zoneinfo_nr_slab_reclaimable_pages gauge\nnode_zoneinfo_nr_slab_reclaimable_pages{node=\"0\",zone=\"DMA\"} 121763\n# HELP node_zoneinfo_nr_slab_unreclaimable_pages Number of unreclaimable slab pages\n# TYPE node_zoneinfo_nr_slab_unreclaimable_pages gauge\nnode_zoneinfo_nr_slab_unreclaimable_pages{node=\"0\",zone=\"DMA\"} 56182\n# HELP node_zoneinfo_nr_unevictable_pages Number of unevictable pages\n# TYPE node_zoneinfo_nr_unevictable_pages gauge\nnode_zoneinfo_nr_unevictable_pages{node=\"0\",zone=\"DMA\"} 213111\n# HELP node_zoneinfo_nr_writeback_pages Number of writeback pages\n# TYPE node_zoneinfo_nr_writeback_pages gauge\nnode_zoneinfo_nr_writeback_pages{node=\"0\",zone=\"DMA\"} 0\n# HELP node_zoneinfo_nr_written_total Page writings since bootup\n# TYPE node_zoneinfo_nr_written_total counter\nnode_zoneinfo_nr_written_total{node=\"0\",zone=\"DMA\"} 1.181554e+06\n# HELP node_zoneinfo_numa_foreign_total Was intended here, hit elsewhere\n# TYPE node_zoneinfo_numa_foreign_total counter\nnode_zoneinfo_numa_foreign_total{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_numa_foreign_total{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_numa_foreign_total{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_numa_hit_total Allocated in intended node\n# TYPE node_zoneinfo_numa_hit_total counter\nnode_zoneinfo_numa_hit_total{node=\"0\",zone=\"DMA\"} 1\nnode_zoneinfo_numa_hit_total{node=\"0\",zone=\"DMA32\"} 13\nnode_zoneinfo_numa_hit_total{node=\"0\",zone=\"Normal\"} 6.2836441e+07\n# HELP node_zoneinfo_numa_interleave_total Interleaver preferred this zone\n# TYPE node_zoneinfo_numa_interleave_total counter\nnode_zoneinfo_numa_interleave_total{node=\"0\",zone=\"DMA\"} 1\nnode_zoneinfo_numa_interleave_total{node=\"0\",zone=\"DMA32\"} 1\nnode_zoneinfo_numa_interleave_total{node=\"0\",zone=\"Normal\"} 23174\n# HELP node_zoneinfo_numa_local_total Allocation from local node\n# TYPE node_zoneinfo_numa_local_total counter\nnode_zoneinfo_numa_local_total{node=\"0\",zone=\"DMA\"} 1\nnode_zoneinfo_numa_local_total{node=\"0\",zone=\"DMA32\"} 13\nnode_zoneinfo_numa_local_total{node=\"0\",zone=\"Normal\"} 6.2836441e+07\n# HELP node_zoneinfo_numa_miss_total Allocated in non intended node\n# TYPE node_zoneinfo_numa_miss_total counter\nnode_zoneinfo_numa_miss_total{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_numa_miss_total{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_numa_miss_total{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_numa_other_total Allocation from other node\n# TYPE node_zoneinfo_numa_other_total counter\nnode_zoneinfo_numa_other_total{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_numa_other_total{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_numa_other_total{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_present_pages Physical pages existing within the zone\n# TYPE node_zoneinfo_present_pages gauge\nnode_zoneinfo_present_pages{node=\"0\",zone=\"DMA\"} 3997\nnode_zoneinfo_present_pages{node=\"0\",zone=\"DMA32\"} 546847\nnode_zoneinfo_present_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_present_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_present_pages{node=\"0\",zone=\"Normal\"} 7.806976e+06\n# HELP node_zoneinfo_protection_0 Protection array 0. field\n# TYPE node_zoneinfo_protection_0 gauge\nnode_zoneinfo_protection_0{node=\"0\",zone=\"DMA\"} 0\nnode_zoneinfo_protection_0{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_protection_0{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_0{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_0{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_protection_1 Protection array 1. field\n# TYPE node_zoneinfo_protection_1 gauge\nnode_zoneinfo_protection_1{node=\"0\",zone=\"DMA\"} 2039\nnode_zoneinfo_protection_1{node=\"0\",zone=\"DMA32\"} 0\nnode_zoneinfo_protection_1{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_1{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_1{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_protection_2 Protection array 2. field\n# TYPE node_zoneinfo_protection_2 gauge\nnode_zoneinfo_protection_2{node=\"0\",zone=\"DMA\"} 31932\nnode_zoneinfo_protection_2{node=\"0\",zone=\"DMA32\"} 29893\nnode_zoneinfo_protection_2{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_2{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_2{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_protection_3 Protection array 3. field\n# TYPE node_zoneinfo_protection_3 gauge\nnode_zoneinfo_protection_3{node=\"0\",zone=\"DMA\"} 31932\nnode_zoneinfo_protection_3{node=\"0\",zone=\"DMA32\"} 29893\nnode_zoneinfo_protection_3{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_3{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_3{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_protection_4 Protection array 4. field\n# TYPE node_zoneinfo_protection_4 gauge\nnode_zoneinfo_protection_4{node=\"0\",zone=\"DMA\"} 31932\nnode_zoneinfo_protection_4{node=\"0\",zone=\"DMA32\"} 29893\nnode_zoneinfo_protection_4{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_protection_4{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_protection_4{node=\"0\",zone=\"Normal\"} 0\n# HELP node_zoneinfo_spanned_pages Total pages spanned by the zone, including holes\n# TYPE node_zoneinfo_spanned_pages gauge\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"DMA\"} 4095\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"DMA32\"} 1.04448e+06\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"Device\"} 0\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"Movable\"} 0\nnode_zoneinfo_spanned_pages{node=\"0\",zone=\"Normal\"} 7.806976e+06\n# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.\n# TYPE process_cpu_seconds_total counter\n# HELP process_max_fds Maximum number of open file descriptors.\n# TYPE process_max_fds gauge\n# HELP process_network_receive_bytes_total Number of bytes received by the process over the network.\n# TYPE process_network_receive_bytes_total counter\n# HELP process_network_transmit_bytes_total Number of bytes sent by the process over the network.\n# TYPE process_network_transmit_bytes_total counter\n# HELP process_open_fds Number of open file descriptors.\n# TYPE process_open_fds gauge\n# HELP process_resident_memory_bytes Resident memory size in bytes.\n# TYPE process_resident_memory_bytes gauge\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\n# TYPE process_start_time_seconds gauge\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\n# TYPE process_virtual_memory_bytes gauge\n# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.\n# TYPE process_virtual_memory_max_bytes gauge\n# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.\n# TYPE promhttp_metric_handler_errors_total counter\npromhttp_metric_handler_errors_total{cause=\"encoding\"} 0\npromhttp_metric_handler_errors_total{cause=\"gathering\"} 0\n# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.\n# TYPE promhttp_metric_handler_requests_in_flight gauge\npromhttp_metric_handler_requests_in_flight 1\n# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.\n# TYPE promhttp_metric_handler_requests_total counter\npromhttp_metric_handler_requests_total{code=\"200\"} 0\npromhttp_metric_handler_requests_total{code=\"500\"} 0\npromhttp_metric_handler_requests_total{code=\"503\"} 0\n# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/ethtool/bond0/statistics",
    "content": "ERROR: 1"
  },
  {
    "path": "collector/fixtures/ethtool/eth0/driver",
    "content": "# ethtool -i eth0\ndriver: e1000e\nversion: 5.11.0-22-generic\nfirmware-version: 0.5-4\nexpansion-rom-version: \nbus-info: 0000:00:1f.6\nsupports-statistics: yes\nsupports-test: yes\nsupports-eeprom-access: yes\nsupports-register-dump: yes\nsupports-priv-flags: yes\n"
  },
  {
    "path": "collector/fixtures/ethtool/eth0/settings",
    "content": "# ethtool eth0\nSettings for eth0:\n\tSupported ports: [ TP\t MII ]\n\tSupported link modes:   10baseT/Half 10baseT/Full\n\t                        100baseT/Half 100baseT/Full\n\t                        1000baseT/Full 10000baseT/Full\n\tSupported pause frame use: Symmetric\n\tSupports auto-negotiation: Yes\n\tSupported FEC modes: Not reported\n\tAdvertised link modes:  10baseT/Half 10baseT/Full\n\t                        100baseT/Half 100baseT/Full\n\t                        1000baseT/Full\n\tAdvertised pause frame use: Symmetric\n\tAdvertised auto-negotiation: Yes\n\tAdvertised FEC modes: Not reported\n\tSpeed: 1000Mb/s\n\tDuplex: Full\n\tAuto-negotiation: on\n\tPort: Twisted Pair\n\tPHYAD: 1\n\tTransceiver: internal\n\tMDI-X: off (auto)\nnetlink error: Operation not permitted\n        Current message level: 0x00000007 (7)\n                               drv probe link\n\tLink detected: yes\n\n"
  },
  {
    "path": "collector/fixtures/ethtool/eth0/statistics",
    "content": "# ethtool -S eth0\nNIC statistics:\n     tx_packets: 961500\n     rx_packets: 1260062\n     tx_errors: 0\n     rx_errors: 0\n     port.rx_dropped: 12028\n     rx_missed: 401\n     align_errors: 0\n     tx_single_collisions: 0\n     tx_multi_collisions: 0\n     rx_unicast: 1230297\n     rx_broadcast: 5792\n     rx_multicast: 23973\n     tx_aborted: 0\n     tx_underrun: 0\n     duplicate metric: 1\n     duplicate_metric: 2\n"
  },
  {
    "path": "collector/fixtures/ip_vs_result.txt",
    "content": "# HELP node_ipvs_backend_connections_active The current active connections by local and remote address.\n# TYPE node_ipvs_backend_connections_active gauge\nnode_ipvs_backend_connections_active{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 321\nnode_ipvs_backend_connections_active{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 64\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 248\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 1498\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 1499\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_backend_connections_inactive The current inactive connections by local and remote address.\n# TYPE node_ipvs_backend_connections_inactive gauge\nnode_ipvs_backend_connections_inactive{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 5\nnode_ipvs_backend_connections_inactive{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 1\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 2\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 1\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 2\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_backend_weight The current backend weight by local and remote address.\n# TYPE node_ipvs_backend_weight gauge\nnode_ipvs_backend_weight{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"\",local_mark=\"10001000\",local_port=\"0\",proto=\"FWM\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 20\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.22\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.83.24\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.49.32\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.55\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.26\",remote_port=\"3306\"} 0\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.50.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.82.21\",remote_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_mark=\"\",local_port=\"3306\",proto=\"TCP\",remote_address=\"192.168.84.22\",remote_port=\"3306\"} 0\n# HELP node_ipvs_connections_total The total number of connections made.\n# TYPE node_ipvs_connections_total counter\nnode_ipvs_connections_total 2.3765872e+07\n# HELP node_ipvs_incoming_bytes_total The total amount of incoming data.\n# TYPE node_ipvs_incoming_bytes_total counter\nnode_ipvs_incoming_bytes_total 8.9991519156915e+13\n# HELP node_ipvs_incoming_packets_total The total number of incoming packets.\n# TYPE node_ipvs_incoming_packets_total counter\nnode_ipvs_incoming_packets_total 3.811989221e+09\n# HELP node_ipvs_outgoing_bytes_total The total amount of outgoing data.\n# TYPE node_ipvs_outgoing_bytes_total counter\nnode_ipvs_outgoing_bytes_total 0\n# HELP node_ipvs_outgoing_packets_total The total number of outgoing packets.\n# TYPE node_ipvs_outgoing_packets_total counter\nnode_ipvs_outgoing_packets_total 0\n"
  },
  {
    "path": "collector/fixtures/ip_vs_result_lbs_local_address_local_port.txt",
    "content": "# HELP node_ipvs_backend_connections_active The current active connections by local and remote address.\n# TYPE node_ipvs_backend_connections_active gauge\nnode_ipvs_backend_connections_active{local_address=\"\",local_port=\"0\"} 385\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.22\",local_port=\"3306\"} 744\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.55\",local_port=\"3306\"} 0\nnode_ipvs_backend_connections_active{local_address=\"192.168.0.57\",local_port=\"3306\"} 2997\n# HELP node_ipvs_backend_connections_inactive The current inactive connections by local and remote address.\n# TYPE node_ipvs_backend_connections_inactive gauge\nnode_ipvs_backend_connections_inactive{local_address=\"\",local_port=\"0\"} 6\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.22\",local_port=\"3306\"} 5\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.55\",local_port=\"3306\"} 0\nnode_ipvs_backend_connections_inactive{local_address=\"192.168.0.57\",local_port=\"3306\"} 0\n# HELP node_ipvs_backend_weight The current backend weight by local and remote address.\n# TYPE node_ipvs_backend_weight gauge\nnode_ipvs_backend_weight{local_address=\"\",local_port=\"0\"} 120\nnode_ipvs_backend_weight{local_address=\"192.168.0.22\",local_port=\"3306\"} 300\nnode_ipvs_backend_weight{local_address=\"192.168.0.55\",local_port=\"3306\"} 100\nnode_ipvs_backend_weight{local_address=\"192.168.0.57\",local_port=\"3306\"} 200\n# HELP node_ipvs_connections_total The total number of connections made.\n# TYPE node_ipvs_connections_total counter\nnode_ipvs_connections_total 2.3765872e+07\n# HELP node_ipvs_incoming_bytes_total The total amount of incoming data.\n# TYPE node_ipvs_incoming_bytes_total counter\nnode_ipvs_incoming_bytes_total 8.9991519156915e+13\n# HELP node_ipvs_incoming_packets_total The total number of incoming packets.\n# TYPE node_ipvs_incoming_packets_total counter\nnode_ipvs_incoming_packets_total 3.811989221e+09\n# HELP node_ipvs_outgoing_bytes_total The total amount of outgoing data.\n# TYPE node_ipvs_outgoing_bytes_total counter\nnode_ipvs_outgoing_bytes_total 0\n# HELP node_ipvs_outgoing_packets_total The total number of outgoing packets.\n# TYPE node_ipvs_outgoing_packets_total counter\nnode_ipvs_outgoing_packets_total 0\n"
  },
  {
    "path": "collector/fixtures/ip_vs_result_lbs_local_port.txt",
    "content": "# HELP node_ipvs_backend_connections_active The current active connections by local and remote address.\n# TYPE node_ipvs_backend_connections_active gauge\nnode_ipvs_backend_connections_active{local_port=\"0\"} 385\nnode_ipvs_backend_connections_active{local_port=\"3306\"} 3741\n# HELP node_ipvs_backend_connections_inactive The current inactive connections by local and remote address.\n# TYPE node_ipvs_backend_connections_inactive gauge\nnode_ipvs_backend_connections_inactive{local_port=\"0\"} 6\nnode_ipvs_backend_connections_inactive{local_port=\"3306\"} 5\n# HELP node_ipvs_backend_weight The current backend weight by local and remote address.\n# TYPE node_ipvs_backend_weight gauge\nnode_ipvs_backend_weight{local_port=\"0\"} 120\nnode_ipvs_backend_weight{local_port=\"3306\"} 600\n# HELP node_ipvs_connections_total The total number of connections made.\n# TYPE node_ipvs_connections_total counter\nnode_ipvs_connections_total 2.3765872e+07\n# HELP node_ipvs_incoming_bytes_total The total amount of incoming data.\n# TYPE node_ipvs_incoming_bytes_total counter\nnode_ipvs_incoming_bytes_total 8.9991519156915e+13\n# HELP node_ipvs_incoming_packets_total The total number of incoming packets.\n# TYPE node_ipvs_incoming_packets_total counter\nnode_ipvs_incoming_packets_total 3.811989221e+09\n# HELP node_ipvs_outgoing_bytes_total The total amount of outgoing data.\n# TYPE node_ipvs_outgoing_bytes_total counter\nnode_ipvs_outgoing_bytes_total 0\n# HELP node_ipvs_outgoing_packets_total The total number of outgoing packets.\n# TYPE node_ipvs_outgoing_packets_total counter\nnode_ipvs_outgoing_packets_total 0\n"
  },
  {
    "path": "collector/fixtures/ip_vs_result_lbs_none.txt",
    "content": "# HELP node_ipvs_backend_connections_active The current active connections by local and remote address.\n# TYPE node_ipvs_backend_connections_active gauge\nnode_ipvs_backend_connections_active 4126\n# HELP node_ipvs_backend_connections_inactive The current inactive connections by local and remote address.\n# TYPE node_ipvs_backend_connections_inactive gauge\nnode_ipvs_backend_connections_inactive 11\n# HELP node_ipvs_backend_weight The current backend weight by local and remote address.\n# TYPE node_ipvs_backend_weight gauge\nnode_ipvs_backend_weight 720\n# HELP node_ipvs_connections_total The total number of connections made.\n# TYPE node_ipvs_connections_total counter\nnode_ipvs_connections_total 2.3765872e+07\n# HELP node_ipvs_incoming_bytes_total The total amount of incoming data.\n# TYPE node_ipvs_incoming_bytes_total counter\nnode_ipvs_incoming_bytes_total 8.9991519156915e+13\n# HELP node_ipvs_incoming_packets_total The total number of incoming packets.\n# TYPE node_ipvs_incoming_packets_total counter\nnode_ipvs_incoming_packets_total 3.811989221e+09\n# HELP node_ipvs_outgoing_bytes_total The total amount of outgoing data.\n# TYPE node_ipvs_outgoing_bytes_total counter\nnode_ipvs_outgoing_bytes_total 0\n# HELP node_ipvs_outgoing_packets_total The total number of outgoing packets.\n# TYPE node_ipvs_outgoing_packets_total counter\nnode_ipvs_outgoing_packets_total 0\n"
  },
  {
    "path": "collector/fixtures/pci.ids",
    "content": "# Test PCI IDs file for node_exporter testing\n# This file contains sample entries for testing PCI name resolution\n\n# Classes\nC 06  Bridge device\n\t04  PCI bridge\nC 01  Mass storage controller\n\t08  Non-Volatile memory controller\n\t\t02  NVM Express\nC 02  Network controller\n\t00  Ethernet controller\n\n# Vendors\n1022  Advanced Micro Devices, Inc. [AMD]\n\t1634  Renoir/Cezanne PCIe GPP Bridge\n\t\t17aa 5095  T540-5095 Unified Wire Ethernet Controller\n\nc0a9  Micron/Crucial Technology\n\t540a  P2 [Nick P2] / P3 / P3 Plus NVMe PCIe SSD (DRAM-less)\n\t\tc0a9 5021  PS5021-E21 PCIe4 NVMe Controller (DRAM-less)\n\n8086  Intel Corporation\n\t1521  I350 Gigabit Network Connection\n\t\t8086 00a3  Ethernet Network Adapter I350-T4 for OCP NIC 3.0\n\n17aa  Lenovo"
  },
  {
    "path": "collector/fixtures/pcidevice-names-output.txt",
    "content": "# Test output for PCI device collector with name resolution enabled\n# This file demonstrates the --collector.pcidevice.names=true functionality\n\n# HELP node_pcidevice_current_link_transfers_per_second Value of current link's transfers per second (T/s)\n# TYPE node_pcidevice_current_link_transfers_per_second gauge\nnode_pcidevice_current_link_transfers_per_second{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8e+09\nnode_pcidevice_current_link_transfers_per_second{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 8e+09\nnode_pcidevice_current_link_transfers_per_second{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 5e+09\n\n# HELP node_pcidevice_current_link_width Value of current link's width (number of lanes)\n# TYPE node_pcidevice_current_link_width gauge\nnode_pcidevice_current_link_width{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 4\nnode_pcidevice_current_link_width{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_current_link_width{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 4\n\n# HELP node_pcidevice_d3cold_allowed Whether the PCIe device supports D3cold power state (0/1).\n# TYPE node_pcidevice_d3cold_allowed gauge\nnode_pcidevice_d3cold_allowed{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 1\nnode_pcidevice_d3cold_allowed{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1\nnode_pcidevice_d3cold_allowed{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 1\n\n# HELP node_pcidevice_info Non-numeric data from /sys/bus/pci/devices/<location>, value is always 1.\n# TYPE node_pcidevice_info gauge\n# Example 1: AMD PCIe Bridge with Lenovo subsystem\nnode_pcidevice_info{bus=\"00\",class_id=\"0x060400\",class_name=\"PCI bridge\",device=\"02\",device_id=\"0x1634\",device_name=\"Renoir/Cezanne PCIe GPP Bridge\",function=\"1\",parent_bus=\"*\",parent_device=\"*\",parent_function=\"*\",parent_segment=\"*\",revision=\"0x00\",segment=\"0000\",subsystem_device_id=\"0x5095\",subsystem_device_name=\"T540-5095 Unified Wire Ethernet Controller\",subsystem_vendor_id=\"0x17aa\",subsystem_vendor_name=\"Lenovo\",vendor_id=\"0x1022\",vendor_name=\"Advanced Micro Devices, Inc. [AMD]\"} 1\n\n# Example 2: Micron/Crucial NVMe Controller\nnode_pcidevice_info{bus=\"01\",class_id=\"0x010802\",class_name=\"NVM Express\",device=\"00\",device_id=\"0x540a\",device_name=\"P2 [Nick P2] / P3 / P3 Plus NVMe PCIe SSD (DRAM-less)\",function=\"0\",parent_bus=\"00\",parent_device=\"02\",parent_function=\"1\",parent_segment=\"0000\",revision=\"0x01\",segment=\"0000\",subsystem_device_id=\"0x5021\",subsystem_device_name=\"PS5021-E21 PCIe4 NVMe Controller (DRAM-less)\",subsystem_vendor_id=\"0xc0a9\",subsystem_vendor_name=\"Micron/Crucial Technology\",vendor_id=\"0xc0a9\",vendor_name=\"Micron/Crucial Technology\"} 1\n\n# Example 3: Intel Network Controller\nnode_pcidevice_info{bus=\"45\",class_id=\"0x020000\",class_name=\"Ethernet controller\",device=\"00\",device_id=\"0x1521\",device_name=\"I350 Gigabit Network Connection\",function=\"0\",parent_bus=\"40\",parent_device=\"01\",parent_function=\"3\",parent_segment=\"0000\",revision=\"0x01\",segment=\"0000\",subsystem_device_id=\"0x00a3\",subsystem_device_name=\"Ethernet Network Adapter I350-T4 for OCP NIC 3.0\",subsystem_vendor_id=\"0x8086\",subsystem_vendor_name=\"Intel Corporation\",vendor_id=\"0x8086\",vendor_name=\"Intel Corporation\"} 1\n\n# HELP node_pcidevice_numa_node NUMA node number for the PCI device. -1 indicates unknown or not available.\n# TYPE node_pcidevice_numa_node gauge\nnode_pcidevice_numa_node{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n\n# HELP node_pcidevice_max_link_transfers_per_second Value of maximum link's transfers per second (T/s)\n# TYPE node_pcidevice_max_link_transfers_per_second gauge\nnode_pcidevice_max_link_transfers_per_second{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8e+09\nnode_pcidevice_max_link_transfers_per_second{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1.6e+10\nnode_pcidevice_max_link_transfers_per_second{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 5e+09\n\n# HELP node_pcidevice_max_link_width Value of maximum link's width (number of lanes)\n# TYPE node_pcidevice_max_link_width gauge\nnode_pcidevice_max_link_width{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 8\nnode_pcidevice_max_link_width{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_max_link_width{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 4\n\n# HELP node_pcidevice_power_state PCIe device power state, one of: D0, D1, D2, D3hot, D3cold, unknown or error.\n# TYPE node_pcidevice_power_state gauge\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\",state=\"unknown\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\",state=\"unknown\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D0\"} 1\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D1\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D2\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3cold\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"D3hot\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"error\"} 0\nnode_pcidevice_power_state{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\",state=\"unknown\"} 0\n\n# HELP node_pcidevice_sriov_drivers_autoprobe Whether SR-IOV drivers autoprobe is enabled for the device (0/1).\n# TYPE node_pcidevice_sriov_drivers_autoprobe gauge\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 1\nnode_pcidevice_sriov_drivers_autoprobe{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 1\n\n# HELP node_pcidevice_sriov_numvfs Number of Virtual Functions (VFs) currently enabled for SR-IOV.\n# TYPE node_pcidevice_sriov_numvfs gauge\nnode_pcidevice_sriov_numvfs{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_numvfs{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 4\nnode_pcidevice_sriov_numvfs{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n\n# HELP node_pcidevice_sriov_totalvfs Total number of Virtual Functions (VFs) supported by the device.\n# TYPE node_pcidevice_sriov_totalvfs gauge\nnode_pcidevice_sriov_totalvfs{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_totalvfs{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 8\nnode_pcidevice_sriov_totalvfs{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 7\n\n# HELP node_pcidevice_sriov_vf_total_msix Total number of MSI-X vectors for Virtual Functions.\n# TYPE node_pcidevice_sriov_vf_total_msix gauge\nnode_pcidevice_sriov_vf_total_msix{bus=\"00\",device=\"02\",function=\"1\",segment=\"0000\"} 0\nnode_pcidevice_sriov_vf_total_msix{bus=\"01\",device=\"00\",function=\"0\",segment=\"0000\"} 16\nnode_pcidevice_sriov_vf_total_msix{bus=\"45\",device=\"00\",function=\"0\",segment=\"0000\"} 0\n"
  },
  {
    "path": "collector/fixtures/proc/1/mountinfo",
    "content": "24 29 0:22 / /sys rw,nosuid,nodev,noexec,relatime shared:7 - sysfs sysfs rw\n25 29 0:23 / /proc rw,nosuid,nodev,noexec,relatime shared:13 - proc proc rw\n26 29 0:5 / /dev rw,nosuid,relatime shared:2 - devtmpfs udev rw,size=7978892k,nr_inodes=1994723,mode=755\n27 26 0:24 / /dev/pts rw,nosuid,noexec,relatime shared:3 - devpts devpts rw,gid=5,mode=620,ptmxmode=000\n28 29 0:25 / /run rw,nosuid,relatime shared:5 - tmpfs tmpfs rw,size=1617716k,mode=755\n29 1 259:2 / / rw,relatime shared:1 - ext4 /dev/dm-2 errors=remount-ro,data=ordered\n30 24 0:6 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime shared:8 - securityfs securityfs rw\n31 26 0:26 / /dev/shm rw,nosuid,nodev shared:4 - tmpfs tmpfs rw,inode64\n32 28 0:27 / /run/lock rw,nosuid,nodev,noexec,relatime shared:6 - tmpfs tmpfs rw,size=5120k\n33 24 0:28 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:9 - tmpfs tmpfs ro,mode=755\n34 31 0:24 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:10 - cgroup cgroup rw,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd\n35 32 0:25 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:11 - pstore pstore rw\n36 33 0:26 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:12 - cgroup cgroup rw,cpuset\n37 34 0:27 / /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime shared:14 - cgroup cgroup rw,cpu,cpuacct\n38 35 0:28 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:16 - cgroup cgroup rw,devices\n39 36 0:29 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:17 - cgroup cgroup rw,freezer\n40 37 0:30 / /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime shared:18 - cgroup cgroup rw,net_cls,net_prio\n41 38 0:31 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime shared:19 - cgroup cgroup rw,blkio\n42 39 0:32 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:20 - cgroup cgroup rw,perf_event\n43 40 0:33 / /proc/sys/fs/binfmt_misc rw,relatime shared:21 - systemd-1 autofs rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct\n44 41 0:34 / /dev/mqueue rw,relatime shared:22 - mqueue mqueue rw\n45 42 0:35 / /sys/kernel/debug rw,relatime shared:23 - debugfs debugfs rw\n46 43 0:36 / /dev/hugepages rw,relatime shared:24 - hugetlbfs hugetlbfs rw\n47 44 0:37 / /sys/fs/fuse/connections rw,relatime shared:25 - fusectl fusectl rw\n48 45 260:3 / /boot rw,relatime shared:92 - ext2 /dev/sda3 rw\n49 46 0:39 / /run/rpc_pipefs rw,relatime shared:27 - rpc_pipefs rpc_pipefs rw\n265 37 0:41 / /proc/sys/fs/binfmt_misc rw,nosuid,nodev,noexec,relatime shared:94 - binfmt_misc binfmt_misc rw\n3002 28 0:79 / /run/user/1000 rw,nosuid,nodev,relatime shared:1225 - tmpfs tmpfs rw,size=1603436k,nr_inodes=400859,mode=700,uid=1000,gid=1000\n3147 3002 0:81 / /run/user/1000/gvfs rw,nosuid,nodev,relatime shared:1290 - fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000\n3148 3003 260:0 / /var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore]\\040bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk rw,relatime shared:31 - ext4 /dev/sda rw,data=ordered\n3149 3004 260:0 / /var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore]\\011bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk rw,relatime shared:32 - ext4 /dev/sda rw,data=ordered\n1128 67 253:0 /var/lib/containers/storage/overlay /var/lib/containers/storage/overlay rw,relatime - xfs /dev/mapper/rhel-root rw,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota\n"
  },
  {
    "path": "collector/fixtures/proc/1/stat",
    "content": "1 (systemd) S 0 1 1 0 -1 4194560 9061 9416027 94 2620 36 98 54406 13885 20 0 1 0 29 109604864 2507 18446744073709551615 1 1 0 0 0 0 671173123 4096 1260 0 0 0 17 0 0 0 19 0 0 0 0 0 0 0 0 0 0\n"
  },
  {
    "path": "collector/fixtures/proc/10/mountinfo",
    "content": "1 1 0:5 /  /root rw,nosuid shared:8 - rootfs rootfs rw\n16 21 0:16 / /sys rw,nosuid,nodev,noexec,relatime shared:7 - sysfs sysfs rw\n17 21 0:4 / /proc rw,nosuid,nodev,noexec,relatime shared:12 - proc proc rw\n21 0 8:1 / / rw,relatime shared:1 - ext4 /dev/sda1 rw,errors=remount-ro,data=ordered\n194 21 0:42 / /mnt/nfs/test rw shared:144 - nfs4 192.168.1.1:/srv/test rw,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.5,addr=192.168.1.1,local_lock=none\n177 21 0:42 / /mnt/nfs/test rw shared:130 - nfs4 192.168.1.1:/srv/test rw,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.5,addr=192.168.1.1,local_lock=none\n1398 798 0:44 / /mnt/nfs/test rw,relatime shared:1154 - nfs 192.168.1.1:/srv/test rw,vers=3,rsize=32768,wsize=32768,namlen=255,hard,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=192.168.1.1,mountvers=3,mountport=49602,mountproto=udp,local_lock=none,addr=192.168.1.1\n"
  },
  {
    "path": "collector/fixtures/proc/10/mountstats",
    "content": "device rootfs mounted on / with fstype rootfs\ndevice sysfs mounted on /sys with fstype sysfs\ndevice proc mounted on /proc with fstype proc\ndevice /dev/sda1 mounted on / with fstype ext4\ndevice 192.168.1.1:/srv/test mounted on /mnt/nfs/test with fstype nfs4 statvers=1.1\n\topts:\trw,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.5,local_lock=none\n\tage:\t13968\n\tcaps:\tcaps=0xfff7,wtmult=512,dtsize=32768,bsize=0,namlen=255\n\tnfsv4:\tbm0=0xfdffafff,bm1=0xf9be3e,bm2=0x0,acl=0x0,pnfs=not configured\n\tsec:\tflavor=1,pseudoflavor=1\n\tevents:\t52 226 0 0 1 13 398 0 0 331 0 47 0 0 77 0 0 77 0 0 0 0 0 0 0 0 0\n\tbytes:\t1207640230 0 0 0 1210214218 0 295483 0\n\tRPC iostats version: 1.0  p/v: 100003/4 (nfs)\n\txprt:\ttcp 832 0 1 0 11 6428 6428 0 12154 0 24 26 5726\n\tper-op statistics\n\t        NULL: 0 0 0 0 0 0 0 0\n\t        READ: 1298 1298 0 207680 1210292152 6 79386 79407\n\t       WRITE: 0 0 0 0 0 0 0 0\n\ndevice 192.168.1.1:/srv/test mounted on /mnt/nfs/test-dupe with fstype nfs4 statvers=1.1\n\topts:\trw,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.5,local_lock=none\n\tage:\t13968\n\tcaps:\tcaps=0xfff7,wtmult=512,dtsize=32768,bsize=0,namlen=255\n\tnfsv4:\tbm0=0xfdffafff,bm1=0xf9be3e,bm2=0x0,acl=0x0,pnfs=not configured\n\tsec:\tflavor=1,pseudoflavor=1\n\tevents:\t52 226 0 0 1 13 398 0 0 331 0 47 0 0 77 0 0 77 0 0 0 0 0 0 0 0 0\n\tbytes:\t1207640230 0 0 0 1210214218 0 295483 0\n\tRPC iostats version: 1.0  p/v: 100003/4 (nfs)\n\txprt:\ttcp 832 0 1 0 11 6428 6428 0 12154 0 24 26 5726\n\tper-op statistics\n\t        NULL: 0 0 0 0 0 0 0 0\n\t        READ: 1298 1298 0 207680 1210292152 6 79386 79407\n\t       WRITE: 0 0 0 0 0 0 0 0\n\t      ACCESS: 2927395007 2927394995 0 526931094212 362996810236 18446743919241604546 1667369447 1953587717\n\ndevice 192.168.1.1:/srv/test mounted on /mnt/nfs/test-dupe with fstype nfs statvers=1.1\n\topts:\trw,vers=3,rsize=1048576,wsize=1048576,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,hard,proto=udp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.5,local_lock=none,mountaddr=192.168.1.1,mountproto=udp,mountport=47853\n\tage:\t13968\n\tcaps:\tcaps=0xfff7,wtmult=512,dtsize=32768,bsize=0,namlen=255\n\tnfsv4:\tbm0=0xfdffafff,bm1=0xf9be3e,bm2=0x0,acl=0x0,pnfs=not configured\n\tsec:\tflavor=1,pseudoflavor=1\n\tevents:\t52 226 0 0 1 13 398 0 0 331 0 47 0 0 77 0 0 77 0 0 0 0 0 0 0 0 0\n\tbytes:\t1207640230 0 0 0 1210214218 0 295483 0\n\tRPC iostats version: 1.0  p/v: 100003/4 (nfs)\n\txprt:\tudp 832 0 6428 6428 0 12154 0 24 26 5726\n\tper-op statistics\n\t        NULL: 0 0 0 0 0 0 0 0\n\t        READ: 1298 1298 0 207680 1210292152 6 79386 79407\n\t       WRITE: 0 0 0 0 0 0 0 0\n\t      ACCESS: 2927395007 2927394995 0 526931094212 362996810236 18446743919241604546 1667369447 1953587717\n"
  },
  {
    "path": "collector/fixtures/proc/10/stat",
    "content": "17 (khungtaskd) S 2 0 0 0 -1 2129984 0 0 0 0 14 0 0 0 20 0 1 0 24 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 0 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0"
  },
  {
    "path": "collector/fixtures/proc/11/.missing_stat",
    "content": ""
  },
  {
    "path": "collector/fixtures/proc/11/stat",
    "content": "11 (rcu_preempt) I 2 0 0 0 -1 2129984 0 0 0 0 0 346 0 0 -2 0 1 0 32 0 0 18446744073709551615 0 0 0 0 0 0 0 2147483647 0 0 0 0 17 2 1 1 0 0 0 0 0 0 0 0 0 0 0\n"
  },
  {
    "path": "collector/fixtures/proc/buddyinfo",
    "content": "Node 0, zone      DMA      1      0      1      0      2      1      1      0      1      1      3 \nNode 0, zone    DMA32    759    572    791    475    194     45     12      0      0      0      0 \nNode 0, zone   Normal   4381   1093    185   1530    567    102      4      0      0      0      0 \n"
  },
  {
    "path": "collector/fixtures/proc/cgroups",
    "content": "#subsys_name\thierarchy\tnum_cgroups\tenabled\ncpuset\t5\t47\t1\ncpu\t3\t172\t1\ncpuacct\t3\t172\t1\nblkio\t6\t170\t1\nmemory\t7\t234\t1\ndevices\t11\t170\t1\nfreezer\t9\t47\t1\nnet_cls\t2\t47\t1\nperf_event\t8\t47\t1\nhugetlb\t12\t47\t1\npids\t10\t170\t1\nrdma\t4\t1\t1"
  },
  {
    "path": "collector/fixtures/proc/cpuinfo",
    "content": "processor\t: 0\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 142\nmodel name\t: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\nstepping\t: 10\nmicrocode\t: 0xb4\ncpu MHz\t\t: 799.998\ncache size\t: 8192 KB\nphysical id\t: 0\nsiblings\t: 8\ncore id\t\t: 0\ncpu cores\t: 4\napicid\t\t: 0\ninitial apicid\t: 0\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 22\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d\nbugs\t\t: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs\nbogomips\t: 4224.00\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 39 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 1\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 142\nmodel name\t: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\nstepping\t: 10\nmicrocode\t: 0xb4\ncpu MHz\t\t: 800.037\ncache size\t: 8192 KB\nphysical id\t: 0\nsiblings\t: 8\ncore id\t\t: 1\ncpu cores\t: 4\napicid\t\t: 2\ninitial apicid\t: 2\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 22\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d\nbugs\t\t: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs\nbogomips\t: 4224.00\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 39 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 2\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 142\nmodel name\t: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\nstepping\t: 10\nmicrocode\t: 0xb4\ncpu MHz\t\t: 800.010\ncache size\t: 8192 KB\nphysical id\t: 0\nsiblings\t: 8\ncore id\t\t: 2\ncpu cores\t: 4\napicid\t\t: 4\ninitial apicid\t: 4\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 22\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d\nbugs\t\t: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs\nbogomips\t: 4224.00\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 39 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 3\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 142\nmodel name\t: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\nstepping\t: 10\nmicrocode\t: 0xb4\ncpu MHz\t\t: 800.028\ncache size\t: 8192 KB\nphysical id\t: 0\nsiblings\t: 8\ncore id\t\t: 3\ncpu cores\t: 4\napicid\t\t: 6\ninitial apicid\t: 6\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 22\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d\nbugs\t\t: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs\nbogomips\t: 4224.00\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 39 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 4\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 142\nmodel name\t: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\nstepping\t: 10\nmicrocode\t: 0xb4\ncpu MHz\t\t: 799.989\ncache size\t: 8192 KB\nphysical id\t: 0\nsiblings\t: 8\ncore id\t\t: 0\ncpu cores\t: 4\napicid\t\t: 1\ninitial apicid\t: 1\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 22\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d\nbugs\t\t: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs\nbogomips\t: 4224.00\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 39 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 5\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 142\nmodel name\t: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\nstepping\t: 10\nmicrocode\t: 0xb4\ncpu MHz\t\t: 800.083\ncache size\t: 8192 KB\nphysical id\t: 0\nsiblings\t: 8\ncore id\t\t: 1\ncpu cores\t: 4\napicid\t\t: 3\ninitial apicid\t: 3\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 22\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d\nbugs\t\t: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs\nbogomips\t: 4224.00\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 39 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 6\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 142\nmodel name\t: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\nstepping\t: 10\nmicrocode\t: 0xb4\ncpu MHz\t\t: 800.017\ncache size\t: 8192 KB\nphysical id\t: 0\nsiblings\t: 8\ncore id\t\t: 2\ncpu cores\t: 4\napicid\t\t: 5\ninitial apicid\t: 5\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 22\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d\nbugs\t\t: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs\nbogomips\t: 4224.00\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 39 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 7\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 142\nmodel name\t: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\nstepping\t: 10\nmicrocode\t: 0xb4\ncpu MHz\t\t: 800.030\ncache size\t: 8192 KB\nphysical id\t: 0\nsiblings\t: 8\ncore id\t\t: 3\ncpu cores\t: 4\napicid\t\t: 7\ninitial apicid\t: 7\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 22\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d\nbugs\t\t: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs\nbogomips\t: 4224.00\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 39 bits physical, 48 bits virtual\npower management:\n\n"
  },
  {
    "path": "collector/fixtures/proc/diskstats",
    "content": "   1       0 ram0 0 0 0 0 0 0 0 0 0 0 0\n   1       1 ram1 0 0 0 0 0 0 0 0 0 0 0\n   1       2 ram2 0 0 0 0 0 0 0 0 0 0 0\n   1       3 ram3 0 0 0 0 0 0 0 0 0 0 0\n   1       4 ram4 0 0 0 0 0 0 0 0 0 0 0\n   1       5 ram5 0 0 0 0 0 0 0 0 0 0 0\n   1       6 ram6 0 0 0 0 0 0 0 0 0 0 0\n   1       7 ram7 0 0 0 0 0 0 0 0 0 0 0\n   1       8 ram8 0 0 0 0 0 0 0 0 0 0 0\n   1       9 ram9 0 0 0 0 0 0 0 0 0 0 0\n   1      10 ram10 0 0 0 0 0 0 0 0 0 0 0\n   1      11 ram11 0 0 0 0 0 0 0 0 0 0 0\n   1      12 ram12 0 0 0 0 0 0 0 0 0 0 0\n   1      13 ram13 0 0 0 0 0 0 0 0 0 0 0\n   1      14 ram14 0 0 0 0 0 0 0 0 0 0 0\n   1      15 ram15 0 0 0 0 0 0 0 0 0 0 0\n   7       0 loop0 0 0 0 0 0 0 0 0 0 0 0\n   7       1 loop1 0 0 0 0 0 0 0 0 0 0 0\n   7       2 loop2 0 0 0 0 0 0 0 0 0 0 0\n   7       3 loop3 0 0 0 0 0 0 0 0 0 0 0\n   7       4 loop4 0 0 0 0 0 0 0 0 0 0 0\n   7       5 loop5 0 0 0 0 0 0 0 0 0 0 0\n   7       6 loop6 0 0 0 0 0 0 0 0 0 0 0\n   7       7 loop7 0 0 0 0 0 0 0 0 0 0 0\n   8       0 sda 25354637 34367663 1003346126 18492372 28444756 11134226 505697032 63877960 0 9653880 82621804\n   8       1 sda1 250 0 2000 36 0 0 0 0 0 36 36\n   8       2 sda2 246 0 1968 32 0 0 0 0 0 32 32\n   8       3 sda3 340 13 2818 52 11 8 152 8 0 56 60\n   8       4 sda4 25353629 34367650 1003337964 18492232 27448755 11134218 505696880 61593380 0 7576432 80332428\n 252       0 dm-0 59910002 0 1003337218 46229572 39231014 0 505696880 1158557800 0 11325968 1206301256\n 252       1 dm-1 388 0 3104 84 74 0 592 0 0 76 84\n 252       2 dm-2 11571 0 308350 6536 153522 0 5093416 122884 0 65400 129416\n 252       3 dm-3 3870 0 3870 104 0 0 0 0 0 16 104\n 252       4 dm-4 392 0 1034 28 38 0 137 16 0 24 44\n 252       5 dm-5 3729 0 84279 924 98918 0 1151688 104684 0 58848 105632\n 179       0 mmcblk0 192 3 1560 156 0 0 0 0 0 136 156\n 179       1 mmcblk0p1 17 3 160 24 0 0 0 0 0 24 24\n 179       2 mmcblk0p2 95 0 760 68 0 0 0 0 0 68 68\n   2       0 fd0 2 0 16 80 0 0 0 0 0 80 80\n 254       0 vda 1775784 15386 32670882 8655768 6038856 20711856 213637440 2069221364 0 41614592 2077872228\n 254       1 vda1 668 85 5984 956 207 4266 35784 32772 0 8808 33720\n 254       2 vda2 1774936 15266 32663262 8654692 5991028 20707590 213601656 2069152216 0 41607628 2077801992\n  11       0 sr0 0 0 0 0 0 0 0 0 0 0 0\n 259       0 nvme0n1 47114 4 4643973 21650 1078320 43950 39451633 1011053 0 222766 1032546\n 259       1 nvme0n1p1 1140 0 9370 16 1 0 1 0 0 16 16\n 259       2 nvme0n1p2 45914 4 4631243 21626 1036885 43950 39451632 919480 0 131580 940970\n   8      16 sdb 326552 841 9657779 84 41822 2895 1972905 5007 0 60730 67070 68851 0 1925173784 11130\n   8      17 sdb1 231 3 34466 4 24 23 106 0 0 64 64 0 0 0 0\n   8      18 sdb2 326310 838 9622281 67 40726 2872 1972799 4924 0 58250 64567 68851 0 1925173784 11130\n   8      32 sdc 126552 141 1657779 14 11822 1895 172905 1007 0 10730 17070 18851 0 125173784 11130 1555 1944\n   8      33 sdc1 231 3 34466 4 24 23 106 0 0 64 64 0 0 0 0 0 0\n"
  },
  {
    "path": "collector/fixtures/proc/drbd",
    "content": "version: 8.4.3 (api:1/proto:86-101)\nsrcversion: 1A9F77B1CA5FF92235C2213 \n\n 1: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r-----\n    ns:17324442 nr:10961011 dw:28263521 dr:118696670 al:1100 bm:221 lo:12345 pe:12346 ua:12347 ap:12348 ep:1 wo:d oos:12349\n"
  },
  {
    "path": "collector/fixtures/proc/interrupts",
    "content": "           CPU0       CPU1       CPU2       CPU3       \n  0:         18          0          0          0  IR-IO-APIC-edge      timer\n  1:      17960        105         28         28  IR-IO-APIC-edge      i8042\n  8:          1          0          0          0  IR-IO-APIC-edge      rtc0\n  9:     398553       2320        824        863  IR-IO-APIC-fasteoi   acpi\n 12:     380847       1021        240        198  IR-IO-APIC-edge      i8042\n 16:     328511     322879     293782     351412  IR-IO-APIC-fasteoi   ehci_hcd:usb1, mmc0\n 23:    1451445    3333499    1092032    2644609  IR-IO-APIC-fasteoi   ehci_hcd:usb2\n 40:          0          0          0          0  DMAR_MSI-edge      dmar0\n 41:          0          0          0          0  DMAR_MSI-edge      dmar1\n 42:     378324    1734637     440240    2434308  IR-PCI-MSI-edge      xhci_hcd\n 43:    7434032    8092205    6478877    7492252  IR-PCI-MSI-edge      ahci\n 44:     140636     226313        347        633  IR-PCI-MSI-edge      i915\n 45:          4         22          0          0  IR-PCI-MSI-edge      mei_me\n 46:   43078464        130     460171        290  IR-PCI-MSI-edge      iwlwifi\n 47:        350        224          0          0  IR-PCI-MSI-edge      snd_hda_intel\nNMI:         47       5031       6211       4968   Non-maskable interrupts\nLOC:  174326351  135776678  168393257  130980079   Local timer interrupts\nSPU:          0          0          0          0   Spurious interrupts\nPMI:         47       5031       6211       4968   Performance monitoring interrupts\nIWI:    1509379    2411776    1512975    2428828   IRQ work interrupts\nRTR:          0          0          0          0   APIC ICR read retries\nRES:   10847134    9111507   15999335    7457260   Rescheduling interrupts\nCAL:     148554     157441     142912     155528   Function call interrupts\nTLB:   10460334    9918429   10494258   10345022   TLB shootdowns\nTRM:          0          0          0          0   Thermal event interrupts\nTHR:          0          0          0          0   Threshold APIC interrupts\nMCE:          0          0          0          0   Machine check exceptions\nMCP:       2406       2399       2399       2399   Machine check polls\nERR:          0\nMIS:          0\n"
  },
  {
    "path": "collector/fixtures/proc/interrupts_aarch64",
    "content": "          CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7\n 10: 3287008667 3310445093 3301386305 3273132897 3368262064 3641875466 3360412019 3225020442     GICv3  27 Level     arch_timer\n 14:       7815          0          0          4          0          0          0          0     GICv3  37 Level     ttyS0\n 17:          0          0          0          0          0          0          0          0     GICv3  48 Edge      ACPI:Ged\n 18:          0          0          0          0          0          0          0          0     GICv3  49 Edge      ACPI:Ged\n 19:          0          0          0          0          0          0          0          0     GICv3  50 Edge      ACPI:Ged\n 20:          0          0          0          0          0          0          0          0     GICv3  51 Edge      ACPI:Ged\n 21:          0          0          0          0          0          0          0          0     GICv3  52 Edge      ACPI:Ged\n 22:          0          0          0          0          0          0          0          0     GICv3  53 Edge      ACPI:Ged\n 23:          0          0          0          0          0          0          0          0     GICv3  54 Edge      ACPI:Ged\n 24:          0          0          0          0          0          0          0          0     GICv3  55 Edge      ACPI:Ged\n 25:          0          0          0          0          0          0          0          0     GICv3  56 Edge      ACPI:Ged\n 26:          0          0          0          0          0          0          0          0     GICv3  57 Edge      ACPI:Ged\n 27:          0          0          0          0          0          0          0          0     GICv3  58 Edge      ACPI:Ged\n 28:          0          0          0          0          0          0          0          0     GICv3  59 Edge      ACPI:Ged\n 29:          0          0          0          0          0          0          0          0     GICv3  60 Edge      ACPI:Ged\n 30:          0          0          0          0          0          0          0          0     GICv3  61 Edge      ACPI:Ged\n 31:          0          0          0          0          0          0          0          0     GICv3  62 Edge      ACPI:Ged\n 32:          0          0          0          0          0          0          0          0     GICv3  63 Edge      ACPI:Ged\n 33:          0          0          0          0          0          0          0          0     GICv3  64 Edge      ACPI:Ged\n 34:          0          0          0          0          0          0          0          0     GICv3  65 Edge      ACPI:Ged\n 35:          0          0          0          0          0          0          0          0     GICv3  66 Edge      ACPI:Ged\n 36:          0          0          0          0          0          0          0          0     GICv3  67 Edge      ACPI:Ged\n 37:          0          0          0          0          0          0          0          0     GICv3  68 Edge      ACPI:Ged\n 38:          0          0          0          0          0          0          0          0     GICv3  69 Edge      ACPI:Ged\n 39:          0          0          0          0          0          0          0          0     GICv3  70 Edge      ACPI:Ged\n 40:          0          0          0          0          0          0          0          0     GICv3  71 Edge      ACPI:Ged\n 41:          0          0          0          0          0          0          0          0     GICv3  72 Edge      ACPI:Ged\n 42:          0          0          0          0          0          0          0          0     GICv3  73 Edge      ACPI:Ged\n 43:          0          0          0          0          0          0          0          0     GICv3  74 Edge      ACPI:Ged\n 44:          0          0          0          0          0          0          0          0     GICv3  75 Edge      ACPI:Ged\n 45:          0          0          0          0          0          0          0          0     GICv3  76 Edge      ACPI:Ged\n 46:          0          0          0          0          0          0          0          0     GICv3  77 Edge      ACPI:Ged\n 47:          0          0          0          0          0          0          0          0     GICv3  78 Edge      ACPI:Ged\n 48:          0          0          0          0          0          0          0          0     GICv3  79 Edge      ACPI:Ged\n 49:          0          0          0          0          0          0          0          0     GICv3  23 Level     arm-pmu\n 50:          0          0          0          0          0          0          0          0  ARMH0061:00   3 Edge      ACPI:Event\n 51:         13          0          0         20          4          0          0          0   ITS-MSI 65536 Edge      nvme0q0\n 52:          0          9          0          0          0          5         20          0   ITS-MSI 507904 Edge      nvme1q0\n 53:  129969327          0          0          0          0          0          0          0   ITS-MSI 65537 Edge      nvme0q1\n 54:          0          0          0          0  126913956          0          0          0   ITS-MSI 65538 Edge      nvme0q2\n 55:          0  199619844          0          0          0          0          0          0   ITS-MSI 507905 Edge      nvme1q1\n 56:          0          0          0          0          0  198494086          0          0   ITS-MSI 507906 Edge      nvme1q2\n 57:          0          0         51          0          0   32479308          0          0   ITS-MSI 81920 Edge      ena-mgmnt@pci:0000:00:05.0\n 58:          0          0 1195697946        437          0          0          0          0   ITS-MSI 81921 Edge      eth0-Tx-Rx-0\n 59:          0          0          0 2709937608       1619          0          0          0   ITS-MSI 81922 Edge      eth0-Tx-Rx-1\n 60:          0 1457922109          0          0          0         71          0          0   ITS-MSI 81923 Edge      eth0-Tx-Rx-2\n 61: 2052879736          0          0          0          0          0        124          0   ITS-MSI 81924 Edge      eth0-Tx-Rx-3\n 62:          0          0          0          0          0          0 2268695629       1530   ITS-MSI 81925 Edge      eth0-Tx-Rx-4\n 63:         50          0          0          0          0          0          0 1997799253   ITS-MSI 81926 Edge      eth0-Tx-Rx-5\n 64:          0         48          0          0 1238622585          0          0          0   ITS-MSI 81927 Edge      eth0-Tx-Rx-6\n 65:          0          0         47          0          0          0          0 1574978449   ITS-MSI 81928 Edge      eth0-Tx-Rx-7\nIPI0:2768808080 2844211768 2878602432 2730576120 2723524623 3349096412 2717389879 2154252810       Rescheduling interrupts\nIPI1: 357815098  213258177  153713187  132890624  124746406  123498004  122386326  120728639       Function call interrupts\nIPI2:         0          0          0          0          0          0          0          0       CPU stop interrupts\nIPI3:         0          0          0          0          0          0          0          0       CPU stop (for crash dump) interrupts\nIPI4:         0          0          0          0          0          0          0          0       Timer broadcast interrupts\nIPI5:         0          0          0          0          0          0          0          0       IRQ work interrupts\nIPI6:         0          0          0          0          0          0          0          0       CPU wake-up interrupts\nErr:          0\n                                                                              \n"
  },
  {
    "path": "collector/fixtures/proc/loadavg",
    "content": "0.21 0.37 0.39 1/719 19737\n"
  },
  {
    "path": "collector/fixtures/proc/mdstat",
    "content": "Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]\n\nmd3 : active raid6 sda1[8] sdh1[7] sdg1[6] sdf1[5] sde1[11] sdd1[3] sdc1[10] sdb1[9] sdd1[10](S) sdd2[11](S)\n      5853468288 blocks super 1.2 level 6, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]\n\nmd127 : active raid1 sdi2[0] sdj2[1]\n      312319552 blocks [2/2] [UU]\n\nmd0 : active raid1 sdi1[0] sdj1[1]\n      248896 blocks [2/2] [UU]\n\nmd4 : inactive raid1 sda3[0](F) sdb3[1](S)\n      4883648 blocks [2/2] [UU]\n\nmd6 : active raid1 sdb2[2](F) sdc[1](S) sda2[0]\n      195310144 blocks [2/1] [U_]\n      [=>...................]  recovery =  8.5% (16775552/195310144) finish=17.0min speed=259783K/sec\n\nmd8 : active raid1 sdb1[1] sda1[0] sdc[2](S) sde[3](S)\n      195310144 blocks [2/2] [UU]\n      [=>...................]  resync =  8.5% (16775552/195310144) finish=17.0min speed=259783K/sec\n\nmd201 : active raid1 sda3[0] sdb3[1]\n      1993728 blocks super 1.2 [2/2] [UU]\n      [=>...................]  check =  5.7% (114176/1993728) finish=0.2min speed=114176K/sec\n\nmd7 : active raid6 sdb1[0] sde1[3] sdd1[2] sdc1[1](F)\n      7813735424 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/3] [U_UU]\n      bitmap: 0/30 pages [0KB], 65536KB chunk\n\nmd9 : active raid1 sdc2[2] sdd2[3] sdb2[1] sda2[0] sde[4](F) sdf[5](F) sdg[6](S)\n      523968 blocks super 1.2 [4/4] [UUUU]\n      resync=DELAYED\n\nmd10 : active raid0 sda1[0] sdb1[1]\n       314159265 blocks 64k chunks\n\nmd11 : active (auto-read-only) raid1 sdb2[0] sdc2[1] sdc3[2](F) hda[4](S) ssdc2[3](S)\n      4190208 blocks super 1.2 [2/2] [UU]\n      resync=PENDING\n\nmd12 : active raid0 sdc2[0] sdd2[1]\n      3886394368 blocks super 1.2 512k chunks\n\nmd126 : active raid0 sdb[1] sdc[0]\n      1855870976 blocks super external:/md127/0 128k chunks\n\nmd219 : inactive sdb[2](S) sdc[1](S) sda[0](S)\n        7932 blocks super external:imsm\n\nmd00 : active raid0 xvdb[0]\n      4186624 blocks super 1.2 256k chunks\n\nmd120 : active linear sda1[1] sdb1[0]\n        2095104 blocks super 1.2 0k rounding\n\nmd101 : active (read-only) raid0 sdb[2] sdd[1] sdc[0]\n      322560 blocks super 1.2 512k chunks\n\nunused devices: <none>\n"
  },
  {
    "path": "collector/fixtures/proc/meminfo",
    "content": "MemTotal:        3742148 kB\nMemFree:          225472 kB\nBuffers:           22040 kB\nCached:           930888 kB\nSwapCached:       192504 kB\nActive:          2233416 kB\nInactive:        1028728 kB\nActive(anon):    2020004 kB\nInactive(anon):   883052 kB\nActive(file):     213412 kB\nInactive(file):   145676 kB\nUnevictable:          32 kB\nMlocked:              32 kB\nSwapTotal:       4194300 kB\nSwapFree:        3155360 kB\nDirty:              1052 kB\nWriteback:             0 kB\nAnonPages:       2244172 kB\nMapped:           239220 kB\nShmem:            593840 kB\nSlab:              98932 kB\nSReclaimable:      44772 kB\nSUnreclaim:        54160 kB\nKernelStack:        5800 kB\nPageTables:        75212 kB\nNFS_Unstable:          0 kB\nBounce:                0 kB\nWritebackTmp:          0 kB\nCommitLimit:     6065372 kB\nCommitted_AS:    7835436 kB\nVmallocTotal:   34359738367 kB\nVmallocUsed:      352840 kB\nVmallocChunk:   34359338876 kB\nHardwareCorrupted:     0 kB\nAnonHugePages:         0 kB\nHugePages_Total:       0\nHugePages_Free:        0\nHugePages_Rsvd:        0\nHugePages_Surp:        0\nHugepagesize:       2048 kB\nDirectMap4k:      185660 kB\nDirectMap2M:     3698688 kB\n"
  },
  {
    "path": "collector/fixtures/proc/net/arp",
    "content": "IP address       HW type     Flags       HW address            Mask     Device\n192.168.1.1    0x1         0x2         cc:aa:dd:ee:aa:bb     *        eth0\n192.168.1.2    0x1         0x2         bb:cc:dd:ee:ff:aa     *        eth0\n192.168.1.3    0x1         0x2         aa:bb:cc:dd:ee:ff     *        eth0\n192.168.1.4    0x1         0x2         dd:ee:ff:aa:bb:cc     *        eth1\n192.168.1.5    0x1         0x2         ee:ff:aa:bb:cc:dd     *        eth1\n192.168.1.6    0x1         0x2         ff:aa:bb:cc:dd:ee     *        eth1\n10.0.0.1       0x1         0x2         de:ad:be:ef:00:00     *        nope\n"
  },
  {
    "path": "collector/fixtures/proc/net/ip_vs",
    "content": "IP Virtual Server version 1.2.1 (size=4096)\nProt LocalAddress:Port Scheduler Flags\n  -> RemoteAddress:Port Forward Weight ActiveConn InActConn\nTCP  C0A80016:0CEA wlc  \n  -> C0A85216:0CEA      Tunnel  100    248        2         \n  -> C0A85318:0CEA      Tunnel  100    248        2         \n  -> C0A85315:0CEA      Tunnel  100    248        1         \nTCP  C0A80039:0CEA wlc  \n  -> C0A85416:0CEA      Tunnel  0      0          0         \n  -> C0A85215:0CEA      Tunnel  100    1499       0         \n  -> C0A83215:0CEA      Tunnel  100    1498       0         \nTCP  C0A80037:0CEA wlc  \n  -> C0A8321A:0CEA      Tunnel  0      0          0         \n  -> C0A83120:0CEA      Tunnel  100    0          0         \nFWM  10001000 wlc   \n  -> C0A8321A:0CEA      Tunnel  20     64         1         \n  -> C0A83120:0CEA      Tunnel  100    321        5         \n"
  },
  {
    "path": "collector/fixtures/proc/net/ip_vs_stats",
    "content": "   Total Incoming Outgoing         Incoming         Outgoing\n   Conns  Packets  Packets            Bytes            Bytes\n 16AA370 E33656E5        0     51D8C8883AB3                0\n\n Conns/s   Pkts/s   Pkts/s          Bytes/s          Bytes/s\n       4    1FB3C        0          1282A8F                0\n"
  },
  {
    "path": "collector/fixtures/proc/net/netstat",
    "content": "TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed EmbryonicRsts PruneCalled RcvPruned OfoPruned OutOfWindowIcmps LockDroppedIcmps ArpFilter TW TWRecycled TWKilled PAWSPassive PAWSActive PAWSEstab DelayedACKs DelayedACKLocked DelayedACKLost ListenOverflows ListenDrops TCPPrequeued TCPDirectCopyFromBacklog TCPDirectCopyFromPrequeue TCPPrequeueDropped TCPHPHits TCPHPHitsToUser TCPPureAcks TCPHPAcks TCPRenoRecovery TCPSackRecovery TCPSACKReneging TCPFACKReorder TCPSACKReorder TCPRenoReorder TCPTSReorder TCPFullUndo TCPPartialUndo TCPDSACKUndo TCPLossUndo TCPLoss TCPLostRetransmit TCPRenoFailures TCPSackFailures TCPLossFailures TCPFastRetrans TCPForwardRetrans TCPSlowStartRetrans TCPTimeouts TCPRenoRecoveryFail TCPSackRecoveryFail TCPSchedulerFailed TCPRcvCollapsed TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv TCPAbortOnData TCPAbortOnClose TCPAbortOnMemory TCPAbortOnTimeout TCPAbortOnLinger TCPAbortFailed TCPMemoryPressures TCPSACKDiscard TCPDSACKIgnoredOld TCPDSACKIgnoredNoUndo TCPSpuriousRTOs TCPMD5NotFound TCPMD5Unexpected TCPSackShifted TCPSackMerged TCPSackShiftFallback TCPBacklogDrop TCPMinTTLDrop TCPDeferAcceptDrop IPReversePathFilter TCPTimeWaitOverflow TCPReqQFullDoCookies TCPReqQFullDrop TCPChallengeACK TCPSYNChallenge TCPOFOQueue TCPRcvQDrop\nTcpExt: 0 0 2 0 0 0 0 0 0 0 388812 0 0 0 0 6 102471 17 9 0 0 80568 0 168808 0 4471289 26 1433940 3744565 0 1 0 0 0 0 0 0 0 0 48 0 0 0 1 0 1 0 1 115 0 0 0 0 9 0 5 0 41 4 0 0 0 0 0 0 0 1 0 0 0 0 2 5 0 0 0 0 0 0 0 2 2 42 131\nIpExt: InNoRoutes InTruncatedPkts InMcastPkts OutMcastPkts InBcastPkts OutBcastPkts InOctets OutOctets InMcastOctets OutMcastOctets InBcastOctets OutBcastOctets\nIpExt: 0 0 0 0 0 0 6286396970 2786264347 0 0 0 0\n"
  },
  {
    "path": "collector/fixtures/proc/net/rpc/nfs",
    "content": "net 70 70 69 45\nrpc 1218785755 374636 1218815394\nproc2 18 16 57 74 52 71 73 45 86 0 52 83 61 17 53 50 23 70 82\nproc3 22 0 1061909262 48906 4077635 117661341 5 29391916 2570425 2993289 590 0 0 7815 15 1130 0 3983 92385 13332 2 1 23729\nproc4 48 98 51 54 83 85 23 24 1 28 73 68 83 12 84 39 68 59 58 88 29 74 69 96 21 84 15 53 86 54 66 56 97 36 49 32 85 81 11 58 32 67 13 28 35 1 90 26 0\n"
  },
  {
    "path": "collector/fixtures/proc/net/rpc/nfsd",
    "content": "rc 0 6 18622\nfh 0 0 0 0 0\nio 157286400 72864\nth 8 0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000\nra 32 0 0 0 0 0 0 0 0 0 0 0\nnet 972 55 917 1\nrpc 18628 3 1 2 0\nproc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2\nproc3 22 2 112 0 2719 111 0 0 0 0 0 0 0 0 0 0 0 27 216 0 2 1 0\nproc4 2 2 10853\nproc4ops 72 0 0 0 1098 2 0 0 0 0 8179 5896 0 0 0 0 5900 0 0 2 0 2 0 9609 0 2 150 1272 0 0 0 1236 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\nwdeleg_getattr 15\n"
  },
  {
    "path": "collector/fixtures/proc/net/snmp",
    "content": "Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates\nIp: 1 64 57740232 0 25 397750 0 0 57340175 55365537 0 54 0 0 0 0 0 0 0\nIcmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps\nIcmp: 104 0 0 104 0 0 0 0 0 0 0 0 0 0 120 0 120 0 0 0 0 0 0 0 0 0 0\nIcmpMsg: InType3 OutType3\nIcmpMsg: 104 120\nTcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors\nTcp: 1 200 120000 -1 3556 230 341 161 0 57252008 54915039 227 5 1003 0\nUdp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors\nUdp: 88542 120 0 53028 9 8 0\nUdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors\nUdpLite: 0 0 0 0 0 0 0\n"
  },
  {
    "path": "collector/fixtures/proc/net/snmp6",
    "content": "Ip6InReceives                   \t7\nIp6InHdrErrors                  \t0\nIp6InTooBigErrors               \t0\nIp6InNoRoutes                   \t5\nIp6InAddrErrors                 \t0\nIp6InUnknownProtos              \t0\nIp6InTruncatedPkts              \t0\nIp6InDiscards                   \t0\nIp6InDelivers                   \t0\nIp6OutForwDatagrams             \t0\nIp6OutRequests                  \t8\nIp6OutDiscards                  \t0\nIp6OutNoRoutes                  \t3003\nIp6ReasmTimeout                 \t0\nIp6ReasmReqds                   \t0\nIp6ReasmOKs                     \t0\nIp6ReasmFails                   \t0\nIp6FragOKs                      \t0\nIp6FragFails                    \t0\nIp6FragCreates                  \t0\nIp6InMcastPkts                  \t2\nIp6OutMcastPkts                 \t12\nIp6InOctets                     \t460\nIp6OutOctets                    \t536\nIp6InMcastOctets                \t112\nIp6OutMcastOctets               \t840\nIp6InBcastOctets                \t0\nIp6OutBcastOctets               \t0\nIp6InNoECTPkts                  \t7\nIp6InECT1Pkts                   \t0\nIp6InECT0Pkts                   \t0\nIp6InCEPkts                     \t0\nIcmp6InMsgs                     \t0\nIcmp6InErrors                   \t0\nIcmp6OutMsgs                    \t8\nIcmp6OutErrors                  \t0\nIcmp6InCsumErrors               \t0\nIcmp6InDestUnreachs             \t0\nIcmp6InPktTooBigs               \t0\nIcmp6InTimeExcds                \t0\nIcmp6InParmProblems             \t0\nIcmp6InEchos                    \t0\nIcmp6InEchoReplies              \t0\nIcmp6InGroupMembQueries         \t0\nIcmp6InGroupMembResponses       \t0\nIcmp6InGroupMembReductions      \t0\nIcmp6InRouterSolicits           \t0\nIcmp6InRouterAdvertisements     \t0\nIcmp6InNeighborSolicits         \t0\nIcmp6InNeighborAdvertisements   \t0\nIcmp6InRedirects                \t0\nIcmp6InMLDv2Reports             \t0\nIcmp6OutDestUnreachs            \t0\nIcmp6OutPktTooBigs              \t0\nIcmp6OutTimeExcds               \t0\nIcmp6OutParmProblems            \t0\nIcmp6OutEchos                   \t0\nIcmp6OutEchoReplies             \t0\nIcmp6OutGroupMembQueries        \t0\nIcmp6OutGroupMembResponses      \t0\nIcmp6OutGroupMembReductions     \t0\nIcmp6OutRouterSolicits          \t3\nIcmp6OutRouterAdvertisements    \t0\nIcmp6OutNeighborSolicits        \t1\nIcmp6OutNeighborAdvertisements  \t0\nIcmp6OutRedirects               \t0\nIcmp6OutMLDv2Reports            \t4\nIcmp6OutType133                 \t3\nIcmp6OutType135                 \t1\nIcmp6OutType143                 \t4\nUdp6InDatagrams                 \t0\nUdp6NoPorts                     \t0\nUdp6InErrors                    \t0\nUdp6OutDatagrams                \t0\nUdp6RcvbufErrors                \t9\nUdp6SndbufErrors                \t8\nUdp6InCsumErrors                \t0\nUdp6IgnoredMulti                \t0\nUdpLite6InDatagrams             \t0\nUdpLite6NoPorts                 \t0\nUdpLite6InErrors                \t0\nUdpLite6OutDatagrams            \t0\nUdpLite6RcvbufErrors            \t0\nUdpLite6SndbufErrors            \t0\nUdpLite6InCsumErrors            \t0\n"
  },
  {
    "path": "collector/fixtures/proc/net/sockstat",
    "content": "sockets: used 229\nTCP: inuse 4 orphan 0 tw 4 alloc 17 mem 1\nUDP: inuse 0 mem 0\nUDPLITE: inuse 0\nRAW: inuse 0\nFRAG: inuse 0 memory 0\n"
  },
  {
    "path": "collector/fixtures/proc/net/sockstat6",
    "content": "TCP6: inuse 17\nUDP6: inuse 9\nUDPLITE6: inuse 0\nRAW6: inuse 1\nFRAG6: inuse 0 memory 0\n"
  },
  {
    "path": "collector/fixtures/proc/net/softnet_stat",
    "content": "00049279 00000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000\n000dfb82 00000029 0000000a 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000\n00551c3f 00000000 00000055 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000\n002f8339 00000000 00000032 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000"
  },
  {
    "path": "collector/fixtures/proc/net/stat/arp_cache",
    "content": "entries  allocs destroys hash_grows  lookups hits  res_failed  rcv_probes_mcast rcv_probes_ucast  periodic_gc_runs forced_gc_runs unresolved_discards table_fulls\n00000014  00000001 00000002 00000003  00000004 00000005  00000006  00000007 00000008  00000009 0000000a 0000000b 0000000c\n00000014  0000000d 0000000e 0000000f  00000010 00000011  00000012  00000013 00000014  00000015 00000016 00000017 00000018\n"
  },
  {
    "path": "collector/fixtures/proc/net/stat/ndisc_cache",
    "content": "entries  allocs destroys hash_grows  lookups hits  res_failed  rcv_probes_mcast rcv_probes_ucast  periodic_gc_runs forced_gc_runs unresolved_discards table_fulls\n00000024  000000f0 000000f1 000000f2  000000f3 000000f4  000000f5  000000f6 000000f7  000000f8 000000f9 000000fa 000000fb\n00000024  000000fc 000000fd 000000fe  000000ff 00000100  00000101  00000102 00000103  00000104 00000105 00000106 00000107\n"
  },
  {
    "path": "collector/fixtures/proc/net/stat/nf_conntrack",
    "content": "entries  searched found new invalid ignore delete delete_list insert insert_failed drop early_drop icmp_error  expect_new expect_create expect_delete search_restart\n00000021  00000000 00000000 00000000 00000003 0000588a 00000000 00000000 00000000 00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000000\n00000021  00000000 00000000 00000000 00000002 000056a4 00000000 00000000 00000000 00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000002\n00000021  00000000 00000000 00000000 00000001 000058d4 00000000 00000000 00000000 00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000001\n00000021  00000000 00000000 00000000 0000002f 00005688 00000000 00000000 00000000 00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000004\n"
  },
  {
    "path": "collector/fixtures/proc/net/udp",
    "content": "  sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode                                                     \n   0: 00000000:0016 00000000:0000 0A 00000015:00000000 00:00000000 00000000     0        0 2740 1 ffff88003d3af3c0 100 0 0 10 0                      \n"
  },
  {
    "path": "collector/fixtures/proc/net/xfrm_stat",
    "content": "XfrmInError                     1\nXfrmInBufferError               2\nXfrmInHdrError                  4\nXfrmInNoStates                  3\nXfrmInStateProtoError           40\nXfrmInStateModeError            100\nXfrmInStateSeqError             6000\nXfrmInStateExpired              7\nXfrmInStateMismatch             23451\nXfrmInStateInvalid              55555\nXfrmInTmplMismatch              51\nXfrmInNoPols                    65432\nXfrmInPolBlock                  100\nXfrmInPolError                  10000\nXfrmOutError                    1000000\nXfrmOutBundleGenError           43321\nXfrmOutBundleCheckError         555\nXfrmOutNoStates                 869\nXfrmOutStateProtoError          4542\nXfrmOutStateModeError           8\nXfrmOutStateSeqError            543\nXfrmOutStateExpired             565\nXfrmOutPolBlock                 43456\nXfrmOutPolDead                  7656\nXfrmOutPolError                 1454\nXfrmFwdHdrError                 6654\nXfrmOutStateInvalid             28765\nXfrmAcquireError                24532"
  },
  {
    "path": "collector/fixtures/proc/pressure/cpu",
    "content": "some avg10=0.00 avg60=0.00 avg300=0.00 total=14036781\nfull avg10=0.00 avg60=0.00 avg300=0.00 total=0\n"
  },
  {
    "path": "collector/fixtures/proc/pressure/io",
    "content": "some avg10=0.18 avg60=0.34 avg300=0.10 total=159886802\nfull avg10=0.18 avg60=0.34 avg300=0.10 total=159229614\n"
  },
  {
    "path": "collector/fixtures/proc/pressure/irq",
    "content": "full avg10=0.00 avg60=0.00 avg300=0.00 total=8494"
  },
  {
    "path": "collector/fixtures/proc/pressure/memory",
    "content": "some avg10=0.00 avg60=0.00 avg300=0.00 total=0\nfull avg10=0.00 avg60=0.00 avg300=0.00 total=0\n"
  },
  {
    "path": "collector/fixtures/proc/schedstat",
    "content": "version 15\ntimestamp 15819019232\ncpu0 498494191 0 3533438552 2553969831 3853684107 2465731542 2045936778163039 343796328169361 4767485306\ndomain0 00000000,00000003 212499247 210112015 1861015 1860405436 536440 369895 32599 210079416 25368550 24241256 384652 927363878 807233 6366 1647 24239609 2122447165 1886868564 121112060 2848625533 125678146 241025 1032026 1885836538 2545 12 2533 0 0 0 0 0 0 1387952561 21076581 0\ncpu1 518377256 0 4155211005 2778589869 10466382 2867629021 1904686152592476 364107263788241 5145567945\ndomain0 00000000,00000003 217653037 215526982 1577949 1580427380 557469 393576 28538 215498444 28721913 27662819 371153 870843407 745912 5523 1639 27661180 2331056874 2107732788 111442342 652402556 123615235 196159 1045245 2106687543 2400 3 2397 0 0 0 0 0 0 1437804657 26220076 0\n"
  },
  {
    "path": "collector/fixtures/proc/slabinfo",
    "content": "slabinfo - version: 2.1\n# name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>\ntw_sock_TCP          704    864    256   32    2 : tunables    0    0    0 : slabdata     27     27      0\ndmaengine-unmap-128   1206   1320   1088   30    8 : tunables    0    0    0 : slabdata     44     44      0\nkmalloc-8192         132    148   8192    4    8 : tunables    0    0    0 : slabdata     37     37      0\nkmem_cache           320    320    256   32    2 : tunables    0    0    0 : slabdata     10     10      0\n"
  },
  {
    "path": "collector/fixtures/proc/softirqs",
    "content": "                    CPU0       CPU1       \n          HI:          7          1\n       TIMER:     424191     108342\n      NET_TX:       2301       2430\n      NET_RX:      43066     104508\n       BLOCK:      23776      24115\n    IRQ_POLL:          0          0\n     TASKLET:        372       1899\n       SCHED:     378895     152852\n     HRTIMER:         40        346\n         RCU:     155929     146631\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/abdstats",
    "content": "7 1 0x01 21 5712 73163810083184 309946154984654\nname                            type data\nstruct_size                     4    2520\nlinear_cnt                      4    62\nlinear_data_size                4    223232\nscatter_cnt                     4    1\nscatter_data_size               4    16384\nscatter_chunk_waste             4    0\nscatter_order_0                 4    0\nscatter_order_1                 4    0\nscatter_order_2                 4    1\nscatter_order_3                 4    0\nscatter_order_4                 4    0\nscatter_order_5                 4    0\nscatter_order_6                 4    0\nscatter_order_7                 4    0\nscatter_order_8                 4    0\nscatter_order_9                 4    0\nscatter_order_10                4    0\nscatter_page_multi_chunk        4    0\nscatter_page_multi_zone         4    0\nscatter_page_alloc_retry        4    0\nscatter_sg_table_retry          4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/arcstats",
    "content": "6 1 0x01 91 4368 5266997922 97951858082072\nname                            type data\nanon_evictable_data             4    0\nanon_evictable_metadata         4    0\nanon_size                       4    1917440\narc_loaned_bytes                4    0\narc_meta_limit                  4    6275982336\narc_meta_max                    4    449286096\narc_meta_min                    4    16777216\narc_meta_used                   4    308103632\narc_need_free                   4    0\narc_no_grow                     4    0\narc_prune                       4    0\narc_sys_free                    4    261496832\narc_tempreserve                 4    0\nc                               4    1643208777\nc_max                           4    8367976448\nc_min                           4    33554432\ndata_size                       4    1295836160\ndeleted                         4    60403\ndemand_data_hits                4    7221032\ndemand_data_misses              4    73300\ndemand_metadata_hits            4    1464353\ndemand_metadata_misses          4    498170\nduplicate_buffers               4    0\nduplicate_buffers_size          4    0\nduplicate_reads                 4    0\nevict_l2_cached                 4    0\nevict_l2_eligible               4    8992514560\nevict_l2_ineligible             4    992552448\nevict_l2_skip                   4    0\nevict_not_enough                4    680\nevict_skip                      4    2265729\nhash_chain_max                  4    3\nhash_chains                     4    412\nhash_collisions                 4    50564\nhash_elements                   4    42359\nhash_elements_max               4    88245\nhdr_size                        4    16361080\nhits                            4    8772612\nl2_abort_lowmem                 4    0\nl2_asize                        4    0\nl2_cdata_free_on_write          4    0\nl2_cksum_bad                    4    0\nl2_compress_failures            4    0\nl2_compress_successes           4    0\nl2_compress_zeros               4    0\nl2_evict_l1cached               4    0\nl2_evict_lock_retry             4    0\nl2_evict_reading                4    0\nl2_feeds                        4    0\nl2_free_on_write                4    0\nl2_hdr_size                     4    0\nl2_hits                         4    0\nl2_io_error                     4    0\nl2_misses                       4    0\nl2_read_bytes                   4    0\nl2_rw_clash                     4    0\nl2_size                         4    0\nl2_write_bytes                  4    0\nl2_writes_done                  4    0\nl2_writes_error                 4    0\nl2_writes_lock_retry            4    0\nl2_writes_sent                  4    0\nmemory_available_bytes          3    -922337203685477580\nmemory_direct_count             4    542\nmemory_indirect_count           4    3006\nmemory_throttle_count           4    0\nmetadata_size                   4    175298560\nmfu_evictable_data              4    1017613824\nmfu_evictable_metadata          4    9163776\nmfu_ghost_evictable_data        4    96731136\nmfu_ghost_evictable_metadata    4    8205312\nmfu_ghost_hits                  4    821\nmfu_ghost_size                  4    104936448\nmfu_hits                        4    7829854\nmfu_size                        4    1066623488\nmisses                          4    604635\nmru_evictable_data              4    278091264\nmru_evictable_metadata          4    18606592\nmru_ghost_evictable_data        4    883765248\nmru_ghost_evictable_metadata    4    115962880\nmru_ghost_hits                  4    21100\nmru_ghost_size                  4    999728128\nmru_hits                        4    855535\nmru_size                        4    402593792\nmutex_miss                      4    2\nother_size                      4    116443992\np                               4    516395305\nprefetch_data_hits              4    3615\nprefetch_data_misses            4    17094\nprefetch_metadata_hits          4    83612\nprefetch_metadata_misses        4    16071\nsize                            4    1603939792\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/dbufstats",
    "content": "15 1 0x01 63 17136 73163812943503 309964267073187\nname                            type data\ndbuf_cache_count                4    27\ndbuf_cache_size                 4    302080\ndbuf_cache_size_max             4    394240\ndbuf_cache_max_bytes            4    62834368\ndbuf_cache_lowater_bytes        4    56550932\ndbuf_cache_hiwater_bytes        4    69117804\ndbuf_cache_total_evicts         4    0\ndbuf_cache_level_0              4    27\ndbuf_cache_level_1              4    0\ndbuf_cache_level_2              4    0\ndbuf_cache_level_3              4    0\ndbuf_cache_level_4              4    0\ndbuf_cache_level_5              4    0\ndbuf_cache_level_6              4    0\ndbuf_cache_level_7              4    0\ndbuf_cache_level_8              4    0\ndbuf_cache_level_9              4    0\ndbuf_cache_level_10             4    0\ndbuf_cache_level_11             4    0\ndbuf_cache_level_0_bytes        4    302080\ndbuf_cache_level_1_bytes        4    0\ndbuf_cache_level_2_bytes        4    0\ndbuf_cache_level_3_bytes        4    0\ndbuf_cache_level_4_bytes        4    0\ndbuf_cache_level_5_bytes        4    0\ndbuf_cache_level_6_bytes        4    0\ndbuf_cache_level_7_bytes        4    0\ndbuf_cache_level_8_bytes        4    0\ndbuf_cache_level_9_bytes        4    0\ndbuf_cache_level_10_bytes       4    0\ndbuf_cache_level_11_bytes       4    0\nhash_hits                       4    108807\nhash_misses                     4    1851\nhash_collisions                 4    0\nhash_elements                   4    55\nhash_elements_max               4    55\nhash_chains                     4    0\nhash_chain_max                  4    0\nhash_insert_race                4    0\nhash_dbuf_level_0               4    37\nhash_dbuf_level_1               4    10\nhash_dbuf_level_2               4    2\nhash_dbuf_level_3               4    2\nhash_dbuf_level_4               4    2\nhash_dbuf_level_5               4    2\nhash_dbuf_level_6               4    0\nhash_dbuf_level_7               4    0\nhash_dbuf_level_8               4    0\nhash_dbuf_level_9               4    0\nhash_dbuf_level_10              4    0\nhash_dbuf_level_11              4    0\nhash_dbuf_level_0_bytes         4    465920\nhash_dbuf_level_1_bytes         4    1310720\nhash_dbuf_level_2_bytes         4    262144\nhash_dbuf_level_3_bytes         4    262144\nhash_dbuf_level_4_bytes         4    262144\nhash_dbuf_level_5_bytes         4    262144\nhash_dbuf_level_6_bytes         4    0\nhash_dbuf_level_7_bytes         4    0\nhash_dbuf_level_8_bytes         4    0\nhash_dbuf_level_9_bytes         4    0\nhash_dbuf_level_10_bytes        4    0\nhash_dbuf_level_11_bytes        4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/dmu_tx",
    "content": "5 1 0x01 11 528 8010436841 354962070418194\nname                            type data\ndmu_tx_assigned                 4    3532844\ndmu_tx_delay                    4    0\ndmu_tx_error                    4    0\ndmu_tx_suspended                4    0\ndmu_tx_group                    4    0\ndmu_tx_memory_reserve           4    0\ndmu_tx_memory_reclaim           4    0\ndmu_tx_dirty_throttle           4    0\ndmu_tx_dirty_delay              4    0\ndmu_tx_dirty_over_max           4    0\ndmu_tx_quota                    4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/dnodestats",
    "content": "10 1 0x01 28 7616 73163810135894 309969103316276\nname                            type data\ndnode_hold_dbuf_hold            4    0\ndnode_hold_dbuf_read            4    0\ndnode_hold_alloc_hits           4    37617\ndnode_hold_alloc_misses         4    0\ndnode_hold_alloc_interior       4    0\ndnode_hold_alloc_lock_retry     4    0\ndnode_hold_alloc_lock_misses    4    0\ndnode_hold_alloc_type_none      4    0\ndnode_hold_free_hits            4    0\ndnode_hold_free_misses          4    0\ndnode_hold_free_lock_misses     4    0\ndnode_hold_free_lock_retry      4    0\ndnode_hold_free_overflow        4    0\ndnode_hold_free_refcount        4    0\ndnode_hold_free_txg             4    0\ndnode_allocate                  4    0\ndnode_reallocate                4    0\ndnode_buf_evict                 4    17\ndnode_alloc_next_chunk          4    0\ndnode_alloc_race                4    0\ndnode_alloc_next_block          4    0\ndnode_move_invalid              4    0\ndnode_move_recheck1             4    0\ndnode_move_recheck2             4    0\ndnode_move_special              4    0\ndnode_move_handle               4    0\ndnode_move_rwlock               4    0\ndnode_move_active               4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/fm",
    "content": "0 1 0x01 4 192 8007255140 354329591145385\nname                            type data\nerpt-dropped                    4    18\nerpt-set-failed                 4    0\nfmri-set-failed                 4    0\npayload-set-failed              4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool1/io",
    "content": "12 3 0x00 1 80 79205351707403 395818011156865\nnread    nwritten reads    writes   wtime    wlentime wupdate  rtime    rlentime rupdate  wcnt     rcnt    \n1884160  3206144  22       132      7155162  104112268 79210489694949 24168078 104112268 79210489849220 0        0       \n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool1/objset-1",
    "content": "23 1 0x01 7 2160 221578688875 6665999035587\nname                            type data\ndataset_name                    7    pool1\nwrites                          4    0\nnwritten                        4    0\nreads                           4    0\nnread                           4    0\nnunlinks                        4    0\nnunlinked                       4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool1/objset-2",
    "content": "24 1 0x01 7 2160 221611904716 7145015038451\nname                            type data\ndataset_name                    7    pool1/dataset1\nwrites                          4    4\nnwritten                        4    12302\nreads                           4    2\nnread                           4    28\nnunlinks                        4    3\nnunlinked                       4    3\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool1/state",
    "content": "ONLINE\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool2/state",
    "content": "SUSPENDED\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool3/io",
    "content": "12 3 0x00 1 80 79205351707403 395818011156865\nnread    nwritten reads    writes   wtime    wlentime wupdate  rtime    rlentime rupdate  wcnt     rcnt    \n1884160  3206144  22       132      7155162  104112268 79210489694949 24168078 104112268 79210489849220 0        0       \n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool3/objset-1",
    "content": "23 1 0x01 7 2160 221578688875 6665999035587\nname                            type data\ndataset_name                    7    pool3\nwrites                          4    0\nnwritten                        4    0\nreads                           4    0\nnread                           4    0\nnunlinks                        4    0\nnunlinked                       4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool3/objset-2",
    "content": "24 1 0x01 7 2160 221611904716 7145015038451\nname                            type data\ndataset_name                    7    pool3/dataset with  space\nwrites                          4    4\nnwritten                        4    12302\nreads                           4    2\nnread                           4    28\nnunlinks                        4    3\nnunlinked                       4    3\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/pool3/state",
    "content": "ONLINE\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/poolz1/io",
    "content": "16 3 0x00 1 80 79568650431241 395832279341621\nnread    nwritten reads    writes   wtime    wlentime wupdate  rtime    rlentime rupdate  wcnt     rcnt    \n2826240  2680501248 33       25294    9673715628 6472105124093 110734831833266 9829091640 6472105124093 110734831944501 0        0       \n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/poolz1/objset-1",
    "content": "30 1 0x01 7 2160 217993779684 2621674546179\nname                            type data\ndataset_name                    7    poolz1\nwrites                          4    0\nnwritten                        4    0\nreads                           4    0\nnread                           4    0\nnunlinks                        4    0\nnunlinked                       4    0"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/poolz1/objset-2",
    "content": "31 1 0x01 7 2160 218133979890 3024169078920\nname                            type data\ndataset_name                    7    poolz1/dataset1\nwrites                          4    10\nnwritten                        4    32806\nreads                           4    2\nnread                           4    28\nnunlinks                        4    14\nnunlinked                       4    14"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/poolz1/state",
    "content": "DEGRADED\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/vdev_cache_stats",
    "content": "8 1 0x01 3 144 8012540758 352116106118781\nname                            type data\ndelegations                     4    40\nhits                            4    0\nmisses                          4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/vdev_mirror_stats",
    "content": "18 1 0x01 7 1904 73163813004224 309980651991187\nname                            type data\nrotating_linear                 4    0\nrotating_offset                 4    0\nrotating_seek                   4    0\nnon_rotating_linear             4    0\nnon_rotating_seek               4    0\npreferred_found                 4    0\npreferred_not_found             4    94\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/xuio_stats",
    "content": "2 1 0x01 6 288 8009100742 353415816865654\nname                            type data\nonloan_read_buf                 4    32\nonloan_write_buf                4    0\nread_buf_copied                 4    0\nread_buf_nocopy                 4    0\nwrite_buf_copied                4    0\nwrite_buf_nocopy                4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/zfetchstats",
    "content": "4 1 0x01 11 528 8010434610 345692669858836\nname                            type data\nhits                            4    7067992\nmisses                          4    11\ncolinear_hits                   4    0\ncolinear_misses                 4    11\nstride_hits                     4    7067990\nstride_misses                   4    0\nreclaim_successes               4    0\nreclaim_failures                4    11\nstreams_resets                  4    0\nstreams_noresets                4    2\nbogus_streams                   4    0\n"
  },
  {
    "path": "collector/fixtures/proc/spl/kstat/zfs/zil",
    "content": "7 1 0x01 13 624 8012538347 351689526932992\nname                            type data\nzil_commit_count                4    10\nzil_commit_writer_count         4    0\nzil_itx_count                   4    0\nzil_itx_indirect_count          4    0\nzil_itx_indirect_bytes          4    0\nzil_itx_copied_count            4    0\nzil_itx_copied_bytes            4    0\nzil_itx_needcopy_count          4    0\nzil_itx_needcopy_bytes          4    18446744073709537686\nzil_itx_metaslab_normal_count   4    0\nzil_itx_metaslab_normal_bytes   4    0\nzil_itx_metaslab_slog_count     4    0\nzil_itx_metaslab_slog_bytes     4    0\n"
  },
  {
    "path": "collector/fixtures/proc/stat",
    "content": "cpu  301854 612 111922 8979004 3552 2 3944 0 44 36\ncpu0 44490 19 21045 1087069 220 1 3410 0 2 1\ncpu1 47869 23 16474 1110787 591 0 46 0 3 2\ncpu2 46504 36 15916 1112321 441 0 326 0 4 3\ncpu3 47054 102 15683 1113230 533 0 60 0 5 4\ncpu4 28413 25 10776 1140321 217 0 8 0 6 5\ncpu5 29271 101 11586 1136270 672 0 30 0 7 6\ncpu6 29152 36 10276 1139721 319 0 29 0 8 7\ncpu7 29098 268 10164 1139282 555 0 31 0 9 8\nintr 8885917 17 0 0 0 0 0 0 0 1 79281 0 0 0 0 0 0 0 231237 0 0 0 0 250586 103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 223424 190745 13 906 1283803 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\nctxt 38014093\nbtime 1418183276\nprocesses 26442\nprocs_running 2\nprocs_blocked 0\nsoftirq 5057579 250191 1481983 1647 211099 186066 0 1783454 622196 12499 508444\n"
  },
  {
    "path": "collector/fixtures/proc/swaps",
    "content": "Filename\t\t\t\tType\t\tSize\t\tUsed\t\tPriority\n/dev/zram0                              partition\t8388604\t\t76\t\t100\n"
  },
  {
    "path": "collector/fixtures/proc/sys/fs/file-nr",
    "content": "1024\t0\t1631329\n"
  },
  {
    "path": "collector/fixtures/proc/sys/kernel/pid_max",
    "content": "123\n"
  },
  {
    "path": "collector/fixtures/proc/sys/kernel/random/entropy_avail",
    "content": "1337\n"
  },
  {
    "path": "collector/fixtures/proc/sys/kernel/random/poolsize",
    "content": "4096\n"
  },
  {
    "path": "collector/fixtures/proc/sys/kernel/seccomp/actions_avail",
    "content": "kill_process kill_thread trap errno user_notif trace log allow\n"
  },
  {
    "path": "collector/fixtures/proc/sys/kernel/threads-max",
    "content": "7801"
  },
  {
    "path": "collector/fixtures/proc/sys/net/netfilter/nf_conntrack_count",
    "content": "123\n"
  },
  {
    "path": "collector/fixtures/proc/sys/net/netfilter/nf_conntrack_max",
    "content": "65536\n"
  },
  {
    "path": "collector/fixtures/proc/sys/pid_max",
    "content": "123\n"
  },
  {
    "path": "collector/fixtures/proc/sys/threads-max",
    "content": "7801"
  },
  {
    "path": "collector/fixtures/proc/vmstat",
    "content": "nr_free_pages 977769\nnr_alloc_batch 4158\nnr_inactive_anon 125031\nnr_active_anon 622512\nnr_inactive_file 92317\nnr_active_file 324014\nnr_unevictable 12\nnr_mlock 12\nnr_anon_pages 713633\nnr_mapped 118021\nnr_file_pages 450840\nnr_dirty 21\nnr_writeback 0\nnr_slab_reclaimable 85763\nnr_slab_unreclaimable 431112\nnr_page_table_pages 12504\nnr_kernel_stack 1156\nnr_overhead 4956\nnr_unstable 0\nnr_bounce 0\nnr_vmscan_write 35050\nnr_vmscan_immediate_reclaim 27\nnr_writeback_temp 0\nnr_isolated_anon 0\nnr_isolated_file 0\nnr_shmem 20623\nnr_dirtied 11127183\nnr_written 11122061\nnr_pages_scanned 0\nnuma_hit 2601972389\nnuma_miss 0\nnuma_foreign 0\nnuma_interleave 32353\nnuma_local 2601972389\nnuma_other 0\nworkingset_refault 157066\nworkingset_activate 104270\nworkingset_nodereclaim 0\nnr_anon_transparent_hugepages 556\nnr_free_cma 0\nnr_dirty_threshold 270390\nnr_dirty_background_threshold 135030\npgpgin 7344136\npgpgout 1541180581\npswpin 1476\npswpout 35045\npgalloc_dma 12\npgalloc_dma32 611781566\npgalloc_normal 2287227526\npgalloc_movable 0\npgfree 2938719870\npgactivate 152952989\npgdeactivate 898450\npgfault 2320168809\npgmajfault 507162\npgrefill_dma 0\npgrefill_dma32 186367\npgrefill_normal 603970\npgrefill_movable 0\npgsteal_kswapd_dma 0\npgsteal_kswapd_dma32 78783\npgsteal_kswapd_normal 254128\npgsteal_kswapd_movable 0\npgsteal_direct_dma 0\npgsteal_direct_dma32 44\npgsteal_direct_normal 6484\npgsteal_direct_movable 0\npgscan_kswapd_dma 0\npgscan_kswapd_dma32 107656\npgscan_kswapd_normal 358784\npgscan_kswapd_movable 0\npgscan_direct_dma 0\npgscan_direct_dma32 67\npgscan_direct_normal 6796\npgscan_direct_movable 0\npgscan_direct_throttle 0\nzone_reclaim_failed 0\npginodesteal 412258\nslabs_scanned 14355346\nkswapd_inodesteal 288891\nkswapd_low_wmark_hit_quickly 109\nkswapd_high_wmark_hit_quickly 45\npageoutrun 247\nallocstall 83165\npgrotated 35014\ndrop_pagecache 0\ndrop_slab 0\nnuma_pte_updates 0\nnuma_huge_pte_updates 0\nnuma_hint_faults 0\nnuma_hint_faults_local 0\nnuma_pages_migrated 0\npgmigrate_success 37070309\npgmigrate_fail 36815\ncompact_migrate_scanned 830267783\ncompact_free_scanned 12336622550\ncompact_isolated 82707414\ncompact_stall 210959\ncompact_fail 164840\ncompact_success 46119\nhtlb_buddy_alloc_success 0\nhtlb_buddy_alloc_fail 0\nunevictable_pgs_culled 2188\nunevictable_pgs_scanned 0\nunevictable_pgs_rescued 3962\nunevictable_pgs_mlocked 3994\nunevictable_pgs_munlocked 3968\nunevictable_pgs_cleared 14\nunevictable_pgs_stranded 14\nthp_fault_alloc 142261\nthp_fault_fallback 98119\nthp_collapse_alloc 88421\nthp_collapse_alloc_failed 20954\nthp_split 69984\nthp_zero_page_alloc 9\nthp_zero_page_alloc_failed 20\nballoon_inflate 0\nballoon_deflate 0\nballoon_migrate 0\noom_kill 0\n"
  },
  {
    "path": "collector/fixtures/proc/zoneinfo",
    "content": "Node 0, zone      DMA\n  per-node stats\n      nr_inactive_anon 95612\n      nr_active_anon 1175853\n      nr_inactive_file 723339\n      nr_active_file 688810\n      nr_unevictable 213111\n      nr_slab_reclaimable 121763\n      nr_slab_unreclaimable 56182\n      nr_isolated_anon 0\n      nr_isolated_file 0\n      workingset_nodes 0\n      workingset_refault 0\n      workingset_activate 0\n      workingset_restore 0\n      workingset_nodereclaim 0\n      nr_anon_pages 1156608\n      nr_mapped    423143\n      nr_file_pages 1740118\n      nr_dirty     103\n      nr_writeback 0\n      nr_writeback_temp 0\n      nr_shmem     330517\n      nr_shmem_hugepages 0\n      nr_shmem_pmdmapped 0\n      nr_file_hugepages 0\n      nr_file_pmdmapped 0\n      nr_anon_transparent_hugepages 0\n      nr_vmscan_write 0\n      nr_vmscan_immediate_reclaim 0\n      nr_dirtied   1189097\n      nr_written   1181554\n      nr_kernel_misc_reclaimable 0\n      nr_foll_pin_acquired 3\n      nr_foll_pin_released 3\n  pages free     2949\n        min      8\n        low      11\n        high     14\n        spanned  4095\n        present  3997\n        managed  3973\n        protection: (0, 2039, 31932, 31932, 31932)\n      nr_free_pages 2949\n      nr_zone_inactive_anon 0\n      nr_zone_active_anon 0\n      nr_zone_inactive_file 0\n      nr_zone_active_file 0\n      nr_zone_unevictable 0\n      nr_zone_write_pending 0\n      nr_mlock     0\n      nr_page_table_pages 0\n      nr_kernel_stack 0\n      nr_bounce    0\n      nr_zspages   0\n      nr_free_cma  0\n      numa_hit     1\n      numa_miss    0\n      numa_foreign 0\n      numa_interleave 1\n      numa_local   1\n      numa_other   0\n  pagesets\n    cpu: 0\n              count: 0\n              high:  0\n              batch: 1\n  vm stats threshold: 8\n    cpu: 1\n              count: 0\n              high:  0\n              batch: 1\n  vm stats threshold: 8\n    cpu: 2\n              count: 0\n              high:  0\n              batch: 1\n  vm stats threshold: 8\n    cpu: 3\n              count: 0\n              high:  0\n              batch: 1\n  vm stats threshold: 8\n    cpu: 4\n              count: 0\n              high:  0\n              batch: 1\n  vm stats threshold: 8\n    cpu: 5\n              count: 0\n              high:  0\n              batch: 1\n  vm stats threshold: 8\n    cpu: 6\n              count: 0\n              high:  0\n              batch: 1\n  vm stats threshold: 8\n    cpu: 7\n              count: 0\n              high:  0\n              batch: 1\n  vm stats threshold: 8\n  node_unreclaimable:  0\n  start_pfn:           1\nNode 0, zone    DMA32\n  pages free     528427\n        min      1078\n        low      1600\n        high     2122\n        spanned  1044480\n        present  546847\n        managed  530339\n        protection: (0, 0, 29893, 29893, 29893)\n      nr_free_pages 528427\n      nr_zone_inactive_anon 0\n      nr_zone_active_anon 0\n      nr_zone_inactive_file 0\n      nr_zone_active_file 0\n      nr_zone_unevictable 0\n      nr_zone_write_pending 0\n      nr_mlock     0\n      nr_page_table_pages 0\n      nr_kernel_stack 0\n      nr_bounce    0\n      nr_zspages   0\n      nr_free_cma  0\n      numa_hit     13\n      numa_miss    0\n      numa_foreign 0\n      numa_interleave 1\n      numa_local   13\n      numa_other   0\n  pagesets\n    cpu: 0\n              count: 357\n              high:  378\n              batch: 63\n  vm stats threshold: 48\n    cpu: 1\n              count: 0\n              high:  378\n              batch: 63\n  vm stats threshold: 48\n    cpu: 2\n              count: 338\n              high:  378\n              batch: 63\n  vm stats threshold: 48\n    cpu: 3\n              count: 0\n              high:  378\n              batch: 63\n  vm stats threshold: 48\n    cpu: 4\n              count: 62\n              high:  378\n              batch: 63\n  vm stats threshold: 48\n    cpu: 5\n              count: 63\n              high:  378\n              batch: 63\n  vm stats threshold: 48\n    cpu: 6\n              count: 0\n              high:  378\n              batch: 63\n  vm stats threshold: 48\n    cpu: 7\n              count: 63\n              high:  378\n              batch: 63\n  vm stats threshold: 48\n  node_unreclaimable:  0\n  start_pfn:           4096\nNode 0, zone   Normal\n  pages free     4539739\n        min      15809\n        low      23461\n        high     31113\n        spanned  7806976\n        present  7806976\n        managed  7654794\n        protection: (0, 0, 0, 0, 0)\n      nr_free_pages 4539739\n      nr_zone_inactive_anon 95612\n      nr_zone_active_anon 1175853\n      nr_zone_inactive_file 723339\n      nr_zone_active_file 688810\n      nr_zone_unevictable 213111\n      nr_zone_write_pending 103\n      nr_mlock     12\n      nr_page_table_pages 13921\n      nr_kernel_stack 18864\n      nr_bounce    0\n      nr_zspages   0\n      nr_free_cma  0\n      numa_hit     62836441\n      numa_miss    0\n      numa_foreign 0\n      numa_interleave 23174\n      numa_local   62836441\n      numa_other   0\n  pagesets\n    cpu: 0\n              count: 351\n              high:  378\n              batch: 63\n  vm stats threshold: 72\n    cpu: 1\n              count: 112\n              high:  378\n              batch: 63\n  vm stats threshold: 72\n    cpu: 2\n              count: 368\n              high:  378\n              batch: 63\n  vm stats threshold: 72\n    cpu: 3\n              count: 358\n              high:  378\n              batch: 63\n  vm stats threshold: 72\n    cpu: 4\n              count: 304\n              high:  378\n              batch: 63\n  vm stats threshold: 72\n    cpu: 5\n              count: 112\n              high:  378\n              batch: 63\n  vm stats threshold: 72\n    cpu: 6\n              count: 488\n              high:  378\n              batch: 63\n  vm stats threshold: 72\n    cpu: 7\n              count: 342\n              high:  378\n              batch: 63\n  vm stats threshold: 72\n  node_unreclaimable:  0\n  start_pfn:           1048576\nNode 0, zone  Movable\n  pages free     0\n        min      0\n        low      0\n        high     0\n        spanned  0\n        present  0\n        managed  0\n        protection: (0, 0, 0, 0, 0)\nNode 0, zone   Device\n  pages free     0\n        min      0\n        low      0\n        high     0\n        spanned  0\n        present  0\n        managed  0\n        protection: (0, 0, 0, 0, 0)"
  },
  {
    "path": "collector/fixtures/qdisc/results.json",
    "content": "[\n    {\n        \"IfaceName\": \"wlan0\",\n        \"Bytes\": 42,\n        \"Packets\": 42,\n        \"Requeues\": 1,\n        \"Kind\": \"fq\",\n        \"Drops\": 1\n    },\n    {\n        \"IfaceName\": \"eth0\",\n        \"Bytes\": 83,\n        \"Packets\": 83,\n        \"Requeues\": 2,\n        \"Kind\": \"pfifo_fast\"\n    }\n]\n"
  },
  {
    "path": "collector/fixtures/sys.ttar",
    "content": "# Archive created by ttar -C collector/fixtures -c -f collector/fixtures/sys.ttar sys\nDirectory: sys\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md0/md\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/array_state\nLines: 1\nclean\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/chunk_size\nLines: 1\n524288\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md0/md/dev-sdg\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/dev-sdg/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md0/md/dev-sdh\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/dev-sdh/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/level\nLines: 1\nraid0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/metadata_version\nLines: 1\n1.2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/raid_disks\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md0/md/rd0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/rd0/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md0/md/rd1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/rd1/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md0/md/uuid\nLines: 1\n155f29ff-1716-4107-b362-52307ef86cac\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md1/md\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/array_state\nLines: 1\nclean\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/chunk_size\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/degraded\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md1/md/dev-sdi\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/dev-sdi/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md1/md/dev-sdj\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/dev-sdj/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/level\nLines: 1\nraid1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/metadata_version\nLines: 1\n1.2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/raid_disks\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md1/md/rd0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/rd0/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md1/md/rd1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/rd1/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/sync_action\nLines: 1\nidle\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/sync_completed\nLines: 1\nnone\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md1/md/uuid\nLines: 1\n0fbf5f2c-add2-43c2-bd78-a4be3ab709ef\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/array_state\nLines: 1\nclean\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/chunk_size\nLines: 1\n524288\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/degraded\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md/dev-sdu\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/dev-sdu/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md/dev-sdv\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/dev-sdv/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md/dev-sdw\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/dev-sdw/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md/dev-sdx\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/dev-sdx/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/level\nLines: 1\nraid10\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/metadata_version\nLines: 1\n1.2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/raid_disks\nLines: 1\n4\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md/rd0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/rd0/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md/rd1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/rd1/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md/rd2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/rd2/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md10/md/rd3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/rd3/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/sync_action\nLines: 1\nidle\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/sync_completed\nLines: 1\nnone\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md10/md/uuid\nLines: 1\n0c15f7e7-b159-4b1f-a5cd-a79b5c04b6f5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md4/md\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/array_state\nLines: 1\nclean\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/chunk_size\nLines: 1\n524288\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/degraded\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md4/md/dev-sdk\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/dev-sdk/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md4/md/dev-sdl\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/dev-sdl/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md4/md/dev-sdm\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/dev-sdm/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/level\nLines: 1\nraid4\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/metadata_version\nLines: 1\n1.2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/raid_disks\nLines: 1\n3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md4/md/rd0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/rd0/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md4/md/rd1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/rd1/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md4/md/rd2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/rd2/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/sync_action\nLines: 1\nidle\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/sync_completed\nLines: 1\nnone\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md4/md/uuid\nLines: 1\n67f415d5-2c0c-4b69-8e0d-7e20ef553457\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5/md\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/array_state\nLines: 1\nclean\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/chunk_size\nLines: 1\n524288\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/degraded\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5/md/dev-sdaa\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/dev-sdaa/state\nLines: 1\nspare\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5/md/dev-sdn\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/dev-sdn/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5/md/dev-sdo\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/dev-sdo/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5/md/dev-sdp\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/dev-sdp/state\nLines: 1\nfaulty\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/level\nLines: 1\nraid5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/metadata_version\nLines: 1\n1.2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/raid_disks\nLines: 1\n3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5/md/rd0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/rd0/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5/md/rd1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/rd1/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md5/md/rd2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/rd2/state\nLines: 1\nfaulty\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/sync_action\nLines: 1\nidle\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/sync_completed\nLines: 1\nnone\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md5/md/uuid\nLines: 1\n7615b98d-f2ba-4d99-bee8-6202d8e130b9\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/array_state\nLines: 1\nactive\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/chunk_size\nLines: 1\n524288\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/degraded\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md/dev-sdq\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/dev-sdq/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md/dev-sdr\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/dev-sdr/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md/dev-sds\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/dev-sds/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md/dev-sdt\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/dev-sdt/state\nLines: 1\nspare\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/level\nLines: 1\nraid6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/metadata_version\nLines: 1\n1.2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/raid_disks\nLines: 1\n4\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md/rd0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/rd0/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md/rd1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/rd1/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md/rd2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/rd2/state\nLines: 1\nin_sync\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/md6/md/rd3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/rd3/state\nLines: 1\nspare\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/sync_action\nLines: 1\nrecover\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/sync_completed\nLines: 1\n1569888 / 2093056\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/md6/md/uuid\nLines: 1\n5f529b25-6efd-46e4-99a2-31f6f597be6b\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/sda\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/sda/queue\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/add_random\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/chunk_sectors\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/dax\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/discard_granularity\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/discard_max_bytes\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/discard_max_hw_bytes\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/discard_zeroes_data\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/fua\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/hw_sector_size\nLines: 1\n512\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/io_poll\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/io_poll_delay\nLines: 1\n-1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/io_timeout\nLines: 1\n30000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/block/sda/queue/iosched\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/back_seek_max\nLines: 1\n16384\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/back_seek_penalty\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/fifo_expire_async\nLines: 1\n250\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/fifo_expire_sync\nLines: 1\n125\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/low_latency\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/max_budget\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/slice_idle\nLines: 1\n8\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/slice_idle_us\nLines: 1\n8000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/strict_guarantees\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iosched/timeout_sync\nLines: 1\n125\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/iostats\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/logical_block_size\nLines: 1\n512\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/max_discard_segments\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/max_hw_sectors_kb\nLines: 1\n32767\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/max_integrity_segments\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/max_sectors_kb\nLines: 1\n1280\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/max_segment_size\nLines: 1\n65536\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/max_segments\nLines: 1\n168\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/minimum_io_size\nLines: 1\n512\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/nomerges\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/nr_requests\nLines: 1\n64\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/nr_zones\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/optimal_io_size\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/physical_block_size\nLines: 1\n512\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/read_ahead_kb\nLines: 1\n128\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/rotational\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/rq_affinity\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/scheduler\nLines: 1\nmq-deadline kyber [bfq] none\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/wbt_lat_usec\nLines: 1\n75000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/write_cache\nLines: 1\nwrite back\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/write_same_max_bytes\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/write_zeroes_max_bytes\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/block/sda/queue/zoned\nLines: 1\nnone\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/bus\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/bus/cpu\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/bus/cpu/devices\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/cpu/devices/cpu0\nSymlinkTo: ../../../devices/system/cpu/cpu0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/cpu/devices/cpu1\nSymlinkTo: ../../../devices/system/cpu/cpu1\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/cpu/devices/cpu2\nSymlinkTo: ../../../devices/system/cpu/cpu2\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/cpu/devices/cpu3\nSymlinkTo: ../../../devices/system/cpu/cpu3\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/bus/node\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/bus/node/devices\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/node/devices/node0\nSymlinkTo: ../../../devices/system/node/node0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/node/devices/node1\nSymlinkTo: ../../../devices/system/node/node1\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/bus/pci\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/bus/pci/devices\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/pci/devices/0000:00:02.1\nSymlinkTo: ../../../devices/pci0000:00/0000:00:02.1\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/pci/devices/0000:01:00.0\nSymlinkTo: ../../../devices/pci0000:00/0000:00:02.1/0000:01:00.0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/bus/pci/devices/0000:45:00.0\nSymlinkTo: ../../../devices/pci0000:40/0000:40:01.3/0000:45:00.0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/dmi\nMode: 775\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/dmi/id\nMode: 775\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/bios_date\nLines: 1\n04/12/2021\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/bios_release\nLines: 1\n2.2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/bios_vendor\nLines: 1\nDell Inc.\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/bios_version\nLines: 1\n2.2.4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/board_name\nLines: 1\n07PXPY\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/board_serial\nLines: 1\n.7N62AI2.GRTCL6944100GP.\nMode: 400\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/board_vendor\nLines: 1\nDell Inc.\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/board_version\nLines: 1\nA01\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/chassis_asset_tag\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/chassis_serial\nLines: 1\n7N62AI2\nMode: 400\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/chassis_type\nLines: 1\n23\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/chassis_vendor\nLines: 1\nDell Inc.\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/chassis_version\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/modalias\nLines: 1\ndmi:bvnDellInc.:bvr2.2.4:bd04/12/2021:br2.2:svnDellInc.:pnPowerEdgeR6515:pvr:rvnDellInc.:rn07PXPY:rvrA01:cvnDellInc.:ct23:cvr:\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/product_family\nLines: 1\nPowerEdge\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/product_name\nLines: 1\nPowerEdge R6515\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/product_serial\nLines: 1\n7N62AI2\nMode: 400\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/product_sku\nLines: 1\nSKU=NotProvided;ModelName=PowerEdge R6515\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/product_uuid\nLines: 1\n83340ca8-cb49-4474-8c29-d2088ca84dd9\nMode: 400\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/product_version\nLines: 1\n�\u001c[�\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/sys_vendor\nLines: 1\nDell Inc.\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/dmi/id/uevent\nLines: 1\nMODALIAS=dmi:bvnDellInc.:bvr2.2.4:bd04/12/2021:br2.2:svnDellInc.:pnPowerEdgeR6515:pvr:rvnDellInc.:rn07PXPY:rvrA01:cvnDellInc.:ct23:cvr:\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/fc_host\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/fc_host/host0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/dev_loss_tmo\nLines: 1\n30\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/fabric_name\nLines: 1\n0x0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/node_name\nLines: 1\n0x2000e0071bce95f2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/port_id\nLines: 1\n0x000002\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/port_name\nLines: 1\n0x1000e0071bce95f2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/port_state\nLines: 1\nOnline\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/port_type\nLines: 1\nPoint-To-Point (direct nport connection)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/speed\nLines: 1\n16 Gbit\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/fc_host/host0/statistics\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/dumped_frames\nLines: 1\n0xffffffffffffffff\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/error_frames\nLines: 1\n0x0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/fcp_packet_aborts\nLines: 1\n0x13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/invalid_crc_count\nLines: 1\n0x2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/invalid_tx_word_count\nLines: 1\n0x8\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/link_failure_count\nLines: 1\n0x9\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/loss_of_signal_count\nLines: 1\n0x11\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/loss_of_sync_count\nLines: 1\n0x10\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/nos_count\nLines: 1\n0x12\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/rx_frames\nLines: 1\n0x3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/rx_words\nLines: 1\n0x4\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/seconds_since_last_reset\nLines: 1\n0x7\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/tx_frames\nLines: 1\n0x5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/statistics/tx_words\nLines: 1\n0x6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/supported_classes\nLines: 1\nClass 3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/supported_speeds\nLines: 1\n4 Gbit, 8 Gbit, 16 Gbit\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host0/symbolic_name\nLines: 1\nEmulex SN1100E2P FV12.4.270.3 DV12.4.0.0. HN:gotest. OS:Linux\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/fc_host/host1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/speed\nLines: 1\n8 Gbit\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/fc_host/host1/statistics\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/dumped_frames\nLines: 1\n0x0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/error_frames\nLines: 1\n0x13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/fcp_packet_aborts\nLines: 1\n0xffffffffffffffff\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/invalid_crc_count\nLines: 1\n0x20\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/invalid_tx_word_count\nLines: 1\n0x80\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/link_failure_count\nLines: 1\n0x90\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/loss_of_signal_count\nLines: 1\n0x110\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/loss_of_sync_count\nLines: 1\n0x100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/nos_count\nLines: 1\n0x120\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/rx_frames\nLines: 1\n0x30\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/rx_words\nLines: 1\n0x40\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/seconds_since_last_reset\nLines: 1\n0x70\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/tx_frames\nLines: 1\n0x50\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/fc_host/host1/statistics/tx_words\nLines: 1\n0x60\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/hwmon\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon0\nSymlinkTo: ../../devices/platform/coretemp.0/hwmon/hwmon0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon1\nSymlinkTo: ../../devices/platform/coretemp.1/hwmon/hwmon1\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon2\nSymlinkTo: ../../devices/platform/applesmc.768/hwmon/hwmon2\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon3\nSymlinkTo: ../../devices/platform/nct6775.656/hwmon/hwmon3\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/hwmon/hwmon4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/freq1_input\nLines: 1\n214000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/freq1_label\nLines: 1\nsclk\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/freq2_input\nLines: 1\n300000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/freq2_label\nLines: 1\nmclk\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp1_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp1_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp1_input\nLines: 1\n55000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp1_label\nLines: 1\nfoosensor\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp1_max\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp2_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp2_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp2_input\nLines: 1\n54000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp2_label\nLines: 1\nfoosensor\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon4/temp2_max\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/hwmon/hwmon5\nSymlinkTo: ../../devices/platform/bogus.0/hwmon/hwmon5/\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/i40iw0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/board_id\nLines: 1\nI40IW Board ID\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/fw_ver\nLines: 1\n0.2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/hca_type\nLines: 1\nI40IW\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/i40iw0/ports\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/i40iw0/ports/1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/i40iw0/ports/1/counters\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/VL15_dropped\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/excessive_buffer_overrun_errors\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/link_downed\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/link_error_recovery\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/local_link_integrity_errors\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_rcv_constraint_errors\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_rcv_data\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_rcv_errors\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_rcv_packets\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_rcv_remote_physical_errors\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_rcv_switch_relay_errors\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_xmit_constraint_errors\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_xmit_data\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_xmit_discards\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_xmit_packets\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/port_xmit_wait\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/counters/symbol_error\nLines: 1\nN/A (no PMA)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/link_layer\nLines: 1\nInfiniBand\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/phys_state\nLines: 1\n5: LinkUp\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/rate\nLines: 1\n10 Gb/sec (4X)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/i40iw0/ports/1/state\nLines: 1\n4: ACTIVE\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/mlx4_0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/board_id\nLines: 1\nSM_1141000001000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/fw_ver\nLines: 1\n2.31.5050\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/hca_type\nLines: 1\nMT4099\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/mlx4_0/ports\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/mlx4_0/ports/1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/mlx4_0/ports/1/counters\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/link_downed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/link_error_recovery\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/multicast_rcv_packets\nLines: 1\n93\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/multicast_xmit_packets\nLines: 1\n16\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_constraint_errors\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_data\nLines: 1\n4631917\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_discards\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_errors\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_rcv_packets\nLines: 1\n6825908347\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_constraint_errors\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_data\nLines: 1\n3733440\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_discards\nLines: 1\n5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_packets\nLines: 1\n6235865\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/port_xmit_wait\nLines: 1\n4294967295\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/unicast_rcv_packets\nLines: 1\n61148\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters/unicast_xmit_packets\nLines: 1\n61239\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/mlx4_0/ports/1/counters_ext\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters_ext/port_multicast_rcv_packets\nLines: 1\n93\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters_ext/port_multicast_xmit_packets\nLines: 1\n16\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters_ext/port_rcv_data_64\nLines: 1\n4631917\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters_ext/port_rcv_packets_64\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters_ext/port_unicast_rcv_packets\nLines: 1\n61148\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters_ext/port_unicast_xmit_packets\nLines: 1\n61239\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters_ext/port_xmit_data_64\nLines: 1\n3733440\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/counters_ext/port_xmit_packets_64\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/link_layer\nLines: 1\nInfiniBand\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/phys_state\nLines: 1\n5: LinkUp\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/rate\nLines: 1\n40 Gb/sec (4X QDR)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/1/state\nLines: 1\n4: ACTIVE\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/mlx4_0/ports/2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/mlx4_0/ports/2/counters\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters/link_downed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters/link_error_recovery\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters/multicast_rcv_packets\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters/multicast_xmit_packets\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters/port_rcv_data\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters/port_xmit_data\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters/unicast_rcv_packets\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters/unicast_xmit_packets\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/infiniband/mlx4_0/ports/2/counters_ext\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters_ext/port_multicast_rcv_packets\nLines: 1\n93\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters_ext/port_multicast_xmit_packets\nLines: 1\n16\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters_ext/port_rcv_data_64\nLines: 1\n4631917\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters_ext/port_rcv_packets_64\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters_ext/port_unicast_rcv_packets\nLines: 1\n61148\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters_ext/port_unicast_xmit_packets\nLines: 1\n61239\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters_ext/port_xmit_data_64\nLines: 1\n3733440\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/counters_ext/port_xmit_packets_64\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/link_layer\nLines: 1\nInfiniBand\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/phys_state\nLines: 1\n5: LinkUp\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/rate\nLines: 1\n40 Gb/sec (4X QDR)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/infiniband/mlx4_0/ports/2/state\nLines: 1\n4: ACTIVE\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/bond0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/addr_assign_type\nLines: 1\n3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/addr_len\nLines: 1\n6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/address\nLines: 1\n01:01:01:01:01:01\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/bond0/bonding\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/bonding/slaves\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/broadcast\nLines: 1\nff:ff:ff:ff:ff:ff\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/carrier\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/carrier_changes\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/carrier_down_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/carrier_up_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/dev_id\nLines: 1\n0x20\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/dormant\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/duplex\nLines: 1\nfull\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/flags\nLines: 1\n0x1303\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/ifalias\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/ifindex\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/iflink\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/link_mode\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/mtu\nLines: 1\n1500\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/name_assign_type\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/netdev_group\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/operstate\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/phys_port_id\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/phys_port_name\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/phys_switch_id\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/speed\nLines: 1\n-1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/tx_queue_len\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bond0/type\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/bonding_masters\nLines: 1\nbond0 dmz int\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/dmz\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/addr_assign_type\nLines: 1\n3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/addr_len\nLines: 1\n6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/address\nLines: 1\n01:01:01:01:01:01\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/dmz/bonding\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/bonding/slaves\nLines: 1\neth0 eth4\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/broadcast\nLines: 1\nff:ff:ff:ff:ff:ff\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/carrier\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/carrier_changes\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/carrier_down_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/carrier_up_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/dev_id\nLines: 1\n0x20\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/dormant\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/duplex\nLines: 1\nfull\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/flags\nLines: 1\n0x1303\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/ifalias\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/ifindex\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/iflink\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/link_mode\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/mtu\nLines: 1\n1500\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/name_assign_type\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/netdev_group\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/operstate\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/phys_port_id\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/phys_port_name\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/phys_switch_id\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/dmz/slave_eth0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/dmz/slave_eth0/bonding_slave\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/slave_eth0/bonding_slave/mii_status\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/slave_eth0/operstate\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/dmz/slave_eth4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/dmz/slave_eth4/bonding_slave\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/slave_eth4/bonding_slave/mii_status\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/slave_eth4/operstate\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/speed\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/tx_queue_len\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/dmz/type\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/eth0\nSymlinkTo: ../../devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/int\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/addr_assign_type\nLines: 1\n3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/addr_len\nLines: 1\n6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/address\nLines: 1\n01:01:01:01:01:01\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/int/bonding\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/bonding/slaves\nLines: 1\neth5 eth1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/broadcast\nLines: 1\nff:ff:ff:ff:ff:ff\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/carrier\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/carrier_changes\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/carrier_down_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/carrier_up_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/dev_id\nLines: 1\n0x20\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/dormant\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/duplex\nLines: 1\nfull\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/flags\nLines: 1\n0x1303\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/ifalias\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/ifindex\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/iflink\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/link_mode\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/mtu\nLines: 1\n1500\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/name_assign_type\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/netdev_group\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/operstate\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/phys_port_id\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/phys_port_name\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/phys_switch_id\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/int/slave_eth1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/int/slave_eth1/bonding_slave\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/slave_eth1/bonding_slave/mii_status\nLines: 1\ndown\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/slave_eth1/operstate\nLines: 1\ndown\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/int/slave_eth5\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/net/int/slave_eth5/bonding_slave\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/slave_eth5/bonding_slave/mii_status\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/slave_eth5/operstate\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/speed\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/tx_queue_len\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/net/int/type\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/nvme\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/nvme/nvme0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/cntlid\nLines: 1\n1997\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/firmware_rev\nLines: 1\n1B2QEXP7\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/model\nLines: 1\nSamsung SSD 970 PRO 512GB\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/serial\nLines: 1\nS680HF8N190894I\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/state\nLines: 1\nlive\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/nvme/nvme0/nvme0c0n0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/nvme0c0n0/ana_state\nLines: 1\noptimized\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/nvme0c0n0/size\nLines: 1\n3906250000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/nvme0c0n0/nuse\nLines: 1\n488281250\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/nvme/nvme0/nvme0c0n0/queue\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/nvme/nvme0/nvme0c0n0/queue/logical_block_size\nLines: 1\n4096\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/power_supply\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/power_supply/AC\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/online\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/power_supply/AC/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_abort_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_active\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_active_count\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_expire_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_last_time_ms\nLines: 1\n7888\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_max_time_ms\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_prevent_sleep_time_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/power/wakeup_total_time_ms\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/type\nLines: 1\nMains\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/AC/uevent\nLines: 2\nPOWER_SUPPLY_NAME=AC\nPOWER_SUPPLY_ONLINE=0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/power_supply/BAT0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/alarm\nLines: 1\n2253000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/capacity\nLines: 1\n81\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/capacity_level\nLines: 1\nNormal\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/charge_start_threshold\nLines: 1\n95\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/charge_stop_threshold\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/cycle_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/energy_full\nLines: 1\n45070000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/energy_full_design\nLines: 1\n47520000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/energy_now\nLines: 1\n36580000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/manufacturer\nLines: 1\nLGC\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/model_name\nLines: 1\nLNV-45N1��\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/power_supply/BAT0/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/power_now\nLines: 1\n5002000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/present\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/serial_number\nLines: 1\n38109\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/status\nLines: 1\nDischarging\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/technology\nLines: 1\nLi-ion\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/type\nLines: 1\nBattery\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/uevent\nLines: 16\nPOWER_SUPPLY_NAME=BAT0\nPOWER_SUPPLY_STATUS=Discharging\nPOWER_SUPPLY_PRESENT=1\nPOWER_SUPPLY_TECHNOLOGY=Li-ion\nPOWER_SUPPLY_CYCLE_COUNT=0\nPOWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000\nPOWER_SUPPLY_VOLTAGE_NOW=11660000\nPOWER_SUPPLY_POWER_NOW=5002000\nPOWER_SUPPLY_ENERGY_FULL_DESIGN=47520000\nPOWER_SUPPLY_ENERGY_FULL=45070000\nPOWER_SUPPLY_ENERGY_NOW=36580000\nPOWER_SUPPLY_CAPACITY=81\nPOWER_SUPPLY_CAPACITY_LEVEL=Normal\nPOWER_SUPPLY_MODEL_NAME=LNV-45N1\nPOWER_SUPPLY_MANUFACTURER=LGC\nPOWER_SUPPLY_SERIAL_NUMBER=38109\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/voltage_min_design\nLines: 1\n10800000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/power_supply/BAT0/voltage_now\nLines: 1\n11660000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/powercap\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/powercap/intel-rapl\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl/enabled\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/powercap/intel-rapl:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/constraint_0_max_power_uw\nLines: 1\n95000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/constraint_0_name\nLines: 1\nlong_term\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw\nLines: 1\n4090000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/constraint_0_time_window_us\nLines: 1\n999424\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/constraint_1_max_power_uw\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/constraint_1_name\nLines: 1\nshort_term\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw\nLines: 1\n4090000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/constraint_1_time_window_us\nLines: 1\n2440\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/enabled\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/energy_uj\nLines: 1\n240422366267\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/max_energy_range_uj\nLines: 1\n262143328850\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/name\nLines: 1\npackage-0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/powercap/intel-rapl:0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/constraint_0_max_power_uw\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/constraint_0_name\nLines: 1\nlong_term\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/constraint_0_power_limit_uw\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/constraint_0_time_window_us\nLines: 1\n976\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/enabled\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/energy_uj\nLines: 1\n118821284256\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/max_energy_range_uj\nLines: 1\n262143328850\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/name\nLines: 1\ncore\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/powercap/intel-rapl:0:0/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/scsi_tape\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/scsi_tape/nst0\nSymlinkTo: ../../devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/scsi_tape/nst0a\nSymlinkTo: ../../devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/scsi_tape/nst0l\nSymlinkTo: ../../devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/scsi_tape/nst0m\nSymlinkTo: ../../devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/scsi_tape/st0\nSymlinkTo: ../../devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/scsi_tape/st0a\nSymlinkTo: ../../devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/scsi_tape/st0l\nSymlinkTo: ../../devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/scsi_tape/st0m\nSymlinkTo: ../../devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/thermal\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/thermal/cooling_device0\nSymlinkTo: ../../devices/virtual/thermal/cooling_device0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/thermal/thermal_zone0\nSymlinkTo: ../../devices/virtual/thermal/thermal_zone0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/watchdog\nMode: 775\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/watchdog/watchdog0\nMode: 775\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/access_cs0\nLines: 1\n0EOF\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/bootstatus\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/fw_version\nLines: 1\n2EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/identity\nLines: 1\nSoftware WatchdogEOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/nowayout\nLines: 1\n0EOF\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/options\nLines: 1\n0x8380EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/pretimeout\nLines: 1\n120EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/pretimeout_governor\nLines: 1\nnoopEOF\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/state\nLines: 1\nactiveEOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/status\nLines: 1\n0x8000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/timeleft\nLines: 1\n300EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/class/watchdog/watchdog0/timeout\nLines: 1\n60EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/class/watchdog/watchdog1\nMode: 775\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/in_flight\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/io_ns\nLines: 1\n9247011087720EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/other_cnt\nLines: 1\n1409EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/read_byte_cnt\nLines: 1\n979383912EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/read_cnt\nLines: 1\n3741EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/read_ns\nLines: 1\n33788355744EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/resid_cnt\nLines: 1\n19EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/write_byte_cnt\nLines: 1\n1496246784000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/write_cnt\nLines: 1\n53772916EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0/stats/write_ns\nLines: 1\n5233597394395EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/in_flight\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/io_ns\nLines: 1\n9247011087720EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/other_cnt\nLines: 1\n1409EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/read_byte_cnt\nLines: 1\n979383912EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/read_cnt\nLines: 1\n3741EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/read_ns\nLines: 1\n33788355744EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/resid_cnt\nLines: 1\n19EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/write_byte_cnt\nLines: 1\n1496246784000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/write_cnt\nLines: 1\n53772916EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0a/stats/write_ns\nLines: 1\n5233597394395EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/in_flight\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/io_ns\nLines: 1\n9247011087720EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/other_cnt\nLines: 1\n1409EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/read_byte_cnt\nLines: 1\n979383912EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/read_cnt\nLines: 1\n3741EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/read_ns\nLines: 1\n33788355744EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/resid_cnt\nLines: 1\n19EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/write_byte_cnt\nLines: 1\n1496246784000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/write_cnt\nLines: 1\n53772916EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0l/stats/write_ns\nLines: 1\n5233597394395EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/in_flight\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/io_ns\nLines: 1\n9247011087720EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/other_cnt\nLines: 1\n1409EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/read_byte_cnt\nLines: 1\n979383912EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/read_cnt\nLines: 1\n3741EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/read_ns\nLines: 1\n33788355744EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/resid_cnt\nLines: 1\n19EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/write_byte_cnt\nLines: 1\n1496246784000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/write_cnt\nLines: 1\n53772916EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/nst0m/stats/write_ns\nLines: 1\n5233597394395EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/in_flight\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/io_ns\nLines: 1\n9247011087720EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/other_cnt\nLines: 1\n1409EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/read_byte_cnt\nLines: 1\n979383912EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/read_cnt\nLines: 1\n3741EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/read_ns\nLines: 1\n33788355744EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/resid_cnt\nLines: 1\n19EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/write_byte_cnt\nLines: 1\n1496246784000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/write_cnt\nLines: 1\n53772916EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0/stats/write_ns\nLines: 1\n5233597394395EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/in_flight\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/io_ns\nLines: 1\n9247011087720EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/other_cnt\nLines: 1\n1409EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/read_byte_cnt\nLines: 1\n979383912EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/read_cnt\nLines: 1\n3741EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/read_ns\nLines: 1\n33788355744EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/resid_cnt\nLines: 1\n19EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/write_byte_cnt\nLines: 1\n1496246784000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/write_cnt\nLines: 1\n53772916EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0a/stats/write_ns\nLines: 1\n5233597394395EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/in_flight\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/io_ns\nLines: 1\n9247011087720EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/other_cnt\nLines: 1\n1409EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/read_byte_cnt\nLines: 1\n979383912EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/read_cnt\nLines: 1\n3741EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/read_ns\nLines: 1\n33788355744EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/resid_cnt\nLines: 1\n19EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/write_byte_cnt\nLines: 1\n1496246784000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/write_cnt\nLines: 1\n53772916EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0l/stats/write_ns\nLines: 1\n5233597394395EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/in_flight\nLines: 1\n1EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/io_ns\nLines: 1\n9247011087720EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/other_cnt\nLines: 1\n1409EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/read_byte_cnt\nLines: 1\n979383912EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/read_cnt\nLines: 1\n3741EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/read_ns\nLines: 1\n33788355744EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/resid_cnt\nLines: 1\n19EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/write_byte_cnt\nLines: 1\n1496246784000EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/write_cnt\nLines: 1\n53772916EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:00.0/host0/port-0:0/end_device-0:0/target0:0:0/0:0:0:0/scsi_tape/st0m/stats/write_ns\nLines: 1\n5233597394395EOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/driver\nSymlinkTo: ../../../../bus/pci_express/drivers/pcie_pme\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/power/async\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/subsystem\nSymlinkTo: ../../../../bus/pci_express\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie001/uevent\nLines: 1\nDRIVER=pcie_pme\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010/power/async\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010/subsystem\nSymlinkTo: ../../../../bus/pci_express\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:00:02.1:pcie010/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/aer_dev_correctable\nLines: 9\nRxErr 0\nBadTLP 0\nBadDLLP 0\nRollover 0\nTimeout 0\nNonFatalErr 0\nCorrIntErr 0\nHeaderOF 0\nTOTAL_ERR_COR 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/aer_dev_fatal\nLines: 19\nUndefined 0\nDLP 0\nSDES 0\nTLP 0\nFCP 0\nCmpltTO 0\nCmpltAbrt 0\nUnxCmplt 0\nRxOF 0\nMalfTLP 0\nECRC 0\nUnsupReq 0\nACSViol 0\nUncorrIntErr 0\nBlockedTLP 0\nAtomicOpBlocked 0\nTLPBlockedErr 0\nPoisonTLPBlocked 0\nTOTAL_ERR_FATAL 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/aer_dev_nonfatal\nLines: 19\nUndefined 0\nDLP 0\nSDES 0\nTLP 0\nFCP 0\nCmpltTO 0\nCmpltAbrt 0\nUnxCmplt 0\nRxOF 0\nMalfTLP 0\nECRC 0\nUnsupReq 0\nACSViol 0\nUncorrIntErr 0\nBlockedTLP 0\nAtomicOpBlocked 0\nTLPBlockedErr 0\nPoisonTLPBlocked 0\nTOTAL_ERR_NONFATAL 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/ari_enabled\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/broken_parity_status\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/class\nLines: 1\n0x010802\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/config\nLines: 2\n��\nT\u0006\u0004\u0010NULLBYTE\u0001\u0002\b\u0001\bNULLBYTENULLBYTENULLBYTE\u0004NULLBYTE��NULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTE��!PNULLBYTENULLBYTENULLBYTENULLBYTE�NULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTE�\u0001NULLBYTENULLBYTEEOF\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/consistent_dma_mask_bits\nLines: 1\n64\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/current_link_speed\nLines: 1\n8.0 GT/s PCIe\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/current_link_width\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/d3cold_allowed\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/device\nLines: 1\n0x540a\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/dma_mask_bits\nLines: 1\n64\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/driver\nSymlinkTo: ../../../../bus/pci/drivers/nvme\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/driver_override\nLines: 1\n(null)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/enable\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/firmware_node\nSymlinkTo: ../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:16/device:17\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/iommu\nSymlinkTo: ../../0000:00:00.2/iommu/ivhd0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/iommu_group\nSymlinkTo: ../../../../kernel/iommu_groups/11\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/irq\nLines: 1\n80\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/link\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/local_cpulist\nLines: 1\n0-15\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/local_cpus\nLines: 1\nffff\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/max_link_speed\nLines: 1\n16.0 GT/s PCIe\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/max_link_width\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/modalias\nLines: 1\npci:v0000C0A9d0000540Asv0000C0A9sd00005021bc01sc08i02\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_bus\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/81\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/82\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/83\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/84\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/85\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/86\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/87\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/88\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/msi_irqs/89\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/numa_node\nLines: 1\n-1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/address\nLines: 1\n0000:01:00.0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/cntlid\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/cntrltype\nLines: 1\nio\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/dctype\nLines: 1\nnone\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/dev\nLines: 1\n240:0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/device\nSymlinkTo: ../../../0000:01:00.0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/firmware_rev\nLines: 1\nP9CR30A \nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/device\nSymlinkTo: ../../nvme0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/name\nLines: 1\nnvme\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/subsystem\nSymlinkTo: ../../../../../../../class/hwmon\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp1_alarm\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp1_crit\nLines: 1\n94850\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp1_input\nLines: 1\n43850\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp1_label\nLines: 1\nComposite\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp1_max\nLines: 1\n84850\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp1_min\nLines: 1\n-150\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp2_input\nLines: 1\n43850\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp2_label\nLines: 1\nSensor 1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp2_max\nLines: 1\n65261850\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp2_min\nLines: 1\n-273150\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp3_input\nLines: 1\n45850\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp3_label\nLines: 1\nSensor 2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp3_max\nLines: 1\n65261850\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp3_min\nLines: 1\n-273150\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp9_input\nLines: 1\n43850\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp9_label\nLines: 1\nSensor 8\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp9_max\nLines: 1\n65261850\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/temp9_min\nLines: 1\n-273150\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/hwmon3/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/kato\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/model\nLines: 1\nCT2000P3SSD8                            \nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/dev\nLines: 1\n239:0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/device\nSymlinkTo: ../../nvme0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/subsystem\nSymlinkTo: ../../../../../../../class/nvme-generic\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/ng0n1/uevent\nLines: 3\nMAJOR=239\nMINOR=0\nDEVNAME=ng0n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/numa_node\nLines: 1\n-1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/alignment_offset\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/bdi\nSymlinkTo: ../../../../../../virtual/bdi/259:0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/capability\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/csi\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/dev\nLines: 1\n259:0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/device\nSymlinkTo: ../../nvme0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/discard_alignment\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/diskseq\nLines: 1\n9\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/events\nLines: 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/events_async\nLines: 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/events_poll_msecs\nLines: 1\n-1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/ext_range\nLines: 1\n256\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/hidden\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/holders\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/inflight\nLines: 1\n       0        0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/integrity\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/integrity/device_is_integrity_capable\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/integrity/format\nLines: 1\nnone\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/integrity/protection_interval_bytes\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/integrity/read_verify\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/integrity/tag_size\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/integrity/write_generate\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/metadata_bytes\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/0/cpu0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/0/cpu1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/0/cpu_list\nLines: 1\n0, 1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/0/nr_reserved_tags\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/0/nr_tags\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/1/cpu2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/1/cpu3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/1/cpu_list\nLines: 1\n2, 3\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/1/nr_reserved_tags\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/1/nr_tags\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/2/cpu4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/2/cpu5\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/2/cpu_list\nLines: 1\n4, 5\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/2/nr_reserved_tags\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/2/nr_tags\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/3/cpu6\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/3/cpu7\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/3/cpu_list\nLines: 1\n6, 7\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/3/nr_reserved_tags\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/3/nr_tags\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/4/cpu8\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/4/cpu9\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/4/cpu_list\nLines: 1\n8, 9\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/4/nr_reserved_tags\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/4/nr_tags\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/5\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/5/cpu10\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/5/cpu11\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/5/cpu_list\nLines: 1\n10, 11\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/5/nr_reserved_tags\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/5/nr_tags\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/6\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/6/cpu12\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/6/cpu13\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/6/cpu_list\nLines: 1\n12, 13\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/6/nr_reserved_tags\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/6/nr_tags\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/7\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/7/cpu14\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/7/cpu15\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/7/cpu_list\nLines: 1\n14, 15\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/7/nr_reserved_tags\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/mq/7/nr_tags\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nsid\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nuse\nLines: 1\n3907029168\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/alignment_offset\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/dev\nLines: 1\n259:1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/discard_alignment\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/holders\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/inflight\nLines: 1\n       0        0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/partition\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/ro\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/size\nLines: 1\n2201600\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/start\nLines: 1\n2048\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/stat\nLines: 1\n     575     1730    14410      185        2        0        2        0        0       17      186        1        0  2184688        1        0        0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/subsystem\nSymlinkTo: ../../../../../../../../class/block\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/trace\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/trace/act_mask\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/trace/enable\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/trace/end_lba\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/trace/pid\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/trace/start_lba\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p1/uevent\nLines: 6\nMAJOR=259\nMINOR=1\nDEVNAME=nvme0n1p1\nDEVTYPE=partition\nDISKSEQ=9\nPARTN=1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/alignment_offset\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/dev\nLines: 1\n259:2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/discard_alignment\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/holders\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/inflight\nLines: 1\n       0        0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/partition\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/ro\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/size\nLines: 1\n4194304\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/start\nLines: 1\n2203648\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/stat\nLines: 1\n     144       19     8954       32       21       14      248       20        0      128      132       45        0  3566944       79        0        0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/subsystem\nSymlinkTo: ../../../../../../../../class/block\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/trace\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/trace/act_mask\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/trace/enable\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/trace/end_lba\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/trace/pid\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/trace/start_lba\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p2/uevent\nLines: 6\nMAJOR=259\nMINOR=2\nDEVNAME=nvme0n1p2\nDEVTYPE=partition\nDISKSEQ=9\nPARTN=2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/alignment_offset\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/dev\nLines: 1\n259:3\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/discard_alignment\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/holders\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/holders/dm-0\nSymlinkTo: ../../../../../../../../virtual/block/dm-0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/inflight\nLines: 1\n       0        0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/partition\nLines: 1\n3\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/ro\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/size\nLines: 1\n3900628992\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/start\nLines: 1\n6397952\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/stat\nLines: 1\n   60223    15025  4174111    24812    83879    46834  2302280    32384        0    24667    57196        0        0        0        0        0        0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/subsystem\nSymlinkTo: ../../../../../../../../class/block\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/trace\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/trace/act_mask\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/trace/enable\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/trace/end_lba\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/trace/pid\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/trace/start_lba\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/nvme0n1p3/uevent\nLines: 6\nMAJOR=259\nMINOR=3\nDEVNAME=nvme0n1p3\nDEVTYPE=partition\nDISKSEQ=9\nPARTN=3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/partscan\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/passthru_err_log_enabled\nLines: 1\noff\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/add_random\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/atomic_write_boundary_bytes\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/atomic_write_max_bytes\nLines: 1\n512\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/atomic_write_unit_max_bytes\nLines: 1\n512\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/atomic_write_unit_min_bytes\nLines: 1\n512\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/chunk_sectors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/dax\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/discard_granularity\nLines: 1\n512\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/discard_max_bytes\nLines: 1\n2199023255040\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/discard_max_hw_bytes\nLines: 1\n2199023255040\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/discard_zeroes_data\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/dma_alignment\nLines: 1\n3\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/fua\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/hw_sector_size\nLines: 1\n512\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/io_poll\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/io_poll_delay\nLines: 1\n-1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/io_timeout\nLines: 1\n30000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/iostats\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/logical_block_size\nLines: 1\n512\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/max_discard_segments\nLines: 1\n256\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/max_hw_sectors_kb\nLines: 1\n128\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/max_integrity_segments\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/max_sectors_kb\nLines: 1\n128\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/max_segment_size\nLines: 1\n4294967295\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/max_segments\nLines: 1\n33\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/minimum_io_size\nLines: 1\n512\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/nomerges\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/nr_requests\nLines: 1\n1023\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/nr_zones\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/optimal_io_size\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/physical_block_size\nLines: 1\n512\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/read_ahead_kb\nLines: 1\n128\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/rotational\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/rq_affinity\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/scheduler\nLines: 1\n[none] mq-deadline \nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/stable_writes\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/virt_boundary_mask\nLines: 1\n4095\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/wbt_lat_usec\nLines: 1\n2000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/write_cache\nLines: 1\nwrite back\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/write_same_max_bytes\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/write_zeroes_max_bytes\nLines: 1\n131072\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/zone_append_max_bytes\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/zone_write_granularity\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/queue/zoned\nLines: 1\nnone\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/range\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/removable\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/ro\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/size\nLines: 1\n3907029168\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/slaves\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/stat\nLines: 1\n   61050    16774  4202091    25036    83902    46848  2302530    32404        0    20551    64225       46        0  5751632       80     3461     6703\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/subsystem\nSymlinkTo: ../../../../../../../class/block\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/trace\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/trace/act_mask\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/trace/enable\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/trace/end_lba\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/trace/pid\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/trace/start_lba\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/uevent\nLines: 5\nMAJOR=259\nMINOR=0\nDEVNAME=nvme0n1\nDEVTYPE=disk\nDISKSEQ=9\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/nvme0n1/wwid\nLines: 1\nnvme.c0a9-323332384536454444384137-435432303030503353534438-00000001\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/passthru_err_log_enabled\nLines: 1\noff\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/pm_qos_latency_tolerance_us\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/queue_count\nLines: 1\n9\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/serial\nLines: 1\n2328E6EDD8A7        \nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/sqsize\nLines: 1\n1023\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/state\nLines: 1\nlive\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/subsysnqn\nLines: 1\nnqn.2014.08.org.nvmexpress:c0a9c0a92328E6EDD8A7        CT2000P3SSD8                            \nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/subsystem\nSymlinkTo: ../../../../../../class/nvme\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/transport\nLines: 1\npcie\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/nvme/nvme0/uevent\nLines: 4\nMAJOR=240\nMINOR=0\nDEVNAME=nvme0\nNVME_TRTYPE=pcie\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/pools\nLines: 3\npoolinfo - 0.1\nprp list 256        0   64  256  4\nprp list page       0    0 4096  0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/async\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/control\nLines: 1\non\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/runtime_active_time\nLines: 1\n3838519\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/runtime_enabled\nLines: 1\nforbidden\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/runtime_status\nLines: 1\nactive\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/runtime_usage\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup_abort_count\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup_active\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup_active_count\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup_count\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup_expire_count\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup_last_time_ms\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup_max_time_ms\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power/wakeup_total_time_ms\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/power_state\nLines: 1\nD0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/reset_method\nLines: 1\nflr bus\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/resource\nLines: 13\n0x00000000fd800000 0x00000000fd803fff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/revision\nLines: 1\n0x01\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/sriov_drivers_autoprobe\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/sriov_numvfs\nLines: 1\n4\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/sriov_totalvfs\nLines: 1\n8\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/sriov_vf_total_msix\nLines: 1\n16\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/subsystem\nSymlinkTo: ../../../../bus/pci\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/subsystem_device\nLines: 1\n0x5021\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/subsystem_vendor\nLines: 1\n0xc0a9\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/uevent\nLines: 6\nDRIVER=nvme\nPCI_CLASS=10802\nPCI_ID=C0A9:540A\nPCI_SUBSYS_ID=C0A9:5021\nPCI_SLOT_NAME=0000:01:00.0\nMODALIAS=pci:v0000C0A9d0000540Asv0000C0A9sd00005021bc01sc08i02\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/vendor\nLines: 1\n0xc0a9\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/ari_enabled\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/broken_parity_status\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/class\nLines: 1\n0x060400\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/config\nLines: 1\n\"\u00104\u0016\u0007\u0004\u0010NULLBYTENULLBYTENULLBYTE\u0004\u0006\bNULLBYTE�NULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTE\u0001\u0001NULLBYTE�\u0001NULLBYTENULLBYTE������\u0001NULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTEPNULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTENULLBYTE�NULLBYTE\u0002NULLBYTEEOF\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/consistent_dma_mask_bits\nLines: 1\n32\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/current_link_speed\nLines: 1\n8.0 GT/s PCIe\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/current_link_width\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/d3cold_allowed\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/device\nLines: 1\n0x1634\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/dma_mask_bits\nLines: 1\n32\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/driver\nSymlinkTo: ../../../bus/pci/drivers/pcieport\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/driver_override\nLines: 1\n(null)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/enable\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/firmware_node\nSymlinkTo: ../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:16\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/iommu\nSymlinkTo: ../0000:00:00.2/iommu/ivhd0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/iommu_group\nSymlinkTo: ../../../kernel/iommu_groups/2\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/irq\nLines: 1\n39\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/link\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/local_cpulist\nLines: 1\n0-15\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/local_cpus\nLines: 1\nffff\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/max_link_speed\nLines: 1\n8.0 GT/s PCIe\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/max_link_width\nLines: 1\n8\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/modalias\nLines: 1\npci:v00001022d00001634sv000017AAsd00005095bc06sc04i00\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/msi_bus\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/msi_irqs\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/msi_irqs/39\nLines: 1\nmsi\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/numa_node\nLines: 1\n-1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/pci_bus\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/cpuaffinity\nLines: 1\nffff\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/cpulistaffinity\nLines: 1\n0-15\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/device\nSymlinkTo: ../../../0000:00:02.1\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/subsystem\nSymlinkTo: ../../../../../class/pci_bus\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/pci_bus/0000:01/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:02.1/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/async\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/autosuspend_delay_ms\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/runtime_active_kids\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/runtime_active_time\nLines: 1\n3838515\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/runtime_enabled\nLines: 1\nenabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/runtime_status\nLines: 1\nactive\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup_abort_count\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup_active\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup_active_count\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup_count\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup_expire_count\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup_last_time_ms\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup_max_time_ms\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power/wakeup_total_time_ms\nLines: 1\n\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/power_state\nLines: 1\nD0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/reset_method\nLines: 1\npm\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/resource\nLines: 17\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x00000000fd800000 0x00000000fd8fffff 0x0000000000000200\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/revision\nLines: 1\n0x00\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/secondary_bus_number\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/sriov_drivers_autoprobe\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/sriov_numvfs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/sriov_totalvfs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/sriov_vf_total_msix\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/subordinate_bus_number\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/subsystem\nSymlinkTo: ../../../bus/pci\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/subsystem_device\nLines: 1\n0x5095\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/subsystem_vendor\nLines: 1\n0x17aa\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/uevent\nLines: 6\nDRIVER=pcieport\nPCI_CLASS=60400\nPCI_ID=1022:1634\nPCI_SUBSYS_ID=17AA:5095\nPCI_SLOT_NAME=0000:00:02.1\nMODALIAS=pci:v00001022d00001634sv000017AAsd00005095bc06sc04i00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:02.1/vendor\nLines: 1\n0x1022\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:03.0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/addr_assign_type\nLines: 1\n3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/addr_len\nLines: 1\n6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/address\nLines: 1\n01:01:01:01:01:01\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/broadcast\nLines: 1\nff:ff:ff:ff:ff:ff\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/carrier\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/carrier_changes\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/carrier_down_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/carrier_up_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/dev_id\nLines: 1\n0x20\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/dormant\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/duplex\nLines: 1\nfull\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/flags\nLines: 1\n0x1303\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/ifalias\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/ifindex\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/iflink\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/link_mode\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/mtu\nLines: 1\n1500\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/name_assign_type\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/netdev_group\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/operstate\nLines: 1\nup\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/phys_port_id\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/phys_port_name\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/phys_switch_id\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/speed\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/tx_queue_len\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/net/eth0/type\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/dirty_data\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/bypassed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_bypass_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_bypass_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_hit_ratio\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_hits\nLines: 1\n289\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_miss_collisions\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_day/cache_readaheads\nLines: 1\n13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/bypassed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_bypass_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_bypass_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_hit_ratio\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_miss_collisions\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_five_minute/cache_readaheads\nLines: 1\n13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/bypassed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_bypass_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_bypass_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_hit_ratio\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_miss_collisions\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_hour/cache_readaheads\nLines: 1\n13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/bypassed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_bypass_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_bypass_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_hit_ratio\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_hits\nLines: 1\n546\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_miss_collisions\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/stats_total/cache_readaheads\nLines: 1\n13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache/writeback_rate_debug\nLines: 7\nrate:           1.1M/sec\ndirty:          20.4G\ntarget:         20.4G\nproportional:   427.5k\nintegral:       790.0k\nchange:         321.5k/sec\nnext io:        17ms\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata5\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/io_errors\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/metadata_written\nLines: 1\n512\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/priority_stats\nLines: 5\nUnused:\t\t99%\nMetadata:\t0%\nAverage:\t10473\nSectors per Q:\t64\nQuantiles:\t[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946 20946]\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache/written\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/aer_dev_correctable\nLines: 9\nRxErr 0\nBadTLP 0\nBadDLLP 0\nRollover 0\nTimeout 0\nNonFatalErr 0\nCorrIntErr 0\nHeaderOF 0\nTOTAL_ERR_COR 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/aer_dev_fatal\nLines: 19\nUndefined 0\nDLP 0\nSDES 0\nTLP 0\nFCP 0\nCmpltTO 0\nCmpltAbrt 0\nUnxCmplt 0\nRxOF 0\nMalfTLP 0\nECRC 0\nUnsupReq 0\nACSViol 0\nUncorrIntErr 0\nBlockedTLP 0\nAtomicOpBlocked 0\nTLPBlockedErr 0\nPoisonTLPBlocked 0\nTOTAL_ERR_FATAL 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/aer_dev_nonfatal\nLines: 19\nUndefined 0\nDLP 0\nSDES 0\nTLP 0\nFCP 0\nCmpltTO 0\nCmpltAbrt 0\nUnxCmplt 0\nRxOF 0\nMalfTLP 0\nECRC 0\nUnsupReq 0\nACSViol 0\nUncorrIntErr 0\nBlockedTLP 0\nAtomicOpBlocked 0\nTLPBlockedErr 0\nPoisonTLPBlocked 0\nTOTAL_ERR_NONFATAL 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ari_enabled\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/broken_parity_status\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/class\nLines: 1\n0x020000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/consistent_dma_mask_bits\nLines: 1\n64\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/current_link_speed\nLines: 1\n5.0 GT/s PCIe\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/current_link_width\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/d3cold_allowed\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/device\nLines: 1\n0x1521\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/dma_mask_bits\nLines: 1\n64\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/driver\nSymlinkTo: ../../../../bus/pci/drivers/igb\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/driver_override\nLines: 1\n(null)\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/enable\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/firmware_node\nSymlinkTo: ../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:01/device:18/device:19\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/device\nSymlinkTo: ../../../0000:45:00.0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/name\nLines: 1\ni350bb\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/subsystem\nSymlinkTo: ../../../../../../class/hwmon\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/temp1_crit\nLines: 1\n110000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/temp1_input\nLines: 1\n50000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/temp1_label\nLines: 1\nloc1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/temp1_max\nLines: 1\n120000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/hwmon/hwmon0/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/modalias\nLines: 1\ni2c:i350bb\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/name\nLines: 1\ni350bb\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/async\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/subsystem\nSymlinkTo: ../../../../../../bus/i2c\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/3-007c/uevent\nLines: 1\nMODALIAS=i2c:i350bb\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/dev\nLines: 1\n89:3\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/device\nSymlinkTo: ../../../i2c-3\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/name\nLines: 1\nigb BB\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/subsystem\nSymlinkTo: ../../../../../../../class/i2c-dev\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/i2c-dev/i2c-3/uevent\nLines: 3\nMAJOR=89\nMINOR=3\nDEVNAME=i2c-3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/name\nLines: 1\nigb BB\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/power/async\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/power/runtime_enabled\nLines: 1\nenabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/power/runtime_status\nLines: 1\nsuspended\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/subsystem\nSymlinkTo: ../../../../../bus/i2c\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/i2c-3/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/iommu\nSymlinkTo: ../../0000:40:00.2/iommu/ivhd1\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/iommu_group\nSymlinkTo: ../../../../kernel/iommu_groups/25\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/irq\nLines: 1\n58\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/link\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/local_cpulist\nLines: 1\n0-63,128-191\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/local_cpus\nLines: 1\n00000000,00000000,ffffffff,ffffffff,00000000,00000000,ffffffff,ffffffff\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/max_link_speed\nLines: 1\n5.0 GT/s PCIe\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/max_link_width\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/modalias\nLines: 1\npci:v00008086d00001521sv00008086sd000000A3bc02sc00i00\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_bus\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/147\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/148\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/149\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/150\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/151\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/152\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/153\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/154\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/msi_irqs/155\nLines: 1\nmsix\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/addr_assign_type\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/addr_len\nLines: 1\n6\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/address\nLines: 1\n68:05:ca:f0:cb:12\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/broadcast\nLines: 1\nff:ff:ff:ff:ff:ff\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/backup_port\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/bpdu_guard\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/bridge\nSymlinkTo: ../../../../../../virtual/net/vmbr0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/broadcast_flood\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/change_ack\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/config_pending\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/designated_bridge\nLines: 1\n8000.6805caf0cb12\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/designated_cost\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/designated_port\nLines: 1\n32769\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/designated_root\nLines: 1\n8000.6805caf0cb12\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/forward_delay_timer\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/group_fwd_mask\nLines: 1\n0x0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/hairpin_mode\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/hold_timer\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/isolated\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/learning\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/message_age_timer\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/multicast_fast_leave\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/multicast_flood\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/multicast_router\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/multicast_to_unicast\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/neigh_suppress\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/path_cost\nLines: 1\n5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/port_id\nLines: 1\n0x8001\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/port_no\nLines: 1\n0x1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/priority\nLines: 1\n32\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/proxyarp\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/proxyarp_wifi\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/root_block\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/state\nLines: 1\n3\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/brport/unicast_flood\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/carrier\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/carrier_changes\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/carrier_down_count\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/carrier_up_count\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/dev_id\nLines: 1\n0x0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/dev_port\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/device\nSymlinkTo: ../../../0000:45:00.0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/dormant\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/duplex\nLines: 1\nfull\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/flags\nLines: 1\n0x1303\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/gro_flush_timeout\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/ifalias\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/ifindex\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/iflink\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/link_mode\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/master\nSymlinkTo: ../../../../../virtual/net/vmbr0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/mtu\nLines: 1\n1500\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/name_assign_type\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/napi_defer_hard_irqs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/netdev_group\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/operstate\nLines: 1\nup\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/phys_port_id\nLines: 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/phys_port_name\nLines: 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/phys_switch_id\nLines: 0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/proto_down\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-0/rps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-0/rps_flow_cnt\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-1/rps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-1/rps_flow_cnt\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-2/rps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-2/rps_flow_cnt\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-3/rps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-3/rps_flow_cnt\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-4/rps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-4/rps_flow_cnt\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-5\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-5/rps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-5/rps_flow_cnt\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-6\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-6/rps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-6/rps_flow_cnt\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-7\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-7/rps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/rx-7/rps_flow_cnt\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits/hold_time\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits/inflight\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits/limit\nLines: 1\n67893\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits/limit_max\nLines: 1\n1879048192\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits/limit_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits/stall_cnt\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits/stall_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/byte_queue_limits/stall_thrs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/traffic_class\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/tx_maxrate\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/tx_timeout\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/xps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-0/xps_rxqs\nLines: 1\n00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits/hold_time\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits/inflight\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits/limit\nLines: 1\n137370\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits/limit_max\nLines: 1\n1879048192\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits/limit_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits/stall_cnt\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits/stall_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/byte_queue_limits/stall_thrs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/traffic_class\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/tx_maxrate\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/tx_timeout\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/xps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-1/xps_rxqs\nLines: 1\n00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits/hold_time\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits/inflight\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits/limit\nLines: 1\n137370\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits/limit_max\nLines: 1\n1879048192\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits/limit_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits/stall_cnt\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits/stall_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/byte_queue_limits/stall_thrs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/traffic_class\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/tx_maxrate\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/tx_timeout\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/xps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-2/xps_rxqs\nLines: 1\n00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits/hold_time\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits/inflight\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits/limit\nLines: 1\n137370\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits/limit_max\nLines: 1\n1879048192\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits/limit_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits/stall_cnt\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits/stall_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/byte_queue_limits/stall_thrs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/traffic_class\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/tx_maxrate\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/tx_timeout\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/xps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-3/xps_rxqs\nLines: 1\n00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits/hold_time\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits/inflight\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits/limit\nLines: 1\n68879\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits/limit_max\nLines: 1\n1879048192\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits/limit_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits/stall_cnt\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits/stall_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/byte_queue_limits/stall_thrs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/traffic_class\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/tx_maxrate\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/tx_timeout\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/xps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-4/xps_rxqs\nLines: 1\n00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits/hold_time\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits/inflight\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits/limit\nLines: 1\n137370\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits/limit_max\nLines: 1\n1879048192\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits/limit_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits/stall_cnt\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits/stall_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/byte_queue_limits/stall_thrs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/traffic_class\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/tx_maxrate\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/tx_timeout\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/xps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-5/xps_rxqs\nLines: 1\n00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits/hold_time\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits/inflight\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits/limit\nLines: 1\n54464\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits/limit_max\nLines: 1\n1879048192\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits/limit_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits/stall_cnt\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits/stall_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/byte_queue_limits/stall_thrs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/traffic_class\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/tx_maxrate\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/tx_timeout\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/xps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-6/xps_rxqs\nLines: 1\n00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits/hold_time\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits/inflight\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits/limit\nLines: 1\n71700\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits/limit_max\nLines: 1\n1879048192\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits/limit_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits/stall_cnt\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits/stall_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/byte_queue_limits/stall_thrs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/traffic_class\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/tx_maxrate\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/tx_timeout\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/xps_cpus\nLines: 1\n00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/queues/tx-7/xps_rxqs\nLines: 1\n00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/speed\nLines: 1\n1000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/collisions\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/multicast\nLines: 1\n656633\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_bytes\nLines: 1\n10013625365\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_compressed\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_crc_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_dropped\nLines: 1\n29220\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_fifo_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_frame_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_length_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_missed_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_nohandler\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_over_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/rx_packets\nLines: 1\n46422718\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_aborted_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_bytes\nLines: 1\n10275718925\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_carrier_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_compressed\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_dropped\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_fifo_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_heartbeat_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_packets\nLines: 1\n47308115\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/statistics/tx_window_errors\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/subsystem\nSymlinkTo: ../../../../../../class/net\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/testing\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/threaded\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/tx_queue_len\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/type\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/uevent\nLines: 2\nINTERFACE=ens10f0\nIFINDEX=2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/net/ens10f0/upper_vmbr0\nSymlinkTo: ../../../../../virtual/net/vmbr0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/numa_node\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/async\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/control\nLines: 1\non\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/runtime_active_time\nLines: 1\n862796974\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/runtime_enabled\nLines: 1\nforbidden\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/runtime_status\nLines: 1\nactive\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/runtime_usage\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup\nLines: 1\nenabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup_abort_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup_active\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup_active_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup_expire_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup_last_time_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup_max_time_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power/wakeup_total_time_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/power_state\nLines: 1\nD0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/clock_name\nLines: 1\n6805caf0cb12\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/dev\nLines: 1\n246:0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/device\nSymlinkTo: ../../../0000:45:00.0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/fifo\nLines: 1\nNULLBYTEEOF\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/max_adjustment\nLines: 1\n62499999\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/max_vclocks\nLines: 1\n20\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/n_alarms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/n_external_timestamps\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/n_periodic_outputs\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/n_programmable_pins\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/n_vclocks\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/pins\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/pins/SDP0\nLines: 1\n0 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/pins/SDP1\nLines: 1\n0 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/pins/SDP2\nLines: 1\n0 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/pins/SDP3\nLines: 1\n0 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/async\nLines: 1\ndisabled\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/autosuspend_delay_ms\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/control\nLines: 1\nauto\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/runtime_active_kids\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/runtime_active_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/runtime_enabled\nLines: 1\ndisabled\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/runtime_status\nLines: 1\nunsupported\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/runtime_suspended_time\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/power/runtime_usage\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/pps_available\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/subsystem\nSymlinkTo: ../../../../../../class/ptp\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/ptp/ptp0/uevent\nLines: 3\nMAJOR=246\nMINOR=0\nDEVNAME=ptp0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/reset_method\nLines: 1\nflr bus\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/resource\nLines: 13\n0x0000000097100000 0x00000000971fffff 0x0000000000040200\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000003060 0x000000000000307f 0x0000000000040101\n0x000000009720c000 0x000000009720ffff 0x0000000000040200\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000097280000 0x00000000972fffff 0x0000000000046200\n0x000000f0a03e0000 0x000000f0a03fffff 0x000000000014220c\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x000000f0a03c0000 0x000000f0a03dffff 0x000000000014220c\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/resource0\nLines: 0\nMode: 600\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/resource2\nLines: 0\nMode: 600\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/resource3\nLines: 0\nMode: 600\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/revision\nLines: 1\n0x01\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/rom\nLines: 0\nMode: 600\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/sriov_drivers_autoprobe\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/sriov_numvfs\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/sriov_offset\nLines: 1\n128\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/sriov_stride\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/sriov_totalvfs\nLines: 1\n7\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/sriov_vf_device\nLines: 1\n1520\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/sriov_vf_total_msix\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/subsystem\nSymlinkTo: ../../../../bus/pci\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/subsystem_device\nLines: 1\n0x00a3\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/subsystem_vendor\nLines: 1\n0x8086\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/uevent\nLines: 6\nDRIVER=igb\nPCI_CLASS=20000\nPCI_ID=8086:1521\nPCI_SUBSYS_ID=8086:00A3\nPCI_SLOT_NAME=0000:45:00.0\nMODALIAS=pci:v00008086d00001521sv00008086sd000000A3bc02sc00i00\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/vendor\nLines: 1\n0x8086\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/vpd\nLines: 2\n�:NULLBYTEIntel (r) Ethernet Network Adapter I350-T4 for OCP NIC 3.0�dNULLBYTEV1:Intel (r) Ethernet Network Adapter I350-T4 for OCP NIC 3.0PN\nK53978-004SN\f6805CAF0CB12V2\u00044521RV\u0001�xEOF\nMode: 600\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/active_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/active_time_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/device\nSymlinkTo: ../../../0000:45:00.0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/event_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/expire_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/last_change_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/max_time_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/name\nLines: 1\n0000:45:00.0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/prevent_suspend_time_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/subsystem\nSymlinkTo: ../../../../../../class/wakeup\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/total_time_ms\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/uevent\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/0000:45:00.0/wakeup/wakeup87/wakeup_count\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/class\nLines: 1\n0x060400\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/d3cold_allowed\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/device\nLines: 1\n0x1483\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/power_state\nLines: 1\nD0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/revision\nLines: 1\n0x00\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/subsystem_device\nLines: 1\n0x1453\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/subsystem_vendor\nLines: 1\n0x1022\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/pci0000:40/0000:40:01.3/vendor\nLines: 1\n0x1022\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/applesmc.768\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan1_input\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan1_label\nLines: 1\nLeft side\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan1_manual\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan1_max\nLines: 1\n6156\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan1_min\nLines: 1\n2160\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan1_output\nLines: 1\n2160\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan1_safe\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan2_input\nLines: 1\n1998\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan2_label\nLines: 1\nRight side\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan2_manual\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan2_max\nLines: 1\n5700\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan2_min\nLines: 1\n2000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan2_output\nLines: 1\n2000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/fan2_safe\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/applesmc.768/hwmon\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/applesmc.768/hwmon/hwmon2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/hwmon/hwmon2/device\nSymlinkTo: ../../../applesmc.768\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/applesmc.768/name\nLines: 1\napplesmc\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/bogus.0\nMode: 775\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/bogus.0/hwmon\nMode: 775\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/bogus.0/hwmon/hwmon5\nMode: 775\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/bogus.0/hwmon/hwmon5/bogus1_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/bogus.0/hwmon/hwmon5/bogus1_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/bogus.0/hwmon/hwmon5/bogus1_input\nLines: 1\n55000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/bogus.0/hwmon/hwmon5/bogus1_label\nLines: 1\nPhysical id 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/bogus.0/hwmon/hwmon5/bogus1_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/bogus.0/hwmon/hwmon5/name\nLines: 1\nbogus\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/coretemp.0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/coretemp.0/hwmon\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/coretemp.0/hwmon/hwmon0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/device\nSymlinkTo: ../../../coretemp.0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/name\nLines: 1\ncoretemp\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input\nLines: 1\n55000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_label\nLines: 1\nPhysical id 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input\nLines: 1\n54000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_label\nLines: 1\nCore 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_input\nLines: 1\n52000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_label\nLines: 1\nCore 1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp3_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp4_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp4_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp4_input\nLines: 1\n53000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp4_label\nLines: 1\nCore 2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp4_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp5_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp5_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp5_input\nLines: 1\n50000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp5_label\nLines: 1\nCore 3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.0/hwmon/hwmon0/temp5_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/coretemp.1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/coretemp.1/hwmon\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/coretemp.1/hwmon/hwmon1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/device\nSymlinkTo: ../../../coretemp.1\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/name\nLines: 1\ncoretemp\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp1_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp1_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp1_input\nLines: 1\n55000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp1_label\nLines: 1\nPhysical id 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp1_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp2_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp2_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp2_input\nLines: 1\n54000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp2_label\nLines: 1\nCore 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp2_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp3_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp3_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp3_input\nLines: 1\n52000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp3_label\nLines: 1\nCore 1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp3_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp4_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp4_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp4_input\nLines: 1\n53000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp4_label\nLines: 1\nCore 2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp4_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp5_crit\nLines: 1\n100000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp5_crit_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp5_input\nLines: 1\n50000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp5_label\nLines: 1\nCore 3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/coretemp.1/hwmon/hwmon1/temp5_max\nLines: 1\n84000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/nct6775.656\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/nct6775.656/hwmon\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/platform/nct6775.656/hwmon/hwmon3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_beep\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_input\nLines: 1\n1098\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_pulses\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_target\nLines: 1\n27000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/fan2_tolerance\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in0_alarm\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in0_beep\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in0_input\nLines: 1\n792\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in0_max\nLines: 1\n1744\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in0_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in1_alarm\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in1_beep\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in1_input\nLines: 1\n1024\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in1_max\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/in1_min\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/intrusion0_alarm\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/intrusion0_beep\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/intrusion1_alarm\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/intrusion1_beep\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/name\nLines: 1\nnct6779\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point1_pwm\nLines: 1\n153\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point1_temp\nLines: 1\n30000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point2_pwm\nLines: 1\n255\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point2_temp\nLines: 1\n70000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point3_pwm\nLines: 1\n255\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point3_temp\nLines: 1\n70000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point4_pwm\nLines: 1\n255\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point4_temp\nLines: 1\n70000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point5_pwm\nLines: 1\n255\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_auto_point5_temp\nLines: 1\n75000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_crit_temp_tolerance\nLines: 1\n2000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_enable\nLines: 1\n5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_floor\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_mode\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_start\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_step_down_time\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_step_up_time\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_stop_time\nLines: 1\n6000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_target_temp\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_temp_sel\nLines: 1\n7\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_temp_tolerance\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_weight_duty_base\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_weight_duty_step\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_weight_temp_sel\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_weight_temp_step\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_weight_temp_step_base\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm1_weight_temp_step_tol\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/clocksource\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/clocksource/clocksource0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/clocksource/clocksource0/available_clocksource\nLines: 1\ntsc hpet acpi_pm\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/clocksource/clocksource0/current_clocksource\nLines: 1\ntsc\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu0/cpufreq\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency\nLines: 1\n0\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/related_cpus\nLines: 1\n0\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors\nLines: 1\nperformance powersave\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq\nLines: 1\n1699981\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/scaling_driver\nLines: 1\nintel_pstate\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/scaling_governor\nLines: 1\npowersave\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq\nLines: 1\n3700000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq\nLines: 1\n800000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed\nLines: 1\n<unsupported>\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu0/thermal_throttle\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/thermal_throttle/core_throttle_count\nLines: 1\n5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/thermal_throttle/package_throttle_count\nLines: 1\n30\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu0/topology\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/topology/core_id\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu0/topology/physical_package_id\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu1/cpufreq\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_transition_latency\nLines: 1\n0\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/related_cpus\nLines: 1\n0\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/scaling_available_governors\nLines: 1\nperformance powersave\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq\nLines: 1\n1699981\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/scaling_driver\nLines: 1\nintel_pstate\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/scaling_governor\nLines: 1\npowersave\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq\nLines: 1\n3700000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq\nLines: 1\n800000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed\nLines: 1\n<unsupported>\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu1/thermal_throttle\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/thermal_throttle/core_throttle_count\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/thermal_throttle/package_throttle_count\nLines: 1\n30\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu1/topology\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/topology/core_id\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu1/topology/physical_package_id\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu2/cpufreq\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_transition_latency\nLines: 1\n0\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/related_cpus\nLines: 1\n0\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/scaling_available_governors\nLines: 1\nperformance powersave\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq\nLines: 1\n8000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/scaling_driver\nLines: 1\nintel_pstate\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/scaling_governor\nLines: 1\npowersave\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq\nLines: 1\n4200000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/cpufreq/scaling_setspeed\nLines: 1\n<unsupported>\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu2/thermal_throttle\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/thermal_throttle/core_throttle_count\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/thermal_throttle/package_throttle_count\nLines: 1\n6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu2/topology\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/topology/core_id\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu2/topology/physical_package_id\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu3\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu3/cpufreq\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_transition_latency\nLines: 1\n0\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/related_cpus\nLines: 1\n0\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/scaling_available_governors\nLines: 1\nperformance powersave\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq\nLines: 1\n8000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/scaling_driver\nLines: 1\nintel_pstate\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/scaling_governor\nLines: 1\npowersave\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq\nLines: 1\n4200000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq\nLines: 1\n1000\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/cpufreq/scaling_setspeed\nLines: 1\n<unsupported>\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu3/thermal_throttle\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/thermal_throttle/core_throttle_count\nLines: 1\n9\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/thermal_throttle/package_throttle_count\nLines: 1\n6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/cpu3/topology\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/topology/core_id\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/cpu3/topology/physical_package_id\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/isolated\nLines: 1\n1,3-5,9\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/offline\nLines: 1\n\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/online\nLines: 1\n0-3\nMode: 664\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/cpu/vulnerabilities\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/vulnerabilities/itlb_multihit\nLines: 1\nNot affected\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/vulnerabilities/mds\nLines: 1\nVulnerable\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/vulnerabilities/retbleed\nLines: 1\nMitigation: untrained return thunk; SMT enabled with STIBP protection\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/vulnerabilities/spectre_v1\nLines: 1\nMitigation: usercopy/swapgs barriers and __user pointer sanitization\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/cpu/vulnerabilities/spectre_v2\nLines: 1\nMitigation: Retpolines, IBPB: conditional, STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/edac\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/edac/mc\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/edac/mc/mc0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/edac/mc/mc0/ce_count\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/edac/mc/mc0/ce_noinfo_count\nLines: 1\n2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/edac/mc/mc0/csrow0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/edac/mc/mc0/csrow0/ce_count\nLines: 1\n3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/edac/mc/mc0/csrow0/ue_count\nLines: 1\n4\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/edac/mc/mc0/ue_count\nLines: 1\n5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/edac/mc/mc0/ue_noinfo_count\nLines: 1\n6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/node\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/node/node0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node0/cpu0\nSymlinkTo: ../../cpu/cpu0\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node0/cpu1\nSymlinkTo: ../../cpu/cpu1\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node0/cpulist\nLines: 1\n0-1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node0/meminfo\nLines: 29\nNode 0 MemTotal:       134182340 kB\nNode 0 MemFree:        53030372 kB\nNode 0 MemUsed:        81151968 kB\nNode 0 Active:          5456380 kB\nNode 0 Inactive:       59150184 kB\nNode 0 Active(anon):     691324 kB\nNode 0 Inactive(anon):   340456 kB\nNode 0 Active(file):    4765056 kB\nNode 0 Inactive(file): 58809728 kB\nNode 0 Unevictable:           0 kB\nNode 0 Mlocked:               0 kB\nNode 0 Dirty:                20 kB\nNode 0 Writeback:             0 kB\nNode 0 FilePages:      70170916 kB\nNode 0 Mapped:           894240 kB\nNode 0 AnonPages:        788196 kB\nNode 0 Shmem:             47860 kB\nNode 0 KernelStack:       34016 kB\nNode 0 PageTables:       143304 kB\nNode 0 NFS_Unstable:          0 kB\nNode 0 Bounce:                0 kB\nNode 0 WritebackTmp:          0 kB\nNode 0 Slab:            6654304 kB\nNode 0 SReclaimable:    4473124 kB\nNode 0 SUnreclaim:      2181180 kB\nNode 0 AnonHugePages:    147456 kB\nNode 0 HugePages_Total:     0\nNode 0 HugePages_Free:      0\nNode 0 HugePages_Surp:      0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node0/numastat\nLines: 6\nnuma_hit 193460335812\nnuma_miss 12624528\nnuma_foreign 59858623300\ninterleave_hit 57146\nlocal_node 193454780853\nother_node 18179487\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/node/node1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node1/cpu2\nSymlinkTo: ../../cpu/cpu2\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node1/cpu3\nSymlinkTo: ../../cpu/cpu3\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node1/cpulist\nLines: 1\n2-3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node1/meminfo\nLines: 29\nNode 1 MemTotal:       134217728 kB\nNode 1 MemFree:        39634788 kB\nNode 1 MemUsed:        94582940 kB\nNode 1 Active:          5604496 kB\nNode 1 Inactive:       71450592 kB\nNode 1 Active(anon):     590464 kB\nNode 1 Inactive(anon):   285088 kB\nNode 1 Active(file):    5014032 kB\nNode 1 Inactive(file): 71165504 kB\nNode 1 Unevictable:           0 kB\nNode 1 Mlocked:               0 kB\nNode 1 Dirty:               120 kB\nNode 1 Writeback:             0 kB\nNode 1 FilePages:      83579188 kB\nNode 1 Mapped:           864112 kB\nNode 1 AnonPages:        671932 kB\nNode 1 Shmem:             87580 kB\nNode 1 KernelStack:       31104 kB\nNode 1 PageTables:       124272 kB\nNode 1 NFS_Unstable:          0 kB\nNode 1 Bounce:                0 kB\nNode 1 WritebackTmp:          0 kB\nNode 1 Slab:            7020716 kB\nNode 1 SReclaimable:    4614084 kB\nNode 1 SUnreclaim:      2406632 kB\nNode 1 AnonHugePages:     90112 kB\nNode 1 HugePages_Total:     0\nNode 1 HugePages_Free:      0\nNode 1 HugePages_Surp:      0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node1/numastat\nLines: 6\nnuma_hit 326720946761\nnuma_miss 59858626709\nnuma_foreign 12624528\ninterleave_hit 57286\nlocal_node 326719046550\nother_node 59860526920\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/system/node/node2\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node2/cpulist\nLines: 1\n\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node2/meminfo\nLines: 29\nNode 2 MemTotal:       134217728 kB\nNode 2 MemFree:        39634788 kB\nNode 2 MemUsed:        94582940 kB\nNode 2 Active:          5604496 kB\nNode 2 Inactive:       71450592 kB\nNode 2 Active(anon):     590464 kB\nNode 2 Inactive(anon):   285088 kB\nNode 2 Active(file):    5014032 kB\nNode 2 Inactive(file): 71165504 kB\nNode 2 Unevictable:           0 kB\nNode 2 Mlocked:               0 kB\nNode 2 Dirty:               120 kB\nNode 2 Writeback:             0 kB\nNode 2 FilePages:      83579188 kB\nNode 2 Mapped:           864112 kB\nNode 2 AnonPages:        671932 kB\nNode 2 Shmem:             87580 kB\nNode 2 KernelStack:       31104 kB\nNode 2 PageTables:       124272 kB\nNode 2 NFS_Unstable:          0 kB\nNode 2 Bounce:                0 kB\nNode 2 WritebackTmp:          0 kB\nNode 2 Slab:            7020716 kB\nNode 2 SReclaimable:    4614084 kB\nNode 2 SUnreclaim:      2406632 kB\nNode 2 AnonHugePages:     90112 kB\nNode 2 HugePages_Total:     0\nNode 2 HugePages_Free:      0\nNode 2 HugePages_Surp:      0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/system/node/node2/numastat\nLines: 6\nnuma_hit 26720946761\nnuma_miss 9858626709\nnuma_foreign 2624528\ninterleave_hit 7286\nlocal_node 26719046550\nother_node 9860526920\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/virtual\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/virtual/thermal\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/virtual/thermal/cooling_device0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/virtual/thermal/cooling_device0/cur_state\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/virtual/thermal/cooling_device0/max_state\nLines: 1\n3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/virtual/thermal/cooling_device0/type\nLines: 1\nProcessor\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/devices/virtual/thermal/thermal_zone0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/virtual/thermal/thermal_zone0/policy\nLines: 1\nstep_wise\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/virtual/thermal/thermal_zone0/temp\nLines: 1\n12376\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/devices/virtual/thermal/thermal_zone0/type\nLines: 1\ncpu-thermal\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcache\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/average_key_size\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/bdev0\nSymlinkTo: ../../../devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb/bcache\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/btree_cache_size\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache0\nSymlinkTo: ../../../devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sdc/bcache\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/cache_available_percent\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/congested\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/active_journal_entries\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/btree_nodes\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/btree_read_average_duration_us\nLines: 1\n1305\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/internal/cache_read_races\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/root_usage_percent\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/bypassed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_bypass_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_bypass_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_hit_ratio\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_hits\nLines: 1\n289\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_miss_collisions\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_day/cache_readaheads\nLines: 1\n13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/bypassed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_bypass_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_bypass_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_hit_ratio\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_miss_collisions\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_five_minute/cache_readaheads\nLines: 1\n13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/bypassed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_bypass_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_bypass_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_hit_ratio\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_miss_collisions\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_hour/cache_readaheads\nLines: 1\n13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/bypassed\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_bypass_hits\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_bypass_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_hit_ratio\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_hits\nLines: 1\n546\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_miss_collisions\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_misses\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/stats_total/cache_readaheads\nLines: 1\n13\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcache/deaddd54-c735-46d5-868e-f331c5fd7c74/tree_depth\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcachefs\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/btree_cache_size\nLines: 1\n2.05G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/btree_write_stats\nLines: 6\n                   nr        size\ninitial:           3298401   100k\ninit_next_bset:    4055926   28.2k\ncache_reclaim:     14401     720\njournal_reclaim:   66903805  697\ninterior:          3035363   1.26k\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/compression_stats\nLines: 6\ntypetype          compressed    uncompressed     average extent size\nlz4_old                    0               0                       0\ngzip                       0               0                       0\nlz4                    48.9G           71.2G                   62.5k\nzstd                    226G            603G                    115k\nincompressible         10.8T           10.8T                   90.4k\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/accounting_key_to_wb_slowpath\nLines: 2\nsince mount:                   39816825\nsince filesystem creation:     44105502\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bkey_pack_pos_fail\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_cache_cannibalize\nLines: 2\nsince mount:                   0\nsince filesystem creation:     26587339\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_cache_cannibalize_lock\nLines: 2\nsince mount:                   3070115\nsince filesystem creation:     62061408\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_cache_cannibalize_lock_fail\nLines: 2\nsince mount:                   2540\nsince filesystem creation:     24213\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_cache_cannibalize_unlock\nLines: 2\nsince mount:                   3070115\nsince filesystem creation:     36260384\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_cache_reap\nLines: 2\nsince mount:                   10555604\nsince filesystem creation:     69068459\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_cache_scan\nLines: 2\nsince mount:                   137595\nsince filesystem creation:     427545\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_key_cache_fill\nLines: 2\nsince mount:                   19814483\nsince filesystem creation:     169308144\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_alloc\nLines: 2\nsince mount:                   3298401\nsince filesystem creation:     8665587\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_compact\nLines: 2\nsince mount:                   2620840\nsince filesystem creation:     5554425\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_free\nLines: 2\nsince mount:                   5926033\nsince filesystem creation:     14112667\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_merge\nLines: 2\nsince mount:                   224564\nsince filesystem creation:     559684\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_merge_attempt\nLines: 2\nsince mount:                   13549164\nsince filesystem creation:     15868895\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_read\nLines: 2\nsince mount:                   10566234\nsince filesystem creation:     70225874\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_rewrite\nLines: 2\nsince mount:                   8227\nsince filesystem creation:     1130316\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_set_root\nLines: 2\nsince mount:                   7779\nsince filesystem creation:     77958\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_split\nLines: 2\nsince mount:                   222385\nsince filesystem creation:     710571\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_node_write\nLines: 2\nsince mount:                   77307915\nsince filesystem creation:     147968490\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_path_relock_fail\nLines: 2\nsince mount:                   2972086\nsince filesystem creation:     56213103\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_path_upgrade_fail\nLines: 2\nsince mount:                   683421\nsince filesystem creation:     2103667\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/btree_reserve_get_fail\nLines: 2\nsince mount:                   71\nsince filesystem creation:     11706\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bucket_alloc\nLines: 2\nsince mount:                   7224514\nsince filesystem creation:     37363674\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bucket_alloc_fail\nLines: 2\nsince mount:                   0\nsince filesystem creation:     11156091\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bucket_alloc_from_stripe\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bucket_discard\nLines: 2\nsince mount:                   5662938\nsince filesystem creation:     24751388\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bucket_discard_fast\nLines: 2\nsince mount:                   3812\nsince filesystem creation:     10204\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bucket_discard_fast_worker\nLines: 2\nsince mount:                   3812\nsince filesystem creation:     4012\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bucket_discard_worker\nLines: 2\nsince mount:                   2584384\nsince filesystem creation:     7021501\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/bucket_invalidate\nLines: 2\nsince mount:                   23630\nsince filesystem creation:     3483205\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/cached_ptr_drop\nLines: 2\nsince mount:                   0\nsince filesystem creation:     2.05G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/copygc\nLines: 2\nsince mount:                   7\nsince filesystem creation:     424790\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/copygc_wait_obsolete\nLines: 2\nsince mount:                   0\nsince filesystem creation:     537321\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read\nLines: 2\nsince mount:                   475G\nsince filesystem creation:     44.5T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_bounce\nLines: 2\nsince mount:                   1918904\nsince filesystem creation:     250520580\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_fail_and_poison\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_hole\nLines: 2\nsince mount:                   7.04G\nsince filesystem creation:     1.69T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_inline\nLines: 2\nsince mount:                   710M\nsince filesystem creation:     14.9G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_narrow_crcs\nLines: 2\nsince mount:                   0\nsince filesystem creation:     18529\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_narrow_crcs_fail\nLines: 2\nsince mount:                   0\nsince filesystem creation:     1779\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_nopromote\nLines: 2\nsince mount:                   8963785\nsince filesystem creation:     242468868\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_nopromote_already_promoted\nLines: 2\nsince mount:                   8890276\nsince filesystem creation:     211037452\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_nopromote_congested\nLines: 2\nsince mount:                   64143\nsince filesystem creation:     2913847\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_nopromote_may_not\nLines: 2\nsince mount:                   0\nsince filesystem creation:     20206095\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_nopromote_unwritten\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_promote\nLines: 2\nsince mount:                   12.8G\nsince filesystem creation:     391G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_retry\nLines: 2\nsince mount:                   183\nsince filesystem creation:     22404675\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_reuse_race\nLines: 2\nsince mount:                   25\nsince filesystem creation:     201095\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_read_split\nLines: 2\nsince mount:                   464596\nsince filesystem creation:     218590695\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update\nLines: 2\nsince mount:                   61.8T\nsince filesystem creation:     21.5P\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_fail\nLines: 2\nsince mount:                   2.44M\nsince filesystem creation:     1.06G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_in_flight\nLines: 2\nsince mount:                   2532017\nsince filesystem creation:     3978784\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_key\nLines: 2\nsince mount:                   61.8T\nsince filesystem creation:     91.2T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_key_fail\nLines: 2\nsince mount:                   22.4G\nsince filesystem creation:     22.7G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_no_io\nLines: 2\nsince mount:                   80.2G\nsince filesystem creation:     93.9G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_noop_obsolete\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_pred\nLines: 2\nsince mount:                   8.64M\nsince filesystem creation:     45.0T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_read\nLines: 2\nsince mount:                   6.94T\nsince filesystem creation:     81.3T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_start_fail_obsolete\nLines: 2\nsince mount:                   0\nsince filesystem creation:     314018822443\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_useless_write_fail\nLines: 2\nsince mount:                   4.87G\nsince filesystem creation:     4.94G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_update_write\nLines: 2\nsince mount:                   6.96T\nsince filesystem creation:     33.8T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/data_write\nLines: 2\nsince mount:                   346G\nsince filesystem creation:     18.9T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/error_throw\nLines: 2\nsince mount:                   2252331183\nsince filesystem creation:     4719910958\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/evacuate_bucket\nLines: 2\nsince mount:                   112\nsince filesystem creation:     6735247\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/fsync\nLines: 2\nsince mount:                   302707\nsince filesystem creation:     1515147\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/gc_gens_end\nLines: 2\nsince mount:                   0\nsince filesystem creation:     3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/gc_gens_start\nLines: 2\nsince mount:                   0\nsince filesystem creation:     3\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/journal_full\nLines: 2\nsince mount:                   1459\nsince filesystem creation:     94587\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/journal_reclaim_finish\nLines: 2\nsince mount:                   93364037\nsince filesystem creation:     406994135\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/journal_reclaim_start\nLines: 2\nsince mount:                   93364037\nsince filesystem creation:     406994135\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/journal_res_get_blocked\nLines: 2\nsince mount:                   27723\nsince filesystem creation:     74696\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/journal_write\nLines: 2\nsince mount:                   5081352\nsince filesystem creation:     15458801\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/open_bucket_alloc_fail\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_btree\nLines: 2\nsince mount:                   2.00G\nsince filesystem creation:     2.01G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_clear_scan\nLines: 2\nsince mount:                   2\nsince filesystem creation:     11\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_data\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_phys\nLines: 2\nsince mount:                   62.7T\nsince filesystem creation:     63.6T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_scan_device\nLines: 2\nsince mount:                   1.03T\nsince filesystem creation:     76.0T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_scan_fs\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_scan_inum\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_scan_metadata\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_scan_pending\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/reconcile_set_pending\nLines: 2\nsince mount:                   0\nsince filesystem creation:     29.0G\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/sectors_alloc\nLines: 2\nsince mount:                   8.08T\nsince filesystem creation:     11.4T\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/stripe_alloc\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/stripe_create\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/stripe_create_fail\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/stripe_delete\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/stripe_reuse\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/stripe_update_bucket\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/stripe_update_extent\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/stripe_update_extent_fail\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/sync_fs\nLines: 2\nsince mount:                   5732\nsince filesystem creation:     42023\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_blocked_journal_reclaim\nLines: 2\nsince mount:                   13\nsince filesystem creation:     78\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_btree_node_reused\nLines: 2\nsince mount:                   38290\nsince filesystem creation:     53354\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_btree_node_split\nLines: 2\nsince mount:                   19007\nsince filesystem creation:     100190\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_fault_inject\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_injected\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_iter_upgrade\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_journal_preres_get\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_journal_reclaim\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_journal_res_get\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_key_cache_key_realloced\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_key_cache_raced\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_key_cache_upgrade\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_mark_replicas\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_mem_realloced\nLines: 2\nsince mount:                   73\nsince filesystem creation:     6111\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_memory_allocation_failure\nLines: 2\nsince mount:                   0\nsince filesystem creation:     27513334\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_relock\nLines: 2\nsince mount:                   912579\nsince filesystem creation:     2806875\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_relock_after_fill\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_relock_key_cache_fill_obsolete\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_relock_next_node\nLines: 2\nsince mount:                   0\nsince filesystem creation:     22087\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_relock_parent_for_fill_obsolete\nLines: 2\nsince mount:                   0\nsince filesystem creation:     2581\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_relock_path\nLines: 2\nsince mount:                   10664021\nsince filesystem creation:     47527280\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_relock_path_intent\nLines: 2\nsince mount:                   0\nsince filesystem creation:     298090\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_split_race\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_too_many_iters\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_traverse\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_upgrade\nLines: 2\nsince mount:                   200974\nsince filesystem creation:     1055154\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_would_deadlock\nLines: 2\nsince mount:                   135555\nsince filesystem creation:     1025983\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_would_deadlock_recursion_limit\nLines: 2\nsince mount:                   0\nsince filesystem creation:     0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_would_deadlock_write\nLines: 2\nsince mount:                   2\nsince filesystem creation:     2\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_restart_write_buffer_flush\nLines: 2\nsince mount:                   47215660\nsince filesystem creation:     51706894\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/trans_traverse_all\nLines: 2\nsince mount:                   17672014\nsince filesystem creation:     78477746\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/transaction_commit\nLines: 2\nsince mount:                   1289297181\nsince filesystem creation:     4338059022\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/write_buffer_flush\nLines: 2\nsince mount:                   47596631\nsince filesystem creation:     48370568\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/write_buffer_flush_slowpath\nLines: 2\nsince mount:                   0\nsince filesystem creation:     21031\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/write_buffer_flush_sync\nLines: 2\nsince mount:                   15\nsince filesystem creation:     6024402\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/write_buffer_maybe_flush\nLines: 2\nsince mount:                   47215669\nsince filesystem creation:     47412849\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/counters/write_super\nLines: 2\nsince mount:                   21\nsince filesystem creation:     30277\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-10\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-10/bucket_size\nLines: 1\n512k\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-10/durability\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-10/io_done\nLines: 22\nread:\nsb          :       86016\njournal     :           0\nbtree       :     5242880\nuser        :102313054208\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nwrite:\nsb          :      645120\njournal     :           0\nbtree       :       16384\nuser        :252377698304\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-10/io_errors\nLines: 8\nIO errors since filesystem creation\n  read:    0\n  write:   0\n  checksum:0\nIO errors since 8 y ago\n  read:    0\n  write:   0\n  checksum:0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-10/label\nLines: 1\ndisk-10\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-10/nbuckets\nLines: 1\n953880\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-10/state\nLines: 1\n[rw] ro evacuating spare \nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-4\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-4/bucket_size\nLines: 1\n2.00M\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-4/durability\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-4/io_done\nLines: 22\nread:\nsb          :       86016\njournal     :           0\nbtree       :  2193358848\nuser        :3770452246528\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nwrite:\nsb          :      645120\njournal     :           0\nbtree       :      589824\nuser        :6258285805568\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-4/io_errors\nLines: 8\nIO errors since filesystem creation\n  read:    197416\n  write:   205\n  checksum:0\nIO errors since 8 y ago\n  read:    197416\n  write:   205\n  checksum:0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-4/label\nLines: 1\ndisk-4\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-4/nbuckets\nLines: 1\n7629824\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-4/state\nLines: 1\n[rw] ro evacuating spare \nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-6\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-6/bucket_size\nLines: 1\n2.00M\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-6/durability\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-6/io_done\nLines: 22\nread:\nsb          :       86016\njournal     :           0\nbtree       :     8912896\nuser        :610019098624\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nwrite:\nsb          :      677376\njournal     :           0\nbtree       :           0\nuser        :562070339584\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-6/io_errors\nLines: 8\nIO errors since filesystem creation\n  read:    18828\n  write:   1\n  checksum:5\nIO errors since 8 y ago\n  read:    18828\n  write:   1\n  checksum:5\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-6/label\nLines: 1\ndisk-6\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-6/nbuckets\nLines: 1\n953864\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-6/state\nLines: 1\n[rw] ro evacuating spare \nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-7\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-7/bucket_size\nLines: 1\n2.00M\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-7/durability\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-7/io_done\nLines: 22\nread:\nsb          :       86016\njournal     :           0\nbtree       :2767671263232\nuser        :553932742656\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nwrite:\nsb          :      645120\njournal     :2432028966912\nbtree       :782753624064\nuser        :383826411520\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-7/io_errors\nLines: 8\nIO errors since filesystem creation\n  read:    0\n  write:   0\n  checksum:18\nIO errors since 8 y ago\n  read:    0\n  write:   0\n  checksum:18\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-7/label\nLines: 1\ndisk-7\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-7/nbuckets\nLines: 1\n1907723\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-7/state\nLines: 1\n[rw] ro evacuating spare \nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-8\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-8/bucket_size\nLines: 1\n2.00M\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-8/durability\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-8/io_done\nLines: 22\nread:\nsb          :       86016\njournal     :           0\nbtree       :           0\nuser        :3115020546048\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nwrite:\nsb          :      645120\njournal     :           0\nbtree       :           0\nuser        :6072510210048\ncached      :           0\nparity      :           0\nstripe      :           0\nneed_gc_gens:           0\nneed_discard:           0\nunstriped   :           0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-8/io_errors\nLines: 8\nIO errors since filesystem creation\n  read:    0\n  write:   0\n  checksum:0\nIO errors since 8 y ago\n  read:    0\n  write:   0\n  checksum:0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-8/label\nLines: 1\ndisk-8\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-8/nbuckets\nLines: 1\n2384637\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/dev-8/state\nLines: 1\n[rw] ro evacuating spare \nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/bcachefs/deadbeef-1234-5678-9012-abcdefabcdef/errors\nLines: 18\nbtree_node_data_missing                         2       1753593586\nbset_bad_csum                                   2       1767112063\nbtree_node_topology_bad_max_key                 2       1767080711\nalloc_key_to_missing_lru_entry                  4517    1771754289\nalloc_key_data_type_wrong                       4415    1771753607\nalloc_key_dirty_sectors_wrong                   4538    1771753607\nalloc_key_cached_sectors_wrong                  4537    1771753607\nbackpointer_to_missing_ptr                      45480   1771754172\nlru_entry_bad                                   4537    1771753700\nptr_to_missing_backpointer                      44112   1771754284\naccounting_mismatch                             6       1771753608\nsubvol_missing                                  194     1761076737\nreconcile_work_incorrectly_set                  113913  1771755828\nvfs_bad_inode_rm                                121     1758960176\nvalidate_error_in_commit                        2       1771750773\nextent_io_opts_not_set                          11299659571772285102\nextent_ptrs_all_invalid                         2       1771750773\nextent_ptrs_all_invalid_but_cached              44612   1771753458\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_may_use\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_readonly\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_reserved\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/bytes_used\nLines: 1\n808189952\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/disk_total\nLines: 1\n2147483648\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/disk_used\nLines: 1\n808189952\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/flags\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0/total_bytes\nLines: 1\n2147483648\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/raid0/used_bytes\nLines: 1\n808189952\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/total_bytes\nLines: 1\n2147483648\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/data/total_bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/global_rsv_reserved\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/global_rsv_size\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_may_use\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_readonly\nLines: 1\n131072\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_reserved\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/bytes_used\nLines: 1\n933888\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/disk_total\nLines: 1\n2147483648\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/disk_used\nLines: 1\n1867776\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/flags\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1/total_bytes\nLines: 1\n1073741824\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/raid1/used_bytes\nLines: 1\n933888\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/total_bytes\nLines: 1\n1073741824\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/metadata/total_bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_may_use\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_readonly\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_reserved\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/bytes_used\nLines: 1\n16384\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/disk_total\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/disk_used\nLines: 1\n32768\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/flags\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1/total_bytes\nLines: 1\n8388608\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/raid1/used_bytes\nLines: 1\n16384\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/total_bytes\nLines: 1\n8388608\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/allocation/system/total_bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/clone_alignment\nLines: 1\n4096\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/commit_stats\nLines: 4\ncommits 258051\nlast_commit_ms 1000\nmax_commit_ms 51462\ntotal_commit_ms 47836090EOF\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop25\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop25/size\nLines: 1\n20971520\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop26\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/devices/loop26/size\nLines: 1\n20971520\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/big_metadata\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/extended_iref\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/mixed_backref\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/features/skinny_metadata\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/label\nLines: 1\nfixture\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/metadata_uuid\nLines: 1\n0abb23a9-579b-43e6-ad30-227ef47fcb9d\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/nodesize\nLines: 1\n16384\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/quota_override\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/0abb23a9-579b-43e6-ad30-227ef47fcb9d/sectorsize\nLines: 1\n4096\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_may_use\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_readonly\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_reserved\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/bytes_used\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/disk_total\nLines: 1\n644087808\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/disk_used\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/flags\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5/total_bytes\nLines: 1\n644087808\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/raid5/used_bytes\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/total_bytes\nLines: 1\n644087808\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/data/total_bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/global_rsv_reserved\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/global_rsv_size\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_may_use\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_readonly\nLines: 1\n262144\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_reserved\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/bytes_used\nLines: 1\n114688\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/disk_total\nLines: 1\n429391872\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/disk_used\nLines: 1\n114688\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/flags\nLines: 1\n4\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6/total_bytes\nLines: 1\n429391872\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/raid6/used_bytes\nLines: 1\n114688\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/total_bytes\nLines: 1\n429391872\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/metadata/total_bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_may_use\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_readonly\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_reserved\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/bytes_used\nLines: 1\n16384\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/disk_total\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/disk_used\nLines: 1\n16384\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/flags\nLines: 1\n2\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6/total_bytes\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/raid6/used_bytes\nLines: 1\n16384\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/total_bytes\nLines: 1\n16777216\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/allocation/system/total_bytes_pinned\nLines: 1\n0\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/clone_alignment\nLines: 1\n4096\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop22\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop22/size\nLines: 1\n20971520\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop23\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop23/size\nLines: 1\n20971520\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop24\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop24/size\nLines: 1\n20971520\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop25\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/devices/loop25/size\nLines: 1\n20971520\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/big_metadata\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/extended_iref\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/mixed_backref\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/raid56\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/features/skinny_metadata\nLines: 1\n1\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/label\nLines: 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/metadata_uuid\nLines: 1\n7f07c59f-6136-449c-ab87-e1cf2328731b\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/nodesize\nLines: 1\n16384\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/quota_override\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/btrfs/7f07c59f-6136-449c-ab87-e1cf2328731b/sectorsize\nLines: 1\n4096\nMode: 444\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/xfs\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/xfs/sda1\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/fs/xfs/sda1/stats\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/fs/xfs/sda1/stats/stats\nLines: 24\nextent_alloc 1 872 0 0\nabt 0 0 0 0\nblk_map 61 29 1 1 1 91 0\nbmbt 0 0 0 0\ndir 3 2 1 52\ntrans 4 40 0\nig 5 1 0 4 0 0 1\nlog 8 21 0 5821 4\npush_ail 44 0 1102 15 0 2 0 2 0 2\nxstrat 1 0\nrw 28 0\nattr 0 0 0 0\nicluster 2 2 2\nvnodes 4 0 0 0 1 1 1 0\nbuf 22 25 14 0 0 8 0 8 8\nabtb2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0\nabtc2 2 1 1 1 0 0 0 0 0 0 0 0 0 0 0\nbmbt2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\nibt2 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0\nfibt2 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0\nrmapbt 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\nqm 0 0 0 0 0 0 0 0\nxpc 3571712 3568056 0\ndebug 0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/kernel\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/kernel/mm\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: sys/kernel/mm/ksm\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/full_scans\nLines: 1\n323\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/merge_across_nodes\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/pages_shared\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/pages_sharing\nLines: 1\n255\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/pages_to_scan\nLines: 1\n100\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/pages_unshared\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/pages_volatile\nLines: 1\n0\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/run\nLines: 1\n1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: sys/kernel/mm/ksm/sleep_millisecs\nLines: 1\n20\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n"
  },
  {
    "path": "collector/fixtures/textfile/client_side_timestamp/metrics.prom",
    "content": "metric_with_custom_timestamp 1 1441205977284\nnormal_metric 2\n"
  },
  {
    "path": "collector/fixtures/textfile/client_side_timestamp.out",
    "content": "# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 1\n"
  },
  {
    "path": "collector/fixtures/textfile/different_metric_types/metrics.prom",
    "content": "# HELP events_total this is a test metric\n# TYPE events_total counter\nevents_total{foo=\"bar\"} 10\nevents_total{foo=\"baz\"} 20\n\n# HELP event_duration_seconds_total Query timings\n# TYPE event_duration_seconds_total summary\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.5\"} 1.073e-06\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.9\"} 1.928e-06\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.99\"} 4.35e-06\nevent_duration_seconds_total_sum{baz=\"inner_eval\"} 1.8652166505091474e+06\nevent_duration_seconds_total_count{baz=\"inner_eval\"} 1.492355615e+09\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.5\"} 4.283e-06\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.9\"} 7.796e-06\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.99\"} 2.2083e-05\nevent_duration_seconds_total_sum{baz=\"prepare_time\"} 840923.7919437207\nevent_duration_seconds_total_count{baz=\"prepare_time\"} 1.492355814e+09\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.5\"} 1.566e-06\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.9\"} 3.223e-06\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.99\"} 6.53e-06\nevent_duration_seconds_total_sum{baz=\"result_append\"} 4.404109951000078\nevent_duration_seconds_total_count{baz=\"result_append\"} 1.427647e+06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.5\"} 1.847e-06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.9\"} 2.975e-06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.99\"} 4.08e-06\nevent_duration_seconds_total_sum{baz=\"result_sort\"} 3.4123187829998307\nevent_duration_seconds_total_count{baz=\"result_sort\"} 1.427647e+06\n\n"
  },
  {
    "path": "collector/fixtures/textfile/different_metric_types.out",
    "content": "# HELP event_duration_seconds_total Query timings\n# TYPE event_duration_seconds_total summary\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.5\"} 1.073e-06\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.9\"} 1.928e-06\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.99\"} 4.35e-06\nevent_duration_seconds_total_sum{baz=\"inner_eval\"} 1.8652166505091474e+06\nevent_duration_seconds_total_count{baz=\"inner_eval\"} 1.492355615e+09\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.5\"} 4.283e-06\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.9\"} 7.796e-06\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.99\"} 2.2083e-05\nevent_duration_seconds_total_sum{baz=\"prepare_time\"} 840923.7919437207\nevent_duration_seconds_total_count{baz=\"prepare_time\"} 1.492355814e+09\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.5\"} 1.566e-06\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.9\"} 3.223e-06\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.99\"} 6.53e-06\nevent_duration_seconds_total_sum{baz=\"result_append\"} 4.404109951000078\nevent_duration_seconds_total_count{baz=\"result_append\"} 1.427647e+06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.5\"} 1.847e-06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.9\"} 2.975e-06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.99\"} 4.08e-06\nevent_duration_seconds_total_sum{baz=\"result_sort\"} 3.4123187829998307\nevent_duration_seconds_total_count{baz=\"result_sort\"} 1.427647e+06\n# HELP events_total this is a test metric\n# TYPE events_total counter\nevents_total{foo=\"bar\"} 10\nevents_total{foo=\"baz\"} 20\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/different_metric_types/metrics.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n"
  },
  {
    "path": "collector/fixtures/textfile/glob_extra_dimension.out",
    "content": "# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/histogram_extra_dimension/metrics.prom\"} 1\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/summary_extra_dimension/metrics.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP prometheus_rule_evaluation_duration_seconds The duration for a rule to execute.\n# TYPE prometheus_rule_evaluation_duration_seconds summary\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"alerting\",quantile=\"0.9\"} 0.001765451\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"alerting\",quantile=\"0.99\"} 0.018672076\nprometheus_rule_evaluation_duration_seconds_sum{handler=\"\",rule_type=\"alerting\"} 214.85081044700146\nprometheus_rule_evaluation_duration_seconds_count{handler=\"\",rule_type=\"alerting\"} 185209\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"recording\",quantile=\"0.5\"} 4.3132e-05\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"recording\",quantile=\"0.9\"} 8.9295e-05\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"recording\",quantile=\"0.99\"} 0.000193657\nprometheus_rule_evaluation_duration_seconds_sum{handler=\"\",rule_type=\"recording\"} 185091.01317759082\nprometheus_rule_evaluation_duration_seconds_count{handler=\"\",rule_type=\"recording\"} 1.0020195e+08\nprometheus_rule_evaluation_duration_seconds{handler=\"foo\",rule_type=\"alerting\",quantile=\"0.5\"} 0.000571464\nprometheus_rule_evaluation_duration_seconds_sum{handler=\"foo\",rule_type=\"alerting\"} 0\nprometheus_rule_evaluation_duration_seconds_count{handler=\"foo\",rule_type=\"alerting\"} 0\n# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction\n# TYPE prometheus_tsdb_compaction_chunk_range histogram\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"100\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"1600\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"6400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"25600\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"102400\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"409600\"} 1.412839e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"1.6384e+06\"} 1.69185e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"6.5536e+06\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"2.62144e+07\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"+Inf\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_sum{foo=\"bar\"} 6.71393432189e+11\nprometheus_tsdb_compaction_chunk_range_count{foo=\"bar\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"100\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"1600\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"6400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"25600\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"102400\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"409600\"} 1.412839e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"1.6384e+06\"} 1.69185e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"6.5536e+06\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"2.62144e+07\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"+Inf\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_sum{foo=\"baz\"} 6.71393432189e+11\nprometheus_tsdb_compaction_chunk_range_count{foo=\"baz\"} 1.691853e+06\n"
  },
  {
    "path": "collector/fixtures/textfile/histogram/metrics.prom",
    "content": "# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction\n# TYPE prometheus_tsdb_compaction_chunk_range histogram\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"100\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"1600\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"6400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"25600\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"102400\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"409600\"} 1.412839e+06\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"1.6384e+06\"} 1.69185e+06\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"6.5536e+06\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"2.62144e+07\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"+Inf\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_sum 6.71393432189e+11\nprometheus_tsdb_compaction_chunk_range_count 1.691853e+06\n"
  },
  {
    "path": "collector/fixtures/textfile/histogram.out",
    "content": "# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/histogram/metrics.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction\n# TYPE prometheus_tsdb_compaction_chunk_range histogram\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"100\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"1600\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"6400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"25600\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"102400\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"409600\"} 1.412839e+06\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"1.6384e+06\"} 1.69185e+06\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"6.5536e+06\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"2.62144e+07\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{le=\"+Inf\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_sum 6.71393432189e+11\nprometheus_tsdb_compaction_chunk_range_count 1.691853e+06\n"
  },
  {
    "path": "collector/fixtures/textfile/histogram_extra_dimension/metrics.prom",
    "content": "# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction\n# TYPE prometheus_tsdb_compaction_chunk_range histogram\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"100\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"1600\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"6400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"25600\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"102400\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"409600\"} 1.412839e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"1.6384e+06\"} 1.69185e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"6.5536e+06\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"2.62144e+07\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"+Inf\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_sum{foo=\"bar\"} 6.71393432189e+11\nprometheus_tsdb_compaction_chunk_range_count{foo=\"bar\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"100\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"1600\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"6400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"25600\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"102400\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"409600\"} 1.412839e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"1.6384e+06\"} 1.69185e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"6.5536e+06\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"2.62144e+07\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"+Inf\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_sum{foo=\"baz\"} 6.71393432189e+11\nprometheus_tsdb_compaction_chunk_range_count{foo=\"baz\"} 1.691853e+06\n"
  },
  {
    "path": "collector/fixtures/textfile/histogram_extra_dimension.out",
    "content": "# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/histogram_extra_dimension/metrics.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP prometheus_tsdb_compaction_chunk_range Final time range of chunks on their first compaction\n# TYPE prometheus_tsdb_compaction_chunk_range histogram\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"100\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"1600\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"6400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"25600\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"102400\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"409600\"} 1.412839e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"1.6384e+06\"} 1.69185e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"6.5536e+06\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"2.62144e+07\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"bar\",le=\"+Inf\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_sum{foo=\"bar\"} 6.71393432189e+11\nprometheus_tsdb_compaction_chunk_range_count{foo=\"bar\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"100\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"1600\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"6400\"} 0\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"25600\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"102400\"} 7\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"409600\"} 1.412839e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"1.6384e+06\"} 1.69185e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"6.5536e+06\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"2.62144e+07\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_bucket{foo=\"baz\",le=\"+Inf\"} 1.691853e+06\nprometheus_tsdb_compaction_chunk_range_sum{foo=\"baz\"} 6.71393432189e+11\nprometheus_tsdb_compaction_chunk_range_count{foo=\"baz\"} 1.691853e+06\n"
  },
  {
    "path": "collector/fixtures/textfile/inconsistent_metrics/metrics.prom",
    "content": "# HELP http_requests_total Total number of HTTP requests made.\n# TYPE http_requests_total counter\nhttp_requests_total{code=\"200\",handler=\"alerts\",method=\"get\"} 35\nhttp_requests_total{code=\"200\",handler=\"config\",method=\"get\"} 8\nhttp_requests_total{code=\"200\",method=\"get\", foo=\"bar\"} 325\nhttp_requests_total{code=\"200\",handler=\"flags\",method=\"get\"} 18\nhttp_requests_total{code=\"200\",handler=\"graph\",method=\"get\"} 89\nhttp_requests_total{code=\"200\",method=\"get\", baz=\"bar\"} 93\nhttp_requests_total{code=\"200\",handler=\"prometheus\",method=\"get\"} 17051\nhttp_requests_total{code=\"200\",handler=\"query\",method=\"get\"} 401\nhttp_requests_total{code=\"200\",handler=\"query_range\",method=\"get\"} 15663\nhttp_requests_total{code=\"200\",handler=\"rules\",method=\"get\"} 7\nhttp_requests_total{code=\"200\",handler=\"series\",method=\"get\"} 221\nhttp_requests_total{code=\"200\",handler=\"static\",method=\"get\"} 1647\nhttp_requests_total{code=\"200\",handler=\"status\",method=\"get\"} 12\nhttp_requests_total{code=\"200\",method=\"get\"} 11\nhttp_requests_total{code=\"206\",handler=\"static\",method=\"get\"} 2\nhttp_requests_total{code=\"400\",handler=\"query_range\",method=\"get\"} 40\nhttp_requests_total{code=\"503\",handler=\"query_range\",method=\"get\"} 3\n\n# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines{foo=\"bar\"} 229\ngo_goroutines 20\n"
  },
  {
    "path": "collector/fixtures/textfile/inconsistent_metrics.out",
    "content": "# HELP go_goroutines Number of goroutines that currently exist.\n# TYPE go_goroutines gauge\ngo_goroutines{foo=\"\"} 20\ngo_goroutines{foo=\"bar\"} 229\n# HELP http_requests_total Total number of HTTP requests made.\n# TYPE http_requests_total counter\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"\",method=\"get\"} 11\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"alerts\",method=\"get\"} 35\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"config\",method=\"get\"} 8\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"flags\",method=\"get\"} 18\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"graph\",method=\"get\"} 89\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"prometheus\",method=\"get\"} 17051\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"query\",method=\"get\"} 401\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"query_range\",method=\"get\"} 15663\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"rules\",method=\"get\"} 7\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"series\",method=\"get\"} 221\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"static\",method=\"get\"} 1647\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"\",handler=\"status\",method=\"get\"} 12\nhttp_requests_total{baz=\"\",code=\"200\",foo=\"bar\",handler=\"\",method=\"get\"} 325\nhttp_requests_total{baz=\"\",code=\"206\",foo=\"\",handler=\"static\",method=\"get\"} 2\nhttp_requests_total{baz=\"\",code=\"400\",foo=\"\",handler=\"query_range\",method=\"get\"} 40\nhttp_requests_total{baz=\"\",code=\"503\",foo=\"\",handler=\"query_range\",method=\"get\"} 3\nhttp_requests_total{baz=\"bar\",code=\"200\",foo=\"\",handler=\"\",method=\"get\"} 93\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/inconsistent_metrics/metrics.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_different_help/a.prom",
    "content": "# HELP events_total A nice help message.\n# TYPE events_total counter\nevents_total{foo=\"bar\",file=\"a\"} 10\nevents_total{foo=\"baz\",file=\"a\"} 20\n\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_different_help/b.prom",
    "content": "# HELP events_total A different help message.\n# TYPE events_total counter\nevents_total{foo=\"bar\",file=\"b\"} 30\nevents_total{foo=\"baz\",file=\"b\"} 40\n\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_different_help.out",
    "content": "# HELP events_total A nice help message.\n# TYPE events_total counter\nevents_total{file=\"a\",foo=\"bar\"} 10\nevents_total{file=\"a\",foo=\"baz\"} 20\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/metrics_merge_different_help/a.prom\"} 1\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/metrics_merge_different_help/b.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 1\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_empty_help/a.prom",
    "content": "# HELP events_total \n# TYPE events_total counter\nevents_total{foo=\"bar\",file=\"a\"} 10\nevents_total{foo=\"baz\",file=\"a\"} 20\n\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_empty_help/b.prom",
    "content": "# HELP events_total \n# TYPE events_total counter\nevents_total{foo=\"bar\",file=\"b\"} 30\nevents_total{foo=\"baz\",file=\"b\"} 40\n\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_empty_help.out",
    "content": "# HELP events_total Metric read from fixtures/textfile/metrics_merge_empty_help/a.prom, fixtures/textfile/metrics_merge_empty_help/b.prom\n# TYPE events_total counter\nevents_total{file=\"a\",foo=\"bar\"} 10\nevents_total{file=\"a\",foo=\"baz\"} 20\nevents_total{file=\"b\",foo=\"bar\"} 30\nevents_total{file=\"b\",foo=\"baz\"} 40\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/metrics_merge_empty_help/a.prom\"} 1\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/metrics_merge_empty_help/b.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_no_help/a.prom",
    "content": "# TYPE events_total counter\nevents_total{foo=\"bar\",file=\"a\"} 10\nevents_total{foo=\"baz\",file=\"a\"} 20\n\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_no_help/b.prom",
    "content": "# TYPE events_total counter\nevents_total{foo=\"bar\",file=\"b\"} 30\nevents_total{foo=\"baz\",file=\"b\"} 40\n\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_no_help.out",
    "content": "# HELP events_total Metric read from fixtures/textfile/metrics_merge_no_help/a.prom, fixtures/textfile/metrics_merge_no_help/b.prom\n# TYPE events_total counter\nevents_total{file=\"a\",foo=\"bar\"} 10\nevents_total{file=\"a\",foo=\"baz\"} 20\nevents_total{file=\"b\",foo=\"bar\"} 30\nevents_total{file=\"b\",foo=\"baz\"} 40\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/metrics_merge_no_help/a.prom\"} 1\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/metrics_merge_no_help/b.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_same_help/a.prom",
    "content": "# HELP events_total The same help.\n# TYPE events_total counter\nevents_total{foo=\"bar\",file=\"a\"} 10\nevents_total{foo=\"baz\",file=\"a\"} 20\n\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_same_help/b.prom",
    "content": "# HELP events_total The same help.\n# TYPE events_total counter\nevents_total{foo=\"bar\",file=\"b\"} 30\nevents_total{foo=\"baz\",file=\"b\"} 40\n\n"
  },
  {
    "path": "collector/fixtures/textfile/metrics_merge_same_help.out",
    "content": "# HELP events_total The same help.\n# TYPE events_total counter\nevents_total{file=\"a\",foo=\"bar\"} 10\nevents_total{file=\"a\",foo=\"baz\"} 20\nevents_total{file=\"b\",foo=\"bar\"} 30\nevents_total{file=\"b\",foo=\"baz\"} 40\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/metrics_merge_same_help/a.prom\"} 1\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/metrics_merge_same_help/b.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n"
  },
  {
    "path": "collector/fixtures/textfile/no_metric_files/non_matching_file.txt",
    "content": "This file should be ignored.\n"
  },
  {
    "path": "collector/fixtures/textfile/no_metric_files.out",
    "content": "# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n"
  },
  {
    "path": "collector/fixtures/textfile/nonexistent_path.out",
    "content": "# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 1\n"
  },
  {
    "path": "collector/fixtures/textfile/summary/metrics.prom",
    "content": "# HELP event_duration_seconds_total Query timings\n# TYPE event_duration_seconds_total summary\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.5\"} 1.073e-06\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.9\"} 1.928e-06\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.99\"} 4.35e-06\nevent_duration_seconds_total_sum{baz=\"inner_eval\"} 1.8652166505091474e+06\nevent_duration_seconds_total_count{baz=\"inner_eval\"} 1.492355615e+09\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.5\"} 4.283e-06\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.9\"} 7.796e-06\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.99\"} 2.2083e-05\nevent_duration_seconds_total_sum{baz=\"prepare_time\"} 840923.7919437207\nevent_duration_seconds_total_count{baz=\"prepare_time\"} 1.492355814e+09\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.5\"} 1.566e-06\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.9\"} 3.223e-06\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.99\"} 6.53e-06\nevent_duration_seconds_total_sum{baz=\"result_append\"} 4.404109951000078\nevent_duration_seconds_total_count{baz=\"result_append\"} 1.427647e+06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.5\"} 1.847e-06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.9\"} 2.975e-06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.99\"} 4.08e-06\nevent_duration_seconds_total_sum{baz=\"result_sort\"} 3.4123187829998307\nevent_duration_seconds_total_count{baz=\"result_sort\"} 1.427647e+06\n"
  },
  {
    "path": "collector/fixtures/textfile/summary.out",
    "content": "# HELP event_duration_seconds_total Query timings\n# TYPE event_duration_seconds_total summary\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.5\"} 1.073e-06\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.9\"} 1.928e-06\nevent_duration_seconds_total{baz=\"inner_eval\",quantile=\"0.99\"} 4.35e-06\nevent_duration_seconds_total_sum{baz=\"inner_eval\"} 1.8652166505091474e+06\nevent_duration_seconds_total_count{baz=\"inner_eval\"} 1.492355615e+09\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.5\"} 4.283e-06\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.9\"} 7.796e-06\nevent_duration_seconds_total{baz=\"prepare_time\",quantile=\"0.99\"} 2.2083e-05\nevent_duration_seconds_total_sum{baz=\"prepare_time\"} 840923.7919437207\nevent_duration_seconds_total_count{baz=\"prepare_time\"} 1.492355814e+09\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.5\"} 1.566e-06\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.9\"} 3.223e-06\nevent_duration_seconds_total{baz=\"result_append\",quantile=\"0.99\"} 6.53e-06\nevent_duration_seconds_total_sum{baz=\"result_append\"} 4.404109951000078\nevent_duration_seconds_total_count{baz=\"result_append\"} 1.427647e+06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.5\"} 1.847e-06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.9\"} 2.975e-06\nevent_duration_seconds_total{baz=\"result_sort\",quantile=\"0.99\"} 4.08e-06\nevent_duration_seconds_total_sum{baz=\"result_sort\"} 3.4123187829998307\nevent_duration_seconds_total_count{baz=\"result_sort\"} 1.427647e+06\n# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/summary/metrics.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n"
  },
  {
    "path": "collector/fixtures/textfile/summary_extra_dimension/metrics.prom",
    "content": "# HELP prometheus_rule_evaluation_duration_seconds The duration for a rule to execute.\n# TYPE prometheus_rule_evaluation_duration_seconds summary\nprometheus_rule_evaluation_duration_seconds{rule_type=\"alerting\",quantile=\"0.5\", handler=\"foo\"} 0.000571464\nprometheus_rule_evaluation_duration_seconds{rule_type=\"alerting\",quantile=\"0.9\"} 0.001765451\nprometheus_rule_evaluation_duration_seconds{rule_type=\"alerting\",quantile=\"0.99\"} 0.018672076\nprometheus_rule_evaluation_duration_seconds_sum{rule_type=\"alerting\"} 214.85081044700146\nprometheus_rule_evaluation_duration_seconds_count{rule_type=\"alerting\"} 185209\nprometheus_rule_evaluation_duration_seconds{rule_type=\"recording\",quantile=\"0.5\"} 4.3132e-05\nprometheus_rule_evaluation_duration_seconds{rule_type=\"recording\",quantile=\"0.9\"} 8.9295e-05\nprometheus_rule_evaluation_duration_seconds{rule_type=\"recording\",quantile=\"0.99\"} 0.000193657\nprometheus_rule_evaluation_duration_seconds_sum{rule_type=\"recording\"} 185091.01317759082\nprometheus_rule_evaluation_duration_seconds_count{rule_type=\"recording\"} 1.0020195e+08\n"
  },
  {
    "path": "collector/fixtures/textfile/summary_extra_dimension.out",
    "content": "# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/summary_extra_dimension/metrics.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP prometheus_rule_evaluation_duration_seconds The duration for a rule to execute.\n# TYPE prometheus_rule_evaluation_duration_seconds summary\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"alerting\",quantile=\"0.9\"} 0.001765451\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"alerting\",quantile=\"0.99\"} 0.018672076\nprometheus_rule_evaluation_duration_seconds_sum{handler=\"\",rule_type=\"alerting\"} 214.85081044700146\nprometheus_rule_evaluation_duration_seconds_count{handler=\"\",rule_type=\"alerting\"} 185209\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"recording\",quantile=\"0.5\"} 4.3132e-05\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"recording\",quantile=\"0.9\"} 8.9295e-05\nprometheus_rule_evaluation_duration_seconds{handler=\"\",rule_type=\"recording\",quantile=\"0.99\"} 0.000193657\nprometheus_rule_evaluation_duration_seconds_sum{handler=\"\",rule_type=\"recording\"} 185091.01317759082\nprometheus_rule_evaluation_duration_seconds_count{handler=\"\",rule_type=\"recording\"} 1.0020195e+08\nprometheus_rule_evaluation_duration_seconds{handler=\"foo\",rule_type=\"alerting\",quantile=\"0.5\"} 0.000571464\nprometheus_rule_evaluation_duration_seconds_sum{handler=\"foo\",rule_type=\"alerting\"} 0\nprometheus_rule_evaluation_duration_seconds_count{handler=\"foo\",rule_type=\"alerting\"} 0\n"
  },
  {
    "path": "collector/fixtures/textfile/two_metric_files/metrics1.prom",
    "content": "testmetric1_1{foo=\"bar\"} 10\ntestmetric1_2{foo=\"baz\"} 20\n"
  },
  {
    "path": "collector/fixtures/textfile/two_metric_files/metrics2.prom",
    "content": "testmetric2_1{foo=\"bar\"} 30\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/textfile/two_metric_files/non_matching_file.txt",
    "content": "This file should be ignored.\n"
  },
  {
    "path": "collector/fixtures/textfile/two_metric_files.out",
    "content": "# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.\n# TYPE node_textfile_mtime_seconds gauge\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/two_metric_files/metrics1.prom\"} 1\nnode_textfile_mtime_seconds{file=\"fixtures/textfile/two_metric_files/metrics2.prom\"} 1\n# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE node_textfile_scrape_error gauge\nnode_textfile_scrape_error 0\n# HELP testmetric1_1 Metric read from fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_1 untyped\ntestmetric1_1{foo=\"bar\"} 10\n# HELP testmetric1_2 Metric read from fixtures/textfile/two_metric_files/metrics1.prom\n# TYPE testmetric1_2 untyped\ntestmetric1_2{foo=\"baz\"} 20\n# HELP testmetric2_1 Metric read from fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_1 untyped\ntestmetric2_1{foo=\"bar\"} 30\n# HELP testmetric2_2 Metric read from fixtures/textfile/two_metric_files/metrics2.prom\n# TYPE testmetric2_2 untyped\ntestmetric2_2{foo=\"baz\"} 40\n"
  },
  {
    "path": "collector/fixtures/udev.ttar",
    "content": "# Archive created by ttar -C collector/fixtures -c -f collector/fixtures/udev.ttar udev\nDirectory: udev\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nDirectory: udev/data\nMode: 755\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b11:0\nLines: 38\nS:disk/by-id/usb-AMI_Virtual_CDROM0_AAAABBBBCCCC1-0:0\nS:disk/by-path/pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0\nS:cdrom\nL:-100\nI:83543243\nE:ID_CDROM=1\nE:SYSTEMD_MOUNT_DEVICE_BOUND=1\nE:ID_VENDOR=AMI\nE:ID_VENDOR_ENC=AMI\\x20\\x20\\x20\\x20\\x20\nE:ID_VENDOR_ID=c096\nE:ID_MODEL=Virtual_CDROM0\nE:ID_MODEL_ENC=Virtual\\x20CDROM0\\x20\\x20\nE:ID_MODEL_ID=ee31\nE:ID_REVISION=1.00\nE:ID_SERIAL=AMI_Virtual_CDROM0_AAAABBBBCCCC1-0:0\nE:ID_SERIAL_SHORT=AAAABBBBCCCC1\nE:ID_TYPE=cd/dvd\nE:ID_INSTANCE=0:0\nE:ID_BUS=usb\nE:ID_USB_INTERFACES=:905639:\nE:ID_USB_INTERFACE_NUM=00\nE:ID_USB_DRIVER=usb-storage\nE:ID_PATH=pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0\nE:ID_PATH_TAG=pci-0000_00_14_0-usb-0_1_1_1_0-scsi-0_0_0_0\nE:SCSI_TPGS=0\nE:SCSI_TYPE=cd/dvd\nE:SCSI_VENDOR=AMI\nE:SCSI_VENDOR_ENC=AMI\\x20\\x20\\x20\\x20\\x20\nE:SCSI_MODEL=Virtual_CDROM0\nE:SCSI_MODEL_ENC=Virtual\\x20CDROM0\\x20\\x20\nE:SCSI_REVISION=1.00\nE:ID_SCSI=1\nE:ID_SCSI_INQUIRY=1\nE:ID_FS_TYPE=\nE:ID_FOR_SEAT=block-pci-0000_00_14_0-usb-0_1_1_1_0-scsi-0_0_0_0\nG:uaccess\nG:systemd\nG:seat\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b179:0\nLines: 13\nS:disk/by-path/platform-df2969f3.mmc\nS:disk/by-id/mmc-SC64G_0x83e36d93\nW:1\nI:7679747\nE:ID_NAME=SC64G\nE:ID_SERIAL=0x83e36d93\nE:ID_PATH=platform-df2969f3.mmc\nE:ID_PATH_TAG=platform-df2969f3_mmc\nE:ID_PART_TABLE_UUID=1954c9df\nE:ID_PART_TABLE_TYPE=dos\nE:ID_DRIVE_FLASH_SD=1\nE:ID_DRIVE_MEDIA_FLASH_SD=1\nG:systemd\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b179:1\nLines: 30\nS:disk/by-id/mmc-SC64G_0x83e36d93-part1\nS:disk/by-path/platform-df2969f3.mmc-part1\nS:disk/by-label/boot\nS:disk/by-uuid/6284-658D\nS:disk/by-partuuid/1954c9df-01\nW:12\nI:8463403\nE:ID_NAME=SC64G\nE:ID_SERIAL=0x83e36d93\nE:ID_PATH=platform-df2969f3.mmc\nE:ID_PATH_TAG=platform-df2969f3_mmc\nE:ID_PART_TABLE_UUID=1954c9df\nE:ID_PART_TABLE_TYPE=dos\nE:ID_DRIVE_FLASH_SD=1\nE:ID_DRIVE_MEDIA_FLASH_SD=1\nE:ID_FS_LABEL=boot\nE:ID_FS_LABEL_ENC=boot\nE:ID_FS_UUID=6284-658D\nE:ID_FS_UUID_ENC=6284-658D\nE:ID_FS_VERSION=FAT32\nE:ID_FS_TYPE=vfat\nE:ID_FS_USAGE=filesystem\nE:ID_PART_ENTRY_SCHEME=dos\nE:ID_PART_ENTRY_UUID=1954c9df-01\nE:ID_PART_ENTRY_TYPE=0xc\nE:ID_PART_ENTRY_NUMBER=1\nE:ID_PART_ENTRY_OFFSET=8192\nE:ID_PART_ENTRY_SIZE=524288\nE:ID_PART_ENTRY_DISK=179:0\nG:systemd\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b179:2\nLines: 30\nS:disk/by-id/mmc-SC64G_0x83e36d93-part2\nS:disk/by-path/platform-df2969f3.mmc-part2\nS:disk/by-label/rootfs\nS:disk/by-uuid/83324ce8-a6f3-4e35-ad64-dbb3d6b87a32\nS:disk/by-partuuid/1954c9df-02\nW:2\nI:7676649\nE:ID_NAME=SC64G\nE:ID_SERIAL=0x83e36d93\nE:ID_PATH=platform-df2969f3.mmc\nE:ID_PATH_TAG=platform-df2969f3_mmc\nE:ID_PART_TABLE_UUID=1954c9df\nE:ID_PART_TABLE_TYPE=dos\nE:ID_DRIVE_FLASH_SD=1\nE:ID_DRIVE_MEDIA_FLASH_SD=1\nE:ID_FS_LABEL=rootfs\nE:ID_FS_LABEL_ENC=rootfs\nE:ID_FS_UUID=83324ce8-a6f3-4e35-ad64-dbb3d6b87a32\nE:ID_FS_UUID_ENC=83324ce8-a6f3-4e35-ad64-dbb3d6b87a32\nE:ID_FS_VERSION=1.0\nE:ID_FS_TYPE=ext4\nE:ID_FS_USAGE=filesystem\nE:ID_PART_ENTRY_SCHEME=dos\nE:ID_PART_ENTRY_UUID=1954c9df-02\nE:ID_PART_ENTRY_TYPE=0x83\nE:ID_PART_ENTRY_NUMBER=2\nE:ID_PART_ENTRY_OFFSET=532480\nE:ID_PART_ENTRY_SIZE=124203008\nE:ID_PART_ENTRY_DISK=179:0\nG:systemd\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b252:0\nLines: 20\nS:disk/by-id/dm-name-nvme0n1_crypt\nS:mapper/nvme0n1_crypt\nS:disk/by-id/lvm-pv-uuid-c3C3uW-gD96-Yw69-c1CJ-5MwT-6ysM-mST0vB\nS:disk/by-id/dm-uuid-CRYPT-LUKS2-jolaulot80fy9zsiobkxyxo7y2dqeho2-nvme0n1_crypt\nI:72859885\nE:DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1\nE:DM_UDEV_PRIMARY_SOURCE_FLAG=1\nE:DM_UDEV_RULES=1\nE:DM_UDEV_RULES_VSN=2\nE:DM_NAME=nvme0n1_crypt\nE:DM_UUID=CRYPT-LUKS2-jolaulot80fy9zsiobkxyxo7y2dqeho2-nvme0n1_crypt\nE:DM_SUSPENDED=0\nE:ID_FS_UUID=c3C3uW-gD96-Yw69-c1CJ-5MwT-6ysM-mST0vB\nE:ID_FS_UUID_ENC=c3C3uW-gD96-Yw69-c1CJ-5MwT-6ysM-mST0vB\nE:ID_FS_VERSION=LVM2 001\nE:ID_FS_TYPE=LVM2_member\nE:ID_FS_USAGE=raid\nG:systemd\nQ:systemd\nV:1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b252:1\nLines: 24\nS:disk/by-id/dm-uuid-LVM-wbGqQEBL9SxrW2DLntJwgg8fAv946hw3Tvjqh0v31fWgxEtD4BoHO0lROWFUY65T\nS:mapper/system-swap_1\nS:disk/by-id/dm-name-system-swap_1\nS:disk/by-uuid/5272bb60-04b5-49cd-b730-be57c7604450\nS:system/swap_1\nI:78705530\nE:DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1\nE:DM_UDEV_PRIMARY_SOURCE_FLAG=1\nE:DM_UDEV_RULES=1\nE:DM_UDEV_RULES_VSN=2\nE:DM_NAME=system-swap_1\nE:DM_UUID=LVM-wbGqQEBL9SxrW2DLntJwgg8fAv946hw3Tvjqh0v31fWgxEtD4BoHO0lROWFUY65T\nE:DM_SUSPENDED=0\nE:DM_VG_NAME=system\nE:DM_LV_NAME=swap_1\nE:DM_LV_LAYER=\nE:ID_FS_UUID=5272bb60-04b5-49cd-b730-be57c7604450\nE:ID_FS_UUID_ENC=5272bb60-04b5-49cd-b730-be57c7604450\nE:ID_FS_VERSION=1\nE:ID_FS_TYPE=swap\nE:ID_FS_USAGE=other\nG:systemd\nQ:systemd\nV:1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b252:2\nLines: 24\nS:disk/by-id/dm-name-system-root\nS:disk/by-id/dm-uuid-LVM-NWEDo8q5ABDyJuC3F8veKNyWfYmeIBfFMS4MF3HakzUhkk7ekDm6fJTHkl2fYHe7\nS:mapper/system-root\nS:disk/by-uuid/3deafd0d-faff-4695-8d15-51061ae1f51b\nS:system/root\nI:77655410\nE:DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1\nE:DM_UDEV_PRIMARY_SOURCE_FLAG=1\nE:DM_UDEV_RULES=1\nE:DM_UDEV_RULES_VSN=2\nE:DM_NAME=system-root\nE:DM_UUID=LVM-NWEDo8q5ABDyJuC3F8veKNyWfYmeIBfFMS4MF3HakzUhkk7ekDm6fJTHkl2fYHe7\nE:DM_SUSPENDED=0\nE:DM_VG_NAME=system\nE:DM_LV_NAME=root\nE:DM_LV_LAYER=\nE:ID_FS_UUID=3deafd0d-faff-4695-8d15-51061ae1f51b\nE:ID_FS_UUID_ENC=3deafd0d-faff-4695-8d15-51061ae1f51b\nE:ID_FS_VERSION=1.0\nE:ID_FS_TYPE=ext4\nE:ID_FS_USAGE=filesystem\nG:systemd\nQ:systemd\nV:1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b252:3\nLines: 24\nS:disk/by-id/dm-name-system-var\nS:disk/by-id/dm-uuid-LVM-hrxHo0rlZ6U95ku5841Lpd17bS1Z7V7lrtEE60DVgE6YEOCdS9gcDGyonWim4hGP\nS:mapper/system-var\nS:disk/by-uuid/5c772222-f7d4-4c8e-87e8-e97df6b7a45e\nS:system/var\nI:79395348\nE:DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1\nE:DM_UDEV_PRIMARY_SOURCE_FLAG=1\nE:DM_UDEV_RULES=1\nE:DM_UDEV_RULES_VSN=2\nE:DM_NAME=system-var\nE:DM_UUID=LVM-hrxHo0rlZ6U95ku5841Lpd17bS1Z7V7lrtEE60DVgE6YEOCdS9gcDGyonWim4hGP\nE:DM_SUSPENDED=0\nE:DM_VG_NAME=system\nE:DM_LV_NAME=var\nE:DM_LV_LAYER=\nE:ID_FS_UUID=5c772222-f7d4-4c8e-87e8-e97df6b7a45e\nE:ID_FS_UUID_ENC=5c772222-f7d4-4c8e-87e8-e97df6b7a45e\nE:ID_FS_VERSION=1.0\nE:ID_FS_TYPE=ext4\nE:ID_FS_USAGE=filesystem\nG:systemd\nQ:systemd\nV:1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b252:4\nLines: 24\nS:system/tmp\nS:disk/by-uuid/a9479d44-60e1-4015-a1e5-bb065e6dd11b\nS:disk/by-id/dm-uuid-LVM-XTNGOHjPWLHcxmJmVu5cWTXEtuzqDeBkdEHAZW5q9LxWQ2d4mb5CchUQzUPJpl8H\nS:mapper/system-tmp\nS:disk/by-id/dm-name-system-tmp\nI:75852450\nE:DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1\nE:DM_UDEV_PRIMARY_SOURCE_FLAG=1\nE:DM_UDEV_RULES=1\nE:DM_UDEV_RULES_VSN=2\nE:DM_NAME=system-tmp\nE:DM_UUID=LVM-XTNGOHjPWLHcxmJmVu5cWTXEtuzqDeBkdEHAZW5q9LxWQ2d4mb5CchUQzUPJpl8H\nE:DM_SUSPENDED=0\nE:DM_VG_NAME=system\nE:DM_LV_NAME=tmp\nE:DM_LV_LAYER=\nE:ID_FS_UUID=a9479d44-60e1-4015-a1e5-bb065e6dd11b\nE:ID_FS_UUID_ENC=a9479d44-60e1-4015-a1e5-bb065e6dd11b\nE:ID_FS_VERSION=1.0\nE:ID_FS_TYPE=ext4\nE:ID_FS_USAGE=filesystem\nG:systemd\nQ:systemd\nV:1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b252:5\nLines: 24\nS:disk/by-uuid/b05b726a-c718-4c4d-8641-7c73a7696d83\nS:mapper/system-home\nS:system/home\nS:disk/by-id/dm-name-system-home\nS:disk/by-id/dm-uuid-LVM-MtoJaWTpjWRXlUnNFlpxZauTEuYlMvGFutigEzCCrfj8CNh6jCRi5LQJXZCpLjPf\nI:72604009\nE:DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1\nE:DM_UDEV_PRIMARY_SOURCE_FLAG=1\nE:DM_UDEV_RULES=1\nE:DM_UDEV_RULES_VSN=2\nE:DM_NAME=system-home\nE:DM_UUID=LVM-MtoJaWTpjWRXlUnNFlpxZauTEuYlMvGFutigEzCCrfj8CNh6jCRi5LQJXZCpLjPf\nE:DM_SUSPENDED=0\nE:DM_VG_NAME=system\nE:DM_LV_NAME=home\nE:DM_LV_LAYER=\nE:ID_FS_UUID=b05b726a-c718-4c4d-8641-7c73a7696d83\nE:ID_FS_UUID_ENC=b05b726a-c718-4c4d-8641-7c73a7696d83\nE:ID_FS_VERSION=1.0\nE:ID_FS_TYPE=ext4\nE:ID_FS_USAGE=filesystem\nG:systemd\nQ:systemd\nV:1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b254:0\nLines: 10\nS:disk/by-path/pci-0000:00:06.0\nS:disk/by-path/virtio-pci-0000:00:06.0\nW:1\nI:8524171\nE:ID_PATH=pci-0000:00:06.0\nE:ID_PATH_TAG=pci-0000_00_06_0\nE:ID_PART_TABLE_UUID=653b59fd\nE:ID_PART_TABLE_TYPE=dos\nE:ID_FS_TYPE=\nG:systemd\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b259:0\nLines: 17\nS:disk/by-path/pci-0000:02:00.0-nvme-1\nS:disk/by-id/nvme-eui.p3vbbiejx5aae2r3\nS:disk/by-id/nvme-SAMSUNG_EHFTF55LURSY-000Y9_S252B6CU1HG3M1\nI:79621327\nE:ID_SERIAL_SHORT=S252B6CU1HG3M1\nE:ID_WWN=eui.p3vbbiejx5aae2r3\nE:ID_MODEL=SAMSUNG EHFTF55LURSY-000Y9\nE:ID_REVISION=4NBTUY95\nE:ID_SERIAL=SAMSUNG_EHFTF55LURSY-000Y9_S252B6CU1HG3M1\nE:ID_PATH=pci-0000:02:00.0-nvme-1\nE:ID_PATH_TAG=pci-0000_02_00_0-nvme-1\nE:ID_PART_TABLE_UUID=f301fdbd-fd1f-46d4-9fb8-c9aeb757f050\nE:ID_PART_TABLE_TYPE=gpt\nE:ID_FS_TYPE=\nG:systemd\nQ:systemd\nV:1\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b8:0\nLines: 60\nS:disk/by-id/lvm-pv-uuid-cVVv6j-HSA2-IY33-1Jmj-dO2H-YL7w-b4Oxqw\nS:disk/by-id/scsi-SATA_TOSHIBA_KSDB4U86_2160A0D5FVGG\nS:disk/by-id/ata-TOSHIBA_KSDB4U866TE_2160A0D5FVGG\nS:disk/by-path/pci-0000:3b:00.0-sas-phy7-lun-0\nS:disk/by-id/scsi-37c72382b8de36a64\nS:disk/by-id/wwn-0x7c72382b8de36a64\nW:702\nI:73815117\nE:ID_ATA=1\nE:ID_TYPE=disk\nE:ID_BUS=ata\nE:ID_MODEL=TOSHIBA_KSDB4U86\nE:ID_MODEL_ENC=TOSHIBA\\x20KSDB4U86\nE:ID_REVISION=0102\nE:ID_SERIAL=TOSHIBA_KSDB4U866TE_DTB0QRJR2EIG\nE:ID_SERIAL_SHORT=2160A0D5FVGG\nE:ID_ATA_WRITE_CACHE=1\nE:ID_ATA_WRITE_CACHE_ENABLED=0\nE:ID_ATA_FEATURE_SET_PM=1\nE:ID_ATA_FEATURE_SET_PM_ENABLED=1\nE:ID_ATA_FEATURE_SET_SECURITY=1\nE:ID_ATA_FEATURE_SET_SECURITY_ENABLED=0\nE:ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=66892\nE:ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=66892\nE:ID_ATA_FEATURE_SET_SMART=1\nE:ID_ATA_FEATURE_SET_SMART_ENABLED=1\nE:ID_ATA_FEATURE_SET_APM=1\nE:ID_ATA_FEATURE_SET_APM_ENABLED=1\nE:ID_ATA_FEATURE_SET_APM_CURRENT_VALUE=128\nE:ID_ATA_DOWNLOAD_MICROCODE=1\nE:ID_ATA_SATA=1\nE:ID_ATA_SATA_SIGNAL_RATE_GEN2=1\nE:ID_ATA_SATA_SIGNAL_RATE_GEN1=1\nE:ID_ATA_ROTATION_RATE_RPM=7200\nE:ID_WWN=0x7c72382b8de36a64\nE:ID_WWN_WITH_EXTENSION=0x7c72382b8de36a64\nE:ID_PATH=pci-0000:3b:00.0-sas-phy7-lun-0\nE:ID_PATH_TAG=pci-0000_3b_00_0-sas-phy7-lun-0\nE:ID_FS_UUID=cVVv6j-HSA2-IY33-1Jmj-dO2H-YL7w-b4Oxqw\nE:ID_FS_UUID_ENC=cVVv6j-HSA2-IY33-1Jmj-dO2H-YL7w-b4Oxqw\nE:ID_FS_VERSION=LVM2 001\nE:ID_FS_TYPE=LVM2_member\nE:ID_FS_USAGE=raid\nE:SCSI_TPGS=0\nE:SCSI_TYPE=disk\nE:SCSI_VENDOR=ATA\nE:SCSI_VENDOR_ENC=ATA\\x20\\x20\\x20\\x20\\x20\nE:SCSI_MODEL=TOSHIBA_KSDB4U86\nE:SCSI_MODEL_ENC=TOSHIBA\\x20KSDB4U86\nE:SCSI_REVISION=0102\nE:ID_SCSI=1\nE:ID_SCSI_INQUIRY=1\nE:ID_VENDOR=ATA\nE:ID_VENDOR_ENC=ATA\\x20\\x20\\x20\\x20\\x20\nE:SCSI_IDENT_SERIAL=2160A0D5FVGG\nE:SCSI_IDENT_LUN_NAA_REG=7c72382b8de36a64\nE:SYSTEMD_READY=1\nE:SYSTEMD_ALIAS=/dev/block/8:0\nE:SYSTEMD_WANTS=lvm2-pvscan@8:0.service\nG:systemd\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b8:16\nLines: 62\nS:disk/by-id/scsi-3e1b87abbb16bd84e\nS:disk/by-id/wwn-0xe1b87abbb16bd84e\nS:disk/by-path/pci-0000:00:1f.2-ata-1\nS:disk/by-id/scsi-0ATA_SuperMicro_SSD_SMC0E1B87ABBB16BD84E\nS:disk/by-id/scsi-SATA_SuperMicro_SSD_SMC0E1B87ABBB16BD84E\nS:disk/by-id/scsi-1ATA_SuperMicro_SSD_SMC0E1B87ABBB16BD84E\nS:disk/by-id/ata-SuperMicro_SSD_SMC0E1B87ABBB16BD84E\nW:58\nI:147686920\nE:ID_ATA=1\nE:ID_TYPE=disk\nE:ID_BUS=ata\nE:ID_MODEL=SuperMicro_SSD\nE:ID_MODEL_ENC=SuperMicro\\x20SSD\\x20\\x20\nE:ID_REVISION=0R\nE:ID_SERIAL=SuperMicro_SSD_SMC0E1B87ABBB16BD84E\nE:ID_SERIAL_SHORT=SMC0E1B87ABBB16BD84E\nE:ID_ATA_WRITE_CACHE=1\nE:ID_ATA_WRITE_CACHE_ENABLED=1\nE:ID_ATA_FEATURE_SET_HPA=1\nE:ID_ATA_FEATURE_SET_HPA_ENABLED=1\nE:ID_ATA_FEATURE_SET_PM=1\nE:ID_ATA_FEATURE_SET_PM_ENABLED=1\nE:ID_ATA_FEATURE_SET_SECURITY=1\nE:ID_ATA_FEATURE_SET_SECURITY_ENABLED=0\nE:ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=4\nE:ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=4\nE:ID_ATA_FEATURE_SET_SMART=1\nE:ID_ATA_FEATURE_SET_SMART_ENABLED=1\nE:ID_ATA_FEATURE_SET_AAM=1\nE:ID_ATA_FEATURE_SET_AAM_ENABLED=0\nE:ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE=0\nE:ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE=0\nE:ID_ATA_DOWNLOAD_MICROCODE=1\nE:ID_ATA_SATA=1\nE:ID_ATA_SATA_SIGNAL_RATE_GEN2=1\nE:ID_ATA_SATA_SIGNAL_RATE_GEN1=1\nE:ID_ATA_ROTATION_RATE_RPM=0\nE:ID_WWN=0xe1b87abbb16bd84e\nE:ID_WWN_WITH_EXTENSION=0xe1b87abbb16bd84e\nE:ID_PATH=pci-0000:00:1f.2-ata-1\nE:ID_PATH_TAG=pci-0000_00_1f_2-ata-1\nE:ID_PART_TABLE_UUID=45980145-24e2-4302-a7f0-364c68cfaf59\nE:ID_PART_TABLE_TYPE=gpt\nE:SCSI_TPGS=0\nE:SCSI_TYPE=disk\nE:SCSI_VENDOR=ATA\nE:SCSI_VENDOR_ENC=ATA\\x20\\x20\\x20\\x20\\x20\nE:SCSI_MODEL=SuperMicro_SSD\nE:SCSI_MODEL_ENC=SuperMicro\\x20SSD\\x20\\x20\nE:SCSI_REVISION=0R\nE:ID_SCSI=1\nE:ID_SCSI_INQUIRY=1\nE:ID_VENDOR=ATA\nE:ID_VENDOR_ENC=ATA\\x20\\x20\\x20\\x20\\x20\nE:SCSI_IDENT_SERIAL=SMC0E1B87ABBB16BD84E\nE:SCSI_IDENT_LUN_VENDOR=SMC0E1B87ABBB16BD84E\nE:SCSI_IDENT_LUN_T10=ATA_SuperMicro_SSD_SMC0E1B87ABBB16BD84E\nE:SCSI_IDENT_LUN_ATA=SuperMicro_SSD_SMC0E1B87ABBB16BD84E\nE:SCSI_IDENT_LUN_NAA_REG=e1b87abbb16bd84e\nE:ID_FS_TYPE=\nG:systemd\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nPath: udev/data/b8:32\nLines: 62\nS:disk/by-path/pci-0000:00:1f.2-ata-4\nS:disk/by-id/scsi-SATA_INTEL_SSDS9X9SI0_3EWB5Y25CWQWA7EH1U\nS:disk/by-id/scsi-0ATA_INTEL_SSDS9X9SI0_3EWB5Y25CWQWA7EH1U\nS:disk/by-id/scsi-1ATA_INTEL_SSDS9X9SI00G8_3EWB5Y25CWQWA7EH1U\nS:disk/by-id/lvm-pv-uuid-QFy9W7-Brj3-hQ6v-AF8i-3Zqg-n3Vs-kGY4vb\nS:disk/by-id/ata-INTEL_SSDS9X9SI00G8_3EWB5Y25CWQWA7EH1U\nS:disk/by-id/scsi-358907ddc573a5de\nS:disk/by-id/wwn-0x58907ddc573a5de\nW:10\nI:145572852\nE:ID_ATA=1\nE:ID_TYPE=disk\nE:ID_BUS=ata\nE:ID_MODEL=INTEL_SSDS9X9SI0\nE:ID_MODEL_ENC=INTEL\\x20SSDS9X9SI0\nE:ID_REVISION=0100\nE:ID_SERIAL=INTEL_SSDS9X9SI00G8_3EWB5Y25CWQWA7EH1U\nE:ID_SERIAL_SHORT=3EWB5Y25CWQWA7EH1U\nE:ID_ATA_WRITE_CACHE=1\nE:ID_ATA_WRITE_CACHE_ENABLED=0\nE:ID_ATA_FEATURE_SET_PM=1\nE:ID_ATA_FEATURE_SET_PM_ENABLED=1\nE:ID_ATA_FEATURE_SET_SECURITY=1\nE:ID_ATA_FEATURE_SET_SECURITY_ENABLED=0\nE:ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=4\nE:ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=4\nE:ID_ATA_FEATURE_SET_SMART=1\nE:ID_ATA_FEATURE_SET_SMART_ENABLED=1\nE:ID_ATA_DOWNLOAD_MICROCODE=1\nE:ID_ATA_SATA=1\nE:ID_ATA_SATA_SIGNAL_RATE_GEN2=1\nE:ID_ATA_SATA_SIGNAL_RATE_GEN1=1\nE:ID_ATA_ROTATION_RATE_RPM=0\nE:ID_WWN=0x58907ddc573a5de\nE:ID_WWN_WITH_EXTENSION=0x58907ddc573a5de\nE:ID_PATH=pci-0000:00:1f.2-ata-4\nE:ID_PATH_TAG=pci-0000_00_1f_2-ata-4\nE:ID_FS_UUID=QFy9W7-Brj3-hQ6v-AF8i-3Zqg-n3Vs-kGY4vb\nE:ID_FS_UUID_ENC=QFy9W7-Brj3-hQ6v-AF8i-3Zqg-n3Vs-kGY4vb\nE:ID_FS_VERSION=LVM2 001\nE:ID_FS_TYPE=LVM2_member\nE:ID_FS_USAGE=raid\nE:SCSI_TPGS=0\nE:SCSI_TYPE=disk\nE:SCSI_VENDOR=ATA\nE:SCSI_VENDOR_ENC=ATA\\x20\\x20\\x20\\x20\\x20\nE:SCSI_MODEL=INTEL_SSDS9X9SI0\nE:SCSI_MODEL_ENC=INTEL\\x20SSDS9X9SI0\nE:SCSI_REVISION=0100\nE:ID_SCSI=1\nE:ID_SCSI_INQUIRY=1\nE:ID_VENDOR=ATA\nE:ID_VENDOR_ENC=ATA\\x20\\x20\\x20\\x20\\x20\nE:SCSI_IDENT_SERIAL=3EWB5Y25CWQWA7EH1U\nE:SCSI_IDENT_LUN_VENDOR=3EWB5Y25CWQWA7EH1U\nE:SCSI_IDENT_LUN_T10=ATA_INTEL_SSDS9X9SI00G8_3EWB5Y25CWQWA7EH1U\nE:SCSI_IDENT_LUN_ATA=INTEL_SSDS9X9SI00G8_3EWB5Y25CWQWA7EH1U\nE:SCSI_IDENT_LUN_NAA_REG=58907ddc573a5de\nE:SYSTEMD_READY=1\nE:SYSTEMD_ALIAS=/dev/block/8:32\nE:SYSTEMD_WANTS=lvm2-pvscan@8:32.service\nG:systemd\nMode: 644\n# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n"
  },
  {
    "path": "collector/fixtures/usr/lib/os-release",
    "content": "NAME=\"Ubuntu\"\nVERSION=\"20.04.2 LTS (Focal Fossa)\"\nID=ubuntu\nID_LIKE=debian\nPRETTY_NAME=\"Ubuntu 20.04.2 LTS\"\nVERSION_ID=\"20.04\"\nHOME_URL=\"https://www.ubuntu.com/\"\nSUPPORT_URL=\"https://help.ubuntu.com/\"\nBUG_REPORT_URL=\"https://bugs.launchpad.net/ubuntu/\"\nPRIVACY_POLICY_URL=\"https://www.ubuntu.com/legal/terms-and-policies/privacy-policy\"\nVERSION_CODENAME=focal\nUBUNTU_CODENAME=focal\n"
  },
  {
    "path": "collector/fixtures/wifi/interfaces.json",
    "content": "[\n\t{\n\t\t\"name\": \"wlan0\",\n\t\t\"type\": 2,\n\t\t\"frequency\": 2412\n\t},\n\t{\n\t\t\"name\": \"wlan1\",\n\t\t\"type\": 3,\n\t\t\"frequency\": 2412\n\t},\n\t{\n\t\t\"type\": 10\n\t}\n]\n"
  },
  {
    "path": "collector/fixtures/wifi/wlan0/bss.json",
    "content": "{\n\t\"ssid\": \"Example\",\n\t\"bssid\": \"ABEiM0RV\",\n\t\"status\": 1\n}\n"
  },
  {
    "path": "collector/fixtures/wifi/wlan0/stationinfo.json",
    "content": "[\n\t{\n\t\t\"hardwareaddr\": \"qrvM3e7/\",\n\t\t\"connected\": 30000000000,\n\t\t\"inactive\": 400000000,\n\t\t\"receivebitrate\": 128000000,\n\t\t\"transmitbitrate\": 164000000,\n\t\t\"signal\": -52,\n\t\t\"transmitretries\": 10,\n\t\t\"transmitfailed\": 2,\n\t\t\"beaconloss\": 1\n\t},\n\t{\n\t\t\"hardwareaddr\": \"AQIDBAUG\",\n\t\t\"connected\": 60000000000,\n\t\t\"inactive\": 800000000,\n\t\t\"receivebitrate\": 256000000,\n\t\t\"transmitbitrate\": 328000000,\n\t\t\"signal\": -26,\n\t\t\"transmitretries\": 20,\n\t\t\"transmitfailed\": 4,\n\t\t\"beaconloss\": 2\n\t}\n]\n\n"
  },
  {
    "path": "collector/fixtures_bindmount/proc/1/mountinfo",
    "content": "29 1 259:0 / /host rw,seclabel,relatime,data=ordered shared:1 - ext4 /dev/nvme1n0 rw\n30 1 260:0 / /host/media/volume1 rw,seclabel,relatime,data=ordered shared:1 - ext4 /dev/nvme1n1 rw\n31 1 261:0 / /host/media/volume2 rw,seclabel,relatime,data=ordered shared:1 - ext4 /dev/nvme1n2 rw\n31 26 0:26 / /dev/shm rw,nosuid,nodev shared:4 - tmpfs tmpfs rw,inode64\n32 28 0:27 / /run/lock rw,nosuid,nodev,noexec,relatime shared:6 - tmpfs tmpfs rw,size=5120k,inode64\n33 24 0:28 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:9 - cgroup2 cgroup2 rw\n"
  },
  {
    "path": "collector/fixtures_hidepid/proc/self/mountinfo",
    "content": "29 1 259:2 / / rw,relatime shared:1 - ext4 /dev/nvme0n1p2 rw,errors=remount-ro\n"
  },
  {
    "path": "collector/helper.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc readUintFromFile(path string) (uint64, error) {\n\tdata, err := os.ReadFile(path)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tvalue, err := strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\treturn value, nil\n}\n\nvar metricNameRegex = regexp.MustCompile(`_*[^0-9A-Za-z_]+_*`)\n\n// SanitizeMetricName sanitize the given metric name by replacing invalid characters by underscores.\n//\n// OpenMetrics and the Prometheus exposition format require the metric name\n// to consist only of alphanumericals and \"_\", \":\" and they must not start\n// with digits. Since colons in MetricFamily are reserved to signal that the\n// MetricFamily is the result of a calculation or aggregation of a general\n// purpose monitoring system, colons will be replaced as well.\n//\n// Note: If not subsequently prepending a namespace and/or subsystem (e.g.,\n// with prometheus.BuildFQName), the caller must ensure that the supplied\n// metricName does not begin with a digit.\nfunc SanitizeMetricName(metricName string) string {\n\treturn metricNameRegex.ReplaceAllString(metricName, \"_\")\n}\n"
  },
  {
    "path": "collector/helper_test.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"testing\"\n)\n\nfunc TestSanitizeMetricName(t *testing.T) {\n\ttestcases := map[string]string{\n\t\t\"\":                             \"\",\n\t\t\"rx_errors\":                    \"rx_errors\",\n\t\t\"Queue[0] AllocFails\":          \"Queue_0_AllocFails\",\n\t\t\"Tx LPI entry count\":           \"Tx_LPI_entry_count\",\n\t\t\"port.VF_admin_queue_requests\": \"port_VF_admin_queue_requests\",\n\t\t\"[3]: tx_bytes\":                \"_3_tx_bytes\",\n\t\t\"     err\":                     \"_err\",\n\t}\n\n\tfor metricName, expected := range testcases {\n\t\tgot := SanitizeMetricName(metricName)\n\t\tif expected != got {\n\t\t\tt.Errorf(\"Expected '%s' but got '%s'\", expected, got)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "collector/hwmon_linux.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nohwmon\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\nvar (\n\tcollectorHWmonChipInclude   = kingpin.Flag(\"collector.hwmon.chip-include\", \"Regexp of hwmon chip to include (mutually exclusive to device-exclude).\").String()\n\tcollectorHWmonChipExclude   = kingpin.Flag(\"collector.hwmon.chip-exclude\", \"Regexp of hwmon chip to exclude (mutually exclusive to device-include).\").String()\n\tcollectorHWmonSensorInclude = kingpin.Flag(\"collector.hwmon.sensor-include\", \"Regexp of hwmon sensor to include (mutually exclusive to sensor-exclude).\").String()\n\tcollectorHWmonSensorExclude = kingpin.Flag(\"collector.hwmon.sensor-exclude\", \"Regexp of hwmon sensor to exclude (mutually exclusive to sensor-include).\").String()\n\n\thwmonInvalidMetricChars = regexp.MustCompile(\"[^a-z0-9:_]\")\n\thwmonFilenameFormat     = regexp.MustCompile(`^(?P<type>[^0-9]+)(?P<id>[0-9]*)?(_(?P<property>.+))?$`)\n\thwmonLabelDesc          = []string{\"chip\", \"sensor\"}\n\thwmonChipNameLabelDesc  = []string{\"chip\", \"chip_name\"}\n\thwmonSensorTypes        = []string{\n\t\t\"vrm\", \"beep_enable\", \"update_interval\", \"in\", \"cpu\", \"fan\",\n\t\t\"pwm\", \"temp\", \"curr\", \"power\", \"energy\", \"humidity\",\n\t\t\"intrusion\", \"freq\",\n\t}\n)\n\nfunc init() {\n\tregisterCollector(\"hwmon\", defaultEnabled, NewHwMonCollector)\n}\n\ntype hwMonCollector struct {\n\tdeviceFilter deviceFilter\n\tsensorFilter deviceFilter\n\tlogger       *slog.Logger\n}\n\n// NewHwMonCollector returns a new Collector exposing /sys/class/hwmon stats\n// (similar to lm-sensors).\nfunc NewHwMonCollector(logger *slog.Logger) (Collector, error) {\n\n\treturn &hwMonCollector{\n\t\tlogger:       logger,\n\t\tdeviceFilter: newDeviceFilter(*collectorHWmonChipExclude, *collectorHWmonChipInclude),\n\t\tsensorFilter: newDeviceFilter(*collectorHWmonSensorExclude, *collectorHWmonSensorInclude),\n\t}, nil\n}\n\nfunc cleanMetricName(name string) string {\n\tlower := strings.ToLower(name)\n\treplaced := hwmonInvalidMetricChars.ReplaceAllLiteralString(lower, \"_\")\n\tcleaned := strings.Trim(replaced, \"_\")\n\treturn cleaned\n}\n\nfunc addValueFile(data map[string]map[string]string, sensor string, prop string, file string) {\n\traw, err := sysReadFile(file)\n\tif err != nil {\n\t\treturn\n\t}\n\tvalue := strings.Trim(string(raw), \"\\n\")\n\n\tif _, ok := data[sensor]; !ok {\n\t\tdata[sensor] = make(map[string]string)\n\t}\n\n\tdata[sensor][prop] = value\n}\n\n// sysReadFile is a simplified os.ReadFile that invokes syscall.Read directly.\nfunc sysReadFile(file string) ([]byte, error) {\n\tf, err := os.Open(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer f.Close()\n\n\t// On some machines, hwmon drivers are broken and return EAGAIN.  This causes\n\t// Go's os.ReadFile implementation to poll forever.\n\t//\n\t// Since we either want to read data or bail immediately, do the simplest\n\t// possible read using system call directly.\n\tb := make([]byte, 128)\n\tn, err := unix.Read(int(f.Fd()), b)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif n < 0 {\n\t\treturn nil, fmt.Errorf(\"failed to read file: %q, read returned negative bytes value: %d\", file, n)\n\t}\n\n\treturn b[:n], nil\n}\n\n// explodeSensorFilename splits a sensor name into <type><num>_<property>.\nfunc explodeSensorFilename(filename string) (ok bool, sensorType string, sensorNum int, sensorProperty string) {\n\tmatches := hwmonFilenameFormat.FindStringSubmatch(filename)\n\tif len(matches) == 0 {\n\t\treturn false, sensorType, sensorNum, sensorProperty\n\t}\n\tfor i, match := range hwmonFilenameFormat.SubexpNames() {\n\t\tif i >= len(matches) {\n\t\t\treturn true, sensorType, sensorNum, sensorProperty\n\t\t}\n\t\tif match == \"type\" {\n\t\t\tsensorType = matches[i]\n\t\t}\n\t\tif match == \"property\" {\n\t\t\tsensorProperty = matches[i]\n\t\t}\n\t\tif match == \"id\" && len(matches[i]) > 0 {\n\t\t\tif num, err := strconv.Atoi(matches[i]); err == nil {\n\t\t\t\tsensorNum = num\n\t\t\t} else {\n\t\t\t\treturn false, sensorType, sensorNum, sensorProperty\n\t\t\t}\n\t\t}\n\t}\n\treturn true, sensorType, sensorNum, sensorProperty\n}\n\nfunc collectSensorData(dir string, data map[string]map[string]string) error {\n\tsensorFiles, dirError := os.ReadDir(dir)\n\tif dirError != nil {\n\t\treturn dirError\n\t}\n\tfor _, file := range sensorFiles {\n\t\tfilename := file.Name()\n\t\tok, sensorType, sensorNum, sensorProperty := explodeSensorFilename(filename)\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\n\t\tif slices.Contains(hwmonSensorTypes, sensorType) {\n\t\t\taddValueFile(data, sensorType+strconv.Itoa(sensorNum), sensorProperty, filepath.Join(dir, file.Name()))\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (c *hwMonCollector) updateHwmon(ch chan<- prometheus.Metric, dir string) error {\n\thwmonName, err := c.hwmonName(dir)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif c.deviceFilter.ignored(hwmonName) {\n\t\tc.logger.Debug(\"ignoring hwmon chip\", \"chip\", hwmonName)\n\t\treturn nil\n\t}\n\n\tdata := make(map[string]map[string]string)\n\terr = collectSensorData(dir, data)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif _, err := os.Stat(filepath.Join(dir, \"device\")); err == nil {\n\t\terr := collectSensorData(filepath.Join(dir, \"device\"), data)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\thwmonChipName, err := c.hwmonHumanReadableChipName(dir)\n\tif err == nil {\n\t\t// sensor chip metadata\n\t\tdesc := prometheus.NewDesc(\n\t\t\t\"node_hwmon_chip_names\",\n\t\t\t\"Annotation metric for human-readable chip names\",\n\t\t\thwmonChipNameLabelDesc,\n\t\t\tnil,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tdesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\t1.0,\n\t\t\thwmonName,\n\t\t\thwmonChipName,\n\t\t)\n\t}\n\n\t// Format all sensors.\n\tfor sensor, sensorData := range data {\n\n\t\t// Filtering for sensors is done on concatenated device name and sensor name\n\t\t// separated by a semicolon. This allows for excluding or including of specific\n\t\t// sensors on specific devices. For example, to exclude the sensor \"temp3\" on\n\t\t// the device \"platform_coretemp_0\", use \"platform_coretemp_0;temp3\"\n\t\tif c.sensorFilter.ignored(hwmonName + \";\" + sensor) {\n\t\t\tc.logger.Debug(\"ignoring sensor\", \"sensor\", sensor)\n\t\t\tcontinue\n\t\t}\n\n\t\t_, sensorType, _, _ := explodeSensorFilename(sensor)\n\n\t\tlabels := []string{hwmonName, sensor}\n\t\tif labelText, ok := sensorData[\"label\"]; ok {\n\t\t\tlabel := strings.ToValidUTF8(labelText, \"�\")\n\t\t\tdesc := prometheus.NewDesc(\"node_hwmon_sensor_label\", \"Label for given chip and sensor\",\n\t\t\t\t[]string{\"chip\", \"sensor\", \"label\"}, nil)\n\t\t\tch <- prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, 1.0, hwmonName, sensor, label)\n\t\t}\n\n\t\tif sensorType == \"beep_enable\" {\n\t\t\tvalue := 0.0\n\t\t\tif sensorData[\"\"] == \"1\" {\n\t\t\t\tvalue = 1.0\n\t\t\t}\n\t\t\tmetricName := \"node_hwmon_beep_enabled\"\n\t\t\tdesc := prometheus.NewDesc(metricName, \"Hardware beep enabled\", hwmonLabelDesc, nil)\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tdesc, prometheus.GaugeValue, value, labels...)\n\t\t\tcontinue\n\t\t}\n\t\tif sensorType == \"vrm\" {\n\t\t\tparsedValue, err := strconv.ParseFloat(sensorData[\"\"], 64)\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmetricName := \"node_hwmon_voltage_regulator_version\"\n\t\t\tdesc := prometheus.NewDesc(metricName, \"Hardware voltage regulator\", hwmonLabelDesc, nil)\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tdesc, prometheus.GaugeValue, parsedValue, labels...)\n\t\t\tcontinue\n\t\t}\n\t\tif sensorType == \"update_interval\" {\n\t\t\tparsedValue, err := strconv.ParseFloat(sensorData[\"\"], 64)\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmetricName := \"node_hwmon_update_interval_seconds\"\n\t\t\tdesc := prometheus.NewDesc(metricName, \"Hardware monitor update interval\", hwmonLabelDesc, nil)\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tdesc, prometheus.GaugeValue, parsedValue*0.001, labels...)\n\t\t\tcontinue\n\t\t}\n\n\t\tprefix := \"node_hwmon_\" + sensorType\n\n\t\tfor element, value := range sensorData {\n\n\t\t\tif element == \"label\" {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tname := prefix\n\t\t\tif element == \"input\" {\n\t\t\t\t// input is actually the value\n\t\t\t\tif _, ok := sensorData[\"\"]; ok {\n\t\t\t\t\tname = name + \"_input\"\n\t\t\t\t}\n\t\t\t} else if element != \"\" {\n\t\t\t\tname = name + \"_\" + cleanMetricName(element)\n\t\t\t}\n\t\t\tparsedValue, err := strconv.ParseFloat(value, 64)\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// special elements, fault, alarm & beep should be handed out without units\n\t\t\tif element == \"fault\" || element == \"alarm\" {\n\t\t\t\tdesc := prometheus.NewDesc(name, \"Hardware sensor \"+element+\" status (\"+sensorType+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, parsedValue, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif element == \"beep\" {\n\t\t\t\tdesc := prometheus.NewDesc(name+\"_enabled\", \"Hardware monitor sensor has beeping enabled\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, parsedValue, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// everything else should get a unit\n\t\t\tif sensorType == \"in\" || sensorType == \"cpu\" {\n\t\t\t\tdesc := prometheus.NewDesc(name+\"_volts\", \"Hardware monitor for voltage (\"+element+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue*0.001, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif sensorType == \"temp\" && element != \"type\" {\n\t\t\t\tif element == \"\" {\n\t\t\t\t\telement = \"input\"\n\t\t\t\t}\n\t\t\t\tdesc := prometheus.NewDesc(name+\"_celsius\", \"Hardware monitor for temperature (\"+element+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue*0.001, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif sensorType == \"curr\" {\n\t\t\t\tdesc := prometheus.NewDesc(name+\"_amps\", \"Hardware monitor for current (\"+element+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue*0.001, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif sensorType == \"energy\" {\n\t\t\t\tdesc := prometheus.NewDesc(name+\"_joule_total\", \"Hardware monitor for joules used so far (\"+element+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.CounterValue, parsedValue/1000000.0, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif sensorType == \"power\" && element == \"accuracy\" {\n\t\t\t\tdesc := prometheus.NewDesc(name, \"Hardware monitor power meter accuracy, as a ratio\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue/1000000.0, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif sensorType == \"power\" && (element == \"average_interval\" || element == \"average_interval_min\" || element == \"average_interval_max\") {\n\t\t\t\tdesc := prometheus.NewDesc(name+\"_seconds\", \"Hardware monitor power usage update interval (\"+element+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue*0.001, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif sensorType == \"power\" {\n\t\t\t\tdesc := prometheus.NewDesc(name+\"_watt\", \"Hardware monitor for power usage in watts (\"+element+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue/1000000.0, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif sensorType == \"humidity\" {\n\t\t\t\tdesc := prometheus.NewDesc(name, \"Hardware monitor for humidity, as a ratio (multiply with 100.0 to get the humidity as a percentage) (\"+element+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue/1000000.0, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif sensorType == \"fan\" && (element == \"input\" || element == \"min\" || element == \"max\" || element == \"target\") {\n\t\t\t\tdesc := prometheus.NewDesc(name+\"_rpm\", \"Hardware monitor for fan revolutions per minute (\"+element+\")\", hwmonLabelDesc, nil)\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue, labels...)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tif sensorType == \"freq\" && element == \"input\" {\n\t\t\t\tif label, ok := sensorData[\"label\"]; ok {\n\t\t\t\t\tsensorLabel := cleanMetricName(label)\n\t\t\t\t\tdesc := prometheus.NewDesc(name+\"_freq_mhz\", \"Hardware monitor for GPU frequency in MHz\", hwmonLabelDesc, nil)\n\t\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\t\tdesc, prometheus.GaugeValue, parsedValue/1000000.0, append(labels[:len(labels)-1], sensorLabel)...)\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// fallback, just dump the metric as is\n\n\t\t\tdesc := prometheus.NewDesc(name, \"Hardware monitor \"+sensorType+\" element \"+element, hwmonLabelDesc, nil)\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tdesc, prometheus.GaugeValue, parsedValue, labels...)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *hwMonCollector) hwmonName(dir string) (string, error) {\n\t// generate a name for a sensor path\n\n\t// sensor numbering depends on the order of linux module loading and\n\t// is thus unstable.\n\t// However the path of the device has to be stable:\n\t// - /sys/devices/<bus>/<device>\n\t// Some hardware monitors have a \"name\" file that exports a human\n\t// readable name that can be used.\n\n\t// human readable names would be bat0 or coretemp, while a path string\n\t// could be platform_applesmc.768\n\n\t// preference 1: construct a name based on device name, always unique\n\n\tdevicePath, devErr := filepath.EvalSymlinks(filepath.Join(dir, \"device\"))\n\tif devErr == nil {\n\t\tdevPathPrefix, devName := filepath.Split(devicePath)\n\t\t_, devType := filepath.Split(strings.TrimRight(devPathPrefix, \"/\"))\n\n\t\tcleanDevName := cleanMetricName(devName)\n\t\tcleanDevType := cleanMetricName(devType)\n\n\t\tif cleanDevType != \"\" && cleanDevName != \"\" {\n\t\t\treturn cleanDevType + \"_\" + cleanDevName, nil\n\t\t}\n\n\t\tif cleanDevName != \"\" {\n\t\t\treturn cleanDevName, nil\n\t\t}\n\t}\n\n\t// preference 2: is there a name file\n\tsysnameRaw, nameErr := os.ReadFile(filepath.Join(dir, \"name\"))\n\tif nameErr == nil && string(sysnameRaw) != \"\" {\n\t\tcleanName := cleanMetricName(string(sysnameRaw))\n\t\tif cleanName != \"\" {\n\t\t\treturn cleanName, nil\n\t\t}\n\t}\n\n\t// it looks bad, name and device don't provide enough information\n\t// return a hwmon[0-9]* name\n\n\trealDir, err := filepath.EvalSymlinks(dir)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\t// take the last path element, this will be hwmonX\n\t_, name := filepath.Split(realDir)\n\tcleanName := cleanMetricName(name)\n\tif cleanName != \"\" {\n\t\treturn cleanName, nil\n\t}\n\treturn \"\", errors.New(\"Could not derive a monitoring name for \" + dir)\n}\n\n// hwmonHumanReadableChipName is similar to the methods in hwmonName, but with\n// different precedences -- we can allow duplicates here.\nfunc (c *hwMonCollector) hwmonHumanReadableChipName(dir string) (string, error) {\n\tsysnameRaw, nameErr := os.ReadFile(filepath.Join(dir, \"name\"))\n\tif nameErr != nil {\n\t\treturn \"\", nameErr\n\t}\n\n\tif string(sysnameRaw) != \"\" {\n\t\tcleanName := cleanMetricName(string(sysnameRaw))\n\t\tif cleanName != \"\" {\n\t\t\treturn cleanName, nil\n\t\t}\n\t}\n\n\treturn \"\", errors.New(\"Could not derive a human-readable chip type for \" + dir)\n}\n\nfunc (c *hwMonCollector) Update(ch chan<- prometheus.Metric) error {\n\t// Step 1: scan /sys/class/hwmon, resolve all symlinks and call\n\t//         updatesHwmon for each folder\n\n\thwmonPathName := filepath.Join(sysFilePath(\"class\"), \"hwmon\")\n\n\thwmonFiles, err := os.ReadDir(hwmonPathName)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"hwmon collector metrics are not available for this system\")\n\t\t\treturn ErrNoData\n\t\t}\n\n\t\treturn err\n\t}\n\n\tvar lastErr error\n\tfor _, hwDir := range hwmonFiles {\n\t\thwmonXPathName := filepath.Join(hwmonPathName, hwDir.Name())\n\t\tfileInfo, err := os.Lstat(hwmonXPathName)\n\t\tif err != nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tif fileInfo.Mode()&os.ModeSymlink > 0 {\n\t\t\tfileInfo, err = os.Stat(hwmonXPathName)\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\tif !fileInfo.IsDir() {\n\t\t\tcontinue\n\t\t}\n\n\t\tif err = c.updateHwmon(ch, hwmonXPathName); err != nil {\n\t\t\tlastErr = err\n\t\t}\n\t}\n\n\treturn lastErr\n}\n"
  },
  {
    "path": "collector/infiniband_linux.go",
    "content": "// Copyright 2017-2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noinfiniband\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\ntype infinibandCollector struct {\n\tfs          sysfs.FS\n\tmetricDescs map[string]*prometheus.Desc\n\tlogger      *slog.Logger\n\tsubsystem   string\n}\n\nfunc init() {\n\tregisterCollector(\"infiniband\", defaultEnabled, NewInfiniBandCollector)\n}\n\n// NewInfiniBandCollector returns a new Collector exposing InfiniBand stats.\nfunc NewInfiniBandCollector(logger *slog.Logger) (Collector, error) {\n\tvar i infinibandCollector\n\tvar err error\n\n\ti.fs, err = sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\ti.logger = logger\n\n\t// Detailed description for all metrics.\n\tdescriptions := map[string]string{\n\t\t\"legacy_multicast_packets_received_total\":    \"Number of multicast packets received\",\n\t\t\"legacy_multicast_packets_transmitted_total\": \"Number of multicast packets transmitted\",\n\t\t\"legacy_data_received_bytes_total\":           \"Number of data octets received on all links\",\n\t\t\"legacy_packets_received_total\":              \"Number of data packets received on all links\",\n\t\t\"legacy_unicast_packets_received_total\":      \"Number of unicast packets received\",\n\t\t\"legacy_unicast_packets_transmitted_total\":   \"Number of unicast packets transmitted\",\n\t\t\"legacy_data_transmitted_bytes_total\":        \"Number of data octets transmitted on all links\",\n\t\t\"legacy_packets_transmitted_total\":           \"Number of data packets received on all links\",\n\t\t\"excessive_buffer_overrun_errors_total\":      \"Number of times that OverrunErrors consecutive flow control update periods occurred, each having at least one overrun error.\",\n\t\t\"link_downed_total\":                          \"Number of times the link failed to recover from an error state and went down\",\n\t\t\"link_error_recovery_total\":                  \"Number of times the link successfully recovered from an error state\",\n\t\t\"local_link_integrity_errors_total\":          \"Number of times that the count of local physical errors exceeded the threshold specified by LocalPhyErrors.\",\n\t\t\"multicast_packets_received_total\":           \"Number of multicast packets received (including errors)\",\n\t\t\"multicast_packets_transmitted_total\":        \"Number of multicast packets transmitted (including errors)\",\n\t\t\"physical_state_id\":                          \"Physical state of the InfiniBand port (0: no change, 1: sleep, 2: polling, 3: disable, 4: shift, 5: link up, 6: link error recover, 7: phytest)\",\n\t\t\"port_constraint_errors_received_total\":      \"Number of packets received on the switch physical port that are discarded\",\n\t\t\"port_constraint_errors_transmitted_total\":   \"Number of packets not transmitted from the switch physical port\",\n\t\t\"port_data_received_bytes_total\":             \"Number of data octets received on all links\",\n\t\t\"port_data_transmitted_bytes_total\":          \"Number of data octets transmitted on all links\",\n\t\t\"port_discards_received_total\":               \"Number of inbound packets discarded by the port because the port is down or congested\",\n\t\t\"port_discards_transmitted_total\":            \"Number of outbound packets discarded by the port because the port is down or congested\",\n\t\t\"port_errors_received_total\":                 \"Number of packets containing an error that were received on this port\",\n\t\t\"port_packets_received_total\":                \"Number of packets received on all VLs by this port (including errors)\",\n\t\t\"port_packets_transmitted_total\":             \"Number of packets transmitted on all VLs from this port (including errors)\",\n\t\t\"port_transmit_wait_total\":                   \"Number of ticks during which the port had data to transmit but no data was sent during the entire tick\",\n\t\t\"rate_bytes_per_second\":                      \"Maximum signal transfer rate\",\n\t\t\"state_id\":                                   \"State of the InfiniBand port (0: no change, 1: down, 2: init, 3: armed, 4: active, 5: act defer)\",\n\t\t\"unicast_packets_received_total\":             \"Number of unicast packets received (including errors)\",\n\t\t\"unicast_packets_transmitted_total\":          \"Number of unicast packets transmitted (including errors)\",\n\t\t\"port_receive_remote_physical_errors_total\":  \"Number of packets marked with the EBP (End of Bad Packet) delimiter received on the port.\",\n\t\t\"port_receive_switch_relay_errors_total\":     \"Number of packets that could not be forwarded by the switch.\",\n\t\t\"symbol_error_total\":                         \"Number of minor link errors detected on one or more physical lanes.\",\n\t\t\"vl15_dropped_total\":                         \"Number of incoming VL15 packets dropped due to resource limitations.\",\n\n\t\t// https://enterprise-support.nvidia.com/s/article/understanding-mlx5-linux-counters-and-status-parameters\n\t\t\"duplicate_requests_packets_total\":          \"The number of received packets. A duplicate request is a request that had been previously executed.\",\n\t\t\"implied_nak_seq_errors_total\":              \"The number of time the requested decided an ACK. with a PSN larger than the expected PSN for an RDMA read or response.\",\n\t\t\"lifespan_seconds\":                          \"The maximum period in ms which defines the aging of the counter reads. Two consecutive reads within this period might return the same values.\",\n\t\t\"local_ack_timeout_errors_total\":            \"The number of times QP's ack timer expired for RC, XRC, DCT QPs at the sender side. The QP retry limit was not exceed, therefore it is still recoverable error.\",\n\t\t\"np_cnp_packets_sent_total\":                 \"The number of CNP packets sent by the Notification Point when it noticed congestion experienced in the RoCEv2 IP header (ECN bits). The counters was added in MLNX_OFED 4.1\",\n\t\t\"np_ecn_marked_roce_packets_received_total\": \"The number of RoCEv2 packets received by the notification point which were marked for experiencing the congestion (ECN bits where '11' on the ingress RoCE traffic) . The counters was added in MLNX_OFED 4.1\",\n\t\t\"out_of_buffer_drops_total\":                 \"The number of drops occurred due to lack of WQE for the associated QPs.\",\n\t\t\"out_of_sequence_packets_received_total\":    \"The number of out of sequence packets received.\",\n\t\t\"packet_sequence_errors_total\":              \"The number of received NAK sequence error packets. The QP retry limit was not exceeded.\",\n\t\t\"req_cqes_errors_total\":                     \"The number of times requester detected CQEs completed with errors. The counters was added in MLNX_OFED 4.1\",\n\t\t\"req_cqes_flush_errors_total\":               \"The number of times requester detected CQEs completed with flushed errors. The counters was added in MLNX_OFED 4.1\",\n\t\t\"req_remote_access_errors_total\":            \"The number of times requester detected remote access errors. The counters was added in MLNX_OFED 4.1\",\n\t\t\"req_remote_invalid_request_errors_total\":   \"The number of times requester detected remote invalid request errors. The counters was added in MLNX_OFED 4.1\",\n\t\t\"resp_cqes_errors_total\":                    \"The number of times responder detected CQEs completed with errors. The counters was added in MLNX_OFED 4.1\",\n\t\t\"resp_cqes_flush_errors_total\":              \"The number of times responder detected CQEs completed with flushed errors. The counters was added in MLNX_OFED 4.1\",\n\t\t\"resp_local_length_errors_total\":            \"The number of times responder detected local length errors. The counters was added in MLNX_OFED 4.1\",\n\t\t\"resp_remote_access_errors_total\":           \"The number of times responder detected remote access errors. The counters was added in MLNX_OFED 4.1\",\n\t\t\"rnr_nak_retry_packets_received_total\":      \"The number of received RNR NAK packets. The QP retry limit was not exceeded.\",\n\t\t\"roce_adp_retransmits_total\":                \"The number of adaptive retransmissions for RoCE traffic. The counter was added in MLNX_OFED rev 5.0-1.0.0.0 and kernel v5.6.0\",\n\t\t\"roce_adp_retransmits_timeout_total\":        \"The number of times RoCE traffic reached timeout due to adaptive retransmission. The counter was added in MLNX_OFED rev 5.0-1.0.0.0 and kernel v5.6.0\",\n\t\t\"roce_slow_restart_used_total\":              \"The number of times RoCE slow restart was used. The counter was added in MLNX_OFED rev 5.0-1.0.0.0 and kernel v5.6.0\",\n\t\t\"roce_slow_restart_cnps_total\":              \"The number of times RoCE slow restart generated CNP packets. The counter was added in MLNX_OFED rev 5.0-1.0.0.0 and kernel v5.6.0\",\n\t\t\"roce_slow_restart_total\":                   \"The number of times RoCE slow restart changed state to slow restart. The counter was added in MLNX_OFED rev 5.0-1.0.0.0 and kernel v5.6.0\",\n\t\t\"rp_cnp_packets_handled_total\":              \"The number of CNP packets handled by the Reaction Point HCA to throttle the transmission rate. The counters was added in MLNX_OFED 4.1\",\n\t\t\"rp_cnp_ignored_packets_received_total\":     \"The number of CNP packets received and ignored by the Reaction Point HCA. This counter should not raise if RoCE Congestion Control was enabled in the network. If this counter raise, verify that ECN was enabled on the adapter.\",\n\t\t\"rx_atomic_requests_total\":                  \"The number of received ATOMIC request for the associated QPs.\",\n\t\t\"rx_dct_connect_requests_total\":             \"The number of received connection requests for the associated DCTs.\",\n\t\t\"rx_read_requests_total\":                    \"The number of received READ requests for the associated QPs.\",\n\t\t\"rx_write_requests_total\":                   \"The number of received WRITE requests for the associated QPs.\",\n\t\t\"rx_icrc_encapsulated_errors_total\":         \"The number of RoCE packets with ICRC errors. This counter was added in MLNX_OFED 4.4 and kernel 4.19\",\n\t}\n\n\ti.metricDescs = make(map[string]*prometheus.Desc)\n\ti.subsystem = \"infiniband\"\n\n\tfor metricName, description := range descriptions {\n\t\ti.metricDescs[metricName] = prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, i.subsystem, metricName),\n\t\t\tdescription,\n\t\t\t[]string{\"device\", \"port\"},\n\t\t\tnil,\n\t\t)\n\t}\n\n\treturn &i, nil\n}\n\nfunc (c *infinibandCollector) pushMetric(ch chan<- prometheus.Metric, name string, value uint64, deviceName string, port string, valueType prometheus.ValueType) {\n\tch <- prometheus.MustNewConstMetric(c.metricDescs[name], valueType, float64(value), deviceName, port)\n}\n\nfunc (c *infinibandCollector) pushCounter(ch chan<- prometheus.Metric, name string, value *uint64, deviceName string, port string) {\n\tif value != nil {\n\t\tc.pushMetric(ch, name, *value, deviceName, port, prometheus.CounterValue)\n\t}\n}\n\nfunc (c *infinibandCollector) Update(ch chan<- prometheus.Metric) error {\n\tdevices, err := c.fs.InfiniBandClass()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"infiniband statistics not found, skipping\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"error obtaining InfiniBand class info: %w\", err)\n\t}\n\n\tfor _, device := range devices {\n\t\tinfoDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"info\"),\n\t\t\t\"Non-numeric data from /sys/class/infiniband/<device>, value is always 1.\",\n\t\t\t[]string{\"device\", \"board_id\", \"firmware_version\", \"hca_type\"},\n\t\t\tnil,\n\t\t)\n\t\tinfoValue := 1.0\n\t\tch <- prometheus.MustNewConstMetric(infoDesc, prometheus.GaugeValue, infoValue, device.Name, device.BoardID, device.FirmwareVersion, device.HCAType)\n\n\t\tfor _, port := range device.Ports {\n\t\t\tportStr := strconv.FormatUint(uint64(port.Port), 10)\n\n\t\t\tc.pushMetric(ch, \"state_id\", uint64(port.StateID), port.Name, portStr, prometheus.GaugeValue)\n\t\t\tc.pushMetric(ch, \"physical_state_id\", uint64(port.PhysStateID), port.Name, portStr, prometheus.GaugeValue)\n\t\t\tc.pushMetric(ch, \"rate_bytes_per_second\", port.Rate, port.Name, portStr, prometheus.GaugeValue)\n\n\t\t\tc.pushCounter(ch, \"legacy_multicast_packets_received_total\", port.Counters.LegacyPortMulticastRcvPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"legacy_multicast_packets_transmitted_total\", port.Counters.LegacyPortMulticastXmitPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"legacy_data_received_bytes_total\", port.Counters.LegacyPortRcvData64, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"legacy_packets_received_total\", port.Counters.LegacyPortRcvPackets64, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"legacy_unicast_packets_received_total\", port.Counters.LegacyPortUnicastRcvPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"legacy_unicast_packets_transmitted_total\", port.Counters.LegacyPortUnicastXmitPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"legacy_data_transmitted_bytes_total\", port.Counters.LegacyPortXmitData64, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"legacy_packets_transmitted_total\", port.Counters.LegacyPortXmitPackets64, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"excessive_buffer_overrun_errors_total\", port.Counters.ExcessiveBufferOverrunErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"link_downed_total\", port.Counters.LinkDowned, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"link_error_recovery_total\", port.Counters.LinkErrorRecovery, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"local_link_integrity_errors_total\", port.Counters.LocalLinkIntegrityErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"multicast_packets_received_total\", port.Counters.MulticastRcvPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"multicast_packets_transmitted_total\", port.Counters.MulticastXmitPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_constraint_errors_received_total\", port.Counters.PortRcvConstraintErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_constraint_errors_transmitted_total\", port.Counters.PortXmitConstraintErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_data_received_bytes_total\", port.Counters.PortRcvData, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_data_transmitted_bytes_total\", port.Counters.PortXmitData, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_discards_received_total\", port.Counters.PortRcvDiscards, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_discards_transmitted_total\", port.Counters.PortXmitDiscards, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_errors_received_total\", port.Counters.PortRcvErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_packets_received_total\", port.Counters.PortRcvPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_packets_transmitted_total\", port.Counters.PortXmitPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_transmit_wait_total\", port.Counters.PortXmitWait, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"unicast_packets_received_total\", port.Counters.UnicastRcvPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"unicast_packets_transmitted_total\", port.Counters.UnicastXmitPackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_receive_remote_physical_errors_total\", port.Counters.PortRcvRemotePhysicalErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"port_receive_switch_relay_errors_total\", port.Counters.PortRcvSwitchRelayErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"symbol_error_total\", port.Counters.SymbolError, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"vl15_dropped_total\", port.Counters.VL15Dropped, port.Name, portStr)\n\n\t\t\t// port.HwCounters\n\t\t\tif port.HwCounters.Lifespan != nil {\n\t\t\t\tc.pushMetric(ch, \"lifespan_seconds\", *(port.HwCounters.Lifespan)/1000, port.Name, portStr, prometheus.GaugeValue)\n\t\t\t}\n\n\t\t\tc.pushCounter(ch, \"duplicate_requests_packets_total\", port.HwCounters.DuplicateRequest, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"implied_nak_seq_errors_total\", port.HwCounters.ImpliedNakSeqErr, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"local_ack_timeout_errors_total\", port.HwCounters.LocalAckTimeoutErr, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"np_cnp_packets_sent_total\", port.HwCounters.NpCnpSent, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"np_ecn_marked_roce_packets_received_total\", port.HwCounters.NpEcnMarkedRocePackets, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"out_of_buffer_drops_total\", port.HwCounters.OutOfBuffer, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"out_of_sequence_packets_received_total\", port.HwCounters.OutOfSequence, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"packet_sequence_errors_total\", port.HwCounters.PacketSeqErr, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"req_cqes_errors_total\", port.HwCounters.ReqCqeError, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"req_cqes_flush_errors_total\", port.HwCounters.ReqCqeFlushError, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"req_remote_access_errors_total\", port.HwCounters.ReqRemoteAccessErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"req_remote_invalid_request_errors_total\", port.HwCounters.ReqRemoteInvalidRequest, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"resp_cqes_errors_total\", port.HwCounters.RespCqeError, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"resp_cqes_flush_errors_total\", port.HwCounters.RespCqeFlushError, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"resp_local_length_errors_total\", port.HwCounters.RespLocalLengthError, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"resp_remote_access_errors_total\", port.HwCounters.RespRemoteAccessErrors, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"rnr_nak_retry_packets_received_total\", port.HwCounters.RnrNakRetryErr, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"roce_adp_retransmits_total\", port.HwCounters.RoceAdpRetrans, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"roce_adp_retransmits_timeout_total\", port.HwCounters.RoceAdpRetransTo, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"roce_slow_restart_used_total\", port.HwCounters.RoceSlowRestart, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"roce_slow_restart_cnps_total\", port.HwCounters.RoceSlowRestartCnps, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"roce_slow_restart_total\", port.HwCounters.RoceSlowRestartTrans, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"rp_cnp_packets_handled_total\", port.HwCounters.RpCnpHandled, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"rp_cnp_ignored_packets_received_total\", port.HwCounters.RpCnpIgnored, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"rx_atomic_requests_total\", port.HwCounters.RxAtomicRequests, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"rx_dct_connect_requests_total\", port.HwCounters.RxDctConnect, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"rx_read_requests_total\", port.HwCounters.RxReadRequests, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"rx_write_requests_total\", port.HwCounters.RxWriteRequests, port.Name, portStr)\n\t\t\tc.pushCounter(ch, \"rx_icrc_encapsulated_errors_total\", port.HwCounters.RxIcrcEncapsulated, port.Name, portStr)\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/interrupts_common.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (linux || openbsd) && !nointerrupts\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype interruptsCollector struct {\n\tdesc         typedDesc\n\tlogger       *slog.Logger\n\tnameFilter   deviceFilter\n\tincludeZeros bool\n}\n\nfunc init() {\n\tregisterCollector(\"interrupts\", defaultDisabled, NewInterruptsCollector)\n}\n\nvar (\n\tinterruptsInclude      = kingpin.Flag(\"collector.interrupts.name-include\", \"Regexp of interrupts name to include (mutually exclusive to --collector.interrupts.name-exclude).\").String()\n\tinterruptsExclude      = kingpin.Flag(\"collector.interrupts.name-exclude\", \"Regexp of interrupts name to exclude (mutually exclusive to --collector.interrupts.name-include).\").String()\n\tinterruptsIncludeZeros = kingpin.Flag(\"collector.interrupts.include-zeros\", \"Include interrupts that have a zero value\").Default(\"true\").Bool()\n)\n\n// NewInterruptsCollector returns a new Collector exposing interrupts stats.\nfunc NewInterruptsCollector(logger *slog.Logger) (Collector, error) {\n\treturn &interruptsCollector{\n\t\tdesc: typedDesc{prometheus.NewDesc(\n\t\t\tnamespace+\"_interrupts_total\",\n\t\t\t\"Interrupt details.\",\n\t\t\tinterruptLabelNames, nil,\n\t\t), prometheus.CounterValue},\n\t\tlogger:       logger,\n\t\tnameFilter:   newDeviceFilter(*interruptsExclude, *interruptsInclude),\n\t\tincludeZeros: *interruptsIncludeZeros,\n\t}, nil\n}\n"
  },
  {
    "path": "collector/interrupts_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nointerrupts\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tinterruptLabelNames = []string{\"cpu\", \"type\", \"info\", \"devices\"}\n)\n\nfunc (c *interruptsCollector) Update(ch chan<- prometheus.Metric) (err error) {\n\tinterrupts, err := getInterrupts()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get interrupts: %w\", err)\n\t}\n\tfor name, interrupt := range interrupts {\n\t\tfor cpuNo, value := range interrupt.values {\n\t\t\tfilterName := name + \";\" + interrupt.info + \";\" + interrupt.devices\n\t\t\tif c.nameFilter.ignored(filterName) {\n\t\t\t\tc.logger.Debug(\"ignoring interrupt name\", \"filter_name\", filterName)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tfv, err := strconv.ParseFloat(value, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid value %s in interrupts: %w\", value, err)\n\t\t\t}\n\t\t\tif !c.includeZeros && fv == 0.0 {\n\t\t\t\tc.logger.Debug(\"ignoring interrupt with zero value\", \"filter_name\", filterName, \"cpu\", cpuNo)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tch <- c.desc.mustNewConstMetric(fv, strconv.Itoa(cpuNo), name, interrupt.info, interrupt.devices)\n\t\t}\n\t}\n\treturn err\n}\n\ntype interrupt struct {\n\tinfo    string\n\tdevices string\n\tvalues  []string\n}\n\nfunc getInterrupts() (map[string]interrupt, error) {\n\tfile, err := os.Open(procFilePath(\"interrupts\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer file.Close()\n\n\treturn parseInterrupts(file)\n}\n\nfunc parseInterrupts(r io.Reader) (map[string]interrupt, error) {\n\tvar (\n\t\tinterrupts = map[string]interrupt{}\n\t\tscanner    = bufio.NewScanner(r)\n\t)\n\n\tif !scanner.Scan() {\n\t\treturn nil, errors.New(\"interrupts empty\")\n\t}\n\tcpuNum := len(strings.Fields(scanner.Text())) // one header per cpu\n\n\tfor scanner.Scan() {\n\t\t// On aarch64 there can be zero space between the name/label\n\t\t// and the values, so we need to split on `:` before using\n\t\t// strings.Fields() to split on fields.\n\t\tgroup := strings.SplitN(scanner.Text(), \":\", 2)\n\t\tif len(group) > 1 {\n\t\t\tparts := strings.Fields(group[1])\n\n\t\t\tif len(parts) < cpuNum+1 { // irq + one column per cpu + details,\n\t\t\t\tcontinue // we ignore ERR and MIS for now\n\t\t\t}\n\t\t\tintName := strings.TrimLeft(group[0], \" \")\n\t\t\tintr := interrupt{\n\t\t\t\tvalues: parts[0:cpuNum],\n\t\t\t}\n\n\t\t\tif _, err := strconv.Atoi(intName); err == nil { // numeral interrupt\n\t\t\t\tintr.info = parts[cpuNum]\n\t\t\t\tintr.devices = strings.Join(parts[cpuNum+1:], \" \")\n\t\t\t} else {\n\t\t\t\tintr.info = strings.Join(parts[cpuNum:], \" \")\n\t\t\t}\n\t\t\tinterrupts[intName] = intr\n\t\t}\n\t}\n\n\treturn interrupts, scanner.Err()\n}\n"
  },
  {
    "path": "collector/interrupts_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nointerrupts\n\npackage collector\n\nimport (\n\t\"os\"\n\t\"testing\"\n)\n\nfunc TestInterrupts(t *testing.T) {\n\tfile, err := os.Open(\"fixtures/proc/interrupts\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tinterrupts, err := parseInterrupts(file)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := \"5031\", interrupts[\"NMI\"].values[1]; want != got {\n\t\tt.Errorf(\"want interrupts value %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"4968\", interrupts[\"NMI\"].values[3]; want != got {\n\t\tt.Errorf(\"want interrupts value %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"IR-IO-APIC-edge\", interrupts[\"12\"].info; want != got {\n\t\tt.Errorf(\"want interrupts info %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"i8042\", interrupts[\"12\"].devices; want != got {\n\t\tt.Errorf(\"want interrupts devices %s, got %s\", want, got)\n\t}\n\n}\n\n// https://github.com/prometheus/node_exporter/issues/2557\n// On aarch64 the interrupts file can have zero spaces between the label of\n// the row and the first value if the value is large\nfunc TestInterruptsArm(t *testing.T) {\n\tfile, err := os.Open(\"fixtures/proc/interrupts_aarch64\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tinterrupts, err := parseInterrupts(file)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif _, ok := interrupts[\"IPI0\"]; !ok {\n\t\tt.Errorf(\"IPI0 label not found in interrupts\")\n\t}\n}\n"
  },
  {
    "path": "collector/interrupts_openbsd.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nointerrupts && !amd64\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n/*\n#include <sys/param.h>\n#include <sys/types.h>\n#include <sys/sysctl.h>\n\n#include <errno.h>\n#include <stdio.h>\n\nstruct intr\n{\n\tint\t\tvector;\n\tchar\t\tdevice[128];\n\tu_int64_t\tcount;\n};\n\nint sysctl_nintr(void)\n{\n\tint nintr, mib[4];\n\tsize_t siz;\n\n\tmib[0] = CTL_KERN;\n\tmib[1] = KERN_INTRCNT;\n\tmib[2] = KERN_INTRCNT_NUM;\n\tsiz = sizeof(nintr);\n\tif (sysctl(mib, 3, &nintr, &siz, NULL, 0) < 0) {\n\t\treturn -1;\n\t}\n\n\treturn nintr;\n}\n\nint\nsysctl_intr(struct intr *intr, int idx)\n{\n\tint mib[4];\n\tsize_t siz;\n\tu_quad_t cnt;\n\n\tmib[0] = CTL_KERN;\n\tmib[1] = KERN_INTRCNT;\n\tmib[2] = KERN_INTRCNT_NAME;\n\tmib[3] = idx;\n\tsiz = sizeof intr->device;\n\tif (sysctl(mib, 4, intr->device, &siz, NULL, 0) < 0) {\n\t\treturn -1;\n\t}\n\n\tmib[0] = CTL_KERN;\n\tmib[1] = KERN_INTRCNT;\n\tmib[2] = KERN_INTRCNT_VECTOR;\n\tmib[3] = idx;\n\tsiz = sizeof intr->vector;\n\tif (sysctl(mib, 4, &intr->vector, &siz, NULL, 0) < 0) {\n\t\treturn -1;\n\t}\n\n\tmib[0] = CTL_KERN;\n\tmib[1] = KERN_INTRCNT;\n\tmib[2] = KERN_INTRCNT_CNT;\n\tmib[3] = idx;\n\tsiz = sizeof(cnt);\n\tif (sysctl(mib, 4, &cnt, &siz, NULL, 0) < 0) {\n\t\treturn -1;\n\t}\n\n\tintr->count = cnt;\n\n\treturn 1;\n}\n*/\nimport \"C\"\n\nvar (\n\tinterruptLabelNames = []string{\"cpu\", \"type\", \"devices\"}\n)\n\nfunc (c *interruptsCollector) Update(ch chan<- prometheus.Metric) error {\n\tinterrupts, err := getInterrupts()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get interrupts: %w\", err)\n\t}\n\tfor dev, interrupt := range interrupts {\n\t\tfor cpuNo, value := range interrupt.values {\n\t\t\tinterruptType := fmt.Sprintf(\"%d\", interrupt.vector)\n\t\t\tfilterName := interruptType + \";\" + dev\n\t\t\tif c.nameFilter.ignored(filterName) {\n\t\t\t\tc.logger.Debug(\"ignoring interrupt name\", \"filter_name\", filterName)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !c.includeZeros && value == 0.0 {\n\t\t\t\tc.logger.Debug(\"ignoring interrupt with zero value\", \"filter_name\", filterName, \"cpu\", cpuNo)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tch <- c.desc.mustNewConstMetric(\n\t\t\t\tvalue,\n\t\t\t\tstrconv.Itoa(cpuNo),\n\t\t\t\tinterruptType,\n\t\t\t\tdev,\n\t\t\t)\n\t\t}\n\t}\n\treturn nil\n}\n\ntype interrupt struct {\n\tvector int\n\tdevice string\n\tvalues []float64\n}\n\nfunc getInterrupts() (map[string]interrupt, error) {\n\tvar (\n\t\tcintr      C.struct_intr\n\t\tinterrupts = map[string]interrupt{}\n\t)\n\n\tnintr := C.sysctl_nintr()\n\n\tfor i := C.int(0); i < nintr; i++ {\n\t\t_, err := C.sysctl_intr(&cintr, i)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tdev := C.GoString(&cintr.device[0])\n\n\t\tinterrupts[dev] = interrupt{\n\t\t\tvector: int(cintr.vector),\n\t\t\tdevice: dev,\n\t\t\t// XXX: openbsd appears to only handle interrupts on cpu 0.\n\t\t\tvalues: []float64{float64(cintr.count)},\n\t\t}\n\t}\n\n\treturn interrupts, nil\n}\n"
  },
  {
    "path": "collector/interrupts_openbsd_amd64.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nointerrupts\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/node_exporter/collector/utils\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tKERN_INTRCNT        = 63\n\tKERN_INTRCNT_NUM    = 1\n\tKERN_INTRCNT_CNT    = 2\n\tKERN_INTRCNT_NAME   = 3\n\tKERN_INTRCNT_VECTOR = 4\n)\n\nfunc nintr() _C_int {\n\tmib := [3]_C_int{unix.CTL_KERN, KERN_INTRCNT, KERN_INTRCNT_NUM}\n\tbuf, err := sysctl(mib[:])\n\tif err != nil {\n\t\treturn 0\n\t}\n\treturn *(*_C_int)(unsafe.Pointer(&buf[0]))\n}\n\nfunc intr(idx _C_int) (itr interrupt, err error) {\n\tmib := [4]_C_int{unix.CTL_KERN, KERN_INTRCNT, KERN_INTRCNT_NAME, idx}\n\tbuf, err := sysctl(mib[:])\n\tif err != nil {\n\t\treturn\n\t}\n\tdev := *(*[128]byte)(unsafe.Pointer(&buf[0]))\n\titr.device = utils.SafeBytesToString(dev[:])\n\n\tmib[2] = KERN_INTRCNT_VECTOR\n\tbuf, err = sysctl(mib[:])\n\tif err != nil {\n\t\treturn\n\t}\n\titr.vector = *(*int)(unsafe.Pointer(&buf[0]))\n\n\tmib[2] = KERN_INTRCNT_CNT\n\tbuf, err = sysctl(mib[:])\n\tif err != nil {\n\t\treturn\n\t}\n\tcount := *(*uint64)(unsafe.Pointer(&buf[0]))\n\titr.values = []float64{float64(count)}\n\treturn\n}\n\nvar interruptLabelNames = []string{\"cpu\", \"type\", \"devices\"}\n\nfunc (c *interruptsCollector) Update(ch chan<- prometheus.Metric) error {\n\tinterrupts, err := getInterrupts()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get interrupts: %s\", err)\n\t}\n\tfor dev, interrupt := range interrupts {\n\t\tfor cpuNo, value := range interrupt.values {\n\t\t\tinterruptType := fmt.Sprintf(\"%d\", interrupt.vector)\n\t\t\tfilterName := interruptType + \";\" + dev\n\t\t\tif c.nameFilter.ignored(filterName) {\n\t\t\t\tc.logger.Debug(\"ignoring interrupt name\", \"filter_name\", filterName)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif !c.includeZeros && value == 0.0 {\n\t\t\t\tc.logger.Debug(\"ignoring interrupt with zero value\", \"filter_name\", filterName, \"cpu\", cpuNo)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tch <- c.desc.mustNewConstMetric(\n\t\t\t\tvalue,\n\t\t\t\tstrconv.Itoa(cpuNo),\n\t\t\t\tinterruptType,\n\t\t\t\tdev,\n\t\t\t)\n\t\t}\n\t}\n\treturn nil\n}\n\ntype interrupt struct {\n\tvector int\n\tdevice string\n\tvalues []float64\n}\n\nfunc getInterrupts() (map[string]interrupt, error) {\n\tvar interrupts = map[string]interrupt{}\n\tn := nintr()\n\n\tfor i := _C_int(0); i < n; i++ {\n\t\titr, err := intr(i)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tinterrupts[itr.device] = itr\n\t}\n\n\treturn interrupts, nil\n}\n"
  },
  {
    "path": "collector/ipvs_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noipvs\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype ipvsCollector struct {\n\tCollector\n\tfs                                                                          procfs.FS\n\tbackendLabels                                                               []string\n\tbackendConnectionsActive, backendConnectionsInact, backendWeight            typedDesc\n\tconnections, incomingPackets, outgoingPackets, incomingBytes, outgoingBytes typedDesc\n\tlogger                                                                      *slog.Logger\n}\n\ntype ipvsBackendStatus struct {\n\tActiveConn uint64\n\tInactConn  uint64\n\tWeight     uint64\n}\n\nconst (\n\tipvsLabelLocalAddress  = \"local_address\"\n\tipvsLabelLocalPort     = \"local_port\"\n\tipvsLabelRemoteAddress = \"remote_address\"\n\tipvsLabelRemotePort    = \"remote_port\"\n\tipvsLabelProto         = \"proto\"\n\tipvsLabelLocalMark     = \"local_mark\"\n)\n\nvar (\n\tfullIpvsBackendLabels = []string{\n\t\tipvsLabelLocalAddress,\n\t\tipvsLabelLocalPort,\n\t\tipvsLabelRemoteAddress,\n\t\tipvsLabelRemotePort,\n\t\tipvsLabelProto,\n\t\tipvsLabelLocalMark,\n\t}\n\tipvsLabels = kingpin.Flag(\"collector.ipvs.backend-labels\", \"Comma separated list for IPVS backend stats labels.\").Default(strings.Join(fullIpvsBackendLabels, \",\")).String()\n)\n\nfunc init() {\n\tregisterCollector(\"ipvs\", defaultEnabled, NewIPVSCollector)\n}\n\n// NewIPVSCollector sets up a new collector for IPVS metrics. It accepts the\n// \"procfs\" config parameter to override the default proc location (/proc).\nfunc NewIPVSCollector(logger *slog.Logger) (Collector, error) {\n\treturn newIPVSCollector(logger)\n}\n\nfunc newIPVSCollector(logger *slog.Logger) (*ipvsCollector, error) {\n\tvar (\n\t\tc         ipvsCollector\n\t\terr       error\n\t\tsubsystem = \"ipvs\"\n\t)\n\n\tif c.backendLabels, err = c.parseIpvsLabels(*ipvsLabels); err != nil {\n\t\treturn nil, err\n\t}\n\n\tc.logger = logger\n\tc.fs, err = procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\tc.connections = typedDesc{prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"connections_total\"),\n\t\t\"The total number of connections made.\",\n\t\tnil, nil,\n\t), prometheus.CounterValue}\n\tc.incomingPackets = typedDesc{prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"incoming_packets_total\"),\n\t\t\"The total number of incoming packets.\",\n\t\tnil, nil,\n\t), prometheus.CounterValue}\n\tc.outgoingPackets = typedDesc{prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"outgoing_packets_total\"),\n\t\t\"The total number of outgoing packets.\",\n\t\tnil, nil,\n\t), prometheus.CounterValue}\n\tc.incomingBytes = typedDesc{prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"incoming_bytes_total\"),\n\t\t\"The total amount of incoming data.\",\n\t\tnil, nil,\n\t), prometheus.CounterValue}\n\tc.outgoingBytes = typedDesc{prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"outgoing_bytes_total\"),\n\t\t\"The total amount of outgoing data.\",\n\t\tnil, nil,\n\t), prometheus.CounterValue}\n\tc.backendConnectionsActive = typedDesc{prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"backend_connections_active\"),\n\t\t\"The current active connections by local and remote address.\",\n\t\tc.backendLabels, nil,\n\t), prometheus.GaugeValue}\n\tc.backendConnectionsInact = typedDesc{prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"backend_connections_inactive\"),\n\t\t\"The current inactive connections by local and remote address.\",\n\t\tc.backendLabels, nil,\n\t), prometheus.GaugeValue}\n\tc.backendWeight = typedDesc{prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"backend_weight\"),\n\t\t\"The current backend weight by local and remote address.\",\n\t\tc.backendLabels, nil,\n\t), prometheus.GaugeValue}\n\n\treturn &c, nil\n}\n\nfunc (c *ipvsCollector) Update(ch chan<- prometheus.Metric) error {\n\tipvsStats, err := c.fs.IPVSStats()\n\tif err != nil {\n\t\t// Cannot access ipvs metrics, report no error.\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"ipvs collector metrics are not available for this system\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"could not get IPVS stats: %w\", err)\n\t}\n\tch <- c.connections.mustNewConstMetric(float64(ipvsStats.Connections))\n\tch <- c.incomingPackets.mustNewConstMetric(float64(ipvsStats.IncomingPackets))\n\tch <- c.outgoingPackets.mustNewConstMetric(float64(ipvsStats.OutgoingPackets))\n\tch <- c.incomingBytes.mustNewConstMetric(float64(ipvsStats.IncomingBytes))\n\tch <- c.outgoingBytes.mustNewConstMetric(float64(ipvsStats.OutgoingBytes))\n\n\tbackendStats, err := c.fs.IPVSBackendStatus()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not get backend status: %w\", err)\n\t}\n\n\tsums := map[string]ipvsBackendStatus{}\n\tlabelValues := map[string][]string{}\n\tfor _, backend := range backendStats {\n\t\tlocalAddress := \"\"\n\t\tif backend.LocalAddress.String() != \"<nil>\" {\n\t\t\tlocalAddress = backend.LocalAddress.String()\n\t\t}\n\t\tkv := make([]string, len(c.backendLabels))\n\t\tfor i, label := range c.backendLabels {\n\t\t\tvar labelValue string\n\t\t\tswitch label {\n\t\t\tcase ipvsLabelLocalAddress:\n\t\t\t\tlabelValue = localAddress\n\t\t\tcase ipvsLabelLocalPort:\n\t\t\t\tlabelValue = strconv.FormatUint(uint64(backend.LocalPort), 10)\n\t\t\tcase ipvsLabelRemoteAddress:\n\t\t\t\tlabelValue = backend.RemoteAddress.String()\n\t\t\tcase ipvsLabelRemotePort:\n\t\t\t\tlabelValue = strconv.FormatUint(uint64(backend.RemotePort), 10)\n\t\t\tcase ipvsLabelProto:\n\t\t\t\tlabelValue = backend.Proto\n\t\t\tcase ipvsLabelLocalMark:\n\t\t\t\tlabelValue = backend.LocalMark\n\t\t\t}\n\t\t\tkv[i] = labelValue\n\t\t}\n\t\tkey := strings.Join(kv, \"-\")\n\t\tstatus := sums[key]\n\t\tstatus.ActiveConn += backend.ActiveConn\n\t\tstatus.InactConn += backend.InactConn\n\t\tstatus.Weight += backend.Weight\n\t\tsums[key] = status\n\t\tlabelValues[key] = kv\n\t}\n\tfor key, status := range sums {\n\t\tkv := labelValues[key]\n\t\tch <- c.backendConnectionsActive.mustNewConstMetric(float64(status.ActiveConn), kv...)\n\t\tch <- c.backendConnectionsInact.mustNewConstMetric(float64(status.InactConn), kv...)\n\t\tch <- c.backendWeight.mustNewConstMetric(float64(status.Weight), kv...)\n\t}\n\treturn nil\n}\n\nfunc (c *ipvsCollector) parseIpvsLabels(labelString string) ([]string, error) {\n\tlabels := strings.Split(labelString, \",\")\n\tlabelSet := make(map[string]bool, len(labels))\n\tresults := make([]string, 0, len(labels))\n\tfor _, label := range labels {\n\t\tif label != \"\" {\n\t\t\tlabelSet[label] = true\n\t\t}\n\t}\n\n\tfor _, label := range fullIpvsBackendLabels {\n\t\tif labelSet[label] {\n\t\t\tresults = append(results, label)\n\t\t}\n\t\tdelete(labelSet, label)\n\t}\n\n\tif len(labelSet) > 0 {\n\t\tkeys := make([]string, 0, len(labelSet))\n\t\tfor label := range labelSet {\n\t\t\tkeys = append(keys, label)\n\t\t}\n\t\tsort.Strings(keys)\n\t\treturn nil, fmt.Errorf(\"unknown IPVS backend labels: %q\", strings.Join(keys, \", \"))\n\t}\n\n\treturn results, nil\n}\n"
  },
  {
    "path": "collector/ipvs_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noipvs\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/client_golang/prometheus/promhttp\"\n)\n\nfunc TestIPVSCollector(t *testing.T) {\n\ttestcases := []struct {\n\t\tlabels  string\n\t\texpects []string\n\t\terr     error\n\t}{\n\t\t{\n\t\t\t\"<none>\",\n\t\t\t[]string{\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_connections_total\", \"The total number of connections made.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_incoming_packets_total\", \"The total number of incoming packets.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_outgoing_packets_total\", \"The total number of outgoing packets.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_incoming_bytes_total\", \"The total amount of incoming data.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_outgoing_bytes_total\", \"The total amount of outgoing data.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_connections_active\", \"The current active connections by local and remote address.\", []string{\"local_address\", \"local_port\", \"remote_address\", \"remote_port\", \"proto\", \"local_mark\"}, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_connections_inactive\", \"The current inactive connections by local and remote address.\", []string{\"local_address\", \"local_port\", \"remote_address\", \"remote_port\", \"proto\", \"local_mark\"}, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_weight\", \"The current backend weight by local and remote address.\", []string{\"local_address\", \"local_port\", \"remote_address\", \"remote_port\", \"proto\", \"local_mark\"}, nil).String(),\n\t\t\t},\n\t\t\tnil,\n\t\t},\n\t\t{\n\t\t\t\"\",\n\t\t\t[]string{\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_connections_total\", \"The total number of connections made.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_incoming_packets_total\", \"The total number of incoming packets.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_outgoing_packets_total\", \"The total number of outgoing packets.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_incoming_bytes_total\", \"The total amount of incoming data.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_outgoing_bytes_total\", \"The total amount of outgoing data.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_connections_active\", \"The current active connections by local and remote address.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_connections_inactive\", \"The current inactive connections by local and remote address.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_weight\", \"The current backend weight by local and remote address.\", nil, nil).String(),\n\t\t\t},\n\t\t\tnil,\n\t\t},\n\t\t{\n\t\t\t\"local_port\",\n\t\t\t[]string{\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_connections_total\", \"The total number of connections made.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_incoming_packets_total\", \"The total number of incoming packets.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_outgoing_packets_total\", \"The total number of outgoing packets.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_incoming_bytes_total\", \"The total amount of incoming data.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_outgoing_bytes_total\", \"The total amount of outgoing data.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_connections_active\", \"The current active connections by local and remote address.\", []string{\"local_port\"}, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_connections_inactive\", \"The current inactive connections by local and remote address.\", []string{\"local_port\"}, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_weight\", \"The current backend weight by local and remote address.\", []string{\"local_port\"}, nil).String(),\n\t\t\t},\n\t\t\tnil,\n\t\t},\n\t\t{\n\t\t\t\"local_address,local_port\",\n\t\t\t[]string{\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_connections_total\", \"The total number of connections made.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_incoming_packets_total\", \"The total number of incoming packets.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_outgoing_packets_total\", \"The total number of outgoing packets.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_incoming_bytes_total\", \"The total amount of incoming data.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_outgoing_bytes_total\", \"The total amount of outgoing data.\", nil, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_connections_active\", \"The current active connections by local and remote address.\", []string{\"local_address\", \"local_port\"}, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_connections_inactive\", \"The current inactive connections by local and remote address.\", []string{\"local_address\", \"local_port\"}, nil).String(),\n\t\t\t\tprometheus.NewDesc(\"node_ipvs_backend_weight\", \"The current backend weight by local and remote address.\", []string{\"local_address\", \"local_port\"}, nil).String(),\n\t\t\t},\n\t\t\tnil,\n\t\t},\n\t\t{\n\t\t\t\"invalid_label\",\n\t\t\tnil,\n\t\t\terrors.New(`unknown IPVS backend labels: \"invalid_label\"`),\n\t\t},\n\t\t{\n\t\t\t\"invalid_label,bad_label\",\n\t\t\tnil,\n\t\t\terrors.New(`unknown IPVS backend labels: \"bad_label, invalid_label\"`),\n\t\t},\n\t}\n\tfor _, test := range testcases {\n\t\tt.Run(test.labels, func(t *testing.T) {\n\t\t\targs := []string{\"--path.procfs\", \"fixtures/proc\"}\n\t\t\tif test.labels != \"<none>\" {\n\t\t\t\targs = append(args, \"--collector.ipvs.backend-labels=\"+test.labels)\n\t\t\t}\n\t\t\tif _, err := kingpin.CommandLine.Parse(args); err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\t\t\tcollector, err := newIPVSCollector(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\t\t\tif err != nil {\n\t\t\t\tif test.err == nil {\n\t\t\t\t\tt.Fatal(err)\n\t\t\t\t}\n\t\t\t\tif !strings.Contains(err.Error(), test.err.Error()) {\n\t\t\t\t\tt.Fatalf(\"expect error: %v contains %v\", err, test.err)\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif test.err != nil {\n\t\t\t\tt.Fatalf(\"expect error: %v but got no error\", test.err)\n\t\t\t}\n\n\t\t\tsink := make(chan prometheus.Metric)\n\t\t\tgo func() {\n\t\t\t\terr = collector.Update(sink)\n\t\t\t\tif err != nil {\n\t\t\t\t\tpanic(fmt.Sprintf(\"failed to update collector: %v\", err))\n\t\t\t\t}\n\t\t\t}()\n\t\t\tfor _, expected := range test.expects {\n\t\t\t\tgot := (<-sink).Desc().String()\n\t\t\t\tif expected != got {\n\t\t\t\t\tt.Fatalf(\"Expected '%s' but got '%s'\", expected, got)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n\n// mock collector\ntype miniCollector struct {\n\tc Collector\n}\n\nfunc (c miniCollector) Collect(ch chan<- prometheus.Metric) {\n\tc.c.Update(ch)\n}\n\nfunc (c miniCollector) Describe(ch chan<- *prometheus.Desc) {\n\tprometheus.NewGauge(prometheus.GaugeOpts{\n\t\tNamespace: \"fake\",\n\t\tSubsystem: \"fake\",\n\t\tName:      \"fake\",\n\t\tHelp:      \"fake\",\n\t}).Describe(ch)\n}\n\nfunc TestIPVSCollectorResponse(t *testing.T) {\n\ttestcases := []struct {\n\t\tlabels      string\n\t\tmetricsFile string\n\t}{\n\t\t{\"<none>\", \"fixtures/ip_vs_result.txt\"},\n\t\t{\"\", \"fixtures/ip_vs_result_lbs_none.txt\"},\n\t\t{\"local_port\", \"fixtures/ip_vs_result_lbs_local_port.txt\"},\n\t\t{\"local_address,local_port\", \"fixtures/ip_vs_result_lbs_local_address_local_port.txt\"},\n\t}\n\tfor _, test := range testcases {\n\t\tt.Run(test.labels, func(t *testing.T) {\n\t\t\targs := []string{\"--path.procfs\", \"fixtures/proc\"}\n\t\t\tif test.labels != \"<none>\" {\n\t\t\t\targs = append(args, \"--collector.ipvs.backend-labels=\"+test.labels)\n\t\t\t}\n\t\t\tif _, err := kingpin.CommandLine.Parse(args); err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\t\t\tcollector, err := NewIPVSCollector(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\t\t\tif err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\t\t\tregistry := prometheus.NewRegistry()\n\t\t\tregistry.MustRegister(miniCollector{c: collector})\n\n\t\t\trw := httptest.NewRecorder()\n\t\t\tpromhttp.InstrumentMetricHandler(registry, promhttp.HandlerFor(registry, promhttp.HandlerOpts{})).ServeHTTP(rw, &http.Request{})\n\n\t\t\twantMetrics, err := os.ReadFile(test.metricsFile)\n\t\t\tif err != nil {\n\t\t\t\tt.Fatalf(\"unable to read input test file %s: %s\", test.metricsFile, err)\n\t\t\t}\n\n\t\t\twantLines := strings.Split(string(wantMetrics), \"\\n\")\n\t\t\tgotLines := strings.Split(string(rw.Body.String()), \"\\n\")\n\t\t\tgotLinesIdx := 0\n\n\t\t\t// Until the Prometheus Go client library offers better testability\n\t\t\t// (https://github.com/prometheus/client_golang/issues/58), we simply compare\n\t\t\t// verbatim text-format metrics outputs, but ignore any lines we don't have\n\t\t\t// in the fixture. Put differently, we are only testing that each line from\n\t\t\t// the fixture is present, in the order given.\n\t\twantLoop:\n\t\t\tfor _, want := range wantLines {\n\t\t\t\tfor _, got := range gotLines[gotLinesIdx:] {\n\t\t\t\t\tif want == got {\n\t\t\t\t\t\t// this is a line we are interested in, and it is correct\n\t\t\t\t\t\tcontinue wantLoop\n\t\t\t\t\t}\n\t\t\t\t\tgotLinesIdx++\n\t\t\t\t}\n\t\t\t\t// if this point is reached, the line we want was missing\n\t\t\t\tt.Fatalf(\"Missing expected output line(s), first missing line is %s\", want)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "collector/kernel_hung_linux.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noprocesses\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype kernelHungCollector struct {\n\tfs     procfs.FS\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"kernel_hung\", defaultDisabled, NewKernelHungCollector)\n}\n\nfunc NewKernelHungCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\treturn &kernelHungCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\nvar (\n\ttaskDetectCount = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"kernel_hung\", \"task_detect_count\"),\n\t\t\"Total number of tasks that have been detected as hung since the system booted.\",\n\t\tnil, nil,\n\t)\n)\n\nfunc (c *kernelHungCollector) Update(ch chan<- prometheus.Metric) error {\n\tkernelHung, err := c.fs.KernelHung()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tch <- prometheus.MustNewConstMetric(taskDetectCount, prometheus.CounterValue, float64(*kernelHung.HungTaskDetectCount))\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/ksmd_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noksmd\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"path/filepath\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tksmdFiles = []string{\"full_scans\", \"merge_across_nodes\", \"pages_shared\", \"pages_sharing\",\n\t\t\"pages_to_scan\", \"pages_unshared\", \"pages_volatile\", \"run\", \"sleep_millisecs\"}\n)\n\ntype ksmdCollector struct {\n\tmetricDescs map[string]*prometheus.Desc\n\tlogger      *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"ksmd\", defaultDisabled, NewKsmdCollector)\n}\n\nfunc getCanonicalMetricName(filename string) string {\n\tswitch filename {\n\tcase \"full_scans\":\n\t\treturn filename + \"_total\"\n\tcase \"sleep_millisecs\":\n\t\treturn \"sleep_seconds\"\n\tdefault:\n\t\treturn filename\n\t}\n}\n\n// NewKsmdCollector returns a new Collector exposing kernel/system statistics.\nfunc NewKsmdCollector(logger *slog.Logger) (Collector, error) {\n\tsubsystem := \"ksmd\"\n\tdescs := make(map[string]*prometheus.Desc)\n\n\tfor _, n := range ksmdFiles {\n\t\tdescs[n] = prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, getCanonicalMetricName(n)),\n\t\t\tfmt.Sprintf(\"ksmd '%s' file.\", n), nil, nil)\n\t}\n\treturn &ksmdCollector{descs, logger}, nil\n}\n\n// Update implements Collector and exposes kernel and system statistics.\nfunc (c *ksmdCollector) Update(ch chan<- prometheus.Metric) error {\n\tfor _, n := range ksmdFiles {\n\t\tval, err := readUintFromFile(sysFilePath(filepath.Join(\"kernel/mm/ksm\", n)))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tt := prometheus.GaugeValue\n\t\tv := float64(val)\n\t\tswitch n {\n\t\tcase \"full_scans\":\n\t\t\tt = prometheus.CounterValue\n\t\tcase \"sleep_millisecs\":\n\t\t\tv /= 1000\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(c.metricDescs[n], t, v)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/kvm_bsd.c",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// +build !nomeminfo\n// +build freebsd dragonfly\n\n#include <fcntl.h>\n#include <kvm.h>\n#include <limits.h>\n#include <paths.h>\n#include <stdlib.h>\n\nint _kvm_swap_used_pages(uint64_t *out) {\n\tconst int total_only = 1; // from kvm_getswapinfo(3)\n\n\tkvm_t *kd;\n\tstruct kvm_swap current;\n\n\tkd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, NULL);\n\tif (kd == NULL) {\n\t\treturn -1;\n\t}\n\n\tif (kvm_getswapinfo(kd, &current, total_only, 0) == -1) {\n\t\tgoto error1;\n\t}\n\n\tif (kvm_close(kd) != 0) {\n\t\treturn -1;\n\t}\n\tkd = NULL;\n\n\t*out = current.ksw_used;\n\treturn 0;\n\nerror1:\n\tif (kd != NULL) {\n\t\tkvm_close(kd);\n\t}\n\n\treturn -1;\n}\n"
  },
  {
    "path": "collector/kvm_bsd.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nokvm && (freebsd || dragonfly)\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n)\n\n// #cgo LDFLAGS: -lkvm\n// #include \"kvm_bsd.h\"\nimport \"C\"\n\ntype kvm struct {\n\tmu     sync.Mutex\n\thasErr bool\n}\n\nfunc (k *kvm) SwapUsedPages() (value uint64, err error) {\n\tk.mu.Lock()\n\tdefer k.mu.Unlock()\n\tif C._kvm_swap_used_pages((*C.uint64_t)(&value)) == -1 {\n\t\tk.hasErr = true\n\t\treturn 0, fmt.Errorf(\"couldn't get kvm stats\")\n\t}\n\n\treturn value, nil\n}\n"
  },
  {
    "path": "collector/kvm_bsd.h",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// +build !nomeminfo\n// +build freebsd dragonfly\n\n#include <sys/types.h>\n\nint _kvm_swap_used_pages(uint64_t *out);\n"
  },
  {
    "path": "collector/lnstat_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nolnstat\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype lnstatCollector struct {\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"lnstat\", defaultDisabled, NewLnstatCollector)\n}\n\nfunc NewLnstatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &lnstatCollector{logger}, nil\n}\n\nfunc (c *lnstatCollector) Update(ch chan<- prometheus.Metric) error {\n\tconst (\n\t\tsubsystem = \"lnstat\"\n\t)\n\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\tnetStats, err := fs.NetStat()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"lnstat error: %s\", err)\n\t}\n\n\tfor _, netStatFile := range netStats {\n\t\tlabelNames := []string{\"subsystem\", \"cpu\"}\n\t\tfor header, stats := range netStatFile.Stats {\n\t\t\tfor cpu, value := range stats {\n\t\t\t\tlabelValues := []string{netStatFile.Filename, strconv.Itoa(cpu)}\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tprometheus.NewDesc(\n\t\t\t\t\t\tprometheus.BuildFQName(namespace, subsystem, header+\"_total\"),\n\t\t\t\t\t\t\"linux network cache stats\",\n\t\t\t\t\t\tlabelNames, nil,\n\t\t\t\t\t),\n\t\t\t\t\tprometheus.CounterValue, float64(value), labelValues...,\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/loadavg.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || aix) && !noloadavg\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype loadavgCollector struct {\n\tmetric []typedDesc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"loadavg\", defaultEnabled, NewLoadavgCollector)\n}\n\n// NewLoadavgCollector returns a new Collector exposing load average stats.\nfunc NewLoadavgCollector(logger *slog.Logger) (Collector, error) {\n\treturn &loadavgCollector{\n\t\tmetric: []typedDesc{\n\t\t\t{prometheus.NewDesc(namespace+\"_load1\", \"1m load average.\", nil, nil), prometheus.GaugeValue},\n\t\t\t{prometheus.NewDesc(namespace+\"_load5\", \"5m load average.\", nil, nil), prometheus.GaugeValue},\n\t\t\t{prometheus.NewDesc(namespace+\"_load15\", \"15m load average.\", nil, nil), prometheus.GaugeValue},\n\t\t},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *loadavgCollector) Update(ch chan<- prometheus.Metric) error {\n\tloads, err := getLoad()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get load: %w\", err)\n\t}\n\tfor i, load := range loads {\n\t\tc.logger.Debug(\"return load\", \"index\", i, \"load\", load)\n\t\tch <- c.metric[i].mustNewConstMetric(load)\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "collector/loadavg_aix.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noloadavg\n\npackage collector\n\nimport (\n\t\"github.com/power-devops/perfstat\"\n)\n\nfunc getLoad() ([]float64, error) {\n\tstat, err := perfstat.CpuTotalStat()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn []float64{float64(stat.LoadAvg1), float64(stat.LoadAvg5), float64(stat.LoadAvg15)}, nil\n}\n"
  },
  {
    "path": "collector/loadavg_bsd.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && !noloadavg\n\npackage collector\n\nimport (\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc getLoad() ([]float64, error) {\n\ttype loadavg struct {\n\t\tload  [3]uint32\n\t\tscale int\n\t}\n\tb, err := unix.SysctlRaw(\"vm.loadavg\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tload := *(*loadavg)(unsafe.Pointer((&b[0])))\n\tscale := float64(load.scale)\n\treturn []float64{\n\t\tfloat64(load.load[0]) / scale,\n\t\tfloat64(load.load[1]) / scale,\n\t\tfloat64(load.load[2]) / scale,\n\t}, nil\n}\n"
  },
  {
    "path": "collector/loadavg_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noloadavg\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// Read loadavg from /proc.\nfunc getLoad() (loads []float64, err error) {\n\tdata, err := os.ReadFile(procFilePath(\"loadavg\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tloads, err = parseLoad(string(data))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn loads, nil\n}\n\n// Parse /proc loadavg and return 1m, 5m and 15m.\nfunc parseLoad(data string) (loads []float64, err error) {\n\tloads = make([]float64, 3)\n\tparts := strings.Fields(data)\n\tif len(parts) < 3 {\n\t\treturn nil, fmt.Errorf(\"unexpected content in %s\", procFilePath(\"loadavg\"))\n\t}\n\tfor i, load := range parts[0:3] {\n\t\tloads[i], err = strconv.ParseFloat(load, 64)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"could not parse load '%s': %w\", load, err)\n\t\t}\n\t}\n\treturn loads, nil\n}\n"
  },
  {
    "path": "collector/loadavg_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noloadavg\n\npackage collector\n\nimport \"testing\"\n\nfunc TestLoad(t *testing.T) {\n\twant := []float64{0.21, 0.37, 0.39}\n\tloads, err := parseLoad(\"0.21 0.37 0.39 1/719 19737\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tfor i, load := range loads {\n\t\tif want[i] != load {\n\t\t\tt.Fatalf(\"want load %f, got %f\", want[i], load)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "collector/loadavg_solaris.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noloadavg\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/illumos/go-kstat\"\n)\n\n// #include <sys/param.h>\nimport \"C\"\n\nfunc kstatToFloat(ks *kstat.KStat, kstatKey string) float64 {\n\tkstatValue, err := ks.GetNamed(kstatKey)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tkstatLoadavg, err := strconv.ParseFloat(\n\t\tfmt.Sprintf(\"%.2f\", float64(kstatValue.UintVal)/C.FSCALE), 64)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn kstatLoadavg\n}\n\nfunc getLoad() ([]float64, error) {\n\ttok, err := kstat.Open()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tdefer tok.Close()\n\n\tks, err := tok.Lookup(\"unix\", 0, \"system_misc\")\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tloadavg1Min := kstatToFloat(ks, \"avenrun_1min\")\n\tloadavg5Min := kstatToFloat(ks, \"avenrun_5min\")\n\tloadavg15Min := kstatToFloat(ks, \"avenrun_15min\")\n\n\treturn []float64{loadavg1Min, loadavg5Min, loadavg15Min}, nil\n}\n"
  },
  {
    "path": "collector/logind_linux.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nologind\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"slices\"\n\t\"strconv\"\n\n\t\"github.com/godbus/dbus/v5\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tlogindSubsystem = \"logind\"\n\tdbusObject      = \"org.freedesktop.login1\"\n\tdbusPath        = \"/org/freedesktop/login1\"\n)\n\nvar (\n\t// Taken from logind as of systemd v229.\n\t// \"other\" is the fallback value for unknown values (in case logind gets extended in the future).\n\tattrRemoteValues = []string{\"true\", \"false\"}\n\tattrTypeValues   = []string{\"other\", \"unspecified\", \"tty\", \"x11\", \"wayland\", \"mir\", \"web\"}\n\tattrClassValues  = []string{\"other\", \"user\", \"greeter\", \"lock-screen\", \"background\"}\n\n\tsessionsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, logindSubsystem, \"sessions\"),\n\t\t\"Number of sessions registered in logind.\", []string{\"seat\", \"remote\", \"type\", \"class\"}, nil,\n\t)\n)\n\ntype logindCollector struct {\n\tlogger *slog.Logger\n}\n\ntype logindDbus struct {\n\tconn   *dbus.Conn\n\tobject dbus.BusObject\n}\n\ntype logindInterface interface {\n\tlistSeats() ([]string, error)\n\tlistSessions() ([]logindSessionEntry, error)\n\tgetSession(logindSessionEntry) *logindSession\n}\n\ntype logindSession struct {\n\tseat        string\n\tremote      string\n\tsessionType string\n\tclass       string\n}\n\n// Struct elements must be public for the reflection magic of godbus to work.\ntype logindSessionEntry struct {\n\tSessionID         string\n\tUserID            uint32\n\tUserName          string\n\tSeatID            string\n\tSessionObjectPath dbus.ObjectPath\n}\n\ntype logindSeatEntry struct {\n\tSeatID         string\n\tSeatObjectPath dbus.ObjectPath\n}\n\nfunc init() {\n\tregisterCollector(\"logind\", defaultDisabled, NewLogindCollector)\n}\n\n// NewLogindCollector returns a new Collector exposing logind statistics.\nfunc NewLogindCollector(logger *slog.Logger) (Collector, error) {\n\treturn &logindCollector{logger}, nil\n}\n\nfunc (lc *logindCollector) Update(ch chan<- prometheus.Metric) error {\n\tc, err := newDbus()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to connect to dbus: %w\", err)\n\t}\n\tdefer c.conn.Close()\n\n\treturn collectMetrics(ch, c)\n}\n\nfunc collectMetrics(ch chan<- prometheus.Metric, c logindInterface) error {\n\tseats, err := c.listSeats()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to get seats: %w\", err)\n\t}\n\n\tsessionList, err := c.listSessions()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to get sessions: %w\", err)\n\t}\n\n\tsessions := make(map[logindSession]float64)\n\n\tfor _, s := range sessionList {\n\t\tsession := c.getSession(s)\n\t\tif session != nil {\n\t\t\tsessions[*session]++\n\t\t}\n\t}\n\n\tfor _, remote := range attrRemoteValues {\n\t\tfor _, sessionType := range attrTypeValues {\n\t\t\tfor _, class := range attrClassValues {\n\t\t\t\tfor _, seat := range seats {\n\t\t\t\t\tcount := sessions[logindSession{seat, remote, sessionType, class}]\n\n\t\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\t\tsessionsDesc, prometheus.GaugeValue, count,\n\t\t\t\t\t\tseat, remote, sessionType, class)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc knownStringOrOther(value string, known []string) string {\n\tif slices.Contains(known, value) {\n\t\treturn value\n\t}\n\n\treturn \"other\"\n}\n\nfunc newDbus() (*logindDbus, error) {\n\tconn, err := dbus.SystemBusPrivate()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmethods := []dbus.Auth{dbus.AuthExternal(strconv.Itoa(os.Getuid()))}\n\n\terr = conn.Auth(methods)\n\tif err != nil {\n\t\tconn.Close()\n\t\treturn nil, err\n\t}\n\n\terr = conn.Hello()\n\tif err != nil {\n\t\tconn.Close()\n\t\treturn nil, err\n\t}\n\n\tobject := conn.Object(dbusObject, dbus.ObjectPath(dbusPath))\n\n\treturn &logindDbus{\n\t\tconn:   conn,\n\t\tobject: object,\n\t}, nil\n}\n\nfunc (c *logindDbus) listSeats() ([]string, error) {\n\tvar result [][]any\n\terr := c.object.Call(dbusObject+\".Manager.ListSeats\", 0).Store(&result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresultInterface := make([]any, len(result))\n\tfor i := range result {\n\t\tresultInterface[i] = result[i]\n\t}\n\n\tseats := make([]logindSeatEntry, len(result))\n\tseatsInterface := make([]any, len(seats))\n\tfor i := range seats {\n\t\tseatsInterface[i] = &seats[i]\n\t}\n\n\terr = dbus.Store(resultInterface, seatsInterface...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tret := make([]string, len(seats)+1)\n\tfor i := range seats {\n\t\tret[i] = seats[i].SeatID\n\t}\n\t// Always add the empty seat, which is used for remote sessions like SSH\n\tret[len(seats)] = \"\"\n\n\treturn ret, nil\n}\n\nfunc (c *logindDbus) listSessions() ([]logindSessionEntry, error) {\n\tvar result [][]any\n\terr := c.object.Call(dbusObject+\".Manager.ListSessions\", 0).Store(&result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresultInterface := make([]any, len(result))\n\tfor i := range result {\n\t\tresultInterface[i] = result[i]\n\t}\n\n\tsessions := make([]logindSessionEntry, len(result))\n\tsessionsInterface := make([]any, len(sessions))\n\tfor i := range sessions {\n\t\tsessionsInterface[i] = &sessions[i]\n\t}\n\n\terr = dbus.Store(resultInterface, sessionsInterface...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn sessions, nil\n}\n\nfunc (c *logindDbus) getSession(session logindSessionEntry) *logindSession {\n\tobject := c.conn.Object(dbusObject, session.SessionObjectPath)\n\n\tremote, err := object.GetProperty(dbusObject + \".Session.Remote\")\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tsessionType, err := object.GetProperty(dbusObject + \".Session.Type\")\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tsessionTypeStr, ok := sessionType.Value().(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\tclass, err := object.GetProperty(dbusObject + \".Session.Class\")\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tclassStr, ok := class.Value().(string)\n\tif !ok {\n\t\treturn nil\n\t}\n\n\treturn &logindSession{\n\t\tseat:        session.SeatID,\n\t\tremote:      remote.String(),\n\t\tsessionType: knownStringOrOther(sessionTypeStr, attrTypeValues),\n\t\tclass:       knownStringOrOther(classStr, attrClassValues),\n\t}\n}\n"
  },
  {
    "path": "collector/logind_linux_test.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nologind\n\npackage collector\n\nimport (\n\t\"testing\"\n\n\t\"github.com/godbus/dbus/v5\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype testLogindInterface struct{}\n\nvar testSeats = []string{\"seat0\", \"\"}\n\nfunc (c *testLogindInterface) listSeats() ([]string, error) {\n\treturn testSeats, nil\n}\n\nfunc (c *testLogindInterface) listSessions() ([]logindSessionEntry, error) {\n\treturn []logindSessionEntry{\n\t\t{\n\t\t\tSessionID:         \"1\",\n\t\t\tUserID:            0,\n\t\t\tUserName:          \"\",\n\t\t\tSeatID:            \"\",\n\t\t\tSessionObjectPath: dbus.ObjectPath(\"/org/freedesktop/login1/session/1\"),\n\t\t},\n\t\t{\n\t\t\tSessionID:         \"2\",\n\t\t\tUserID:            0,\n\t\t\tUserName:          \"\",\n\t\t\tSeatID:            \"seat0\",\n\t\t\tSessionObjectPath: dbus.ObjectPath(\"/org/freedesktop/login1/session/2\"),\n\t\t},\n\t}, nil\n}\n\nfunc (c *testLogindInterface) getSession(session logindSessionEntry) *logindSession {\n\tsessions := map[dbus.ObjectPath]*logindSession{\n\t\tdbus.ObjectPath(\"/org/freedesktop/login1/session/1\"): {\n\t\t\tseat:        session.SeatID,\n\t\t\tremote:      \"true\",\n\t\t\tsessionType: knownStringOrOther(\"tty\", attrTypeValues),\n\t\t\tclass:       knownStringOrOther(\"user\", attrClassValues),\n\t\t},\n\t\tdbus.ObjectPath(\"/org/freedesktop/login1/session/2\"): {\n\t\t\tseat:        session.SeatID,\n\t\t\tremote:      \"false\",\n\t\t\tsessionType: knownStringOrOther(\"x11\", attrTypeValues),\n\t\t\tclass:       knownStringOrOther(\"greeter\", attrClassValues),\n\t\t},\n\t}\n\n\treturn sessions[session.SessionObjectPath]\n}\n\nfunc TestLogindCollectorKnownStringOrOther(t *testing.T) {\n\tknown := []string{\"foo\", \"bar\"}\n\n\tactual := knownStringOrOther(\"foo\", known)\n\texpected := \"foo\"\n\tif actual != expected {\n\t\tt.Errorf(\"knownStringOrOther failed: got %q, expected %q.\", actual, expected)\n\t}\n\n\tactual = knownStringOrOther(\"baz\", known)\n\texpected = \"other\"\n\tif actual != expected {\n\t\tt.Errorf(\"knownStringOrOther failed: got %q, expected %q.\", actual, expected)\n\t}\n\n}\n\nfunc TestLogindCollectorCollectMetrics(t *testing.T) {\n\tch := make(chan prometheus.Metric)\n\tgo func() {\n\t\tcollectMetrics(ch, &testLogindInterface{})\n\t\tclose(ch)\n\t}()\n\n\tcount := 0\n\tfor range ch {\n\t\tcount++\n\t}\n\n\texpected := len(testSeats) * len(attrRemoteValues) * len(attrTypeValues) * len(attrClassValues)\n\tif count != expected {\n\t\tt.Errorf(\"collectMetrics did not generate the expected number of metrics: got %d, expected %d.\", count, expected)\n\t}\n}\n"
  },
  {
    "path": "collector/mdadm_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomdadm\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/procfs/sysfs\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype mdadmCollector struct {\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"mdadm\", defaultEnabled, NewMdadmCollector)\n}\n\n// NewMdadmCollector returns a new Collector exposing raid statistics.\nfunc NewMdadmCollector(logger *slog.Logger) (Collector, error) {\n\treturn &mdadmCollector{logger}, nil\n}\n\nvar (\n\tactiveDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"state\"),\n\t\t\"Indicates the state of md-device.\",\n\t\t[]string{\"device\"},\n\t\tprometheus.Labels{\"state\": \"active\"},\n\t)\n\tinActiveDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"state\"),\n\t\t\"Indicates the state of md-device.\",\n\t\t[]string{\"device\"},\n\t\tprometheus.Labels{\"state\": \"inactive\"},\n\t)\n\trecoveringDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"state\"),\n\t\t\"Indicates the state of md-device.\",\n\t\t[]string{\"device\"},\n\t\tprometheus.Labels{\"state\": \"recovering\"},\n\t)\n\tresyncDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"state\"),\n\t\t\"Indicates the state of md-device.\",\n\t\t[]string{\"device\"},\n\t\tprometheus.Labels{\"state\": \"resync\"},\n\t)\n\tcheckDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"state\"),\n\t\t\"Indicates the state of md-device.\",\n\t\t[]string{\"device\"},\n\t\tprometheus.Labels{\"state\": \"check\"},\n\t)\n\n\tdisksDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"disks\"),\n\t\t\"Number of active/failed/spare disks of device.\",\n\t\t[]string{\"device\", \"state\"},\n\t\tnil,\n\t)\n\n\tdisksTotalDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"disks_required\"),\n\t\t\"Total number of disks of device.\",\n\t\t[]string{\"device\"},\n\t\tnil,\n\t)\n\n\tblocksTotalDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"blocks\"),\n\t\t\"Total number of blocks on device.\",\n\t\t[]string{\"device\"},\n\t\tnil,\n\t)\n\n\tblocksSyncedDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"blocks_synced\"),\n\t\t\"Number of blocks synced on device.\",\n\t\t[]string{\"device\"},\n\t\tnil,\n\t)\n\n\tmdraidDisks = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"raid_disks\"),\n\t\t\"Number of raid disks on device.\",\n\t\t[]string{\"device\"},\n\t\tnil,\n\t)\n\n\tmdraidDegradedDisksDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"md\", \"degraded\"),\n\t\t\"Number of degraded disks on device.\",\n\t\t[]string{\"device\"},\n\t\tnil,\n\t)\n)\n\nfunc (c *mdadmCollector) Update(ch chan<- prometheus.Metric) error {\n\tprocFS, err := procfs.NewFS(*procPath)\n\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\tmdStats, err := procFS.MDStat()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"Not collecting mdstat, file does not exist\", \"file\", *procPath)\n\t\t\treturn ErrNoData\n\t\t}\n\n\t\treturn fmt.Errorf(\"error parsing mdstatus: %w\", err)\n\t}\n\n\tfor _, mdStat := range mdStats {\n\t\tc.logger.Debug(\"collecting metrics for device\", \"device\", mdStat.Name)\n\n\t\tstateVals := make(map[string]float64)\n\t\tstateVals[mdStat.ActivityState] = 1\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tdisksTotalDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(mdStat.DisksTotal),\n\t\t\tmdStat.Name,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tdisksDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(mdStat.DisksActive),\n\t\t\tmdStat.Name,\n\t\t\t\"active\",\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tdisksDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(mdStat.DisksFailed),\n\t\t\tmdStat.Name,\n\t\t\t\"failed\",\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tdisksDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(mdStat.DisksSpare),\n\t\t\tmdStat.Name,\n\t\t\t\"spare\",\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tactiveDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tstateVals[\"active\"],\n\t\t\tmdStat.Name,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tinActiveDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tstateVals[\"inactive\"],\n\t\t\tmdStat.Name,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\trecoveringDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tstateVals[\"recovering\"],\n\t\t\tmdStat.Name,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tresyncDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tstateVals[\"resyncing\"],\n\t\t\tmdStat.Name,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tcheckDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tstateVals[\"checking\"],\n\t\t\tmdStat.Name,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tblocksTotalDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(mdStat.BlocksTotal),\n\t\t\tmdStat.Name,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tblocksSyncedDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(mdStat.BlocksSynced),\n\t\t\tmdStat.Name,\n\t\t)\n\t}\n\n\tsysFS, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\tmdraids, err := sysFS.Mdraids()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"Not collecting mdraids, file does not exist\", \"file\", *sysPath)\n\t\t\treturn ErrNoData\n\t\t}\n\n\t\treturn fmt.Errorf(\"error parsing mdraids: %w\", err)\n\t}\n\n\tfor _, mdraid := range mdraids {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tmdraidDisks,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(mdraid.Disks),\n\t\t\tmdraid.Device,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tmdraidDegradedDisksDesc,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(mdraid.DegradedDisks),\n\t\t\tmdraid.Device,\n\t\t)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/mdadm_linux_test.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomdadm\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/client_golang/prometheus/testutil\"\n)\n\ntype testMdadmCollector struct {\n\tmc Collector\n}\n\nfunc (c testMdadmCollector) Collect(ch chan<- prometheus.Metric) {\n\tc.mc.Update(ch)\n}\n\nfunc (c testMdadmCollector) Describe(ch chan<- *prometheus.Desc) {\n\tprometheus.DescribeByCollect(c, ch)\n}\n\nfunc NewTestMdadmCollector(logger *slog.Logger) (prometheus.Collector, error) {\n\tmc, err := NewMdadmCollector(logger)\n\tif err != nil {\n\t\treturn testMdadmCollector{}, err\n\t}\n\treturn &testMdadmCollector{mc}, nil\n}\n\nfunc TestMdadmStats(t *testing.T) {\n\t*sysPath = \"fixtures/sys\"\n\t*procPath = \"fixtures/proc\"\n\ttestcase := `# HELP node_md_blocks Total number of blocks on device.\n        # TYPE node_md_blocks gauge\n        node_md_blocks{device=\"md0\"} 248896\n        node_md_blocks{device=\"md00\"} 4.186624e+06\n        node_md_blocks{device=\"md10\"} 3.14159265e+08\n        node_md_blocks{device=\"md101\"} 322560\n        node_md_blocks{device=\"md11\"} 4.190208e+06\n        node_md_blocks{device=\"md12\"} 3.886394368e+09\n        node_md_blocks{device=\"md120\"} 2.095104e+06\n        node_md_blocks{device=\"md126\"} 1.855870976e+09\n        node_md_blocks{device=\"md127\"} 3.12319552e+08\n        node_md_blocks{device=\"md201\"} 1.993728e+06\n        node_md_blocks{device=\"md219\"} 7932\n        node_md_blocks{device=\"md3\"} 5.853468288e+09\n        node_md_blocks{device=\"md4\"} 4.883648e+06\n        node_md_blocks{device=\"md6\"} 1.95310144e+08\n        node_md_blocks{device=\"md7\"} 7.813735424e+09\n        node_md_blocks{device=\"md8\"} 1.95310144e+08\n        node_md_blocks{device=\"md9\"} 523968\n        # HELP node_md_blocks_synced Number of blocks synced on device.\n        # TYPE node_md_blocks_synced gauge\n        node_md_blocks_synced{device=\"md0\"} 248896\n        node_md_blocks_synced{device=\"md00\"} 4.186624e+06\n        node_md_blocks_synced{device=\"md10\"} 3.14159265e+08\n        node_md_blocks_synced{device=\"md101\"} 322560\n        node_md_blocks_synced{device=\"md11\"} 0\n        node_md_blocks_synced{device=\"md12\"} 3.886394368e+09\n        node_md_blocks_synced{device=\"md120\"} 2.095104e+06\n        node_md_blocks_synced{device=\"md126\"} 1.855870976e+09\n        node_md_blocks_synced{device=\"md127\"} 3.12319552e+08\n        node_md_blocks_synced{device=\"md201\"} 114176\n        node_md_blocks_synced{device=\"md219\"} 7932\n        node_md_blocks_synced{device=\"md3\"} 5.853468288e+09\n        node_md_blocks_synced{device=\"md4\"} 4.883648e+06\n        node_md_blocks_synced{device=\"md6\"} 1.6775552e+07\n        node_md_blocks_synced{device=\"md7\"} 7.813735424e+09\n        node_md_blocks_synced{device=\"md8\"} 1.6775552e+07\n        node_md_blocks_synced{device=\"md9\"} 0\n        # HELP node_md_degraded Number of degraded disks on device.\n        # TYPE node_md_degraded gauge\n        node_md_degraded{device=\"md0\"} 0\n        node_md_degraded{device=\"md1\"} 0\n        node_md_degraded{device=\"md10\"} 0\n        node_md_degraded{device=\"md4\"} 0\n        node_md_degraded{device=\"md5\"} 1\n        node_md_degraded{device=\"md6\"} 1\n        # HELP node_md_disks Number of active/failed/spare disks of device.\n        # TYPE node_md_disks gauge\n        node_md_disks{device=\"md0\",state=\"active\"} 2\n        node_md_disks{device=\"md0\",state=\"failed\"} 0\n        node_md_disks{device=\"md0\",state=\"spare\"} 0\n        node_md_disks{device=\"md00\",state=\"active\"} 1\n        node_md_disks{device=\"md00\",state=\"failed\"} 0\n        node_md_disks{device=\"md00\",state=\"spare\"} 0\n        node_md_disks{device=\"md10\",state=\"active\"} 2\n        node_md_disks{device=\"md10\",state=\"failed\"} 0\n        node_md_disks{device=\"md10\",state=\"spare\"} 0\n        node_md_disks{device=\"md101\",state=\"active\"} 3\n        node_md_disks{device=\"md101\",state=\"failed\"} 0\n        node_md_disks{device=\"md101\",state=\"spare\"} 0\n        node_md_disks{device=\"md11\",state=\"active\"} 2\n        node_md_disks{device=\"md11\",state=\"failed\"} 1\n        node_md_disks{device=\"md11\",state=\"spare\"} 2\n        node_md_disks{device=\"md12\",state=\"active\"} 2\n        node_md_disks{device=\"md12\",state=\"failed\"} 0\n        node_md_disks{device=\"md12\",state=\"spare\"} 0\n        node_md_disks{device=\"md120\",state=\"active\"} 2\n        node_md_disks{device=\"md120\",state=\"failed\"} 0\n        node_md_disks{device=\"md120\",state=\"spare\"} 0\n        node_md_disks{device=\"md126\",state=\"active\"} 2\n        node_md_disks{device=\"md126\",state=\"failed\"} 0\n        node_md_disks{device=\"md126\",state=\"spare\"} 0\n        node_md_disks{device=\"md127\",state=\"active\"} 2\n        node_md_disks{device=\"md127\",state=\"failed\"} 0\n        node_md_disks{device=\"md127\",state=\"spare\"} 0\n        node_md_disks{device=\"md201\",state=\"active\"} 2\n        node_md_disks{device=\"md201\",state=\"failed\"} 0\n        node_md_disks{device=\"md201\",state=\"spare\"} 0\n        node_md_disks{device=\"md219\",state=\"active\"} 0\n        node_md_disks{device=\"md219\",state=\"failed\"} 0\n        node_md_disks{device=\"md219\",state=\"spare\"} 3\n        node_md_disks{device=\"md3\",state=\"active\"} 8\n        node_md_disks{device=\"md3\",state=\"failed\"} 0\n        node_md_disks{device=\"md3\",state=\"spare\"} 2\n        node_md_disks{device=\"md4\",state=\"active\"} 0\n        node_md_disks{device=\"md4\",state=\"failed\"} 1\n        node_md_disks{device=\"md4\",state=\"spare\"} 1\n        node_md_disks{device=\"md6\",state=\"active\"} 1\n        node_md_disks{device=\"md6\",state=\"failed\"} 1\n        node_md_disks{device=\"md6\",state=\"spare\"} 1\n        node_md_disks{device=\"md7\",state=\"active\"} 3\n        node_md_disks{device=\"md7\",state=\"failed\"} 1\n        node_md_disks{device=\"md7\",state=\"spare\"} 0\n        node_md_disks{device=\"md8\",state=\"active\"} 2\n        node_md_disks{device=\"md8\",state=\"failed\"} 0\n        node_md_disks{device=\"md8\",state=\"spare\"} 2\n        node_md_disks{device=\"md9\",state=\"active\"} 4\n        node_md_disks{device=\"md9\",state=\"failed\"} 2\n        node_md_disks{device=\"md9\",state=\"spare\"} 1\n        # HELP node_md_disks_required Total number of disks of device.\n        # TYPE node_md_disks_required gauge\n        node_md_disks_required{device=\"md0\"} 2\n        node_md_disks_required{device=\"md00\"} 1\n        node_md_disks_required{device=\"md10\"} 2\n        node_md_disks_required{device=\"md101\"} 3\n        node_md_disks_required{device=\"md11\"} 2\n        node_md_disks_required{device=\"md12\"} 2\n        node_md_disks_required{device=\"md120\"} 2\n        node_md_disks_required{device=\"md126\"} 2\n        node_md_disks_required{device=\"md127\"} 2\n        node_md_disks_required{device=\"md201\"} 2\n        node_md_disks_required{device=\"md219\"} 0\n        node_md_disks_required{device=\"md3\"} 8\n        node_md_disks_required{device=\"md4\"} 0\n        node_md_disks_required{device=\"md6\"} 2\n        node_md_disks_required{device=\"md7\"} 4\n        node_md_disks_required{device=\"md8\"} 2\n        node_md_disks_required{device=\"md9\"} 4\n        # HELP node_md_raid_disks Number of raid disks on device.\n        # TYPE node_md_raid_disks gauge\n        node_md_raid_disks{device=\"md0\"} 2\n        node_md_raid_disks{device=\"md1\"} 2\n        node_md_raid_disks{device=\"md10\"} 4\n        node_md_raid_disks{device=\"md4\"} 3\n        node_md_raid_disks{device=\"md5\"} 3\n        node_md_raid_disks{device=\"md6\"} 4\n        # HELP node_md_state Indicates the state of md-device.\n        # TYPE node_md_state gauge\n        node_md_state{device=\"md0\",state=\"active\"} 1\n        node_md_state{device=\"md0\",state=\"check\"} 0\n        node_md_state{device=\"md0\",state=\"inactive\"} 0\n        node_md_state{device=\"md0\",state=\"recovering\"} 0\n        node_md_state{device=\"md0\",state=\"resync\"} 0\n        node_md_state{device=\"md00\",state=\"active\"} 1\n        node_md_state{device=\"md00\",state=\"check\"} 0\n        node_md_state{device=\"md00\",state=\"inactive\"} 0\n        node_md_state{device=\"md00\",state=\"recovering\"} 0\n        node_md_state{device=\"md00\",state=\"resync\"} 0\n        node_md_state{device=\"md10\",state=\"active\"} 1\n        node_md_state{device=\"md10\",state=\"check\"} 0\n        node_md_state{device=\"md10\",state=\"inactive\"} 0\n        node_md_state{device=\"md10\",state=\"recovering\"} 0\n        node_md_state{device=\"md10\",state=\"resync\"} 0\n        node_md_state{device=\"md101\",state=\"active\"} 1\n        node_md_state{device=\"md101\",state=\"check\"} 0\n        node_md_state{device=\"md101\",state=\"inactive\"} 0\n        node_md_state{device=\"md101\",state=\"recovering\"} 0\n        node_md_state{device=\"md101\",state=\"resync\"} 0\n        node_md_state{device=\"md11\",state=\"active\"} 0\n        node_md_state{device=\"md11\",state=\"check\"} 0\n        node_md_state{device=\"md11\",state=\"inactive\"} 0\n        node_md_state{device=\"md11\",state=\"recovering\"} 0\n        node_md_state{device=\"md11\",state=\"resync\"} 1\n        node_md_state{device=\"md12\",state=\"active\"} 1\n        node_md_state{device=\"md12\",state=\"check\"} 0\n        node_md_state{device=\"md12\",state=\"inactive\"} 0\n        node_md_state{device=\"md12\",state=\"recovering\"} 0\n        node_md_state{device=\"md12\",state=\"resync\"} 0\n        node_md_state{device=\"md120\",state=\"active\"} 1\n        node_md_state{device=\"md120\",state=\"check\"} 0\n        node_md_state{device=\"md120\",state=\"inactive\"} 0\n        node_md_state{device=\"md120\",state=\"recovering\"} 0\n        node_md_state{device=\"md120\",state=\"resync\"} 0\n        node_md_state{device=\"md126\",state=\"active\"} 1\n        node_md_state{device=\"md126\",state=\"check\"} 0\n        node_md_state{device=\"md126\",state=\"inactive\"} 0\n        node_md_state{device=\"md126\",state=\"recovering\"} 0\n        node_md_state{device=\"md126\",state=\"resync\"} 0\n        node_md_state{device=\"md127\",state=\"active\"} 1\n        node_md_state{device=\"md127\",state=\"check\"} 0\n        node_md_state{device=\"md127\",state=\"inactive\"} 0\n        node_md_state{device=\"md127\",state=\"recovering\"} 0\n        node_md_state{device=\"md127\",state=\"resync\"} 0\n        node_md_state{device=\"md201\",state=\"active\"} 0\n        node_md_state{device=\"md201\",state=\"check\"} 1\n        node_md_state{device=\"md201\",state=\"inactive\"} 0\n        node_md_state{device=\"md201\",state=\"recovering\"} 0\n        node_md_state{device=\"md201\",state=\"resync\"} 0\n        node_md_state{device=\"md219\",state=\"active\"} 0\n        node_md_state{device=\"md219\",state=\"check\"} 0\n        node_md_state{device=\"md219\",state=\"inactive\"} 1\n        node_md_state{device=\"md219\",state=\"recovering\"} 0\n        node_md_state{device=\"md219\",state=\"resync\"} 0\n        node_md_state{device=\"md3\",state=\"active\"} 1\n        node_md_state{device=\"md3\",state=\"check\"} 0\n        node_md_state{device=\"md3\",state=\"inactive\"} 0\n        node_md_state{device=\"md3\",state=\"recovering\"} 0\n        node_md_state{device=\"md3\",state=\"resync\"} 0\n        node_md_state{device=\"md4\",state=\"active\"} 0\n        node_md_state{device=\"md4\",state=\"check\"} 0\n        node_md_state{device=\"md4\",state=\"inactive\"} 1\n        node_md_state{device=\"md4\",state=\"recovering\"} 0\n        node_md_state{device=\"md4\",state=\"resync\"} 0\n        node_md_state{device=\"md6\",state=\"active\"} 0\n        node_md_state{device=\"md6\",state=\"check\"} 0\n        node_md_state{device=\"md6\",state=\"inactive\"} 0\n        node_md_state{device=\"md6\",state=\"recovering\"} 1\n        node_md_state{device=\"md6\",state=\"resync\"} 0\n        node_md_state{device=\"md7\",state=\"active\"} 1\n        node_md_state{device=\"md7\",state=\"check\"} 0\n        node_md_state{device=\"md7\",state=\"inactive\"} 0\n        node_md_state{device=\"md7\",state=\"recovering\"} 0\n        node_md_state{device=\"md7\",state=\"resync\"} 0\n        node_md_state{device=\"md8\",state=\"active\"} 0\n        node_md_state{device=\"md8\",state=\"check\"} 0\n        node_md_state{device=\"md8\",state=\"inactive\"} 0\n        node_md_state{device=\"md8\",state=\"recovering\"} 0\n        node_md_state{device=\"md8\",state=\"resync\"} 1\n        node_md_state{device=\"md9\",state=\"active\"} 0\n        node_md_state{device=\"md9\",state=\"check\"} 0\n        node_md_state{device=\"md9\",state=\"inactive\"} 0\n        node_md_state{device=\"md9\",state=\"recovering\"} 0\n        node_md_state{device=\"md9\",state=\"resync\"} 1\n`\n\tlogger := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{\n\t\tLevel:     slog.LevelError,\n\t\tAddSource: true,\n\t}))\n\tcollector, err := NewMdadmCollector(logger)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tc, err := NewTestMdadmCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\treg := prometheus.NewRegistry()\n\treg.MustRegister(c)\n\n\tsink := make(chan prometheus.Metric)\n\tgo func() {\n\t\terr := collector.Update(sink)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tclose(sink)\n\t}()\n\n\terr = testutil.GatherAndCompare(reg, strings.NewReader(testcase))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n"
  },
  {
    "path": "collector/meminfo.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (darwin || linux || openbsd || netbsd || aix) && !nomeminfo\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tmemInfoSubsystem = \"memory\"\n)\n\nfunc init() {\n\tregisterCollector(\"meminfo\", defaultEnabled, NewMeminfoCollector)\n}\n\n// Update calls (*meminfoCollector).getMemInfo to get the platform specific\n// memory metrics.\nfunc (c *meminfoCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar metricType prometheus.ValueType\n\tmemInfo, err := c.getMemInfo()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get meminfo: %w\", err)\n\t}\n\tc.logger.Debug(\"Set node_mem\", \"memInfo\", fmt.Sprintf(\"%v\", memInfo))\n\tfor k, v := range memInfo {\n\t\tif strings.HasSuffix(k, \"_total\") {\n\t\t\tmetricType = prometheus.CounterValue\n\t\t} else {\n\t\t\tmetricType = prometheus.GaugeValue\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, memInfoSubsystem, k),\n\t\t\t\tfmt.Sprintf(\"Memory information field %s.\", k),\n\t\t\t\tnil, nil,\n\t\t\t),\n\t\t\tmetricType, v,\n\t\t)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/meminfo_aix.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/power-devops/perfstat\"\n)\n\ntype meminfoCollector struct {\n\tlogger *slog.Logger\n}\n\n// NewMeminfoCollector returns a new Collector exposing memory stats.\nfunc NewMeminfoCollector(logger *slog.Logger) (Collector, error) {\n\treturn &meminfoCollector{\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *meminfoCollector) getMemInfo() (map[string]float64, error) {\n\tstats, err := perfstat.MemoryTotalStat()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn map[string]float64{\n\t\t\"total_bytes\":              float64(stats.RealTotal * 4096),\n\t\t\"free_bytes\":               float64(stats.RealFree * 4096),\n\t\t\"available_bytes\":          float64(stats.RealAvailable * 4096),\n\t\t\"process_bytes\":            float64(stats.RealProcess * 4096),\n\t\t\"paging_space_total_bytes\": float64(stats.PgSpTotal * 4096),\n\t\t\"paging_space_free_bytes\":  float64(stats.PgSpFree * 4096),\n\t\t\"page_scans_total\":         float64(stats.Scans),\n\t}, nil\n}\n"
  },
  {
    "path": "collector/meminfo_darwin.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo\n\npackage collector\n\n// #include <mach/mach_host.h>\n// #include <sys/sysctl.h>\n// typedef struct xsw_usage xsw_usage_t;\nimport \"C\"\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\ntype meminfoCollector struct {\n\tlogger *slog.Logger\n}\n\n// NewMeminfoCollector returns a new Collector exposing memory stats.\nfunc NewMeminfoCollector(logger *slog.Logger) (Collector, error) {\n\treturn &meminfoCollector{\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *meminfoCollector) getMemInfo() (map[string]float64, error) {\n\thost := C.mach_host_self()\n\tinfoCount := C.mach_msg_type_number_t(C.HOST_VM_INFO64_COUNT)\n\tvmstat := C.vm_statistics64_data_t{}\n\tret := C.host_statistics64(\n\t\tC.host_t(host),\n\t\tC.HOST_VM_INFO64,\n\t\tC.host_info_t(unsafe.Pointer(&vmstat)),\n\t\t&infoCount,\n\t)\n\tif ret != C.KERN_SUCCESS {\n\t\treturn nil, fmt.Errorf(\"couldn't get memory statistics, host_statistics returned %d\", ret)\n\t}\n\ttotalb, err := unix.Sysctl(\"hw.memsize\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tswapraw, err := unix.SysctlRaw(\"vm.swapusage\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tswap := (*C.xsw_usage_t)(unsafe.Pointer(&swapraw[0]))\n\n\t// Syscall removes terminating NUL which we need to cast to uint64\n\ttotal := binary.LittleEndian.Uint64([]byte(totalb + \"\\x00\"))\n\n\tvar pageSize C.vm_size_t\n\tC.host_page_size(C.host_t(host), &pageSize)\n\n\tps := float64(pageSize)\n\treturn map[string]float64{\n\t\t\"active_bytes\":            ps * float64(vmstat.active_count),\n\t\t\"compressed_bytes\":        ps * float64(vmstat.compressor_page_count),\n\t\t\"inactive_bytes\":          ps * float64(vmstat.inactive_count),\n\t\t\"wired_bytes\":             ps * float64(vmstat.wire_count),\n\t\t\"free_bytes\":              ps * float64(vmstat.free_count),\n\t\t\"swapped_in_bytes_total\":  ps * float64(vmstat.pageins),\n\t\t\"swapped_out_bytes_total\": ps * float64(vmstat.pageouts),\n\t\t\"internal_bytes\":          ps * float64(vmstat.internal_page_count),\n\t\t\"purgeable_bytes\":         ps * float64(vmstat.purgeable_count),\n\t\t\"total_bytes\":             float64(total),\n\t\t\"swap_used_bytes\":         float64(swap.xsu_used),\n\t\t\"swap_total_bytes\":        float64(swap.xsu_total),\n\t}, nil\n}\n"
  },
  {
    "path": "collector/meminfo_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/procfs\"\n)\n\ntype meminfoCollector struct {\n\tfs     procfs.FS\n\tlogger *slog.Logger\n}\n\n// NewMeminfoCollector returns a new Collector exposing memory stats.\nfunc NewMeminfoCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &meminfoCollector{\n\t\tlogger: logger,\n\t\tfs:     fs,\n\t}, nil\n}\n\nfunc (c *meminfoCollector) getMemInfo() (map[string]float64, error) {\n\tmeminfo, err := c.fs.Meminfo()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get memory info: %w\", err)\n\t}\n\n\tmetrics := make(map[string]float64)\n\n\tif meminfo.ActiveBytes != nil {\n\t\tmetrics[\"Active_bytes\"] = float64(*meminfo.ActiveBytes)\n\t}\n\tif meminfo.ActiveAnonBytes != nil {\n\t\tmetrics[\"Active_anon_bytes\"] = float64(*meminfo.ActiveAnonBytes)\n\t}\n\tif meminfo.ActiveFileBytes != nil {\n\t\tmetrics[\"Active_file_bytes\"] = float64(*meminfo.ActiveFileBytes)\n\t}\n\tif meminfo.AnonHugePagesBytes != nil {\n\t\tmetrics[\"AnonHugePages_bytes\"] = float64(*meminfo.AnonHugePagesBytes)\n\t}\n\tif meminfo.AnonPagesBytes != nil {\n\t\tmetrics[\"AnonPages_bytes\"] = float64(*meminfo.AnonPagesBytes)\n\t}\n\tif meminfo.BounceBytes != nil {\n\t\tmetrics[\"Bounce_bytes\"] = float64(*meminfo.BounceBytes)\n\t}\n\tif meminfo.BuffersBytes != nil {\n\t\tmetrics[\"Buffers_bytes\"] = float64(*meminfo.BuffersBytes)\n\t}\n\tif meminfo.CachedBytes != nil {\n\t\tmetrics[\"Cached_bytes\"] = float64(*meminfo.CachedBytes)\n\t}\n\tif meminfo.CmaFreeBytes != nil {\n\t\tmetrics[\"CmaFree_bytes\"] = float64(*meminfo.CmaFreeBytes)\n\t}\n\tif meminfo.CmaTotalBytes != nil {\n\t\tmetrics[\"CmaTotal_bytes\"] = float64(*meminfo.CmaTotalBytes)\n\t}\n\tif meminfo.CommitLimitBytes != nil {\n\t\tmetrics[\"CommitLimit_bytes\"] = float64(*meminfo.CommitLimitBytes)\n\t}\n\tif meminfo.CommittedASBytes != nil {\n\t\tmetrics[\"Committed_AS_bytes\"] = float64(*meminfo.CommittedASBytes)\n\t}\n\tif meminfo.DirectMap1GBytes != nil {\n\t\tmetrics[\"DirectMap1G_bytes\"] = float64(*meminfo.DirectMap1GBytes)\n\t}\n\tif meminfo.DirectMap2MBytes != nil {\n\t\tmetrics[\"DirectMap2M_bytes\"] = float64(*meminfo.DirectMap2MBytes)\n\t}\n\tif meminfo.DirectMap4kBytes != nil {\n\t\tmetrics[\"DirectMap4k_bytes\"] = float64(*meminfo.DirectMap4kBytes)\n\t}\n\tif meminfo.DirtyBytes != nil {\n\t\tmetrics[\"Dirty_bytes\"] = float64(*meminfo.DirtyBytes)\n\t}\n\tif meminfo.HardwareCorruptedBytes != nil {\n\t\tmetrics[\"HardwareCorrupted_bytes\"] = float64(*meminfo.HardwareCorruptedBytes)\n\t}\n\tif meminfo.HugepagesizeBytes != nil {\n\t\tmetrics[\"Hugepagesize_bytes\"] = float64(*meminfo.HugepagesizeBytes)\n\t}\n\tif meminfo.InactiveBytes != nil {\n\t\tmetrics[\"Inactive_bytes\"] = float64(*meminfo.InactiveBytes)\n\t}\n\tif meminfo.InactiveAnonBytes != nil {\n\t\tmetrics[\"Inactive_anon_bytes\"] = float64(*meminfo.InactiveAnonBytes)\n\t}\n\tif meminfo.InactiveFileBytes != nil {\n\t\tmetrics[\"Inactive_file_bytes\"] = float64(*meminfo.InactiveFileBytes)\n\t}\n\tif meminfo.KernelStackBytes != nil {\n\t\tmetrics[\"KernelStack_bytes\"] = float64(*meminfo.KernelStackBytes)\n\t}\n\tif meminfo.MappedBytes != nil {\n\t\tmetrics[\"Mapped_bytes\"] = float64(*meminfo.MappedBytes)\n\t}\n\tif meminfo.MemAvailableBytes != nil {\n\t\tmetrics[\"MemAvailable_bytes\"] = float64(*meminfo.MemAvailableBytes)\n\t}\n\tif meminfo.MemFreeBytes != nil {\n\t\tmetrics[\"MemFree_bytes\"] = float64(*meminfo.MemFreeBytes)\n\t}\n\tif meminfo.MemTotalBytes != nil {\n\t\tmetrics[\"MemTotal_bytes\"] = float64(*meminfo.MemTotalBytes)\n\t}\n\tif meminfo.MlockedBytes != nil {\n\t\tmetrics[\"Mlocked_bytes\"] = float64(*meminfo.MlockedBytes)\n\t}\n\tif meminfo.NFSUnstableBytes != nil {\n\t\tmetrics[\"NFS_Unstable_bytes\"] = float64(*meminfo.NFSUnstableBytes)\n\t}\n\tif meminfo.PageTablesBytes != nil {\n\t\tmetrics[\"PageTables_bytes\"] = float64(*meminfo.PageTablesBytes)\n\t}\n\tif meminfo.PercpuBytes != nil {\n\t\tmetrics[\"Percpu_bytes\"] = float64(*meminfo.PercpuBytes)\n\t}\n\tif meminfo.SReclaimableBytes != nil {\n\t\tmetrics[\"SReclaimable_bytes\"] = float64(*meminfo.SReclaimableBytes)\n\t}\n\tif meminfo.SUnreclaimBytes != nil {\n\t\tmetrics[\"SUnreclaim_bytes\"] = float64(*meminfo.SUnreclaimBytes)\n\t}\n\tif meminfo.ShmemBytes != nil {\n\t\tmetrics[\"Shmem_bytes\"] = float64(*meminfo.ShmemBytes)\n\t}\n\tif meminfo.ShmemHugePagesBytes != nil {\n\t\tmetrics[\"ShmemHugePages_bytes\"] = float64(*meminfo.ShmemHugePagesBytes)\n\t}\n\tif meminfo.ShmemPmdMappedBytes != nil {\n\t\tmetrics[\"ShmemPmdMapped_bytes\"] = float64(*meminfo.ShmemPmdMappedBytes)\n\t}\n\tif meminfo.SlabBytes != nil {\n\t\tmetrics[\"Slab_bytes\"] = float64(*meminfo.SlabBytes)\n\t}\n\tif meminfo.SwapCachedBytes != nil {\n\t\tmetrics[\"SwapCached_bytes\"] = float64(*meminfo.SwapCachedBytes)\n\t}\n\tif meminfo.SwapFreeBytes != nil {\n\t\tmetrics[\"SwapFree_bytes\"] = float64(*meminfo.SwapFreeBytes)\n\t}\n\tif meminfo.SwapTotalBytes != nil {\n\t\tmetrics[\"SwapTotal_bytes\"] = float64(*meminfo.SwapTotalBytes)\n\t}\n\tif meminfo.UnevictableBytes != nil {\n\t\tmetrics[\"Unevictable_bytes\"] = float64(*meminfo.UnevictableBytes)\n\t}\n\tif meminfo.VmallocChunkBytes != nil {\n\t\tmetrics[\"VmallocChunk_bytes\"] = float64(*meminfo.VmallocChunkBytes)\n\t}\n\tif meminfo.VmallocTotalBytes != nil {\n\t\tmetrics[\"VmallocTotal_bytes\"] = float64(*meminfo.VmallocTotalBytes)\n\t}\n\tif meminfo.VmallocUsedBytes != nil {\n\t\tmetrics[\"VmallocUsed_bytes\"] = float64(*meminfo.VmallocUsedBytes)\n\t}\n\tif meminfo.WritebackBytes != nil {\n\t\tmetrics[\"Writeback_bytes\"] = float64(*meminfo.WritebackBytes)\n\t}\n\tif meminfo.WritebackTmpBytes != nil {\n\t\tmetrics[\"WritebackTmp_bytes\"] = float64(*meminfo.WritebackTmpBytes)\n\t}\n\tif meminfo.ZswapBytes != nil {\n\t\tmetrics[\"Zswap_bytes\"] = float64(*meminfo.ZswapBytes)\n\t}\n\tif meminfo.ZswappedBytes != nil {\n\t\tmetrics[\"Zswapped_bytes\"] = float64(*meminfo.ZswappedBytes)\n\t}\n\n\t// These fields are always in bytes and do not have `Bytes`\n\t// suffixed counterparts in the procfs.Meminfo struct, nor do\n\t// they have `_bytes` suffix on the metric names.\n\tif meminfo.HugePagesFree != nil {\n\t\tmetrics[\"HugePages_Free\"] = float64(*meminfo.HugePagesFree)\n\t}\n\tif meminfo.HugePagesRsvd != nil {\n\t\tmetrics[\"HugePages_Rsvd\"] = float64(*meminfo.HugePagesRsvd)\n\t}\n\tif meminfo.HugePagesSurp != nil {\n\t\tmetrics[\"HugePages_Surp\"] = float64(*meminfo.HugePagesSurp)\n\t}\n\tif meminfo.HugePagesTotal != nil {\n\t\tmetrics[\"HugePages_Total\"] = float64(*meminfo.HugePagesTotal)\n\t}\n\n\treturn metrics, nil\n}\n"
  },
  {
    "path": "collector/meminfo_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"testing\"\n)\n\nfunc TestMemInfo(t *testing.T) {\n\t*procPath = \"fixtures/proc\"\n\tlogger := slog.New(slog.NewTextHandler(io.Discard, nil))\n\n\tcollector, err := NewMeminfoCollector(logger)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tmemInfo, err := collector.(*meminfoCollector).getMemInfo()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif want, got := 3831959552.0, memInfo[\"MemTotal_bytes\"]; want != got {\n\t\tt.Errorf(\"want memory total %f, got %f\", want, got)\n\t}\n\n\tif want, got := 3787456512.0, memInfo[\"DirectMap2M_bytes\"]; want != got {\n\t\tt.Errorf(\"want memory directMap2M %f, got %f\", want, got)\n\t}\n}\n"
  },
  {
    "path": "collector/meminfo_netbsd.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\ntype meminfoCollector struct {\n\tlogger *slog.Logger\n}\n\n// NewMeminfoCollector returns a new Collector exposing memory stats.\nfunc NewMeminfoCollector(logger *slog.Logger) (Collector, error) {\n\treturn &meminfoCollector{\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *meminfoCollector) getMemInfo() (map[string]float64, error) {\n\tuvmexp, err := unix.SysctlUvmexp(\"vm.uvmexp2\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tps := float64(uvmexp.Pagesize)\n\n\t// see uvm(9)\n\treturn map[string]float64{\n\t\t\"active_bytes\":                  ps * float64(uvmexp.Active),\n\t\t\"free_bytes\":                    ps * float64(uvmexp.Free),\n\t\t\"inactive_bytes\":                ps * float64(uvmexp.Inactive),\n\t\t\"size_bytes\":                    ps * float64(uvmexp.Npages),\n\t\t\"swap_size_bytes\":               ps * float64(uvmexp.Swpages),\n\t\t\"swap_used_bytes\":               ps * float64(uvmexp.Swpginuse),\n\t\t\"swapped_in_pages_bytes_total\":  ps * float64(uvmexp.Pgswapin),\n\t\t\"swapped_out_pages_bytes_total\": ps * float64(uvmexp.Pgswapout),\n\t\t\"wired_bytes\":                   ps * float64(uvmexp.Wired),\n\t}, nil\n}\n"
  },
  {
    "path": "collector/meminfo_numa_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo_numa\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tmemInfoNumaSubsystem = \"memory_numa\"\n)\n\nvar meminfoNodeRE = regexp.MustCompile(`.*devices/system/node/node([0-9]*)`)\n\ntype meminfoMetric struct {\n\tmetricName string\n\tmetricType prometheus.ValueType\n\tnumaNode   string\n\tvalue      float64\n}\n\ntype meminfoNumaCollector struct {\n\tmetricDescs map[string]*prometheus.Desc\n\tlogger      *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"meminfo_numa\", defaultDisabled, NewMeminfoNumaCollector)\n}\n\n// NewMeminfoNumaCollector returns a new Collector exposing memory stats.\nfunc NewMeminfoNumaCollector(logger *slog.Logger) (Collector, error) {\n\treturn &meminfoNumaCollector{\n\t\tmetricDescs: map[string]*prometheus.Desc{},\n\t\tlogger:      logger,\n\t}, nil\n}\n\nfunc (c *meminfoNumaCollector) Update(ch chan<- prometheus.Metric) error {\n\tmetrics, err := getMemInfoNuma()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get NUMA meminfo: %w\", err)\n\t}\n\tfor _, v := range metrics {\n\t\tdesc, ok := c.metricDescs[v.metricName]\n\t\tif !ok {\n\t\t\tdesc = prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, memInfoNumaSubsystem, v.metricName),\n\t\t\t\tfmt.Sprintf(\"Memory information field %s.\", v.metricName),\n\t\t\t\t[]string{\"node\"}, nil)\n\t\t\tc.metricDescs[v.metricName] = desc\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(desc, v.metricType, v.value, v.numaNode)\n\t}\n\treturn nil\n}\n\nfunc getMemInfoNuma() ([]meminfoMetric, error) {\n\tvar (\n\t\tmetrics []meminfoMetric\n\t)\n\n\tnodes, err := filepath.Glob(sysFilePath(\"devices/system/node/node[0-9]*\"))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, node := range nodes {\n\t\tmeminfoFile, err := os.Open(filepath.Join(node, \"meminfo\"))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer meminfoFile.Close()\n\n\t\tnumaInfo, err := parseMemInfoNuma(meminfoFile)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tmetrics = append(metrics, numaInfo...)\n\n\t\tnumastatFile, err := os.Open(filepath.Join(node, \"numastat\"))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdefer numastatFile.Close()\n\n\t\tnodeNumber := meminfoNodeRE.FindStringSubmatch(node)\n\t\tif nodeNumber == nil {\n\t\t\treturn nil, fmt.Errorf(\"device node string didn't match regexp: %s\", node)\n\t\t}\n\n\t\tnumaStat, err := parseMemInfoNumaStat(numastatFile, nodeNumber[1])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tmetrics = append(metrics, numaStat...)\n\t}\n\n\treturn metrics, nil\n}\n\nfunc parseMemInfoNuma(r io.Reader) ([]meminfoMetric, error) {\n\tvar (\n\t\tmemInfo []meminfoMetric\n\t\tscanner = bufio.NewScanner(r)\n\t\tre      = regexp.MustCompile(`\\((.*)\\)`)\n\t)\n\n\tfor scanner.Scan() {\n\t\tline := strings.TrimSpace(scanner.Text())\n\t\tif line == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tparts := strings.Fields(line)\n\n\t\tfv, err := strconv.ParseFloat(parts[3], 64)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid value in meminfo: %w\", err)\n\t\t}\n\t\tswitch l := len(parts); {\n\t\tcase l == 4: // no unit\n\t\tcase l == 5 && parts[4] == \"kB\": // has unit\n\t\t\tfv *= 1024\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"invalid line in meminfo: %s\", line)\n\t\t}\n\t\tmetric := strings.TrimRight(parts[2], \":\")\n\n\t\t// Active(anon) -> Active_anon\n\t\tmetric = re.ReplaceAllString(metric, \"_${1}\")\n\t\tmemInfo = append(memInfo, meminfoMetric{metric, prometheus.GaugeValue, parts[1], fv})\n\t}\n\n\treturn memInfo, scanner.Err()\n}\n\nfunc parseMemInfoNumaStat(r io.Reader, nodeNumber string) ([]meminfoMetric, error) {\n\tvar (\n\t\tnumaStat []meminfoMetric\n\t\tscanner  = bufio.NewScanner(r)\n\t)\n\n\tfor scanner.Scan() {\n\t\tline := strings.TrimSpace(scanner.Text())\n\t\tif line == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tparts := strings.Fields(line)\n\t\tif len(parts) != 2 {\n\t\t\treturn nil, fmt.Errorf(\"line scan did not return 2 fields: %s\", line)\n\t\t}\n\n\t\tfv, err := strconv.ParseFloat(parts[1], 64)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid value in numastat: %w\", err)\n\t\t}\n\n\t\tnumaStat = append(numaStat, meminfoMetric{parts[0] + \"_total\", prometheus.CounterValue, nodeNumber, fv})\n\t}\n\treturn numaStat, scanner.Err()\n}\n"
  },
  {
    "path": "collector/meminfo_numa_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo_numa\n\npackage collector\n\nimport (\n\t\"os\"\n\t\"testing\"\n)\n\nfunc TestMemInfoNuma(t *testing.T) {\n\tfile, err := os.Open(\"fixtures/sys/devices/system/node/node0/meminfo\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tmemInfo, err := parseMemInfoNuma(file)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := 707915776.0, memInfo[5].value; want != got {\n\t\tt.Errorf(\"want memory Active(anon) value %f, got %f\", want, got)\n\t}\n\n\tif want, got := \"Active_anon\", memInfo[5].metricName; want != got {\n\t\tt.Errorf(\"want metric Active(anon) metricName %s, got %s\", want, got)\n\t}\n\n\tif want, got := 150994944.0, memInfo[25].value; want != got {\n\t\tt.Errorf(\"want memory AnonHugePages %f, got %f\", want, got)\n\t}\n\n\tfile, err = os.Open(\"fixtures/sys/devices/system/node/node1/meminfo\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tmemInfo, err = parseMemInfoNuma(file)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := 291930112.0, memInfo[6].value; want != got {\n\t\tt.Errorf(\"want memory Inactive(anon) %f, got %f\", want, got)\n\t}\n\n\tif want, got := 85585088512.0, memInfo[13].value; want != got {\n\t\tt.Errorf(\"want memory FilePages %f, got %f\", want, got)\n\t}\n}\n\nfunc TestMemInfoNumaStat(t *testing.T) {\n\tfile, err := os.Open(\"fixtures/sys/devices/system/node/node0/numastat\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tnumaStat, err := parseMemInfoNumaStat(file, \"0\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := 193460335812.0, numaStat[0].value; want != got {\n\t\tt.Errorf(\"want numa stat numa_hit value %f, got %f\", want, got)\n\t}\n\n\tif want, got := \"numa_hit_total\", numaStat[0].metricName; want != got {\n\t\tt.Errorf(\"want numa stat numa_hit metricName %s, got %s\", want, got)\n\t}\n\n\tif want, got := 193454780853.0, numaStat[4].value; want != got {\n\t\tt.Errorf(\"want numa stat local_node %f, got %f\", want, got)\n\t}\n\n\tfile, err = os.Open(\"fixtures/sys/devices/system/node/node1/numastat\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tnumaStat, err = parseMemInfoNumaStat(file, \"1\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := 59858626709.0, numaStat[1].value; want != got {\n\t\tt.Errorf(\"want numa stat numa_miss %f, got %f\", want, got)\n\t}\n\n\tif want, got := 59860526920.0, numaStat[5].value; want != got {\n\t\tt.Errorf(\"want numa stat other_node %f, got %f\", want, got)\n\t}\n}\n"
  },
  {
    "path": "collector/meminfo_openbsd.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo && !amd64\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n)\n\n/*\n#include <sys/param.h>\n#include <sys/types.h>\n#include <sys/mount.h>\n#include <sys/sysctl.h>\n\nint\nsysctl_uvmexp(struct uvmexp *uvmexp)\n{\n        static int uvmexp_mib[] = {CTL_VM, VM_UVMEXP};\n        size_t sz = sizeof(struct uvmexp);\n\n        if(sysctl(uvmexp_mib, 2, uvmexp, &sz, NULL, 0) < 0)\n                return -1;\n\n        return 0;\n}\n\nint\nsysctl_bcstats(struct bcachestats *bcstats)\n{\n        static int bcstats_mib[] = {CTL_VFS, VFS_GENERIC, VFS_BCACHESTAT};\n        size_t sz = sizeof(struct bcachestats);\n\n        if(sysctl(bcstats_mib, 3, bcstats, &sz, NULL, 0) < 0)\n                return -1;\n\n        return 0;\n}\n\n*/\nimport \"C\"\n\ntype meminfoCollector struct {\n\tlogger *slog.Logger\n}\n\n// NewMeminfoCollector returns a new Collector exposing memory stats.\nfunc NewMeminfoCollector(logger *slog.Logger) (Collector, error) {\n\treturn &meminfoCollector{\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *meminfoCollector) getMemInfo() (map[string]float64, error) {\n\tvar uvmexp C.struct_uvmexp\n\tvar bcstats C.struct_bcachestats\n\n\tif _, err := C.sysctl_uvmexp(&uvmexp); err != nil {\n\t\treturn nil, fmt.Errorf(\"sysctl CTL_VM VM_UVMEXP failed: %w\", err)\n\t}\n\n\tif _, err := C.sysctl_bcstats(&bcstats); err != nil {\n\t\treturn nil, fmt.Errorf(\"sysctl CTL_VFS VFS_GENERIC VFS_BCACHESTAT failed: %w\", err)\n\t}\n\n\tps := float64(uvmexp.pagesize)\n\n\t// see uvm(9)\n\treturn map[string]float64{\n\t\t\"active_bytes\":                  ps * float64(uvmexp.active),\n\t\t\"cache_bytes\":                   ps * float64(bcstats.numbufpages),\n\t\t\"free_bytes\":                    ps * float64(uvmexp.free),\n\t\t\"inactive_bytes\":                ps * float64(uvmexp.inactive),\n\t\t\"size_bytes\":                    ps * float64(uvmexp.npages),\n\t\t\"swap_size_bytes\":               ps * float64(uvmexp.swpages),\n\t\t\"swap_used_bytes\":               ps * float64(uvmexp.swpginuse),\n\t\t\"swapped_in_pages_bytes_total\":  ps * float64(uvmexp.pgswapin),\n\t\t\"swapped_out_pages_bytes_total\": ps * float64(uvmexp.pgswapout),\n\t\t\"wired_bytes\":                   ps * float64(uvmexp.wired),\n\t}, nil\n}\n"
  },
  {
    "path": "collector/meminfo_openbsd_amd64.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\")\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomeminfo\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tCTL_VFS        = 10\n\tVFS_GENERIC    = 0\n\tVFS_BCACHESTAT = 3\n)\n\ntype bcachestats struct {\n\tNumbufs        int64\n\tNumbufpages    int64\n\tNumdirtypages  int64\n\tNumcleanpages  int64\n\tPendingwrites  int64\n\tPendingreads   int64\n\tNumwrites      int64\n\tNumreads       int64\n\tCachehits      int64\n\tBusymapped     int64\n\tDmapages       int64\n\tHighpages      int64\n\tDelwribufs     int64\n\tKvaslots       int64\n\tKvaslots_avail int64\n\tHighflips      int64\n\tHighflops      int64\n\tDmaflips       int64\n}\n\ntype meminfoCollector struct {\n\tlogger *slog.Logger\n}\n\n// NewMeminfoCollector returns a new Collector exposing memory stats.\nfunc NewMeminfoCollector(logger *slog.Logger) (Collector, error) {\n\treturn &meminfoCollector{\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *meminfoCollector) getMemInfo() (map[string]float64, error) {\n\tuvmexpb, err := unix.SysctlRaw(\"vm.uvmexp\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tmib := [3]_C_int{CTL_VFS, VFS_GENERIC, VFS_BCACHESTAT}\n\tbcstatsb, err := sysctl(mib[:])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tuvmexp := *(*unix.Uvmexp)(unsafe.Pointer(&uvmexpb[0]))\n\tps := float64(uvmexp.Pagesize)\n\n\tbcstats := *(*bcachestats)(unsafe.Pointer(&bcstatsb[0]))\n\n\t// see uvm(9)\n\treturn map[string]float64{\n\t\t\"active_bytes\":                  ps * float64(uvmexp.Active),\n\t\t\"cache_bytes\":                   ps * float64(bcstats.Numbufpages),\n\t\t\"free_bytes\":                    ps * float64(uvmexp.Free),\n\t\t\"inactive_bytes\":                ps * float64(uvmexp.Inactive),\n\t\t\"size_bytes\":                    ps * float64(uvmexp.Npages),\n\t\t\"swap_size_bytes\":               ps * float64(uvmexp.Swpages),\n\t\t\"swap_used_bytes\":               ps * float64(uvmexp.Swpginuse),\n\t\t\"swapped_in_pages_bytes_total\":  ps * float64(uvmexp.Pgswapin),\n\t\t\"swapped_out_pages_bytes_total\": ps * float64(uvmexp.Pgswapout),\n\t\t\"wired_bytes\":                   ps * float64(uvmexp.Wired),\n\t}, nil\n}\n"
  },
  {
    "path": "collector/memory_bsd.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (freebsd || dragonfly) && !nomeminfo\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tmemorySubsystem = \"memory\"\n)\n\ntype memoryCollector struct {\n\tpageSize uint64\n\tsysctls  []bsdSysctl\n\tkvm      kvm\n\tlogger   *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"meminfo\", defaultEnabled, NewMemoryCollector)\n}\n\n// NewMemoryCollector returns a new Collector exposing memory stats.\nfunc NewMemoryCollector(logger *slog.Logger) (Collector, error) {\n\ttmp32, err := unix.SysctlUint32(\"vm.stats.vm.v_page_size\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"sysctl(vm.stats.vm.v_page_size) failed: %w\", err)\n\t}\n\tsize := float64(tmp32)\n\n\tmibSwapTotal := \"vm.swap_total\"\n\t/* swap_total is FreeBSD specific. Fall back to Dfly specific mib if not present. */\n\t_, err = unix.SysctlUint64(mibSwapTotal)\n\tif err != nil {\n\t\tmibSwapTotal = \"vm.swap_size\"\n\t}\n\n\tfromPage := func(v float64) float64 {\n\t\treturn v * size\n\t}\n\n\treturn &memoryCollector{\n\t\tlogger:   logger,\n\t\tpageSize: uint64(tmp32),\n\t\tsysctls: []bsdSysctl{\n\t\t\t// Descriptions via: https://wiki.freebsd.org/Memory\n\t\t\t{\n\t\t\t\tname:        \"active_bytes\",\n\t\t\t\tdescription: \"Recently used by userland\",\n\t\t\t\tmib:         \"vm.stats.vm.v_active_count\",\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"inactive_bytes\",\n\t\t\t\tdescription: \"Not recently used by userland\",\n\t\t\t\tmib:         \"vm.stats.vm.v_inactive_count\",\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"wired_bytes\",\n\t\t\t\tdescription: \"Locked in memory by kernel, mlock, etc\",\n\t\t\t\tmib:         \"vm.stats.vm.v_wire_count\",\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"user_wired_bytes\",\n\t\t\t\tdescription: \"Locked in memory by user, mlock, etc\",\n\t\t\t\tmib:         \"vm.stats.vm.v_user_wire_count\",\n\t\t\t\tconversion:  fromPage,\n\t\t\t\tdataType:    bsdSysctlTypeCLong,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"cache_bytes\",\n\t\t\t\tdescription: \"Almost free, backed by swap or files, available for re-allocation\",\n\t\t\t\tmib:         \"vm.stats.vm.v_cache_count\",\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"buffer_bytes\",\n\t\t\t\tdescription: \"Disk IO Cache entries for non ZFS filesystems, only usable by kernel\",\n\t\t\t\tmib:         \"vfs.bufspace\",\n\t\t\t\tdataType:    bsdSysctlTypeCLong,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"free_bytes\",\n\t\t\t\tdescription: \"Unallocated, available for allocation\",\n\t\t\t\tmib:         \"vm.stats.vm.v_free_count\",\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"laundry_bytes\",\n\t\t\t\tdescription: \"Dirty not recently used by userland\",\n\t\t\t\tmib:         \"vm.stats.vm.v_laundry_count\",\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"size_bytes\",\n\t\t\t\tdescription: \"Total physical memory size\",\n\t\t\t\tmib:         \"vm.stats.vm.v_page_count\",\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"swap_size_bytes\",\n\t\t\t\tdescription: \"Total swap memory size\",\n\t\t\t\tmib:         mibSwapTotal,\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t},\n\t\t\t// Descriptions via: top(1)\n\t\t\t{\n\t\t\t\tname:        \"swap_in_bytes_total\",\n\t\t\t\tdescription: \"Bytes paged in from swap devices\",\n\t\t\t\tmib:         \"vm.stats.vm.v_swappgsin\",\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"swap_out_bytes_total\",\n\t\t\t\tdescription: \"Bytes paged out to swap devices\",\n\t\t\t\tmib:         \"vm.stats.vm.v_swappgsout\",\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t\tconversion:  fromPage,\n\t\t\t},\n\t\t},\n\t}, nil\n}\n\n// Update checks relevant sysctls for current memory usage, and kvm for swap\n// usage.\nfunc (c *memoryCollector) Update(ch chan<- prometheus.Metric) error {\n\tfor _, m := range c.sysctls {\n\t\tv, err := m.Value()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"couldn't get memory: %w\", err)\n\t\t}\n\n\t\t// Most are gauges.\n\t\tif m.valueType == 0 {\n\t\t\tm.valueType = prometheus.GaugeValue\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, memorySubsystem, m.name),\n\t\t\t\tm.description,\n\t\t\t\tnil, nil,\n\t\t\t), m.valueType, v)\n\t}\n\n\tswapUsed, err := c.kvm.SwapUsedPages()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get kvm: %w\", err)\n\t}\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, memorySubsystem, \"swap_used_bytes\"),\n\t\t\t\"Currently allocated swap\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue, float64(swapUsed*c.pageSize))\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/mountstats_linux.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nomountstats\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nvar (\n\t// 64-bit float mantissa: https://en.wikipedia.org/wiki/Double-precision_floating-point_format\n\tfloat64Mantissa uint64 = 9007199254740992\n)\n\ntype mountStatsCollector struct {\n\t// General statistics\n\tNFSAgeSecondsTotal *prometheus.Desc\n\n\t// Byte statistics\n\tNFSReadBytesTotal        *prometheus.Desc\n\tNFSWriteBytesTotal       *prometheus.Desc\n\tNFSDirectReadBytesTotal  *prometheus.Desc\n\tNFSDirectWriteBytesTotal *prometheus.Desc\n\tNFSTotalReadBytesTotal   *prometheus.Desc\n\tNFSTotalWriteBytesTotal  *prometheus.Desc\n\tNFSReadPagesTotal        *prometheus.Desc\n\tNFSWritePagesTotal       *prometheus.Desc\n\n\t// Per-operation statistics\n\tNFSOperationsRequestsTotal            *prometheus.Desc\n\tNFSOperationsTransmissionsTotal       *prometheus.Desc\n\tNFSOperationsMajorTimeoutsTotal       *prometheus.Desc\n\tNFSOperationsSentBytesTotal           *prometheus.Desc\n\tNFSOperationsReceivedBytesTotal       *prometheus.Desc\n\tNFSOperationsQueueTimeSecondsTotal    *prometheus.Desc\n\tNFSOperationsResponseTimeSecondsTotal *prometheus.Desc\n\tNFSOperationsRequestTimeSecondsTotal  *prometheus.Desc\n\n\t// Transport statistics\n\tNFSTransportBindTotal              *prometheus.Desc\n\tNFSTransportConnectTotal           *prometheus.Desc\n\tNFSTransportIdleTimeSeconds        *prometheus.Desc\n\tNFSTransportSendsTotal             *prometheus.Desc\n\tNFSTransportReceivesTotal          *prometheus.Desc\n\tNFSTransportBadTransactionIDsTotal *prometheus.Desc\n\tNFSTransportBacklogQueueTotal      *prometheus.Desc\n\tNFSTransportMaximumRPCSlots        *prometheus.Desc\n\tNFSTransportSendingQueueTotal      *prometheus.Desc\n\tNFSTransportPendingQueueTotal      *prometheus.Desc\n\n\t// Event statistics\n\tNFSEventInodeRevalidateTotal     *prometheus.Desc\n\tNFSEventDnodeRevalidateTotal     *prometheus.Desc\n\tNFSEventDataInvalidateTotal      *prometheus.Desc\n\tNFSEventAttributeInvalidateTotal *prometheus.Desc\n\tNFSEventVFSOpenTotal             *prometheus.Desc\n\tNFSEventVFSLookupTotal           *prometheus.Desc\n\tNFSEventVFSAccessTotal           *prometheus.Desc\n\tNFSEventVFSUpdatePageTotal       *prometheus.Desc\n\tNFSEventVFSReadPageTotal         *prometheus.Desc\n\tNFSEventVFSReadPagesTotal        *prometheus.Desc\n\tNFSEventVFSWritePageTotal        *prometheus.Desc\n\tNFSEventVFSWritePagesTotal       *prometheus.Desc\n\tNFSEventVFSGetdentsTotal         *prometheus.Desc\n\tNFSEventVFSSetattrTotal          *prometheus.Desc\n\tNFSEventVFSFlushTotal            *prometheus.Desc\n\tNFSEventVFSFsyncTotal            *prometheus.Desc\n\tNFSEventVFSLockTotal             *prometheus.Desc\n\tNFSEventVFSFileReleaseTotal      *prometheus.Desc\n\tNFSEventTruncationTotal          *prometheus.Desc\n\tNFSEventWriteExtensionTotal      *prometheus.Desc\n\tNFSEventSillyRenameTotal         *prometheus.Desc\n\tNFSEventShortReadTotal           *prometheus.Desc\n\tNFSEventShortWriteTotal          *prometheus.Desc\n\tNFSEventJukeboxDelayTotal        *prometheus.Desc\n\tNFSEventPNFSReadTotal            *prometheus.Desc\n\tNFSEventPNFSWriteTotal           *prometheus.Desc\n\n\tproc procfs.Proc\n\n\tlogger *slog.Logger\n}\n\n// used to uniquely identify an NFS mount to prevent duplicates\ntype nfsDeviceIdentifier struct {\n\tDevice       string\n\tProtocol     string\n\tMountAddress string\n}\n\nfunc init() {\n\tregisterCollector(\"mountstats\", defaultDisabled, NewMountStatsCollector)\n}\n\n// NewMountStatsCollector returns a new Collector exposing NFS statistics.\nfunc NewMountStatsCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\tproc, err := fs.Self()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open /proc/self: %w\", err)\n\t}\n\n\tconst (\n\t\t// For the time being, only NFS statistics are available via this mechanism.\n\t\tsubsystem = \"mountstats_nfs\"\n\t)\n\n\tvar (\n\t\tlabels      = []string{\"export\", \"protocol\", \"mountaddr\"}\n\t\topLabels    = []string{\"export\", \"protocol\", \"mountaddr\", \"operation\"}\n\t\ttranslabels = []string{\"export\", \"protocol\", \"mountaddr\", \"transport\"}\n\t)\n\n\treturn &mountStatsCollector{\n\t\tNFSAgeSecondsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"age_seconds_total\"),\n\t\t\t\"The age of the NFS mount in seconds.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSReadBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"read_bytes_total\"),\n\t\t\t\"Number of bytes read using the read() syscall.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSWriteBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"write_bytes_total\"),\n\t\t\t\"Number of bytes written using the write() syscall.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSDirectReadBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"direct_read_bytes_total\"),\n\t\t\t\"Number of bytes read using the read() syscall in O_DIRECT mode.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSDirectWriteBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"direct_write_bytes_total\"),\n\t\t\t\"Number of bytes written using the write() syscall in O_DIRECT mode.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTotalReadBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"total_read_bytes_total\"),\n\t\t\t\"Number of bytes read from the NFS server, in total.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTotalWriteBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"total_write_bytes_total\"),\n\t\t\t\"Number of bytes written to the NFS server, in total.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSReadPagesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"read_pages_total\"),\n\t\t\t\"Number of pages read directly via mmap()'d files.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSWritePagesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"write_pages_total\"),\n\t\t\t\"Number of pages written directly via mmap()'d files.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportBindTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_bind_total\"),\n\t\t\t\"Number of times the client has had to establish a connection from scratch to the NFS server.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportConnectTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_connect_total\"),\n\t\t\t\"Number of times the client has made a TCP connection to the NFS server.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportIdleTimeSeconds: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_idle_time_seconds\"),\n\t\t\t\"Duration since the NFS mount last saw any RPC traffic, in seconds.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportSendsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_sends_total\"),\n\t\t\t\"Number of RPC requests for this mount sent to the NFS server.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportReceivesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_receives_total\"),\n\t\t\t\"Number of RPC responses for this mount received from the NFS server.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportBadTransactionIDsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_bad_transaction_ids_total\"),\n\t\t\t\"Number of times the NFS server sent a response with a transaction ID unknown to this client.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportBacklogQueueTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_backlog_queue_total\"),\n\t\t\t\"Total number of items added to the RPC backlog queue.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportMaximumRPCSlots: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_maximum_rpc_slots\"),\n\t\t\t\"Maximum number of simultaneously active RPC requests ever used.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportSendingQueueTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_sending_queue_total\"),\n\t\t\t\"Total number of items added to the RPC transmission sending queue.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSTransportPendingQueueTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"transport_pending_queue_total\"),\n\t\t\t\"Total number of items added to the RPC transmission pending queue.\",\n\t\t\ttranslabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSOperationsRequestsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"operations_requests_total\"),\n\t\t\t\"Number of requests performed for a given operation.\",\n\t\t\topLabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSOperationsTransmissionsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"operations_transmissions_total\"),\n\t\t\t\"Number of times an actual RPC request has been transmitted for a given operation.\",\n\t\t\topLabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSOperationsMajorTimeoutsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"operations_major_timeouts_total\"),\n\t\t\t\"Number of times a request has had a major timeout for a given operation.\",\n\t\t\topLabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSOperationsSentBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"operations_sent_bytes_total\"),\n\t\t\t\"Number of bytes sent for a given operation, including RPC headers and payload.\",\n\t\t\topLabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSOperationsReceivedBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"operations_received_bytes_total\"),\n\t\t\t\"Number of bytes received for a given operation, including RPC headers and payload.\",\n\t\t\topLabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSOperationsQueueTimeSecondsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"operations_queue_time_seconds_total\"),\n\t\t\t\"Duration all requests spent queued for transmission for a given operation before they were sent, in seconds.\",\n\t\t\topLabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSOperationsResponseTimeSecondsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"operations_response_time_seconds_total\"),\n\t\t\t\"Duration all requests took to get a reply back after a request for a given operation was transmitted, in seconds.\",\n\t\t\topLabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSOperationsRequestTimeSecondsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"operations_request_time_seconds_total\"),\n\t\t\t\"Duration all requests took from when a request was enqueued to when it was completely handled for a given operation, in seconds.\",\n\t\t\topLabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventInodeRevalidateTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_inode_revalidate_total\"),\n\t\t\t\"Number of times cached inode attributes are re-validated from the server.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventDnodeRevalidateTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_dnode_revalidate_total\"),\n\t\t\t\"Number of times cached dentry nodes are re-validated from the server.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventDataInvalidateTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_data_invalidate_total\"),\n\t\t\t\"Number of times an inode cache is cleared.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventAttributeInvalidateTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_attribute_invalidate_total\"),\n\t\t\t\"Number of times cached inode attributes are invalidated.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSOpenTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_open_total\"),\n\t\t\t\"Number of times cached inode attributes are invalidated.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSLookupTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_lookup_total\"),\n\t\t\t\"Number of times a directory lookup has occurred.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSAccessTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_access_total\"),\n\t\t\t\"Number of times permissions have been checked.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSUpdatePageTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_update_page_total\"),\n\t\t\t\"Number of updates (and potential writes) to pages.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSReadPageTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_read_page_total\"),\n\t\t\t\"Number of pages read directly via mmap()'d files.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSReadPagesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_read_pages_total\"),\n\t\t\t\"Number of times a group of pages have been read.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSWritePageTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_write_page_total\"),\n\t\t\t\"Number of pages written directly via mmap()'d files.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSWritePagesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_write_pages_total\"),\n\t\t\t\"Number of times a group of pages have been written.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSGetdentsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_getdents_total\"),\n\t\t\t\"Number of times directory entries have been read with getdents().\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSSetattrTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_setattr_total\"),\n\t\t\t\"Number of times directory entries have been read with getdents().\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSFlushTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_flush_total\"),\n\t\t\t\"Number of pending writes that have been forcefully flushed to the server.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSFsyncTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_fsync_total\"),\n\t\t\t\"Number of times fsync() has been called on directories and files.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSLockTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_lock_total\"),\n\t\t\t\"Number of times locking has been attempted on a file.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventVFSFileReleaseTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_vfs_file_release_total\"),\n\t\t\t\"Number of times files have been closed and released.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventTruncationTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_truncation_total\"),\n\t\t\t\"Number of times files have been truncated.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventWriteExtensionTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_write_extension_total\"),\n\t\t\t\"Number of times a file has been grown due to writes beyond its existing end.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventSillyRenameTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_silly_rename_total\"),\n\t\t\t\"Number of times a file was removed while still open by another process.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventShortReadTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_short_read_total\"),\n\t\t\t\"Number of times the NFS server gave less data than expected while reading.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventShortWriteTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_short_write_total\"),\n\t\t\t\"Number of times the NFS server wrote less data than expected while writing.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventJukeboxDelayTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_jukebox_delay_total\"),\n\t\t\t\"Number of times the NFS server indicated EJUKEBOX; retrieving data from offline storage.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventPNFSReadTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_pnfs_read_total\"),\n\t\t\t\"Number of NFS v4.1+ pNFS reads.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tNFSEventPNFSWriteTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"event_pnfs_write_total\"),\n\t\t\t\"Number of NFS v4.1+ pNFS writes.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tproc:   proc,\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *mountStatsCollector) Update(ch chan<- prometheus.Metric) error {\n\tmounts, err := c.proc.MountStats()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to parse mountstats: %w\", err)\n\t}\n\n\tmountsInfo, err := c.proc.MountInfo()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to parse mountinfo: %w\", err)\n\t}\n\n\t// store all seen nfsDeviceIdentifiers for deduplication\n\tdeviceList := make(map[nfsDeviceIdentifier]bool)\n\n\tfor idx, m := range mounts {\n\t\t// For the time being, only NFS statistics are available via this mechanism\n\t\tstats, ok := m.Stats.(*procfs.MountStatsNFS)\n\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\n\t\tvar mountAddress string\n\t\tif idx < len(mountsInfo) {\n\t\t\t// The mount entry order in the /proc/self/mountstats and /proc/self/mountinfo is the same.\n\t\t\tmiStats := mountsInfo[idx]\n\t\t\tmountAddress = miStats.SuperOptions[\"addr\"]\n\t\t}\n\n\t\tfor k := range stats.Transport {\n\t\t\tdeviceIdentifier := nfsDeviceIdentifier{m.Device, stats.Transport[k].Protocol, mountAddress}\n\t\t\ti := deviceList[deviceIdentifier]\n\t\t\tif i {\n\t\t\t\tc.logger.Debug(\"Skipping duplicate device entry\", \"device\", deviceIdentifier)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdeviceList[deviceIdentifier] = true\n\t\t\tc.updateNFSStats(ch, stats, m.Device, stats.Transport[k].Protocol, mountAddress)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *mountStatsCollector) updateNFSStats(ch chan<- prometheus.Metric, s *procfs.MountStatsNFS, export, protocol, mountAddress string) {\n\tlabelValues := []string{export, protocol, mountAddress}\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSAgeSecondsTotal,\n\t\tprometheus.CounterValue,\n\t\ts.Age.Seconds(),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSReadBytesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Bytes.Read),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSWriteBytesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Bytes.Write),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSDirectReadBytesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Bytes.DirectRead),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSDirectWriteBytesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Bytes.DirectWrite),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSTotalReadBytesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Bytes.ReadTotal),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSTotalWriteBytesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Bytes.WriteTotal),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSReadPagesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Bytes.ReadPages),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSWritePagesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Bytes.WritePages),\n\t\tlabelValues...,\n\t)\n\n\tfor i := range s.Transport {\n\t\ttranslabelValues := []string{export, protocol, mountAddress, strconv.Itoa(i)}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportBindTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(s.Transport[i].Bind),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportConnectTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(s.Transport[i].Connect),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportIdleTimeSeconds,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(s.Transport[i].IdleTimeSeconds%float64Mantissa),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportSendsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(s.Transport[i].Sends),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportReceivesTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(s.Transport[i].Receives),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportBadTransactionIDsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(s.Transport[i].BadTransactionIDs),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportBacklogQueueTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(s.Transport[i].CumulativeBacklog),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportMaximumRPCSlots,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(s.Transport[i].MaximumRPCSlotsUsed),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportSendingQueueTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(s.Transport[i].CumulativeSendingQueue),\n\t\t\ttranslabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSTransportPendingQueueTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(s.Transport[i].CumulativePendingQueue),\n\t\t\ttranslabelValues...,\n\t\t)\n\t}\n\n\tfor _, op := range s.Operations {\n\t\topLabelValues := []string{export, protocol, mountAddress, op.Operation}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSOperationsRequestsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(op.Requests),\n\t\t\topLabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSOperationsTransmissionsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(op.Transmissions),\n\t\t\topLabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSOperationsMajorTimeoutsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(op.MajorTimeouts),\n\t\t\topLabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSOperationsSentBytesTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(op.BytesSent),\n\t\t\topLabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSOperationsReceivedBytesTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(op.BytesReceived),\n\t\t\topLabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSOperationsQueueTimeSecondsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(op.CumulativeQueueMilliseconds%float64Mantissa)/1000.0,\n\t\t\topLabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSOperationsResponseTimeSecondsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(op.CumulativeTotalResponseMilliseconds%float64Mantissa)/1000.0,\n\t\t\topLabelValues...,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.NFSOperationsRequestTimeSecondsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(op.CumulativeTotalRequestMilliseconds%float64Mantissa)/1000.0,\n\t\t\topLabelValues...,\n\t\t)\n\t}\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventInodeRevalidateTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.InodeRevalidate),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventDnodeRevalidateTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.DnodeRevalidate),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventDataInvalidateTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.DataInvalidate),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventAttributeInvalidateTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.AttributeInvalidate),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSOpenTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSOpen),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSLookupTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSLookup),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSAccessTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSAccess),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSUpdatePageTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSUpdatePage),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSReadPageTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSReadPage),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSReadPagesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSReadPages),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSWritePageTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSWritePage),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSWritePagesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSWritePages),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSGetdentsTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSGetdents),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSSetattrTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSSetattr),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSFlushTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSFlush),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSFsyncTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSFsync),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSLockTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSLock),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventVFSFileReleaseTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.VFSFileRelease),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventTruncationTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.Truncation),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventWriteExtensionTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.WriteExtension),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventSillyRenameTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.SillyRename),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventShortReadTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.ShortRead),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventShortWriteTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.ShortWrite),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventJukeboxDelayTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.JukeboxDelay),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventPNFSReadTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.PNFSRead),\n\t\tlabelValues...,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.NFSEventPNFSWriteTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Events.PNFSWrite),\n\t\tlabelValues...,\n\t)\n}\n"
  },
  {
    "path": "collector/netclass_linux.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetclass && linux\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net\"\n\t\"os\"\n\t\"regexp\"\n\t\"sync\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nvar (\n\tnetclassIgnoredDevices = kingpin.Flag(\"collector.netclass.ignored-devices\", \"Regexp of net devices to ignore for netclass collector.\").Default(\"^$\").String()\n\tnetclassInvalidSpeed   = kingpin.Flag(\"collector.netclass.ignore-invalid-speed\", \"Ignore devices where the speed is invalid. This will be the default behavior in 2.x.\").Bool()\n\tnetclassNetlink        = kingpin.Flag(\"collector.netclass.netlink\", \"Use netlink to gather stats instead of /proc/net/dev.\").Default(\"false\").Bool()\n)\n\ntype netClassCollector struct {\n\tfs                    sysfs.FS\n\tsubsystem             string\n\tignoredDevicesPattern *regexp.Regexp\n\tmetricDescs           map[string]*prometheus.Desc\n\tmetricDescsMu         sync.Mutex\n\tlogger                *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"netclass\", defaultEnabled, NewNetClassCollector)\n}\n\n// NewNetClassCollector returns a new Collector exposing network class stats.\nfunc NewNetClassCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\tpattern := regexp.MustCompile(*netclassIgnoredDevices)\n\treturn &netClassCollector{\n\t\tfs:                    fs,\n\t\tsubsystem:             \"network\",\n\t\tignoredDevicesPattern: pattern,\n\t\tmetricDescs:           map[string]*prometheus.Desc{},\n\t\tlogger:                logger,\n\t}, nil\n}\n\nfunc (c *netClassCollector) Update(ch chan<- prometheus.Metric) error {\n\tif *netclassNetlink {\n\t\treturn c.netClassRTNLUpdate(ch)\n\t}\n\treturn c.netClassSysfsUpdate(ch)\n}\n\nfunc (c *netClassCollector) netClassSysfsUpdate(ch chan<- prometheus.Metric) error {\n\tnetClass, err := c.getNetClassInfo()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) || errors.Is(err, os.ErrPermission) {\n\t\t\tc.logger.Debug(\"Could not read netclass file\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"could not get net class info: %w\", err)\n\t}\n\tfor _, ifaceInfo := range netClass {\n\t\tupDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"up\"),\n\t\t\t\"Value is 1 if operstate is 'up', 0 otherwise.\",\n\t\t\t[]string{\"device\"},\n\t\t\tnil,\n\t\t)\n\t\tupValue := 0.0\n\t\tif ifaceInfo.OperState == \"up\" {\n\t\t\tupValue = 1.0\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(upDesc, prometheus.GaugeValue, upValue, ifaceInfo.Name)\n\n\t\tinfoDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"info\"),\n\t\t\t\"Non-numeric data from /sys/class/net/<iface>, value is always 1.\",\n\t\t\t[]string{\"device\", \"address\", \"broadcast\", \"duplex\", \"operstate\", \"adminstate\", \"ifalias\"},\n\t\t\tnil,\n\t\t)\n\t\tinfoValue := 1.0\n\n\t\tch <- prometheus.MustNewConstMetric(infoDesc, prometheus.GaugeValue, infoValue, ifaceInfo.Name, ifaceInfo.Address, ifaceInfo.Broadcast, ifaceInfo.Duplex, ifaceInfo.OperState, getAdminState(ifaceInfo.Flags), ifaceInfo.IfAlias)\n\n\t\tpushMetric(ch, c.getFieldDesc(\"address_assign_type\"), \"address_assign_type\", ifaceInfo.AddrAssignType, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"carrier\"), \"carrier\", ifaceInfo.Carrier, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"carrier_changes_total\"), \"carrier_changes_total\", ifaceInfo.CarrierChanges, prometheus.CounterValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"carrier_up_changes_total\"), \"carrier_up_changes_total\", ifaceInfo.CarrierUpCount, prometheus.CounterValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"carrier_down_changes_total\"), \"carrier_down_changes_total\", ifaceInfo.CarrierDownCount, prometheus.CounterValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"device_id\"), \"device_id\", ifaceInfo.DevID, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"dormant\"), \"dormant\", ifaceInfo.Dormant, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"flags\"), \"flags\", ifaceInfo.Flags, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"iface_id\"), \"iface_id\", ifaceInfo.IfIndex, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"iface_link\"), \"iface_link\", ifaceInfo.IfLink, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"iface_link_mode\"), \"iface_link_mode\", ifaceInfo.LinkMode, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"mtu_bytes\"), \"mtu_bytes\", ifaceInfo.MTU, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"name_assign_type\"), \"name_assign_type\", ifaceInfo.NameAssignType, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"net_dev_group\"), \"net_dev_group\", ifaceInfo.NetDevGroup, prometheus.GaugeValue, ifaceInfo.Name)\n\n\t\tif ifaceInfo.Speed != nil {\n\t\t\t// Some devices return -1 if the speed is unknown.\n\t\t\tif *ifaceInfo.Speed >= 0 || !*netclassInvalidSpeed {\n\t\t\t\tspeedBytes := int64(*ifaceInfo.Speed * 1000 * 1000 / 8)\n\t\t\t\tpushMetric(ch, c.getFieldDesc(\"speed_bytes\"), \"speed_bytes\", speedBytes, prometheus.GaugeValue, ifaceInfo.Name)\n\t\t\t}\n\t\t}\n\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_queue_length\"), \"transmit_queue_length\", ifaceInfo.TxQueueLen, prometheus.GaugeValue, ifaceInfo.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"protocol_type\"), \"protocol_type\", ifaceInfo.Type, prometheus.GaugeValue, ifaceInfo.Name)\n\n\t}\n\n\treturn nil\n}\n\nfunc (c *netClassCollector) getFieldDesc(name string) *prometheus.Desc {\n\tc.metricDescsMu.Lock()\n\tdefer c.metricDescsMu.Unlock()\n\n\tfieldDesc, exists := c.metricDescs[name]\n\n\tif !exists {\n\t\tfieldDesc = prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, name),\n\t\t\tfmt.Sprintf(\"Network device property: %s\", name),\n\t\t\t[]string{\"device\"},\n\t\t\tnil,\n\t\t)\n\t\tc.metricDescs[name] = fieldDesc\n\t}\n\n\treturn fieldDesc\n}\n\nfunc (c *netClassCollector) getNetClassInfo() (sysfs.NetClass, error) {\n\tnetClass := sysfs.NetClass{}\n\tnetDevices, err := c.fs.NetClassDevices()\n\tif err != nil {\n\t\treturn netClass, err\n\t}\n\n\tfor _, device := range netDevices {\n\t\tif c.ignoredDevicesPattern.MatchString(device) {\n\t\t\tcontinue\n\t\t}\n\t\tinterfaceClass, err := c.fs.NetClassByIface(device)\n\t\tif err != nil {\n\t\t\treturn netClass, err\n\t\t}\n\t\tnetClass[device] = *interfaceClass\n\t}\n\n\treturn netClass, nil\n}\n\nfunc getAdminState(flags *int64) string {\n\tif flags == nil {\n\t\treturn \"unknown\"\n\t}\n\n\tif *flags&int64(net.FlagUp) == 1 {\n\t\treturn \"up\"\n\t}\n\n\treturn \"down\"\n}\n"
  },
  {
    "path": "collector/netclass_rtnl_linux.go",
    "content": "// Copyright 2022 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetclass && linux\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/jsimonetti/rtnetlink/v2\"\n\t\"github.com/mdlayher/ethtool\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nvar (\n\tnetclassRTNLWithStats = kingpin.Flag(\"collector.netclass_rtnl.with-stats\", \"Expose the statistics for each network device, replacing netdev collector.\").Bool()\n\toperstateStr          = []string{\n\t\t\"unknown\", \"notpresent\", \"down\", \"lowerlayerdown\", \"testing\",\n\t\t\"dormant\", \"up\",\n\t}\n)\n\nfunc (c *netClassCollector) netClassRTNLUpdate(ch chan<- prometheus.Metric) error {\n\tlinkModes := make(map[string]*ethtool.LinkMode)\n\tlms, err := c.getLinkModes()\n\tif err != nil {\n\t\tif !errors.Is(errors.Unwrap(err), fs.ErrNotExist) {\n\t\t\treturn fmt.Errorf(\"could not get link modes: %w\", err)\n\t\t}\n\t\tc.logger.Info(\"ETHTOOL netlink interface unavailable, duplex and linkspeed are not scraped.\")\n\t} else {\n\t\tfor _, lm := range lms {\n\t\t\tif c.ignoredDevicesPattern.MatchString(lm.Interface.Name) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif lm.SpeedMegabits >= 0 {\n\t\t\t\tspeedBytes := uint64(lm.SpeedMegabits * 1000 * 1000 / 8)\n\t\t\t\tpushMetric(ch, c.getFieldDesc(\"speed_bytes\"), \"speed_bytes\", speedBytes, prometheus.GaugeValue, lm.Interface.Name)\n\t\t\t}\n\t\t\tlinkModes[lm.Interface.Name] = lm\n\t\t}\n\t}\n\n\t// Get most attributes from Netlink\n\tlMsgs, err := c.getNetClassInfoRTNL()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not get net class info: %w\", err)\n\t}\n\n\trelevantLinks := make([]rtnetlink.LinkMessage, 0, len(lMsgs))\n\tfor _, msg := range lMsgs {\n\t\tif !c.ignoredDevicesPattern.MatchString(msg.Attributes.Name) {\n\t\t\trelevantLinks = append(relevantLinks, msg)\n\t\t}\n\t}\n\n\t// Read sysfs for attributes that Netlink doesn't expose\n\tsysfsAttrs, err := getSysfsAttributes(relevantLinks)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not get sysfs device info: %w\", err)\n\t}\n\n\t// Parse all the info and update metrics\n\tfor _, msg := range relevantLinks {\n\t\tupDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"up\"),\n\t\t\t\"Value is 1 if operstate is 'up', 0 otherwise.\",\n\t\t\t[]string{\"device\"},\n\t\t\tnil,\n\t\t)\n\t\tupValue := 0.0\n\t\tif msg.Attributes.OperationalState == rtnetlink.OperStateUp {\n\t\t\tupValue = 1.0\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(upDesc, prometheus.GaugeValue, upValue, msg.Attributes.Name)\n\n\t\tinfoDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"info\"),\n\t\t\t\"Non-numeric data of <iface>, value is always 1.\",\n\t\t\t[]string{\"device\", \"address\", \"broadcast\", \"duplex\", \"operstate\", \"ifalias\"},\n\t\t\tnil,\n\t\t)\n\t\taltnameDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"altnames_info\"),\n\t\t\t\"Non-numeric data of <iface> altname, value is always 1.\",\n\t\t\t[]string{\"altname\", \"device\"},\n\t\t\tnil,\n\t\t)\n\t\tinfoValue := 1.0\n\n\t\tvar ifalias = \"\"\n\t\tif msg.Attributes.Alias != nil {\n\t\t\tifalias = *msg.Attributes.Alias\n\t\t}\n\n\t\tduplex := \"\"\n\t\tlm, lmExists := linkModes[msg.Attributes.Name]\n\t\tif lmExists {\n\t\t\tduplex = lm.Duplex.String()\n\t\t}\n\n\t\tifaceInfo := sysfsAttrs[msg.Attributes.Name]\n\n\t\tch <- prometheus.MustNewConstMetric(infoDesc, prometheus.GaugeValue, infoValue, msg.Attributes.Name, msg.Attributes.Address.String(), msg.Attributes.Broadcast.String(), duplex, operstateStr[int(msg.Attributes.OperationalState)], ifalias)\n\n\t\tif len(msg.Attributes.AltNames) > 0 {\n\t\t\tfor _, altname := range msg.Attributes.AltNames {\n\t\t\t\tif altname == \"\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tch <- prometheus.MustNewConstMetric(altnameDesc, prometheus.GaugeValue, infoValue, strings.ToValidUTF8(altname, \"\\uFFFD\"), msg.Attributes.Name)\n\t\t\t}\n\t\t}\n\t\tpushMetric(ch, c.getFieldDesc(\"address_assign_type\"), \"address_assign_type\", ifaceInfo.AddrAssignType, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"carrier\"), \"carrier\", msg.Attributes.Carrier, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"carrier_changes_total\"), \"carrier_changes_total\", msg.Attributes.CarrierChanges, prometheus.CounterValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"carrier_up_changes_total\"), \"carrier_up_changes_total\", msg.Attributes.CarrierUpCount, prometheus.CounterValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"carrier_down_changes_total\"), \"carrier_down_changes_total\", msg.Attributes.CarrierDownCount, prometheus.CounterValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"device_id\"), \"device_id\", ifaceInfo.DevID, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"flags\"), \"flags\", msg.Flags, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"iface_id\"), \"iface_id\", msg.Index, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"iface_link_mode\"), \"iface_link_mode\", msg.Attributes.LinkMode, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"dormant\"), \"dormant\", msg.Attributes.LinkMode, prometheus.GaugeValue, msg.Attributes.Name)\n\n\t\t// kernel logic: IFLA_LINK attribute will be ignore when ifindex is the same as iflink\n\t\t// (dev->ifindex != dev_get_iflink(dev) && nla_put_u32(skb, IFLA_LINK, dev_get_iflink(dev)))\n\t\t// As interface ID is never 0, we assume msg.Attributes.Type 0  means iflink is omitted in RTM_GETLINK response.\n\t\tif msg.Attributes.Type > 0 {\n\t\t\tpushMetric(ch, c.getFieldDesc(\"iface_link\"), \"iface_link\", msg.Attributes.Type, prometheus.GaugeValue, msg.Attributes.Name)\n\t\t} else {\n\t\t\tpushMetric(ch, c.getFieldDesc(\"iface_link\"), \"iface_link\", msg.Index, prometheus.GaugeValue, msg.Attributes.Name)\n\t\t}\n\n\t\tpushMetric(ch, c.getFieldDesc(\"mtu_bytes\"), \"mtu_bytes\", msg.Attributes.MTU, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"name_assign_type\"), \"name_assign_type\", ifaceInfo.NameAssignType, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"net_dev_group\"), \"net_dev_group\", msg.Attributes.NetDevGroup, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_queue_length\"), \"transmit_queue_length\", msg.Attributes.TxQueueLen, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"protocol_type\"), \"protocol_type\", msg.Type, prometheus.GaugeValue, msg.Attributes.Name)\n\n\t\t// Skip statistics if argument collector.netclass_rtnl.with-stats is false or statistics are unavailable.\n\t\tif netclassRTNLWithStats == nil || !*netclassRTNLWithStats || msg.Attributes.Stats64 == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_packets_total\"), \"receive_packets_total\", msg.Attributes.Stats64.RXPackets, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_packets_total\"), \"transmit_packets_total\", msg.Attributes.Stats64.TXPackets, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_bytes_total\"), \"receive_bytes_total\", msg.Attributes.Stats64.RXBytes, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_bytes_total\"), \"transmit_bytes_total\", msg.Attributes.Stats64.TXBytes, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_errors_total\"), \"receive_errors_total\", msg.Attributes.Stats64.RXErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_errors_total\"), \"transmit_errors_total\", msg.Attributes.Stats64.TXErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_dropped_total\"), \"receive_dropped_total\", msg.Attributes.Stats64.RXDropped, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_dropped_total\"), \"transmit_dropped_total\", msg.Attributes.Stats64.TXDropped, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"multicast_total\"), \"multicast_total\", msg.Attributes.Stats64.Multicast, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"collisions_total\"), \"collisions_total\", msg.Attributes.Stats64.Collisions, prometheus.GaugeValue, msg.Attributes.Name)\n\n\t\t// Detailed rx_errors.\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_length_errors_total\"), \"receive_length_errors_total\", msg.Attributes.Stats64.RXLengthErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_over_errors_total\"), \"receive_over_errors_total\", msg.Attributes.Stats64.RXOverErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_crc_errors_total\"), \"receive_crc_errors_total\", msg.Attributes.Stats64.RXCRCErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_frame_errors_total\"), \"receive_frame_errors_total\", msg.Attributes.Stats64.RXFrameErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_fifo_errors_total\"), \"receive_fifo_errors_total\", msg.Attributes.Stats64.RXFIFOErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_missed_errors_total\"), \"receive_missed_errors_total\", msg.Attributes.Stats64.RXMissedErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\n\t\t// Detailed tx_errors.\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_aborted_errors_total\"), \"transmit_aborted_errors_total\", msg.Attributes.Stats64.TXAbortedErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_carrier_errors_total\"), \"transmit_carrier_errors_total\", msg.Attributes.Stats64.TXCarrierErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_fifo_errors_total\"), \"transmit_fifo_errors_total\", msg.Attributes.Stats64.TXFIFOErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_heartbeat_errors_total\"), \"transmit_heartbeat_errors_total\", msg.Attributes.Stats64.TXHeartbeatErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_window_errors_total\"), \"transmit_window_errors_total\", msg.Attributes.Stats64.TXWindowErrors, prometheus.GaugeValue, msg.Attributes.Name)\n\n\t\t// For cslip, etc.\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_compressed_total\"), \"receive_compressed_total\", msg.Attributes.Stats64.RXCompressed, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"transmit_compressed_total\"), \"transmit_compressed_total\", msg.Attributes.Stats64.TXCompressed, prometheus.GaugeValue, msg.Attributes.Name)\n\t\tpushMetric(ch, c.getFieldDesc(\"receive_nohandler_total\"), \"receive_nohandler_total\", msg.Attributes.Stats64.RXNoHandler, prometheus.GaugeValue, msg.Attributes.Name)\n\n\t}\n\n\treturn nil\n}\n\nfunc (c *netClassCollector) getNetClassInfoRTNL() ([]rtnetlink.LinkMessage, error) {\n\tconn, err := rtnetlink.Dial(nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer conn.Close()\n\n\tlMsgs, err := conn.Link.List()\n\n\treturn lMsgs, err\n\n}\n\nfunc (c *netClassCollector) getLinkModes() ([]*ethtool.LinkMode, error) {\n\tconn, err := ethtool.New()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer conn.Close()\n\n\tlms, err := conn.LinkModes()\n\n\treturn lms, err\n}\n\n// getSysfsAttributes reads attributes that are absent from netlink but provided\n// by sysfs.\nfunc getSysfsAttributes(links []rtnetlink.LinkMessage) (sysfs.NetClass, error) {\n\tnetClass := sysfs.NetClass{}\n\tfor _, msg := range links {\n\t\tinterfaceClass := sysfs.NetClassIface{}\n\t\tifName := msg.Attributes.Name\n\t\tdevPath := filepath.Join(\"/sys\", \"class\", \"net\", ifName)\n\n\t\t// These three attributes hold a device-specific lock when\n\t\t// accessed, not the RTNL lock, so they are much less impactful\n\t\t// than reading most of the other attributes from sysfs.\n\t\tfor _, attr := range []string{\"addr_assign_type\", \"dev_id\", \"name_assign_type\"} {\n\t\t\tif err := sysfs.ParseNetClassAttribute(devPath, attr, &interfaceClass); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\t\tnetClass[ifName] = interfaceClass\n\t}\n\treturn netClass, nil\n}\n"
  },
  {
    "path": "collector/netdev_aix.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetdev\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/power-devops/perfstat\"\n)\n\nfunc getNetDevStats(filter *deviceFilter, logger *slog.Logger) (netDevStats, error) {\n\tnetDev := netDevStats{}\n\n\tstats, err := perfstat.NetAdapterStat()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tfor _, stat := range stats {\n\t\tnetDev[stat.Name] = map[string]uint64{\n\t\t\t\"receive_bytes\":                      uint64(stat.RxBytes),\n\t\t\t\"receive_dropped\":                    uint64(stat.RxPacketsDropped),\n\t\t\t\"receive_errors\":                     uint64(stat.RxErrors),\n\t\t\t\"receive_multicast\":                  uint64(stat.RxMulticastPackets),\n\t\t\t\"receive_packets\":                    uint64(stat.RxPackets),\n\t\t\t\"receive_collision_errors\":           uint64(stat.RxCollisionErrors),\n\t\t\t\"transmit_bytes\":                     uint64(stat.TxBytes),\n\t\t\t\"transmit_dropped\":                   uint64(stat.TxPacketsDropped),\n\t\t\t\"transmit_errors\":                    uint64(stat.TxErrors),\n\t\t\t\"transmit_multicast\":                 uint64(stat.TxMulticastPackets),\n\t\t\t\"transmit_packets\":                   uint64(stat.TxPackets),\n\t\t\t\"transmit_queue_overflow\":            uint64(stat.TxQueueOverflow),\n\t\t\t\"transmit_collision_single_errors\":   uint64(stat.TxSingleCollisionCount),\n\t\t\t\"transmit_collision_multiple_errors\": uint64(stat.TxMultipleCollisionCount),\n\t\t}\n\t}\n\n\treturn netDev, nil\n}\n\nfunc getNetDevLabels() (map[string]map[string]string, error) {\n\t// to be implemented if needed\n\treturn nil, nil\n}\n"
  },
  {
    "path": "collector/netdev_bsd.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetdev && (freebsd || dragonfly)\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"log/slog\"\n)\n\n/*\n#cgo CFLAGS: -D_IFI_OQDROPS\n#include <stdio.h>\n#include <sys/types.h>\n#include <sys/socket.h>\n#include <ifaddrs.h>\n#include <net/if.h>\n*/\nimport \"C\"\n\nfunc getNetDevStats(filter *deviceFilter, logger *slog.Logger) (netDevStats, error) {\n\tnetDev := netDevStats{}\n\n\tvar ifap, ifa *C.struct_ifaddrs\n\tif C.getifaddrs(&ifap) == -1 {\n\t\treturn nil, errors.New(\"getifaddrs() failed\")\n\t}\n\tdefer C.freeifaddrs(ifap)\n\n\tfor ifa = ifap; ifa != nil; ifa = ifa.ifa_next {\n\t\tif ifa.ifa_addr.sa_family != C.AF_LINK {\n\t\t\tcontinue\n\t\t}\n\n\t\tdev := C.GoString(ifa.ifa_name)\n\t\tif filter.ignored(dev) {\n\t\t\tlogger.Debug(\"Ignoring device\", \"device\", dev)\n\t\t\tcontinue\n\t\t}\n\n\t\tdata := (*C.struct_if_data)(ifa.ifa_data)\n\n\t\tnetDev[dev] = map[string]uint64{\n\t\t\t\"receive_packets\":    uint64(data.ifi_ipackets),\n\t\t\t\"transmit_packets\":   uint64(data.ifi_opackets),\n\t\t\t\"receive_bytes\":      uint64(data.ifi_ibytes),\n\t\t\t\"transmit_bytes\":     uint64(data.ifi_obytes),\n\t\t\t\"receive_errors\":     uint64(data.ifi_ierrors),\n\t\t\t\"transmit_errors\":    uint64(data.ifi_oerrors),\n\t\t\t\"receive_dropped\":    uint64(data.ifi_iqdrops),\n\t\t\t\"transmit_dropped\":   uint64(data.ifi_oqdrops),\n\t\t\t\"receive_multicast\":  uint64(data.ifi_imcasts),\n\t\t\t\"transmit_multicast\": uint64(data.ifi_omcasts),\n\t\t}\n\t}\n\n\treturn netDev, nil\n}\n\nfunc getNetDevLabels() (map[string]map[string]string, error) {\n\treturn nil, nil\n}\n"
  },
  {
    "path": "collector/netdev_common.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetdev && (linux || freebsd || openbsd || dragonfly || darwin || aix)\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net\"\n\t\"strconv\"\n\t\"sync\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tnetdevDeviceInclude    = kingpin.Flag(\"collector.netdev.device-include\", \"Regexp of net devices to include (mutually exclusive to device-exclude).\").String()\n\toldNetdevDeviceInclude = kingpin.Flag(\"collector.netdev.device-whitelist\", \"DEPRECATED: Use collector.netdev.device-include\").Hidden().String()\n\tnetdevDeviceExclude    = kingpin.Flag(\"collector.netdev.device-exclude\", \"Regexp of net devices to exclude (mutually exclusive to device-include).\").String()\n\toldNetdevDeviceExclude = kingpin.Flag(\"collector.netdev.device-blacklist\", \"DEPRECATED: Use collector.netdev.device-exclude\").Hidden().String()\n\tnetdevAddressInfo      = kingpin.Flag(\"collector.netdev.address-info\", \"Collect address-info for every device\").Bool()\n\tnetdevDetailedMetrics  = kingpin.Flag(\"collector.netdev.enable-detailed-metrics\", \"Use (incompatible) metric names that provide more detailed stats on Linux\").Bool()\n)\n\ntype netDevCollector struct {\n\tsubsystem        string\n\tdeviceFilter     deviceFilter\n\tmetricDescsMutex sync.Mutex\n\tmetricDescs      map[string]*prometheus.Desc\n\tlogger           *slog.Logger\n}\n\ntype netDevStats map[string]map[string]uint64\n\nfunc init() {\n\tregisterCollector(\"netdev\", defaultEnabled, NewNetDevCollector)\n}\n\n// NewNetDevCollector returns a new Collector exposing network device stats.\nfunc NewNetDevCollector(logger *slog.Logger) (Collector, error) {\n\tif *oldNetdevDeviceInclude != \"\" {\n\t\tif *netdevDeviceInclude == \"\" {\n\t\t\tlogger.Warn(\"--collector.netdev.device-whitelist is DEPRECATED and will be removed in 2.0.0, use --collector.netdev.device-include\")\n\t\t\t*netdevDeviceInclude = *oldNetdevDeviceInclude\n\t\t} else {\n\t\t\treturn nil, errors.New(\"--collector.netdev.device-whitelist and --collector.netdev.device-include are mutually exclusive\")\n\t\t}\n\t}\n\n\tif *oldNetdevDeviceExclude != \"\" {\n\t\tif *netdevDeviceExclude == \"\" {\n\t\t\tlogger.Warn(\"--collector.netdev.device-blacklist is DEPRECATED and will be removed in 2.0.0, use --collector.netdev.device-exclude\")\n\t\t\t*netdevDeviceExclude = *oldNetdevDeviceExclude\n\t\t} else {\n\t\t\treturn nil, errors.New(\"--collector.netdev.device-blacklist and --collector.netdev.device-exclude are mutually exclusive\")\n\t\t}\n\t}\n\n\tif *netdevDeviceExclude != \"\" && *netdevDeviceInclude != \"\" {\n\t\treturn nil, errors.New(\"device-exclude & device-include are mutually exclusive\")\n\t}\n\n\tif *netdevDeviceExclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.netdev.device-exclude\", \"flag\", *netdevDeviceExclude)\n\t}\n\n\tif *netdevDeviceInclude != \"\" {\n\t\tlogger.Info(\"Parsed Flag --collector.netdev.device-include\", \"flag\", *netdevDeviceInclude)\n\t}\n\n\treturn &netDevCollector{\n\t\tsubsystem:    \"network\",\n\t\tdeviceFilter: newDeviceFilter(*netdevDeviceExclude, *netdevDeviceInclude),\n\t\tmetricDescs:  map[string]*prometheus.Desc{},\n\t\tlogger:       logger,\n\t}, nil\n}\n\nfunc (c *netDevCollector) metricDesc(key string, labels []string) *prometheus.Desc {\n\tc.metricDescsMutex.Lock()\n\tdefer c.metricDescsMutex.Unlock()\n\n\tif _, ok := c.metricDescs[key]; !ok {\n\t\tc.metricDescs[key] = prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, key+\"_total\"),\n\t\t\tfmt.Sprintf(\"Network device statistic %s.\", key),\n\t\t\tlabels,\n\t\t\tnil,\n\t\t)\n\t}\n\n\treturn c.metricDescs[key]\n}\n\nfunc (c *netDevCollector) Update(ch chan<- prometheus.Metric) error {\n\tnetDev, err := getNetDevStats(&c.deviceFilter, c.logger)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get netstats: %w\", err)\n\t}\n\n\tnetDevLabels, err := getNetDevLabels()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get netdev labels: %w\", err)\n\t}\n\n\tfor dev, devStats := range netDev {\n\t\tif !*netdevDetailedMetrics {\n\t\t\tlegacy(devStats)\n\t\t}\n\n\t\tlabels := []string{\"device\"}\n\t\tlabelValues := []string{dev}\n\t\tif devLabels, exists := netDevLabels[dev]; exists {\n\t\t\tfor labelName, labelValue := range devLabels {\n\t\t\t\tlabels = append(labels, labelName)\n\t\t\t\tlabelValues = append(labelValues, labelValue)\n\t\t\t}\n\t\t}\n\n\t\tfor key, value := range devStats {\n\t\t\tdesc := c.metricDesc(key, labels)\n\t\t\tch <- prometheus.MustNewConstMetric(desc, prometheus.CounterValue, float64(value), labelValues...)\n\t\t}\n\t}\n\tif *netdevAddressInfo {\n\t\tinterfaces, err := net.Interfaces()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not get network interfaces: %w\", err)\n\t\t}\n\n\t\tdesc := prometheus.NewDesc(prometheus.BuildFQName(namespace, \"network_address\",\n\t\t\t\"info\"), \"node network address by device\",\n\t\t\t[]string{\"device\", \"address\", \"netmask\", \"scope\"}, nil)\n\n\t\tfor _, addr := range getAddrsInfo(interfaces, &c.deviceFilter, c.logger) {\n\t\t\tch <- prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, 1,\n\t\t\t\taddr.device, addr.addr, addr.netmask, addr.scope)\n\t\t}\n\t}\n\treturn nil\n}\n\ntype addrInfo struct {\n\tdevice  string\n\taddr    string\n\tscope   string\n\tnetmask string\n}\n\nfunc scope(ip net.IP) string {\n\tif ip.IsLoopback() || ip.IsLinkLocalUnicast() || ip.IsLinkLocalMulticast() {\n\t\treturn \"link-local\"\n\t}\n\n\tif ip.IsInterfaceLocalMulticast() {\n\t\treturn \"interface-local\"\n\t}\n\n\tif ip.IsGlobalUnicast() {\n\t\treturn \"global\"\n\t}\n\n\treturn \"\"\n}\n\n// getAddrsInfo returns interface name, address, scope and netmask for all interfaces.\nfunc getAddrsInfo(interfaces []net.Interface, filter *deviceFilter, logger *slog.Logger) []addrInfo {\n\tvar res []addrInfo\n\n\tfor _, ifs := range interfaces {\n\t\tif filter.ignored(ifs.Name) {\n\t\t\tlogger.Debug(\"Ignoring device\", \"device\", ifs.Name)\n\t\t\tcontinue\n\t\t}\n\t\taddrs, _ := ifs.Addrs()\n\t\tfor _, addr := range addrs {\n\t\t\tip, ipNet, err := net.ParseCIDR(addr.String())\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tsize, _ := ipNet.Mask.Size()\n\n\t\t\tres = append(res, addrInfo{\n\t\t\t\tdevice:  ifs.Name,\n\t\t\t\taddr:    ip.String(),\n\t\t\t\tscope:   scope(ip),\n\t\t\t\tnetmask: strconv.Itoa(size),\n\t\t\t})\n\t\t}\n\t}\n\n\treturn res\n}\n\n// https://github.com/torvalds/linux/blob/master/net/core/net-procfs.c#L75-L97\nfunc legacy(metrics map[string]uint64) {\n\tif metric, ok := pop(metrics, \"receive_errors\"); ok {\n\t\tmetrics[\"receive_errs\"] = metric\n\t}\n\tif metric, ok := pop(metrics, \"receive_dropped\"); ok {\n\t\tmetrics[\"receive_drop\"] = metric + popz(metrics, \"receive_missed_errors\")\n\t}\n\tif metric, ok := pop(metrics, \"receive_fifo_errors\"); ok {\n\t\tmetrics[\"receive_fifo\"] = metric\n\t}\n\tif metric, ok := pop(metrics, \"receive_frame_errors\"); ok {\n\t\tmetrics[\"receive_frame\"] = metric + popz(metrics, \"receive_length_errors\") + popz(metrics, \"receive_over_errors\") + popz(metrics, \"receive_crc_errors\")\n\t}\n\tif metric, ok := pop(metrics, \"multicast\"); ok {\n\t\tmetrics[\"receive_multicast\"] = metric\n\t}\n\tif metric, ok := pop(metrics, \"transmit_errors\"); ok {\n\t\tmetrics[\"transmit_errs\"] = metric\n\t}\n\tif metric, ok := pop(metrics, \"transmit_dropped\"); ok {\n\t\tmetrics[\"transmit_drop\"] = metric\n\t}\n\tif metric, ok := pop(metrics, \"transmit_fifo_errors\"); ok {\n\t\tmetrics[\"transmit_fifo\"] = metric\n\t}\n\tif metric, ok := pop(metrics, \"multicast\"); ok {\n\t\tmetrics[\"receive_multicast\"] = metric\n\t}\n\tif metric, ok := pop(metrics, \"collisions\"); ok {\n\t\tmetrics[\"transmit_colls\"] = metric\n\t}\n\tif metric, ok := pop(metrics, \"transmit_carrier_errors\"); ok {\n\t\tmetrics[\"transmit_carrier\"] = metric + popz(metrics, \"transmit_aborted_errors\") + popz(metrics, \"transmit_heartbeat_errors\") + popz(metrics, \"transmit_window_errors\")\n\t}\n}\n\nfunc pop(m map[string]uint64, key string) (uint64, bool) {\n\tvalue, ok := m[key]\n\tdelete(m, key)\n\treturn value, ok\n}\n\nfunc popz(m map[string]uint64, key string) uint64 {\n\tif value, ok := m[key]; ok {\n\t\tdelete(m, key)\n\t\treturn value\n\t}\n\treturn 0\n}\n"
  },
  {
    "path": "collector/netdev_darwin.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetdev\n\npackage collector\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc getNetDevStats(filter *deviceFilter, logger *slog.Logger) (netDevStats, error) {\n\tnetDev := netDevStats{}\n\n\tifs, err := net.Interfaces()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"net.Interfaces() failed: %w\", err)\n\t}\n\n\tfor _, iface := range ifs {\n\t\tif filter.ignored(iface.Name) {\n\t\t\tlogger.Debug(\"Ignoring device\", \"device\", iface.Name)\n\t\t\tcontinue\n\t\t}\n\n\t\tifaceData, err := getIfaceData(iface.Index)\n\t\tif err != nil {\n\t\t\tlogger.Debug(\"failed to load data for interface\", \"device\", iface.Name, \"err\", err)\n\t\t\tcontinue\n\t\t}\n\n\t\tnetDev[iface.Name] = map[string]uint64{\n\t\t\t\"receive_packets\":    ifaceData.Data.Ipackets,\n\t\t\t\"transmit_packets\":   ifaceData.Data.Opackets,\n\t\t\t\"receive_bytes\":      ifaceData.Data.Ibytes,\n\t\t\t\"transmit_bytes\":     ifaceData.Data.Obytes,\n\t\t\t\"receive_errors\":     ifaceData.Data.Ierrors,\n\t\t\t\"transmit_errors\":    ifaceData.Data.Oerrors,\n\t\t\t\"receive_dropped\":    ifaceData.Data.Iqdrops,\n\t\t\t\"receive_multicast\":  ifaceData.Data.Imcasts,\n\t\t\t\"transmit_multicast\": ifaceData.Data.Omcasts,\n\t\t\t\"collisions\":         ifaceData.Data.Collisions,\n\t\t\t\"noproto\":            ifaceData.Data.Noproto,\n\t\t}\n\t}\n\n\treturn netDev, nil\n}\n\nfunc getIfaceData(index int) (*ifMsghdr2, error) {\n\tvar data ifMsghdr2\n\trawData, err := unix.SysctlRaw(\"net\", unix.AF_ROUTE, 0, 0, unix.NET_RT_IFLIST2, index)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\terr = binary.Read(bytes.NewReader(rawData), binary.LittleEndian, &data)\n\tif err != nil {\n\t\treturn &data, err\n\t}\n\n\t/*\n\t\tAs of macOS Ventura 13.2.1, there’s a kernel bug which truncates traffic values at the 4GiB mark.\n\t\tThis is a workaround to fetch the interface traffic metrics using a sysctl call.\n\t\tApple wants to prevent fingerprinting by 3rdparty apps and might fix this bug in future which would break this implementation.\n\t*/\n\tmib := []int32{\n\t\tunix.CTL_NET,\n\t\tunix.AF_LINK,\n\t\t0, // NETLINK_GENERIC: functions not specific to a type of iface\n\t\t2, //IFMIB_IFDATA: per-interface data table\n\t\tint32(index),\n\t\t1, // IFDATA_GENERAL: generic stats for all kinds of ifaces\n\t}\n\n\tvar mibData ifMibData\n\tsize := unsafe.Sizeof(mibData)\n\n\tif _, _, errno := unix.Syscall6(\n\t\tunix.SYS___SYSCTL,\n\t\tuintptr(unsafe.Pointer(&mib[0])),\n\t\tuintptr(len(mib)),\n\t\tuintptr(unsafe.Pointer(&mibData)),\n\t\tuintptr(unsafe.Pointer(&size)),\n\t\tuintptr(unsafe.Pointer(nil)),\n\t\t0,\n\t); errno != 0 {\n\t\treturn &data, err\n\t}\n\n\tvar ifdata ifData64\n\terr = binary.Read(bytes.NewReader(mibData.Data[:]), binary.LittleEndian, &ifdata)\n\tif err != nil {\n\t\treturn &data, err\n\t}\n\n\tdata.Data.Ibytes = ifdata.Ibytes\n\tdata.Data.Obytes = ifdata.Obytes\n\treturn &data, err\n}\n\n// https://github.com/apple-oss-distributions/xnu/blob/main/bsd/net/if.h#L220-L232\ntype ifMsghdr2 struct {\n\tMsglen    uint16   // to skip over non-understood messages\n\tVersion   uint8    // future binary compatabilit\n\tType      uint8    // message type\n\tAddrs     int32    // like rtm_addrs\n\tFlags     int32    // value of if_flags\n\tIndex     uint16   // index for associated ifp\n\t_         [2]byte  // padding for alignment\n\tSndLen    int32    // instantaneous length of send queue\n\tSndMaxlen int32    // maximum length of send queue\n\tSndDrops  int32    // number of drops in send queue\n\tTimer     int32    // time until if_watchdog called\n\tData      ifData64 // statistics and other data\n}\n\n// https://github.com/apple-oss-distributions/xnu/blob/main/bsd/net/if_var.h#L207-L235\ntype ifData64 struct {\n\tType      uint8  // ethernet, tokenring, etc\n\tTypelen   uint8  // Length of frame type id\n\tPhysical  uint8  // e.g., AUI, Thinnet, 10base-T, etc\n\tAddrlen   uint8  // media address length\n\tHdrlen    uint8  // media header length\n\tRecvquota uint8  // polling quota for receive intrs\n\tXmitquota uint8  // polling quota for xmit intrs\n\tUnused1   uint8  // for future use\n\tMtu       uint32 // maximum transmission unit\n\tMetric    uint32 // routing metric (external only)\n\tBaudrate  uint64 // linespeed\n\n\t// volatile statistics\n\tIpackets   uint64         // packets received on interface\n\tIerrors    uint64         // input errors on interface\n\tOpackets   uint64         // packets sent on interface\n\tOerrors    uint64         // output errors on interface\n\tCollisions uint64         // collisions on csma interfaces\n\tIbytes     uint64         // total number of octets received\n\tObytes     uint64         // total number of octets sent\n\tImcasts    uint64         // packets received via multicast\n\tOmcasts    uint64         // packets sent via multicast\n\tIqdrops    uint64         // dropped on input, this interface\n\tNoproto    uint64         // destined for unsupported protocol\n\tRecvtiming uint32         // usec spent receiving when timing\n\tXmittiming uint32         // usec spent xmitting when timing\n\tLastchange unix.Timeval32 // time of last administrative change\n}\n\n// https://github.com/apple-oss-distributions/xnu/blob/main/bsd/net/if_mib.h#L65-L74\ntype ifMibData struct {\n\tName          [16]byte  // name of interface\n\tPCount        uint32    // number of promiscuous listeners\n\tFlags         uint32    // interface flags\n\tSendLength    uint32    // instantaneous length of send queue\n\tMaxSendLength uint32    // maximum length of send queue\n\tSendDrops     uint32    // number of drops in send queue\n\t_             [4]uint32 // for future expansion\n\tData          [128]byte // generic information and statistics\n}\n\nfunc getNetDevLabels() (map[string]map[string]string, error) {\n\t// to be implemented if needed\n\treturn nil, nil\n}\n"
  },
  {
    "path": "collector/netdev_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetdev\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/jsimonetti/rtnetlink/v2\"\n\t\"github.com/prometheus/procfs\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nvar (\n\tnetDevNetlink      = kingpin.Flag(\"collector.netdev.netlink\", \"Use netlink to gather stats instead of /proc/net/dev.\").Default(\"true\").Bool()\n\tnetdevLabelIfAlias = kingpin.Flag(\"collector.netdev.label-ifalias\", \"Add ifAlias label\").Default(\"false\").Bool()\n)\n\nfunc getNetDevStats(filter *deviceFilter, logger *slog.Logger) (netDevStats, error) {\n\tif *netDevNetlink {\n\t\treturn netlinkStats(filter, logger)\n\t}\n\treturn procNetDevStats(filter, logger)\n}\n\nfunc netlinkStats(filter *deviceFilter, logger *slog.Logger) (netDevStats, error) {\n\tconn, err := rtnetlink.Dial(nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdefer conn.Close()\n\tlinks, err := conn.Link.List()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn parseNetlinkStats(links, filter, logger), nil\n}\n\nfunc parseNetlinkStats(links []rtnetlink.LinkMessage, filter *deviceFilter, logger *slog.Logger) netDevStats {\n\tmetrics := netDevStats{}\n\n\tfor _, msg := range links {\n\t\tif msg.Attributes == nil {\n\t\t\tlogger.Debug(\"No netlink attributes, skipping\")\n\t\t\tcontinue\n\t\t}\n\t\tname := msg.Attributes.Name\n\t\tstats := msg.Attributes.Stats64\n\t\tif stats32 := msg.Attributes.Stats; stats == nil && stats32 != nil {\n\t\t\tstats = &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets:          uint64(stats32.RXPackets),\n\t\t\t\tTXPackets:          uint64(stats32.TXPackets),\n\t\t\t\tRXBytes:            uint64(stats32.RXBytes),\n\t\t\t\tTXBytes:            uint64(stats32.TXBytes),\n\t\t\t\tRXErrors:           uint64(stats32.RXErrors),\n\t\t\t\tTXErrors:           uint64(stats32.TXErrors),\n\t\t\t\tRXDropped:          uint64(stats32.RXDropped),\n\t\t\t\tTXDropped:          uint64(stats32.TXDropped),\n\t\t\t\tMulticast:          uint64(stats32.Multicast),\n\t\t\t\tCollisions:         uint64(stats32.Collisions),\n\t\t\t\tRXLengthErrors:     uint64(stats32.RXLengthErrors),\n\t\t\t\tRXOverErrors:       uint64(stats32.RXOverErrors),\n\t\t\t\tRXCRCErrors:        uint64(stats32.RXCRCErrors),\n\t\t\t\tRXFrameErrors:      uint64(stats32.RXFrameErrors),\n\t\t\t\tRXFIFOErrors:       uint64(stats32.RXFIFOErrors),\n\t\t\t\tRXMissedErrors:     uint64(stats32.RXMissedErrors),\n\t\t\t\tTXAbortedErrors:    uint64(stats32.TXAbortedErrors),\n\t\t\t\tTXCarrierErrors:    uint64(stats32.TXCarrierErrors),\n\t\t\t\tTXFIFOErrors:       uint64(stats32.TXFIFOErrors),\n\t\t\t\tTXHeartbeatErrors:  uint64(stats32.TXHeartbeatErrors),\n\t\t\t\tTXWindowErrors:     uint64(stats32.TXWindowErrors),\n\t\t\t\tRXCompressed:       uint64(stats32.RXCompressed),\n\t\t\t\tTXCompressed:       uint64(stats32.TXCompressed),\n\t\t\t\tRXNoHandler:        uint64(stats32.RXNoHandler),\n\t\t\t\tRXOtherhostDropped: 0,\n\t\t\t}\n\t\t}\n\n\t\tif filter.ignored(name) {\n\t\t\tlogger.Debug(\"Ignoring device\", \"device\", name)\n\t\t\tcontinue\n\t\t}\n\n\t\t// Make sure we don't panic when accessing `stats` attributes below.\n\t\tif stats == nil {\n\t\t\tlogger.Debug(\"No netlink stats, skipping\")\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://github.com/torvalds/linux/blob/master/include/uapi/linux/if_link.h#L42-L246\n\t\tmetrics[name] = map[string]uint64{\n\t\t\t\"receive_packets\":  stats.RXPackets,\n\t\t\t\"transmit_packets\": stats.TXPackets,\n\t\t\t\"receive_bytes\":    stats.RXBytes,\n\t\t\t\"transmit_bytes\":   stats.TXBytes,\n\t\t\t\"receive_errors\":   stats.RXErrors,\n\t\t\t\"transmit_errors\":  stats.TXErrors,\n\t\t\t\"receive_dropped\":  stats.RXDropped,\n\t\t\t\"transmit_dropped\": stats.TXDropped,\n\t\t\t\"multicast\":        stats.Multicast,\n\t\t\t\"collisions\":       stats.Collisions,\n\n\t\t\t// detailed rx_errors\n\t\t\t\"receive_length_errors\": stats.RXLengthErrors,\n\t\t\t\"receive_over_errors\":   stats.RXOverErrors,\n\t\t\t\"receive_crc_errors\":    stats.RXCRCErrors,\n\t\t\t\"receive_frame_errors\":  stats.RXFrameErrors,\n\t\t\t\"receive_fifo_errors\":   stats.RXFIFOErrors,\n\t\t\t\"receive_missed_errors\": stats.RXMissedErrors,\n\n\t\t\t// detailed tx_errors\n\t\t\t\"transmit_aborted_errors\":   stats.TXAbortedErrors,\n\t\t\t\"transmit_carrier_errors\":   stats.TXCarrierErrors,\n\t\t\t\"transmit_fifo_errors\":      stats.TXFIFOErrors,\n\t\t\t\"transmit_heartbeat_errors\": stats.TXHeartbeatErrors,\n\t\t\t\"transmit_window_errors\":    stats.TXWindowErrors,\n\n\t\t\t// for cslip etc\n\t\t\t\"receive_compressed\":  stats.RXCompressed,\n\t\t\t\"transmit_compressed\": stats.TXCompressed,\n\t\t\t\"receive_nohandler\":   stats.RXNoHandler,\n\t\t}\n\t}\n\n\treturn metrics\n}\n\nfunc procNetDevStats(filter *deviceFilter, logger *slog.Logger) (netDevStats, error) {\n\tmetrics := netDevStats{}\n\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn metrics, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\tnetDev, err := fs.NetDev()\n\tif err != nil {\n\t\treturn metrics, fmt.Errorf(\"failed to parse /proc/net/dev: %w\", err)\n\t}\n\n\tfor _, stats := range netDev {\n\t\tname := stats.Name\n\n\t\tif filter.ignored(name) {\n\t\t\tlogger.Debug(\"Ignoring device\", \"device\", name)\n\t\t\tcontinue\n\t\t}\n\n\t\tmetrics[name] = map[string]uint64{\n\t\t\t\"receive_bytes\":       stats.RxBytes,\n\t\t\t\"receive_packets\":     stats.RxPackets,\n\t\t\t\"receive_errors\":      stats.RxErrors,\n\t\t\t\"receive_dropped\":     stats.RxDropped,\n\t\t\t\"receive_fifo\":        stats.RxFIFO,\n\t\t\t\"receive_frame\":       stats.RxFrame,\n\t\t\t\"receive_compressed\":  stats.RxCompressed,\n\t\t\t\"receive_multicast\":   stats.RxMulticast,\n\t\t\t\"transmit_bytes\":      stats.TxBytes,\n\t\t\t\"transmit_packets\":    stats.TxPackets,\n\t\t\t\"transmit_errors\":     stats.TxErrors,\n\t\t\t\"transmit_dropped\":    stats.TxDropped,\n\t\t\t\"transmit_fifo\":       stats.TxFIFO,\n\t\t\t\"transmit_colls\":      stats.TxCollisions,\n\t\t\t\"transmit_carrier\":    stats.TxCarrier,\n\t\t\t\"transmit_compressed\": stats.TxCompressed,\n\t\t}\n\t}\n\n\treturn metrics, nil\n}\n\nfunc getNetDevLabels() (map[string]map[string]string, error) {\n\tif !*netdevLabelIfAlias {\n\t\treturn nil, nil\n\t}\n\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tinterfaces, err := fs.NetClass()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tlabels := make(map[string]map[string]string)\n\tfor iface, params := range interfaces {\n\t\tlabels[iface] = map[string]string{\"ifalias\": params.IfAlias}\n\t}\n\n\treturn labels, nil\n}\n"
  },
  {
    "path": "collector/netdev_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetdev\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"testing\"\n\n\t\"github.com/jsimonetti/rtnetlink/v2\"\n)\n\nvar links = []rtnetlink.LinkMessage{\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"tun0\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets: 24,\n\t\t\t\tTXPackets: 934,\n\t\t\t\tRXBytes:   1888,\n\t\t\t\tTXBytes:   67120,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"veth4B09XN\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets: 8,\n\t\t\t\tTXPackets: 10640,\n\t\t\t\tRXBytes:   648,\n\t\t\t\tTXBytes:   1943284,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"lo\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets: 1832522,\n\t\t\t\tTXPackets: 1832522,\n\t\t\t\tRXBytes:   435303245,\n\t\t\t\tTXBytes:   435303245,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"eth0\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets: 520993275,\n\t\t\t\tTXPackets: 43451486,\n\t\t\t\tRXBytes:   68210035552,\n\t\t\t\tTXBytes:   9315587528,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"lxcbr0\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tTXPackets: 28339,\n\t\t\t\tTXBytes:   2630299,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"wlan0\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets: 13899359,\n\t\t\t\tTXPackets: 11726200,\n\t\t\t\tRXBytes:   10437182923,\n\t\t\t\tTXBytes:   2851649360,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"docker0\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets: 1065585,\n\t\t\t\tTXPackets: 1929779,\n\t\t\t\tRXBytes:   64910168,\n\t\t\t\tTXBytes:   2681662018,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName:    \"ibr10:30\",\n\t\t\tStats64: &rtnetlink.LinkStats64{},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"flannel.1\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets: 228499337,\n\t\t\t\tTXPackets: 258369223,\n\t\t\t\tRXBytes:   18144009813,\n\t\t\t\tTXBytes:   20758990068,\n\t\t\t\tTXDropped: 64,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"💩0\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets: 105557,\n\t\t\t\tTXPackets: 304261,\n\t\t\t\tRXBytes:   57750104,\n\t\t\t\tTXBytes:   404570255,\n\t\t\t\tMulticast: 72,\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tAttributes: &rtnetlink.LinkAttributes{\n\t\t\tName: \"enp0s0f0\",\n\t\t\tStats64: &rtnetlink.LinkStats64{\n\t\t\t\tRXPackets:         226,\n\t\t\t\tTXPackets:         803,\n\t\t\t\tRXBytes:           231424,\n\t\t\t\tTXBytes:           822272,\n\t\t\t\tRXErrors:          14,\n\t\t\t\tTXErrors:          2,\n\t\t\t\tRXDropped:         10,\n\t\t\t\tTXDropped:         17,\n\t\t\t\tMulticast:         285,\n\t\t\t\tCollisions:        30,\n\t\t\t\tRXLengthErrors:    5,\n\t\t\t\tRXOverErrors:      3,\n\t\t\t\tRXCRCErrors:       1,\n\t\t\t\tRXFrameErrors:     4,\n\t\t\t\tRXFIFOErrors:      6,\n\t\t\t\tRXMissedErrors:    21,\n\t\t\t\tTXAbortedErrors:   22,\n\t\t\t\tTXCarrierErrors:   7,\n\t\t\t\tTXFIFOErrors:      24,\n\t\t\t\tTXHeartbeatErrors: 9,\n\t\t\t\tTXWindowErrors:    19,\n\t\t\t\tRXCompressed:      23,\n\t\t\t\tTXCompressed:      20,\n\t\t\t\tRXNoHandler:       62,\n\t\t\t},\n\t\t},\n\t},\n}\n\nfunc TestNetDevStatsIgnore(t *testing.T) {\n\tfilter := newDeviceFilter(\"^veth\", \"\")\n\n\tnetStats := parseNetlinkStats(links, &filter, slog.New(slog.NewTextHandler(io.Discard, nil)))\n\n\tif want, got := uint64(10437182923), netStats[\"wlan0\"][\"receive_bytes\"]; want != got {\n\t\tt.Errorf(\"want netstat wlan0 bytes %v, got %v\", want, got)\n\t}\n\n\tif want, got := uint64(68210035552), netStats[\"eth0\"][\"receive_bytes\"]; want != got {\n\t\tt.Errorf(\"want netstat eth0 bytes %v, got %v\", want, got)\n\t}\n\n\tif want, got := uint64(934), netStats[\"tun0\"][\"transmit_packets\"]; want != got {\n\t\tt.Errorf(\"want netstat tun0 packets %v, got %v\", want, got)\n\t}\n\n\tif want, got := 10, len(netStats); want != got {\n\t\tt.Errorf(\"want count of devices to be %d, got %d\", want, got)\n\t}\n\n\tif _, ok := netStats[\"veth4B09XN\"][\"transmit_bytes\"]; ok {\n\t\tt.Error(\"want fixture interface veth4B09XN to not exist, but it does\")\n\t}\n\n\tif want, got := uint64(0), netStats[\"ibr10:30\"][\"receive_fifo\"]; want != got {\n\t\tt.Error(\"want fixture interface ibr10:30 to exist, but it does not\")\n\t}\n\n\tif want, got := uint64(72), netStats[\"💩0\"][\"multicast\"]; want != got {\n\t\tt.Error(\"want fixture interface 💩0 to exist, but it does not\")\n\t}\n}\n\nfunc TestNetDevStatsAccept(t *testing.T) {\n\tfilter := newDeviceFilter(\"\", \"^💩0$\")\n\tnetStats := parseNetlinkStats(links, &filter, slog.New(slog.NewTextHandler(io.Discard, nil)))\n\n\tif want, got := 1, len(netStats); want != got {\n\t\tt.Errorf(\"want count of devices to be %d, got %d\", want, got)\n\t}\n\tif want, got := uint64(72), netStats[\"💩0\"][\"multicast\"]; want != got {\n\t\tt.Error(\"want fixture interface 💩0 to exist, but it does not\")\n\t}\n}\n\nfunc TestNetDevLegacyMetricNames(t *testing.T) {\n\texpected := []string{\n\t\t\"receive_packets\",\n\t\t\"transmit_packets\",\n\t\t\"receive_bytes\",\n\t\t\"transmit_bytes\",\n\t\t\"receive_errs\",\n\t\t\"transmit_errs\",\n\t\t\"receive_drop\",\n\t\t\"transmit_drop\",\n\t\t\"receive_multicast\",\n\t\t\"transmit_colls\",\n\t\t\"receive_frame\",\n\t\t\"receive_fifo\",\n\t\t\"transmit_carrier\",\n\t\t\"transmit_fifo\",\n\t\t\"receive_compressed\",\n\t\t\"transmit_compressed\",\n\t}\n\n\tfilter := newDeviceFilter(\"\", \"\")\n\tnetStats := parseNetlinkStats(links, &filter, slog.New(slog.NewTextHandler(io.Discard, nil)))\n\n\tfor dev, devStats := range netStats {\n\t\tlegacy(devStats)\n\t\tfor _, name := range expected {\n\t\t\tif _, ok := devStats[name]; !ok {\n\t\t\t\tt.Errorf(\"metric %s should be defined on interface %s\", name, dev)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc TestNetDevLegacyMetricValues(t *testing.T) {\n\texpected := map[string]uint64{\n\t\t\"receive_packets\":     226,\n\t\t\"transmit_packets\":    803,\n\t\t\"receive_bytes\":       231424,\n\t\t\"transmit_bytes\":      822272,\n\t\t\"receive_errs\":        14,\n\t\t\"transmit_errs\":       2,\n\t\t\"receive_drop\":        10 + 21,\n\t\t\"transmit_drop\":       17,\n\t\t\"receive_multicast\":   285,\n\t\t\"transmit_colls\":      30,\n\t\t\"receive_frame\":       5 + 3 + 1 + 4,\n\t\t\"receive_fifo\":        6,\n\t\t\"transmit_carrier\":    22 + 7 + 9 + 19,\n\t\t\"transmit_fifo\":       24,\n\t\t\"receive_compressed\":  23,\n\t\t\"transmit_compressed\": 20,\n\t}\n\n\tfilter := newDeviceFilter(\"\", \"^enp0s0f0$\")\n\tnetStats := parseNetlinkStats(links, &filter, slog.New(slog.NewTextHandler(io.Discard, nil)))\n\tmetrics, ok := netStats[\"enp0s0f0\"]\n\tif !ok {\n\t\tt.Error(\"expected stats for interface enp0s0f0\")\n\t}\n\n\tlegacy(metrics)\n\n\tfor name, want := range expected {\n\t\tgot, ok := metrics[name]\n\t\tif !ok {\n\t\t\tt.Errorf(\"metric %s should be defined on interface enp0s0f0\", name)\n\t\t\tcontinue\n\t\t}\n\t\tif want != got {\n\t\t\tt.Errorf(\"want %s %d, got %d\", name, want, got)\n\t\t}\n\t}\n}\n\nfunc TestNetDevMetricValues(t *testing.T) {\n\tfilter := newDeviceFilter(\"\", \"\")\n\tnetStats := parseNetlinkStats(links, &filter, slog.New(slog.NewTextHandler(io.Discard, nil)))\n\n\tfor _, msg := range links {\n\t\tdevice := msg.Attributes.Name\n\t\tstats := msg.Attributes.Stats64\n\n\t\texpected := map[string]uint64{\n\t\t\t\"receive_packets\":  stats.RXPackets,\n\t\t\t\"transmit_packets\": stats.TXPackets,\n\t\t\t\"receive_bytes\":    stats.RXBytes,\n\t\t\t\"transmit_bytes\":   stats.TXBytes,\n\t\t\t\"receive_errors\":   stats.RXErrors,\n\t\t\t\"transmit_errors\":  stats.TXErrors,\n\t\t\t\"receive_dropped\":  stats.RXDropped,\n\t\t\t\"transmit_dropped\": stats.TXDropped,\n\t\t\t\"multicast\":        stats.Multicast,\n\t\t\t\"collisions\":       stats.Collisions,\n\n\t\t\t// detailed rx_errors\n\t\t\t\"receive_length_errors\": stats.RXLengthErrors,\n\t\t\t\"receive_over_errors\":   stats.RXOverErrors,\n\t\t\t\"receive_crc_errors\":    stats.RXCRCErrors,\n\t\t\t\"receive_frame_errors\":  stats.RXFrameErrors,\n\t\t\t\"receive_fifo_errors\":   stats.RXFIFOErrors,\n\t\t\t\"receive_missed_errors\": stats.RXMissedErrors,\n\n\t\t\t// detailed tx_errors\n\t\t\t\"transmit_aborted_errors\":   stats.TXAbortedErrors,\n\t\t\t\"transmit_carrier_errors\":   stats.TXCarrierErrors,\n\t\t\t\"transmit_fifo_errors\":      stats.TXFIFOErrors,\n\t\t\t\"transmit_heartbeat_errors\": stats.TXHeartbeatErrors,\n\t\t\t\"transmit_window_errors\":    stats.TXWindowErrors,\n\n\t\t\t// for cslip etc\n\t\t\t\"receive_compressed\":  stats.RXCompressed,\n\t\t\t\"transmit_compressed\": stats.TXCompressed,\n\t\t\t\"receive_nohandler\":   stats.RXNoHandler,\n\t\t}\n\n\t\tfor name, want := range expected {\n\t\t\tdevStats, ok := netStats[device]\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"expected stats for interface %s\", device)\n\t\t\t}\n\t\t\tgot, ok := devStats[name]\n\t\t\tif !ok {\n\t\t\t\tt.Errorf(\"metric %s should be defined on interface %s\", name, device)\n\t\t\t}\n\t\t\tif want != got {\n\t\t\t\tt.Errorf(\"want %s %d, got %d\", name, want, got)\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "collector/netdev_openbsd.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetdev && !amd64\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"log/slog\"\n)\n\n/*\n#include <sys/types.h>\n#include <sys/socket.h>\n#include <ifaddrs.h>\n#include <net/if.h>\n*/\nimport \"C\"\n\nfunc getNetDevStats(filter *deviceFilter, logger *slog.Logger) (netDevStats, error) {\n\tnetDev := netDevStats{}\n\n\tvar ifap, ifa *C.struct_ifaddrs\n\tif C.getifaddrs(&ifap) == -1 {\n\t\treturn nil, errors.New(\"getifaddrs() failed\")\n\t}\n\tdefer C.freeifaddrs(ifap)\n\n\tfor ifa = ifap; ifa != nil; ifa = ifa.ifa_next {\n\t\tif ifa.ifa_addr.sa_family != C.AF_LINK {\n\t\t\tcontinue\n\t\t}\n\n\t\tdev := C.GoString(ifa.ifa_name)\n\t\tif filter.ignored(dev) {\n\t\t\tlogger.Debug(\"Ignoring device\", \"device\", dev)\n\t\t\tcontinue\n\t\t}\n\n\t\tdata := (*C.struct_if_data)(ifa.ifa_data)\n\n\t\t// https://github.com/openbsd/src/blob/master/sys/net/if.h#L101-L126\n\t\tnetDev[dev] = map[string]uint64{\n\t\t\t\"receive_packets\":    uint64(data.ifi_ipackets),\n\t\t\t\"transmit_packets\":   uint64(data.ifi_opackets),\n\t\t\t\"receive_bytes\":      uint64(data.ifi_ibytes),\n\t\t\t\"transmit_bytes\":     uint64(data.ifi_obytes),\n\t\t\t\"receive_errors\":     uint64(data.ifi_ierrors),\n\t\t\t\"transmit_errors\":    uint64(data.ifi_oerrors),\n\t\t\t\"receive_dropped\":    uint64(data.ifi_iqdrops),\n\t\t\t\"transmit_dropped\":   uint64(data.ifi_oqdrops),\n\t\t\t\"receive_multicast\":  uint64(data.ifi_imcasts),\n\t\t\t\"transmit_multicast\": uint64(data.ifi_omcasts),\n\t\t\t\"collisions\":         uint64(data.ifi_collisions),\n\t\t\t\"noproto\":            uint64(data.ifi_noproto),\n\t\t}\n\t}\n\n\treturn netDev, nil\n}\n\nfunc getNetDevLabels() (map[string]map[string]string, error) {\n\t// to be implemented if needed\n\treturn nil, nil\n}\n"
  },
  {
    "path": "collector/netdev_openbsd_amd64.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetdev\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc getNetDevStats(filter *deviceFilter, logger *slog.Logger) (netDevStats, error) {\n\tnetDev := netDevStats{}\n\n\tmib := [6]_C_int{unix.CTL_NET, unix.AF_ROUTE, 0, 0, unix.NET_RT_IFLIST, 0}\n\tbuf, err := sysctl(mib[:])\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tn := uintptr(len(buf))\n\tindex := uintptr(unsafe.Pointer(&buf[0]))\n\tnext := uintptr(0)\n\n\tvar rtm *unix.RtMsghdr\n\n\tfor next = index; next < (index + n); next += uintptr(rtm.Msglen) {\n\t\trtm = (*unix.RtMsghdr)(unsafe.Pointer(next))\n\t\tif rtm.Version != unix.RTM_VERSION || rtm.Type != unix.RTM_IFINFO {\n\t\t\tcontinue\n\t\t}\n\t\tifm := (*unix.IfMsghdr)(unsafe.Pointer(next))\n\t\tif ifm.Addrs&unix.RTA_IFP == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tdl := (*unix.RawSockaddrDatalink)(unsafe.Pointer(next + uintptr(rtm.Hdrlen)))\n\t\tif dl.Family != unix.AF_LINK {\n\t\t\tcontinue\n\t\t}\n\t\tdata := ifm.Data\n\t\tdev := int8ToString(dl.Data[:dl.Nlen])\n\t\tif filter.ignored(dev) {\n\t\t\tlogger.Debug(\"Ignoring device\", \"device\", dev)\n\t\t\tcontinue\n\t\t}\n\n\t\t// https://cs.opensource.google/go/x/sys/+/master:unix/ztypes_openbsd_amd64.go;l=292-316\n\t\tnetDev[dev] = map[string]uint64{\n\t\t\t\"receive_packets\":    data.Ipackets,\n\t\t\t\"transmit_packets\":   data.Opackets,\n\t\t\t\"receive_bytes\":      data.Ibytes,\n\t\t\t\"transmit_bytes\":     data.Obytes,\n\t\t\t\"receive_errors\":     data.Ierrors,\n\t\t\t\"transmit_errors\":    data.Oerrors,\n\t\t\t\"receive_dropped\":    data.Iqdrops,\n\t\t\t\"transmit_dropped\":   data.Oqdrops,\n\t\t\t\"receive_multicast\":  data.Imcasts,\n\t\t\t\"transmit_multicast\": data.Omcasts,\n\t\t\t\"collisions\":         data.Collisions,\n\t\t\t\"noproto\":            data.Noproto,\n\t\t}\n\t}\n\treturn netDev, nil\n}\n\nfunc getNetDevLabels() (map[string]map[string]string, error) {\n\t// to be implemented if needed\n\treturn nil, nil\n}\n"
  },
  {
    "path": "collector/netinterface_aix.go",
    "content": "// Copyright 2025 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetinterface\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/power-devops/perfstat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype netinterfaceCollector struct {\n\tlogger     *slog.Logger\n\tcollisions *prometheus.Desc\n\tibytes     *prometheus.Desc\n\tipackets   *prometheus.Desc\n\tobytes     *prometheus.Desc\n\topackets   *prometheus.Desc\n}\n\nconst (\n\tnetinterfaceSubsystem = \"netinterface\"\n)\n\nfunc init() {\n\tregisterCollector(\"netinterface\", defaultEnabled, NewNetinterfaceCollector)\n}\n\nfunc NewNetinterfaceCollector(logger *slog.Logger) (Collector, error) {\n\tlabels := []string{\"interface\"}\n\treturn &netinterfaceCollector{\n\t\tlogger: logger,\n\t\tcollisions: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, netinterfaceSubsystem, \"collisions_total\"),\n\t\t\t\"Total number of CSMA collisions on the interface.\", labels, nil,\n\t\t),\n\t\tibytes: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, netinterfaceSubsystem, \"receive_bytes_total\"),\n\t\t\t\"Total number of bytes received on the interface.\", labels, nil,\n\t\t),\n\t\tipackets: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, netinterfaceSubsystem, \"receive_packets_total\"),\n\t\t\t\"Total number of packets received on the interface.\", labels, nil,\n\t\t),\n\t\tobytes: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, netinterfaceSubsystem, \"transmit_bytes_total\"),\n\t\t\t\"Total number of bytes transmitted on the interface.\", labels, nil,\n\t\t),\n\t\topackets: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, netinterfaceSubsystem, \"transmit_packets_total\"),\n\t\t\t\"Total number of packets transmitted on the interface.\", labels, nil,\n\t\t),\n\t}, nil\n}\n\nfunc (c *netinterfaceCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := perfstat.NetIfaceStat()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, stat := range stats {\n\t\tiface := stat.Name\n\n\t\tch <- prometheus.MustNewConstMetric(c.collisions, prometheus.CounterValue, float64(stat.Collisions), iface)\n\t\tch <- prometheus.MustNewConstMetric(c.ibytes, prometheus.CounterValue, float64(stat.IBytes), iface)\n\t\tch <- prometheus.MustNewConstMetric(c.ipackets, prometheus.CounterValue, float64(stat.IPackets), iface)\n\t\tch <- prometheus.MustNewConstMetric(c.obytes, prometheus.CounterValue, float64(stat.OBytes), iface)\n\t\tch <- prometheus.MustNewConstMetric(c.opackets, prometheus.CounterValue, float64(stat.OPackets), iface)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/netisr_freebsd.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetisr\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype netisrCollector struct {\n\tsysctls []bsdSysctl\n\tlogger  *slog.Logger\n}\n\nconst (\n\tnetisrCollectorSubsystem = \"netisr\"\n)\n\nfunc init() {\n\tregisterCollector(\"netisr\", defaultEnabled, NewNetisrCollector)\n}\n\nfunc NewNetisrCollector(logger *slog.Logger) (Collector, error) {\n\treturn &netisrCollector{\n\t\tsysctls: []bsdSysctl{\n\t\t\t{\n\t\t\t\tname:        \"numthreads\",\n\t\t\t\tdescription: \"netisr current thread count\",\n\t\t\t\tmib:         \"net.isr.numthreads\",\n\t\t\t\tdataType:    bsdSysctlTypeUint32,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"maxprot\",\n\t\t\t\tdescription: \"netisr maximum protocols\",\n\t\t\t\tmib:         \"net.isr.maxprot\",\n\t\t\t\tdataType:    bsdSysctlTypeUint32,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"defaultqlimit\",\n\t\t\t\tdescription: \"netisr default queue limit\",\n\t\t\t\tmib:         \"net.isr.defaultqlimit\",\n\t\t\t\tdataType:    bsdSysctlTypeUint32,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"maxqlimit\",\n\t\t\t\tdescription: \"netisr maximum queue limit\",\n\t\t\t\tmib:         \"net.isr.maxqlimit\",\n\t\t\t\tdataType:    bsdSysctlTypeUint32,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"bindthreads\",\n\t\t\t\tdescription: \"netisr threads bound to CPUs\",\n\t\t\t\tmib:         \"net.isr.bindthreads\",\n\t\t\t\tdataType:    bsdSysctlTypeUint32,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"maxthreads\",\n\t\t\t\tdescription: \"netisr maximum thread count\",\n\t\t\t\tmib:         \"net.isr.maxthreads\",\n\t\t\t\tdataType:    bsdSysctlTypeUint32,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *netisrCollector) Update(ch chan<- prometheus.Metric) error {\n\tfor _, m := range c.sysctls {\n\t\tv, err := m.Value()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"couldn't get sysctl: %w\", err)\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, netisrCollectorSubsystem, m.name),\n\t\t\t\tm.description,\n\t\t\t\tnil, nil,\n\t\t\t), m.valueType, v)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/netstat_freebsd.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build freebsd\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\n/*\n#include <sys/types.h>\n#include <netinet/in.h>\n#include <netinet/ip.h>\n#include <netinet/tcp.h>\n#include <netinet/tcp_var.h>\n#include <netinet/udp.h>\n*/\nimport \"C\"\n\nvar (\n\tbsdNetstatTcpSendPacketsTotal = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"netstat\", \"tcp_transmit_packets_total\"),\n\t\t\"TCP packets sent\",\n\t\tnil, nil,\n\t)\n\n\tbsdNetstatTcpRecvPacketsTotal = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"netstat\", \"tcp_receive_packets_total\"),\n\t\t\"TCP packets received\",\n\t\tnil, nil,\n\t)\n)\n\ntype netStatCollector struct {\n\tnetStatMetric *prometheus.Desc\n}\n\nfunc init() {\n\tregisterCollector(\"netstat\", defaultEnabled, NewNetStatCollector)\n}\n\nfunc NewNetStatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &netStatCollector{}, nil\n}\n\nfunc (c *netStatCollector) Describe(ch chan<- *prometheus.Desc) {\n\tch <- c.netStatMetric\n}\n\nfunc (c *netStatCollector) Collect(ch chan<- prometheus.Metric) {\n\t_ = c.Update(ch)\n}\n\nfunc getData(queryString string) ([]byte, error) {\n\tdata, err := unix.SysctlRaw(queryString)\n\tif err != nil {\n\t\tfmt.Println(\"Error:\", err)\n\t\treturn nil, err\n\t}\n\n\tif len(data) < int(unsafe.Sizeof(C.struct_tcpstat{})) {\n\t\treturn nil, errors.New(\"Data Size mismatch\")\n\t}\n\treturn data, nil\n}\n\nfunc (c *netStatCollector) Update(ch chan<- prometheus.Metric) error {\n\n\ttcpData, err := getData(\"net.inet.tcp.stats\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ttcpStats := *(*C.struct_tcpstat)(unsafe.Pointer(&tcpData[0]))\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tbsdNetstatTcpSendPacketsTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(tcpStats.tcps_sndtotal),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tbsdNetstatTcpRecvPacketsTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(tcpStats.tcps_rcvtotal),\n\t)\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/netstat_freebsd_test.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build freebsd\n\npackage collector\n\nimport (\n\t\"testing\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc TestNetStatCollectorDescribe(t *testing.T) {\n\tch := make(chan *prometheus.Desc, 1)\n\tcollector := &netStatCollector{\n\t\tnetStatMetric: prometheus.NewDesc(\"dummy_metric\", \"dummy\", nil, nil),\n\t}\n\tcollector.Describe(ch)\n\tdesc := <-ch\n\n\tif want, got := \"dummy_metric\", desc.String(); want != got {\n\t\tt.Errorf(\"want %s, got %s\", want, got)\n\t}\n}\n\nfunc TestGetData(t *testing.T) {\n\tdata, err := getData(\"net.inet.tcp.stats\")\n\tif err != nil {\n\t\tt.Fatal(\"unexpected error:\", err)\n\t}\n\n\tif got, want := len(data), int(unsafe.Sizeof(unix.TCPStats{})); got < want {\n\t\tt.Errorf(\"data length too small: want >= %d, got %d\", want, got)\n\t}\n}\n\nfunc TestNetStatCollectorUpdate(t *testing.T) {\n\tch := make(chan prometheus.Metric, len(metrics))\n\tcollector := &netStatCollector{\n\t\tnetStatMetric: prometheus.NewDesc(\"netstat_metric\", \"NetStat Metric\", nil, nil),\n\t}\n\terr := collector.Update(ch)\n\tif err != nil {\n\t\tt.Fatal(\"unexpected error:\", err)\n\t}\n\n\tif got, want := len(ch), len(metrics); got != want {\n\t\tt.Errorf(\"metric count mismatch: want %d, got %d\", want, got)\n\t}\n\n\tfor range metrics {\n\t\t<-ch\n\t}\n}\n\nfunc TestNewNetStatCollector(t *testing.T) {\n\tcollector, err := NewNetStatCollector(nil)\n\tif err != nil {\n\t\tt.Fatal(\"unexpected error:\", err)\n\t}\n\tif collector == nil {\n\t\tt.Fatal(\"collector is nil, want non-nil\")\n\t}\n}\n"
  },
  {
    "path": "collector/netstat_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetstat\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"maps\"\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tnetStatsSubsystem = \"netstat\"\n)\n\nvar (\n\tnetStatFields = kingpin.Flag(\"collector.netstat.fields\", \"Regexp of fields to return for netstat collector.\").Default(\"^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*|TCPSynRetrans|TCPTimeouts|TCPOFOQueue|TCPRcvQDrop)|Tcp_(ActiveOpens|InSegs|OutSegs|OutRsts|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$\").String()\n)\n\ntype netStatCollector struct {\n\tfieldPattern *regexp.Regexp\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"netstat\", defaultEnabled, NewNetStatCollector)\n}\n\n// NewNetStatCollector takes and returns\n// a new Collector exposing network stats.\nfunc NewNetStatCollector(logger *slog.Logger) (Collector, error) {\n\tpattern := regexp.MustCompile(*netStatFields)\n\treturn &netStatCollector{\n\t\tfieldPattern: pattern,\n\t\tlogger:       logger,\n\t}, nil\n}\n\nfunc (c *netStatCollector) Update(ch chan<- prometheus.Metric) error {\n\tnetStats, err := getNetStats(procFilePath(\"net/netstat\"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get netstats: %w\", err)\n\t}\n\tsnmpStats, err := getNetStats(procFilePath(\"net/snmp\"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get SNMP stats: %w\", err)\n\t}\n\tsnmp6Stats, err := getSNMP6Stats(procFilePath(\"net/snmp6\"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get SNMP6 stats: %w\", err)\n\t}\n\t// Merge the results of snmpStats into netStats (collisions are possible, but\n\t// we know that the keys are always unique for the given use case).\n\tmaps.Copy(netStats, snmpStats)\n\tmaps.Copy(netStats, snmp6Stats)\n\tfor protocol, protocolStats := range netStats {\n\t\tfor name, value := range protocolStats {\n\t\t\tkey := protocol + \"_\" + name\n\t\t\tv, err := strconv.ParseFloat(value, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid value %s in netstats: %w\", value, err)\n\t\t\t}\n\t\t\tif !c.fieldPattern.MatchString(key) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tprometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, netStatsSubsystem, key),\n\t\t\t\t\tfmt.Sprintf(\"Statistic %s.\", protocol+name),\n\t\t\t\t\tnil, nil,\n\t\t\t\t),\n\t\t\t\tprometheus.UntypedValue, v,\n\t\t\t)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc getNetStats(fileName string) (map[string]map[string]string, error) {\n\tfile, err := os.Open(fileName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer file.Close()\n\n\treturn parseNetStats(file, fileName)\n}\n\nfunc parseNetStats(r io.Reader, fileName string) (map[string]map[string]string, error) {\n\tvar (\n\t\tnetStats = map[string]map[string]string{}\n\t\tscanner  = bufio.NewScanner(r)\n\t)\n\n\tfor scanner.Scan() {\n\t\tnameParts := strings.Split(scanner.Text(), \" \")\n\t\tscanner.Scan()\n\t\tvalueParts := strings.Split(scanner.Text(), \" \")\n\t\t// Remove trailing :.\n\t\tprotocol := nameParts[0][:len(nameParts[0])-1]\n\t\tnetStats[protocol] = map[string]string{}\n\t\tif len(nameParts) != len(valueParts) {\n\t\t\treturn nil, fmt.Errorf(\"mismatch field count mismatch in %s: %s\",\n\t\t\t\tfileName, protocol)\n\t\t}\n\t\tfor i := 1; i < len(nameParts); i++ {\n\t\t\tnetStats[protocol][nameParts[i]] = valueParts[i]\n\t\t}\n\t}\n\n\treturn netStats, scanner.Err()\n}\n\nfunc getSNMP6Stats(fileName string) (map[string]map[string]string, error) {\n\tfile, err := os.Open(fileName)\n\tif err != nil {\n\t\t// On systems with IPv6 disabled, this file won't exist.\n\t\t// Do nothing.\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\treturn nil, nil\n\t\t}\n\n\t\treturn nil, err\n\t}\n\tdefer file.Close()\n\n\treturn parseSNMP6Stats(file)\n}\n\nfunc parseSNMP6Stats(r io.Reader) (map[string]map[string]string, error) {\n\tvar (\n\t\tnetStats = map[string]map[string]string{}\n\t\tscanner  = bufio.NewScanner(r)\n\t)\n\n\tfor scanner.Scan() {\n\t\tstat := strings.Fields(scanner.Text())\n\t\tif len(stat) < 2 {\n\t\t\tcontinue\n\t\t}\n\t\t// Expect to have \"6\" in metric name, skip line otherwise\n\t\tif sixIndex := strings.Index(stat[0], \"6\"); sixIndex != -1 {\n\t\t\tprotocol := stat[0][:sixIndex+1]\n\t\t\tname := stat[0][sixIndex+1:]\n\t\t\tif _, present := netStats[protocol]; !present {\n\t\t\t\tnetStats[protocol] = map[string]string{}\n\t\t\t}\n\t\t\tnetStats[protocol][name] = stat[1]\n\t\t}\n\t}\n\n\treturn netStats, scanner.Err()\n}\n"
  },
  {
    "path": "collector/netstat_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetstat\n\npackage collector\n\nimport (\n\t\"os\"\n\t\"testing\"\n)\n\nfunc TestNetStats(t *testing.T) {\n\ttestNetStats(t, \"fixtures/proc/net/netstat\")\n\ttestSNMPStats(t, \"fixtures/proc/net/snmp\")\n\ttestSNMP6Stats(t, \"fixtures/proc/net/snmp6\")\n}\n\nfunc testNetStats(t *testing.T, fileName string) {\n\tfile, err := os.Open(fileName)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tnetStats, err := parseNetStats(file, fileName)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := \"102471\", netStats[\"TcpExt\"][\"DelayedACKs\"]; want != got {\n\t\tt.Errorf(\"want netstat TCP DelayedACKs %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"2786264347\", netStats[\"IpExt\"][\"OutOctets\"]; want != got {\n\t\tt.Errorf(\"want netstat IP OutOctets %s, got %s\", want, got)\n\t}\n}\n\nfunc testSNMPStats(t *testing.T, fileName string) {\n\tfile, err := os.Open(fileName)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tsnmpStats, err := parseNetStats(file, fileName)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := \"9\", snmpStats[\"Udp\"][\"RcvbufErrors\"]; want != got {\n\t\tt.Errorf(\"want netstat Udp RcvbufErrors %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"8\", snmpStats[\"Udp\"][\"SndbufErrors\"]; want != got {\n\t\tt.Errorf(\"want netstat Udp SndbufErrors %s, got %s\", want, got)\n\t}\n}\n\nfunc testSNMP6Stats(t *testing.T, fileName string) {\n\tfile, err := os.Open(fileName)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\tsnmp6Stats, err := parseSNMP6Stats(file)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := \"460\", snmp6Stats[\"Ip6\"][\"InOctets\"]; want != got {\n\t\tt.Errorf(\"want netstat IPv6 InOctets %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"8\", snmp6Stats[\"Icmp6\"][\"OutMsgs\"]; want != got {\n\t\tt.Errorf(\"want netstat ICPM6 OutMsgs %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"9\", snmp6Stats[\"Udp6\"][\"RcvbufErrors\"]; want != got {\n\t\tt.Errorf(\"want netstat Udp6 RcvbufErrors %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"8\", snmp6Stats[\"Udp6\"][\"SndbufErrors\"]; want != got {\n\t\tt.Errorf(\"want netstat Udp6 SndbufErrors %s, got %s\", want, got)\n\t}\n}\n"
  },
  {
    "path": "collector/network_route_linux.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonetworkroute\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net\"\n\t\"strconv\"\n\n\t\"github.com/jsimonetti/rtnetlink/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\ntype networkRouteCollector struct {\n\trouteInfoDesc *prometheus.Desc\n\troutesDesc    *prometheus.Desc\n\tlogger        *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"network_route\", defaultDisabled, NewNetworkRouteCollector)\n}\n\n// NewNetworkRouteCollector returns a new Collector exposing systemd statistics.\nfunc NewNetworkRouteCollector(logger *slog.Logger) (Collector, error) {\n\tconst subsystem = \"network\"\n\n\trouteInfoDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"route_info\"),\n\t\t\"network routing table information\", []string{\"device\", \"src\", \"dest\", \"gw\", \"priority\", \"proto\", \"weight\"}, nil,\n\t)\n\troutesDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"routes\"),\n\t\t\"network routes by interface\", []string{\"device\"}, nil,\n\t)\n\n\treturn &networkRouteCollector{\n\t\trouteInfoDesc: routeInfoDesc,\n\t\troutesDesc:    routesDesc,\n\t\tlogger:        logger,\n\t}, nil\n}\n\nfunc (n networkRouteCollector) Update(ch chan<- prometheus.Metric) error {\n\tdeviceRoutes := make(map[string]int)\n\n\tconn, err := rtnetlink.Dial(nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't connect rtnetlink: %w\", err)\n\t}\n\tdefer conn.Close()\n\n\tlinks, err := conn.Link.List()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get links: %w\", err)\n\t}\n\n\troutes, err := conn.Route.List()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get routes: %w\", err)\n\t}\n\n\tfor _, route := range routes {\n\t\tif route.Type != unix.RTA_DST {\n\t\t\tcontinue\n\t\t}\n\t\tif len(route.Attributes.Multipath) != 0 {\n\t\t\tfor _, nextHop := range route.Attributes.Multipath {\n\t\t\t\tifName := \"\"\n\t\t\t\tfor _, link := range links {\n\t\t\t\t\tif link.Index == nextHop.Hop.IfIndex {\n\t\t\t\t\t\tifName = link.Attributes.Name\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlabels := []string{\n\t\t\t\t\tifName, // if\n\t\t\t\t\tnetworkRouteIPToString(route.Attributes.Src),                            // src\n\t\t\t\t\tnetworkRouteIPWithPrefixToString(route.Attributes.Dst, route.DstLength), // dest\n\t\t\t\t\tnetworkRouteIPToString(nextHop.Gateway),                                 // gw\n\t\t\t\t\tstrconv.FormatUint(uint64(route.Attributes.Priority), 10),               // priority(metrics)\n\t\t\t\t\tnetworkRouteProtocolToString(route.Protocol),                            // proto\n\t\t\t\t\tstrconv.Itoa(int(nextHop.Hop.Hops) + 1),                                 // weight\n\t\t\t\t}\n\t\t\t\tch <- prometheus.MustNewConstMetric(n.routeInfoDesc, prometheus.GaugeValue, 1, labels...)\n\t\t\t\tdeviceRoutes[ifName]++\n\t\t\t}\n\t\t} else {\n\t\t\tifName := \"\"\n\t\t\tfor _, link := range links {\n\t\t\t\tif link.Index == route.Attributes.OutIface {\n\t\t\t\t\tifName = link.Attributes.Name\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlabels := []string{\n\t\t\t\tifName, // if\n\t\t\t\tnetworkRouteIPToString(route.Attributes.Src),                            // src\n\t\t\t\tnetworkRouteIPWithPrefixToString(route.Attributes.Dst, route.DstLength), // dest\n\t\t\t\tnetworkRouteIPToString(route.Attributes.Gateway),                        // gw\n\t\t\t\tstrconv.FormatUint(uint64(route.Attributes.Priority), 10),               // priority(metrics)\n\t\t\t\tnetworkRouteProtocolToString(route.Protocol),                            // proto\n\t\t\t\t\"\", // weight\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstMetric(n.routeInfoDesc, prometheus.GaugeValue, 1, labels...)\n\t\t\tdeviceRoutes[ifName]++\n\t\t}\n\t}\n\n\tfor dev, total := range deviceRoutes {\n\t\tch <- prometheus.MustNewConstMetric(n.routesDesc, prometheus.GaugeValue, float64(total), dev)\n\t}\n\n\treturn nil\n}\n\nfunc networkRouteIPWithPrefixToString(ip net.IP, len uint8) string {\n\tif len == 0 {\n\t\treturn \"default\"\n\t}\n\tiplen := net.IPv4len\n\tif ip.To4() == nil {\n\t\tiplen = net.IPv6len\n\t}\n\tnetwork := &net.IPNet{\n\t\tIP:   ip,\n\t\tMask: net.CIDRMask(int(len), iplen*8),\n\t}\n\treturn network.String()\n}\n\nfunc networkRouteIPToString(ip net.IP) string {\n\tif len(ip) == 0 {\n\t\treturn \"\"\n\t}\n\treturn ip.String()\n}\n\nfunc networkRouteProtocolToString(protocol uint8) string {\n\t// from linux kernel 'include/uapi/linux/rtnetlink.h'\n\tswitch protocol {\n\tcase 0:\n\t\treturn \"unspec\"\n\tcase 1:\n\t\treturn \"redirect\"\n\tcase 2:\n\t\treturn \"kernel\"\n\tcase 3:\n\t\treturn \"boot\"\n\tcase 4:\n\t\treturn \"static\"\n\tcase 8:\n\t\treturn \"gated\"\n\tcase 9:\n\t\treturn \"ra\"\n\tcase 10:\n\t\treturn \"mrt\"\n\tcase 11:\n\t\treturn \"zebra\"\n\tcase 12:\n\t\treturn \"bird\"\n\tcase 13:\n\t\treturn \"dnrouted\"\n\tcase 14:\n\t\treturn \"xorp\"\n\tcase 15:\n\t\treturn \"ntk\"\n\tcase 16:\n\t\treturn \"dhcp\"\n\tcase 17:\n\t\treturn \"mrouted\"\n\tcase 42:\n\t\treturn \"babel\"\n\tcase 186:\n\t\treturn \"bgp\"\n\tcase 187:\n\t\treturn \"isis\"\n\tcase 188:\n\t\treturn \"ospf\"\n\tcase 189:\n\t\treturn \"rip\"\n\tcase 192:\n\t\treturn \"eigrp\"\n\t}\n\treturn \"unknown\"\n}\n"
  },
  {
    "path": "collector/nfs_linux.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonfs\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"reflect\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/nfs\"\n)\n\nconst (\n\tnfsSubsystem = \"nfs\"\n)\n\ntype nfsCollector struct {\n\tfs                                nfs.FS\n\tnfsNetReadsDesc                   *prometheus.Desc\n\tnfsNetConnectionsDesc             *prometheus.Desc\n\tnfsRPCOperationsDesc              *prometheus.Desc\n\tnfsRPCRetransmissionsDesc         *prometheus.Desc\n\tnfsRPCAuthenticationRefreshesDesc *prometheus.Desc\n\tnfsProceduresDesc                 *prometheus.Desc\n\tlogger                            *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"nfs\", defaultEnabled, NewNfsCollector)\n}\n\n// NewNfsCollector returns a new Collector exposing NFS statistics.\nfunc NewNfsCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := nfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &nfsCollector{\n\t\tfs: fs,\n\t\tnfsNetReadsDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsSubsystem, \"packets_total\"),\n\t\t\t\"Total NFSd network packets (sent+received) by protocol type.\",\n\t\t\t[]string{\"protocol\"},\n\t\t\tnil,\n\t\t),\n\t\tnfsNetConnectionsDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsSubsystem, \"connections_total\"),\n\t\t\t\"Total number of NFSd TCP connections.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tnfsRPCOperationsDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsSubsystem, \"rpcs_total\"),\n\t\t\t\"Total number of RPCs performed.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tnfsRPCRetransmissionsDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsSubsystem, \"rpc_retransmissions_total\"),\n\t\t\t\"Number of RPC transmissions performed.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tnfsRPCAuthenticationRefreshesDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsSubsystem, \"rpc_authentication_refreshes_total\"),\n\t\t\t\"Number of RPC authentication refreshes performed.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tnfsProceduresDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsSubsystem, \"requests_total\"),\n\t\t\t\"Number of NFS procedures invoked.\",\n\t\t\t[]string{\"proto\", \"method\"},\n\t\t\tnil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *nfsCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.fs.ClientRPCStats()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"Not collecting NFS metrics\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"failed to retrieve nfs stats: %w\", err)\n\t}\n\n\tc.updateNFSNetworkStats(ch, &stats.Network)\n\tc.updateNFSClientRPCStats(ch, &stats.ClientRPC)\n\tc.updateNFSRequestsv2Stats(ch, &stats.V2Stats)\n\tc.updateNFSRequestsv3Stats(ch, &stats.V3Stats)\n\tc.updateNFSRequestsv4Stats(ch, &stats.ClientV4Stats)\n\n\treturn nil\n}\n\n// updateNFSNetworkStats collects statistics for network packets/connections.\nfunc (c *nfsCollector) updateNFSNetworkStats(ch chan<- prometheus.Metric, s *nfs.Network) {\n\tch <- prometheus.MustNewConstMetric(c.nfsNetReadsDesc, prometheus.CounterValue,\n\t\tfloat64(s.UDPCount), \"udp\")\n\tch <- prometheus.MustNewConstMetric(c.nfsNetReadsDesc, prometheus.CounterValue,\n\t\tfloat64(s.TCPCount), \"tcp\")\n\tch <- prometheus.MustNewConstMetric(c.nfsNetConnectionsDesc, prometheus.CounterValue,\n\t\tfloat64(s.TCPConnect))\n}\n\n// updateNFSClientRPCStats collects statistics for kernel server RPCs.\nfunc (c *nfsCollector) updateNFSClientRPCStats(ch chan<- prometheus.Metric, s *nfs.ClientRPC) {\n\tch <- prometheus.MustNewConstMetric(c.nfsRPCOperationsDesc, prometheus.CounterValue,\n\t\tfloat64(s.RPCCount))\n\tch <- prometheus.MustNewConstMetric(c.nfsRPCRetransmissionsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Retransmissions))\n\tch <- prometheus.MustNewConstMetric(c.nfsRPCAuthenticationRefreshesDesc, prometheus.CounterValue,\n\t\tfloat64(s.AuthRefreshes))\n}\n\n// updateNFSRequestsv2Stats collects statistics for NFSv2 requests.\nfunc (c *nfsCollector) updateNFSRequestsv2Stats(ch chan<- prometheus.Metric, s *nfs.V2Stats) {\n\tconst proto = \"2\"\n\n\tv := reflect.ValueOf(s).Elem()\n\tfor i := 0; i < v.NumField(); i++ {\n\t\tfield := v.Field(i)\n\n\t\tch <- prometheus.MustNewConstMetric(c.nfsProceduresDesc, prometheus.CounterValue,\n\t\t\tfloat64(field.Uint()), proto, v.Type().Field(i).Name)\n\t}\n}\n\n// updateNFSRequestsv3Stats collects statistics for NFSv3 requests.\nfunc (c *nfsCollector) updateNFSRequestsv3Stats(ch chan<- prometheus.Metric, s *nfs.V3Stats) {\n\tconst proto = \"3\"\n\n\tv := reflect.ValueOf(s).Elem()\n\tfor i := 0; i < v.NumField(); i++ {\n\t\tfield := v.Field(i)\n\n\t\tch <- prometheus.MustNewConstMetric(c.nfsProceduresDesc, prometheus.CounterValue,\n\t\t\tfloat64(field.Uint()), proto, v.Type().Field(i).Name)\n\t}\n}\n\n// updateNFSRequestsv4Stats collects statistics for NFSv4 requests.\nfunc (c *nfsCollector) updateNFSRequestsv4Stats(ch chan<- prometheus.Metric, s *nfs.ClientV4Stats) {\n\tconst proto = \"4\"\n\n\tv := reflect.ValueOf(s).Elem()\n\tfor i := 0; i < v.NumField(); i++ {\n\t\tfield := v.Field(i)\n\n\t\tch <- prometheus.MustNewConstMetric(c.nfsProceduresDesc, prometheus.CounterValue,\n\t\t\tfloat64(field.Uint()), proto, v.Type().Field(i).Name)\n\t}\n}\n"
  },
  {
    "path": "collector/nfsd_linux.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonfsd\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/nfs\"\n)\n\n// A nfsdCollector is a Collector which gathers metrics from /proc/net/rpc/nfsd.\n// See: https://www.svennd.be/nfsd-stats-explained-procnetrpcnfsd/\ntype nfsdCollector struct {\n\tfs           nfs.FS\n\trequestsDesc *prometheus.Desc\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"nfsd\", defaultEnabled, NewNFSdCollector)\n}\n\nconst (\n\tnfsdSubsystem = \"nfsd\"\n)\n\n// NewNFSdCollector returns a new Collector exposing /proc/net/rpc/nfsd statistics.\nfunc NewNFSdCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := nfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &nfsdCollector{\n\t\tfs: fs,\n\t\trequestsDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"requests_total\"),\n\t\t\t\"Total number NFSd Requests by method and protocol.\",\n\t\t\t[]string{\"proto\", \"method\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update implements Collector.\nfunc (c *nfsdCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.fs.ServerRPCStats()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"Not collecting NFSd metrics\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"failed to retrieve nfsd stats: %w\", err)\n\t}\n\n\tc.updateNFSdReplyCacheStats(ch, &stats.ReplyCache)\n\tc.updateNFSdFileHandlesStats(ch, &stats.FileHandles)\n\tc.updateNFSdInputOutputStats(ch, &stats.InputOutput)\n\tc.updateNFSdThreadsStats(ch, &stats.Threads)\n\tc.updateNFSdReadAheadCacheStats(ch, &stats.ReadAheadCache)\n\tc.updateNFSdNetworkStats(ch, &stats.Network)\n\tc.updateNFSdServerRPCStats(ch, &stats.ServerRPC)\n\tc.updateNFSdRequestsv2Stats(ch, &stats.V2Stats)\n\tc.updateNFSdRequestsv3Stats(ch, &stats.V3Stats)\n\tc.updateNFSdRequestsv4Stats(ch, &stats.V4Ops)\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(stats.WdelegGetattr), \"4\", \"WdelegGetattr\")\n\n\treturn nil\n}\n\n// updateNFSdReplyCacheStats collects statistics for the reply cache.\nfunc (c *nfsdCollector) updateNFSdReplyCacheStats(ch chan<- prometheus.Metric, s *nfs.ReplyCache) {\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"reply_cache_hits_total\"),\n\t\t\t\"Total number of NFSd Reply Cache hits (client lost server response).\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Hits))\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"reply_cache_misses_total\"),\n\t\t\t\"Total number of NFSd Reply Cache an operation that requires caching (idempotent).\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Misses))\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"reply_cache_nocache_total\"),\n\t\t\t\"Total number of NFSd Reply Cache non-idempotent operations (rename/delete/…).\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.NoCache))\n}\n\n// updateNFSdFileHandlesStats collects statistics for the file handles.\nfunc (c *nfsdCollector) updateNFSdFileHandlesStats(ch chan<- prometheus.Metric, s *nfs.FileHandles) {\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"file_handles_stale_total\"),\n\t\t\t\"Total number of NFSd stale file handles\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Stale))\n\t// NOTE: Other FileHandles entries are unused in the kernel.\n}\n\n// updateNFSdInputOutputStats collects statistics for the bytes in/out.\nfunc (c *nfsdCollector) updateNFSdInputOutputStats(ch chan<- prometheus.Metric, s *nfs.InputOutput) {\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"disk_bytes_read_total\"),\n\t\t\t\"Total NFSd bytes read.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Read))\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"disk_bytes_written_total\"),\n\t\t\t\"Total NFSd bytes written.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.Write))\n}\n\n// updateNFSdThreadsStats collects statistics for kernel server threads.\nfunc (c *nfsdCollector) updateNFSdThreadsStats(ch chan<- prometheus.Metric, s *nfs.Threads) {\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"server_threads\"),\n\t\t\t\"Total number of NFSd kernel threads that are running.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.GaugeValue,\n\t\tfloat64(s.Threads))\n}\n\n// updateNFSdReadAheadCacheStats collects statistics for the read ahead cache.\nfunc (c *nfsdCollector) updateNFSdReadAheadCacheStats(ch chan<- prometheus.Metric, s *nfs.ReadAheadCache) {\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"read_ahead_cache_size_blocks\"),\n\t\t\t\"How large the read ahead cache is in blocks.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.GaugeValue,\n\t\tfloat64(s.CacheSize))\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"read_ahead_cache_not_found_total\"),\n\t\t\t\"Total number of NFSd read ahead cache not found.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.NotFound))\n}\n\n// updateNFSdNetworkStats collects statistics for network packets/connections.\nfunc (c *nfsdCollector) updateNFSdNetworkStats(ch chan<- prometheus.Metric, s *nfs.Network) {\n\tpacketDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"packets_total\"),\n\t\t\"Total NFSd network packets (sent+received) by protocol type.\",\n\t\t[]string{\"proto\"},\n\t\tnil,\n\t)\n\tch <- prometheus.MustNewConstMetric(\n\t\tpacketDesc,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.UDPCount), \"udp\")\n\tch <- prometheus.MustNewConstMetric(\n\t\tpacketDesc,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.TCPCount), \"tcp\")\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"connections_total\"),\n\t\t\t\"Total number of NFSd TCP connections.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.TCPConnect))\n}\n\n// updateNFSdServerRPCStats collects statistics for kernel server RPCs.\nfunc (c *nfsdCollector) updateNFSdServerRPCStats(ch chan<- prometheus.Metric, s *nfs.ServerRPC) {\n\tbadRPCDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"rpc_errors_total\"),\n\t\t\"Total number of NFSd RPC errors by error type.\",\n\t\t[]string{\"error\"},\n\t\tnil,\n\t)\n\tch <- prometheus.MustNewConstMetric(\n\t\tbadRPCDesc,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.BadFmt), \"fmt\")\n\tch <- prometheus.MustNewConstMetric(\n\t\tbadRPCDesc,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.BadAuth), \"auth\")\n\tch <- prometheus.MustNewConstMetric(\n\t\tbadRPCDesc,\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.BadcInt), \"cInt\")\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, nfsdSubsystem, \"server_rpcs_total\"),\n\t\t\t\"Total number of NFSd RPCs.\",\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.CounterValue,\n\t\tfloat64(s.RPCCount))\n}\n\n// updateNFSdRequestsv2Stats collects statistics for NFSv2 requests.\nfunc (c *nfsdCollector) updateNFSdRequestsv2Stats(ch chan<- prometheus.Metric, s *nfs.V2Stats) {\n\tconst proto = \"2\"\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.GetAttr), proto, \"GetAttr\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SetAttr), proto, \"SetAttr\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Root), proto, \"Root\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Lookup), proto, \"Lookup\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.ReadLink), proto, \"ReadLink\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Read), proto, \"Read\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.WrCache), proto, \"WrCache\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Write), proto, \"Write\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Create), proto, \"Create\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Remove), proto, \"Remove\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Rename), proto, \"Rename\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Link), proto, \"Link\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SymLink), proto, \"SymLink\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.MkDir), proto, \"MkDir\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.RmDir), proto, \"RmDir\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.ReadDir), proto, \"ReadDir\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.FsStat), proto, \"FsStat\")\n}\n\n// updateNFSdRequestsv3Stats collects statistics for NFSv3 requests.\nfunc (c *nfsdCollector) updateNFSdRequestsv3Stats(ch chan<- prometheus.Metric, s *nfs.V3Stats) {\n\tconst proto = \"3\"\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.GetAttr), proto, \"GetAttr\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SetAttr), proto, \"SetAttr\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Lookup), proto, \"Lookup\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Access), proto, \"Access\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.ReadLink), proto, \"ReadLink\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Read), proto, \"Read\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Write), proto, \"Write\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Create), proto, \"Create\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.MkDir), proto, \"MkDir\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SymLink), proto, \"SymLink\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.MkNod), proto, \"MkNod\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Remove), proto, \"Remove\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.RmDir), proto, \"RmDir\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Rename), proto, \"Rename\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Link), proto, \"Link\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.ReadDir), proto, \"ReadDir\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.ReadDirPlus), proto, \"ReadDirPlus\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.FsStat), proto, \"FsStat\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.FsInfo), proto, \"FsInfo\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.PathConf), proto, \"PathConf\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Commit), proto, \"Commit\")\n}\n\n// updateNFSdRequestsv4Stats collects statistics for NFSv4 requests.\nfunc (c *nfsdCollector) updateNFSdRequestsv4Stats(ch chan<- prometheus.Metric, s *nfs.V4Ops) {\n\tconst proto = \"4\"\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Access), proto, \"Access\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Close), proto, \"Close\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Commit), proto, \"Commit\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Create), proto, \"Create\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.DelegPurge), proto, \"DelegPurge\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.DelegReturn), proto, \"DelegReturn\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.GetAttr), proto, \"GetAttr\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.GetFH), proto, \"GetFH\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Link), proto, \"Link\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Lock), proto, \"Lock\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Lockt), proto, \"Lockt\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Locku), proto, \"Locku\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Lookup), proto, \"Lookup\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.LookupRoot), proto, \"LookupRoot\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Nverify), proto, \"Nverify\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Open), proto, \"Open\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.OpenAttr), proto, \"OpenAttr\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.OpenConfirm), proto, \"OpenConfirm\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.OpenDgrd), proto, \"OpenDgrd\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.PutFH), proto, \"PutFH\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Read), proto, \"Read\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.ReadDir), proto, \"ReadDir\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.ReadLink), proto, \"ReadLink\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Remove), proto, \"Remove\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Rename), proto, \"Rename\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Renew), proto, \"Renew\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.RestoreFH), proto, \"RestoreFH\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SaveFH), proto, \"SaveFH\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SecInfo), proto, \"SecInfo\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SetAttr), proto, \"SetAttr\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SetClientID), proto, \"SetClientID\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.SetClientIDConfirm), proto, \"SetClientIDConfirm\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Verify), proto, \"Verify\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.Write), proto, \"Write\")\n\tch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue,\n\t\tfloat64(s.RelLockOwner), proto, \"RelLockOwner\")\n}\n"
  },
  {
    "path": "collector/ntp.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nontp\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/beevik/ntp\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\thour24       = 24 * time.Hour // `time` does not export `Day` as Day != 24h because of DST\n\tntpSubsystem = \"ntp\"\n)\n\nvar (\n\tntpServer          = kingpin.Flag(\"collector.ntp.server\", \"NTP server to use for ntp collector\").Default(\"127.0.0.1\").String()\n\tntpServerPort      = kingpin.Flag(\"collector.ntp.server-port\", \"UDP port number to connect to on NTP server\").Default(\"123\").Int()\n\tntpProtocolVersion = kingpin.Flag(\"collector.ntp.protocol-version\", \"NTP protocol version\").Default(\"4\").Int()\n\tntpServerIsLocal   = kingpin.Flag(\"collector.ntp.server-is-local\", \"Certify that collector.ntp.server address is not a public ntp server\").Default(\"false\").Bool()\n\tntpIPTTL           = kingpin.Flag(\"collector.ntp.ip-ttl\", \"IP TTL to use while sending NTP query\").Default(\"1\").Int()\n\t// 3.46608s ~ 1.5s + PHI * (1 << maxPoll), where 1.5s is MAXDIST from ntp.org, it is 1.0 in RFC5905\n\t// max-distance option is used as-is without phi*(1<<poll)\n\tntpMaxDistance     = kingpin.Flag(\"collector.ntp.max-distance\", \"Max accumulated distance to the root\").Default(\"3.46608s\").Duration()\n\tntpOffsetTolerance = kingpin.Flag(\"collector.ntp.local-offset-tolerance\", \"Offset between local clock and local ntpd time to tolerate\").Default(\"1ms\").Duration()\n\n\tleapMidnight      time.Time\n\tleapMidnightMutex = &sync.Mutex{}\n)\n\ntype ntpCollector struct {\n\tstratum, leap, rtt, offset, reftime, rootDelay, rootDispersion, sanity typedDesc\n\tlogger                                                                 *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"ntp\", defaultDisabled, NewNtpCollector)\n}\n\n// NewNtpCollector returns a new Collector exposing sanity of local NTP server.\n// Default definition of \"local\" is:\n// - collector.ntp.server address is a loopback address (or collector.ntp.server-is-mine flag is turned on)\n// - the server is reachable with outgoing IP_TTL = 1\nfunc NewNtpCollector(logger *slog.Logger) (Collector, error) {\n\tipaddr := net.ParseIP(*ntpServer)\n\tif !*ntpServerIsLocal && (ipaddr == nil || !ipaddr.IsLoopback()) {\n\t\treturn nil, fmt.Errorf(\"only IP address of local NTP server is valid for --collector.ntp.server\")\n\t}\n\n\tif *ntpProtocolVersion < 2 || *ntpProtocolVersion > 4 {\n\t\treturn nil, fmt.Errorf(\"invalid NTP protocol version %d; must be 2, 3, or 4\", *ntpProtocolVersion)\n\t}\n\n\tif *ntpOffsetTolerance < 0 {\n\t\treturn nil, fmt.Errorf(\"offset tolerance must be non-negative\")\n\t}\n\n\tif *ntpServerPort < 1 || *ntpServerPort > 65535 {\n\t\treturn nil, fmt.Errorf(\"invalid NTP port number %d; must be between 1 and 65535 inclusive\", *ntpServerPort)\n\t}\n\n\tlogger.Warn(\"This collector is deprecated and will be removed in the next major version release.\")\n\treturn &ntpCollector{\n\t\tstratum: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, ntpSubsystem, \"stratum\"),\n\t\t\t\"NTPD stratum.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tleap: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, ntpSubsystem, \"leap\"),\n\t\t\t\"NTPD leap second indicator, 2 bits.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\trtt: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, ntpSubsystem, \"rtt_seconds\"),\n\t\t\t\"RTT to NTPD.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\toffset: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, ntpSubsystem, \"offset_seconds\"),\n\t\t\t\"ClockOffset between NTP and local clock.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\treftime: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, ntpSubsystem, \"reference_timestamp_seconds\"),\n\t\t\t\"NTPD ReferenceTime, UNIX timestamp.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\trootDelay: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, ntpSubsystem, \"root_delay_seconds\"),\n\t\t\t\"NTPD RootDelay.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\trootDispersion: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, ntpSubsystem, \"root_dispersion_seconds\"),\n\t\t\t\"NTPD RootDispersion.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tsanity: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, ntpSubsystem, \"sanity\"),\n\t\t\t\"NTPD sanity according to RFC5905 heuristics and configured limits.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *ntpCollector) Update(ch chan<- prometheus.Metric) error {\n\tresp, err := ntp.QueryWithOptions(*ntpServer, ntp.QueryOptions{\n\t\tVersion: *ntpProtocolVersion,\n\t\tTTL:     *ntpIPTTL,\n\t\tTimeout: time.Second, // default `ntpdate` timeout\n\t\tPort:    *ntpServerPort,\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get SNTP reply: %w\", err)\n\t}\n\n\tch <- c.stratum.mustNewConstMetric(float64(resp.Stratum))\n\tch <- c.leap.mustNewConstMetric(float64(resp.Leap))\n\tch <- c.rtt.mustNewConstMetric(resp.RTT.Seconds())\n\tch <- c.offset.mustNewConstMetric(resp.ClockOffset.Seconds())\n\tif resp.ReferenceTime.Unix() > 0 {\n\t\t// Go Zero is   0001-01-01 00:00:00 UTC\n\t\t// NTP Zero is  1900-01-01 00:00:00 UTC\n\t\t// UNIX Zero is 1970-01-01 00:00:00 UTC\n\t\t// so let's keep ALL ancient `reftime` values as zero\n\t\tch <- c.reftime.mustNewConstMetric(float64(resp.ReferenceTime.UnixNano()) / 1e9)\n\t} else {\n\t\tch <- c.reftime.mustNewConstMetric(0)\n\t}\n\tch <- c.rootDelay.mustNewConstMetric(resp.RootDelay.Seconds())\n\tch <- c.rootDispersion.mustNewConstMetric(resp.RootDispersion.Seconds())\n\n\t// Here is SNTP packet sanity check that is exposed to move burden of\n\t// configuration from node_exporter user to the developer.\n\n\tmaxerr := *ntpOffsetTolerance\n\tleapMidnightMutex.Lock()\n\tif resp.Leap == ntp.LeapAddSecond || resp.Leap == ntp.LeapDelSecond {\n\t\t// state of leapMidnight is cached as leap flag is dropped right after midnight\n\t\tleapMidnight = resp.Time.Truncate(hour24).Add(hour24)\n\t}\n\tif leapMidnight.Add(-hour24).Before(resp.Time) && resp.Time.Before(leapMidnight.Add(hour24)) {\n\t\t// tolerate leap smearing\n\t\tmaxerr += time.Second\n\t}\n\tleapMidnightMutex.Unlock()\n\n\tif resp.Validate() == nil && resp.RootDistance <= *ntpMaxDistance && resp.MinError <= maxerr {\n\t\tch <- c.sanity.mustNewConstMetric(1)\n\t} else {\n\t\tch <- c.sanity.mustNewConstMetric(0)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/nvme_linux.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nonvme\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\ntype nvmeCollector struct {\n\tfs                             sysfs.FS\n\tlogger                         *slog.Logger\n\tnamespaceInfo                  *prometheus.Desc\n\tnamespaceCapacityBytes         *prometheus.Desc\n\tnamespaceSizeBytes             *prometheus.Desc\n\tnamespaceUsedBytes             *prometheus.Desc\n\tnamespaceLogicalBlockSizeBytes *prometheus.Desc\n\tinfo                           *prometheus.Desc\n}\n\nfunc init() {\n\tregisterCollector(\"nvme\", defaultEnabled, NewNVMeCollector)\n}\n\n// NewNVMeCollector returns a new Collector exposing NVMe stats.\nfunc NewNVMeCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\tinfo := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"nvme\", \"info\"),\n\t\t\"Non-numeric data from /sys/class/nvme/<device>, value is always 1.\",\n\t\t[]string{\"device\", \"firmware_revision\", \"model\", \"serial\", \"state\", \"cntlid\"},\n\t\tnil,\n\t)\n\tnamespaceInfo := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"nvme\", \"namespace_info\"),\n\t\t\"Information about NVMe namespaces. Value is always 1\",\n\t\t[]string{\"device\", \"nsid\", \"ana_state\"}, nil,\n\t)\n\n\tnamespaceCapacityBytes := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"nvme\", \"namespace_capacity_bytes\"),\n\t\t\"Capacity of the NVMe namespace in bytes. Computed as namespace_size * namespace_logical_block_size\",\n\t\t[]string{\"device\", \"nsid\"}, nil,\n\t)\n\n\tnamespaceSizeBytes := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"nvme\", \"namespace_size_bytes\"),\n\t\t\"Size of the NVMe namespace in bytes. Available in /sys/class/nvme/<device>/<namespace>/size\",\n\t\t[]string{\"device\", \"nsid\"}, nil,\n\t)\n\n\tnamespaceUsedBytes := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"nvme\", \"namespace_used_bytes\"),\n\t\t\"Used space of the NVMe namespace in bytes. Available in /sys/class/nvme/<device>/<namespace>/nuse\",\n\t\t[]string{\"device\", \"nsid\"}, nil,\n\t)\n\n\tnamespaceLogicalBlockSizeBytes := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"nvme\", \"namespace_logical_block_size_bytes\"),\n\t\t\"Logical block size of the NVMe namespace in bytes. Usually 4Kb. Available in /sys/class/nvme/<device>/<namespace>/queue/logical_block_size\",\n\t\t[]string{\"device\", \"nsid\"}, nil,\n\t)\n\n\treturn &nvmeCollector{\n\t\tfs:                             fs,\n\t\tlogger:                         logger,\n\t\tnamespaceInfo:                  namespaceInfo,\n\t\tnamespaceCapacityBytes:         namespaceCapacityBytes,\n\t\tnamespaceSizeBytes:             namespaceSizeBytes,\n\t\tnamespaceUsedBytes:             namespaceUsedBytes,\n\t\tnamespaceLogicalBlockSizeBytes: namespaceLogicalBlockSizeBytes,\n\t\tinfo:                           info,\n\t}, nil\n}\n\nfunc (c *nvmeCollector) Update(ch chan<- prometheus.Metric) error {\n\tdevices, err := c.fs.NVMeClass()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"nvme statistics not found, skipping\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"error obtaining NVMe class info: %w\", err)\n\t}\n\n\tfor _, device := range devices {\n\t\t// Export device-level metrics\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.info,\n\t\t\tprometheus.GaugeValue,\n\t\t\t1.0,\n\t\t\tdevice.Name,\n\t\t\tdevice.FirmwareRevision,\n\t\t\tdevice.Model,\n\t\t\tdevice.Serial,\n\t\t\tdevice.State,\n\t\t\tdevice.ControllerID,\n\t\t)\n\n\t\t// Export namespace-level metrics\n\t\tfor _, namespace := range device.Namespaces {\n\t\t\t// Namespace info metric\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.namespaceInfo,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\t1.0,\n\t\t\t\tdevice.Name,\n\t\t\t\tnamespace.ID,\n\t\t\t\tnamespace.ANAState,\n\t\t\t)\n\n\t\t\t// Namespace capacity in bytes\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.namespaceCapacityBytes,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(namespace.CapacityBytes),\n\t\t\t\tdevice.Name,\n\t\t\t\tnamespace.ID,\n\t\t\t)\n\n\t\t\t// Namespace size in bytes\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.namespaceSizeBytes,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(namespace.SizeBytes),\n\t\t\t\tdevice.Name,\n\t\t\t\tnamespace.ID,\n\t\t\t)\n\n\t\t\t// Namespace used space in bytes\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.namespaceUsedBytes,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(namespace.UsedBytes),\n\t\t\t\tdevice.Name,\n\t\t\t\tnamespace.ID,\n\t\t\t)\n\n\t\t\t// Namespace logical block size in bytes\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.namespaceLogicalBlockSizeBytes,\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(namespace.LogicalBlockSize),\n\t\t\t\tdevice.Name,\n\t\t\t\tnamespace.ID,\n\t\t\t)\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/os_release.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noosrelease && !aix\n\npackage collector\n\nimport (\n\t\"encoding/xml\"\n\t\"errors\"\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\tenvparse \"github.com/hashicorp/go-envparse\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tetcOSRelease       = \"/etc/os-release\"\n\tusrLibOSRelease    = \"/usr/lib/os-release\"\n\tsystemVersionPlist = \"/System/Library/CoreServices/SystemVersion.plist\"\n)\n\nvar (\n\tversionRegex = regexp.MustCompile(`^[0-9]+\\.?[0-9]*`)\n)\n\ntype osRelease struct {\n\tName            string\n\tID              string\n\tIDLike          string\n\tPrettyName      string\n\tVariant         string\n\tVariantID       string\n\tVersion         string\n\tVersionID       string\n\tVersionCodename string\n\tBuildID         string\n\tImageID         string\n\tImageVersion    string\n\tSupportEnd      string\n}\n\ntype osReleaseCollector struct {\n\tinfoDesc           *prometheus.Desc\n\tlogger             *slog.Logger\n\tos                 *osRelease\n\tosMutex            sync.RWMutex\n\tosReleaseFilenames []string // all os-release file names to check\n\tversion            float64\n\tversionDesc        *prometheus.Desc\n\tsupportEnd         time.Time\n\tsupportEndDesc     *prometheus.Desc\n}\n\ntype Plist struct {\n\tDict Dict `xml:\"dict\"`\n}\n\ntype Dict struct {\n\tKey    []string `xml:\"key\"`\n\tString []string `xml:\"string\"`\n}\n\nfunc init() {\n\tregisterCollector(\"os\", defaultEnabled, NewOSCollector)\n}\n\n// NewOSCollector returns a new Collector exposing os-release information.\nfunc NewOSCollector(logger *slog.Logger) (Collector, error) {\n\treturn &osReleaseCollector{\n\t\tlogger: logger,\n\t\tinfoDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"os\", \"info\"),\n\t\t\t\"A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, \"+\n\t\t\t\t\"name, pretty_name, variant, variant_id, version, version_codename, version_id.\",\n\t\t\t[]string{\"build_id\", \"id\", \"id_like\", \"image_id\", \"image_version\", \"name\", \"pretty_name\",\n\t\t\t\t\"variant\", \"variant_id\", \"version\", \"version_codename\", \"version_id\"}, nil,\n\t\t),\n\t\tosReleaseFilenames: []string{etcOSRelease, usrLibOSRelease, systemVersionPlist},\n\t\tversionDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"os\", \"version\"),\n\t\t\t\"Metric containing the major.minor part of the OS version.\",\n\t\t\t[]string{\"id\", \"id_like\", \"name\"}, nil,\n\t\t),\n\t\tsupportEndDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"os\", \"support_end_timestamp_seconds\"),\n\t\t\t\"Metric containing the end-of-life date timestamp of the OS.\",\n\t\t\tnil, nil,\n\t\t),\n\t}, nil\n}\n\nfunc parseOSRelease(r io.Reader) (*osRelease, error) {\n\tenv, err := envparse.Parse(r)\n\treturn &osRelease{\n\t\tName:            env[\"NAME\"],\n\t\tID:              env[\"ID\"],\n\t\tIDLike:          env[\"ID_LIKE\"],\n\t\tPrettyName:      env[\"PRETTY_NAME\"],\n\t\tVariant:         env[\"VARIANT\"],\n\t\tVariantID:       env[\"VARIANT_ID\"],\n\t\tVersion:         env[\"VERSION\"],\n\t\tVersionID:       env[\"VERSION_ID\"],\n\t\tVersionCodename: env[\"VERSION_CODENAME\"],\n\t\tBuildID:         env[\"BUILD_ID\"],\n\t\tImageID:         env[\"IMAGE_ID\"],\n\t\tImageVersion:    env[\"IMAGE_VERSION\"],\n\t\tSupportEnd:      env[\"SUPPORT_END\"],\n\t}, err\n}\n\nfunc (c *osReleaseCollector) UpdateStruct(path string) error {\n\treleaseFile, err := os.Open(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer releaseFile.Close()\n\n\t// Acquire a lock to update the osReleaseCollector struct.\n\tc.osMutex.Lock()\n\tdefer c.osMutex.Unlock()\n\n\t//  SystemVersion.plist is xml file with MacOs version info\n\tif strings.Contains(releaseFile.Name(), \"SystemVersion.plist\") {\n\t\tc.os, err = getMacosProductVersion(releaseFile.Name())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tc.os, err = parseOSRelease(releaseFile)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tmajorMinor := versionRegex.FindString(c.os.VersionID)\n\tif majorMinor != \"\" {\n\t\tc.version, err = strconv.ParseFloat(majorMinor, 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tc.version = 0\n\t}\n\n\tif c.os.SupportEnd != \"\" {\n\t\tc.supportEnd, err = time.Parse(time.DateOnly, c.os.SupportEnd)\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *osReleaseCollector) Update(ch chan<- prometheus.Metric) error {\n\tfor i, path := range c.osReleaseFilenames {\n\t\terr := c.UpdateStruct(*rootfsPath + path)\n\t\tif err == nil {\n\t\t\tbreak\n\t\t}\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tif i >= (len(c.osReleaseFilenames) - 1) {\n\t\t\t\tc.logger.Debug(\"no os-release file found\", \"files\", strings.Join(c.osReleaseFilenames, \",\"))\n\t\t\t\treturn ErrNoData\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\treturn err\n\t}\n\n\tch <- prometheus.MustNewConstMetric(c.infoDesc, prometheus.GaugeValue, 1.0,\n\t\tc.os.BuildID, c.os.ID, c.os.IDLike, c.os.ImageID, c.os.ImageVersion, c.os.Name, c.os.PrettyName,\n\t\tc.os.Variant, c.os.VariantID, c.os.Version, c.os.VersionCodename, c.os.VersionID)\n\tif c.version > 0 {\n\t\tch <- prometheus.MustNewConstMetric(c.versionDesc, prometheus.GaugeValue, c.version,\n\t\t\tc.os.ID, c.os.IDLike, c.os.Name)\n\t}\n\n\tif c.os.SupportEnd != \"\" {\n\t\tch <- prometheus.MustNewConstMetric(c.supportEndDesc, prometheus.GaugeValue, float64(c.supportEnd.Unix()))\n\t}\n\n\treturn nil\n}\n\nfunc getMacosProductVersion(filename string) (*osRelease, error) {\n\tf, _ := os.Open(filename)\n\tbytePlist, _ := io.ReadAll(f)\n\tf.Close()\n\n\tvar plist Plist\n\terr := xml.Unmarshal(bytePlist, &plist)\n\tif err != nil {\n\t\treturn &osRelease{}, err\n\t}\n\n\tvar osVersionID, osVersionName, osBuildID string\n\tif len(plist.Dict.Key) > 0 {\n\t\tfor index, value := range plist.Dict.Key {\n\t\t\tswitch value {\n\t\t\tcase \"ProductVersion\":\n\t\t\t\tosVersionID = plist.Dict.String[index]\n\t\t\tcase \"ProductName\":\n\t\t\t\tosVersionName = plist.Dict.String[index]\n\t\t\tcase \"ProductBuildVersion\":\n\t\t\t\tosBuildID = plist.Dict.String[index]\n\t\t\t}\n\t\t}\n\t}\n\treturn &osRelease{\n\t\tName:      osVersionName,\n\t\tVersion:   osVersionID,\n\t\tVersionID: osVersionID,\n\t\tBuildID:   osBuildID,\n\t}, nil\n}\n"
  },
  {
    "path": "collector/os_release_test.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"reflect\"\n\t\"strings\"\n\t\"testing\"\n)\n\nconst debianBullseye string = `PRETTY_NAME=\"Debian GNU/Linux 11 (bullseye)\"\nNAME=\"Debian GNU/Linux\"\nVERSION_ID=\"11\"\nVERSION=\"11 (bullseye)\"\nVERSION_CODENAME=bullseye\nID=debian\nHOME_URL=\"https://www.debian.org/\"\nSUPPORT_URL=\"https://www.debian.org/support\"\nBUG_REPORT_URL=\"https://bugs.debian.org/\"\n`\n\nconst nixosTapir string = `BUG_REPORT_URL=\"https://github.com/NixOS/nixpkgs/issues\"\nBUILD_ID=\"23.11.20240328.219951b\"\nDOCUMENTATION_URL=\"https://nixos.org/learn.html\"\nHOME_URL=\"https://nixos.org/\"\nID=nixos\nLOGO=\"nix-snowflake\"\nNAME=NixOS\nPRETTY_NAME=\"NixOS 23.11 (Tapir)\"\nSUPPORT_END=\"2024-06-30\"\nSUPPORT_URL=\"https://nixos.org/community.html\"\nVERSION=\"23.11 (Tapir)\"\nVERSION_CODENAME=tapir\nVERSION_ID=\"23.11\"\n`\n\nfunc TestParseOSRelease(t *testing.T) {\n\twant := &osRelease{\n\t\tName:            \"Ubuntu\",\n\t\tID:              \"ubuntu\",\n\t\tIDLike:          \"debian\",\n\t\tPrettyName:      \"Ubuntu 20.04.2 LTS\",\n\t\tSupportEnd:      \"\",\n\t\tVersion:         \"20.04.2 LTS (Focal Fossa)\",\n\t\tVersionID:       \"20.04\",\n\t\tVersionCodename: \"focal\",\n\t}\n\n\tosReleaseFile, err := os.Open(\"fixtures\" + usrLibOSRelease)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer osReleaseFile.Close()\n\n\tgot, err := parseOSRelease(osReleaseFile)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif !reflect.DeepEqual(want, got) {\n\t\tt.Fatalf(\"should have %+v osRelease: got %+v\", want, got)\n\t}\n\n\twant = &osRelease{\n\t\tName:            \"Debian GNU/Linux\",\n\t\tID:              \"debian\",\n\t\tPrettyName:      \"Debian GNU/Linux 11 (bullseye)\",\n\t\tVersion:         \"11 (bullseye)\",\n\t\tVersionID:       \"11\",\n\t\tVersionCodename: \"bullseye\",\n\t}\n\tgot, err = parseOSRelease(strings.NewReader(debianBullseye))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif !reflect.DeepEqual(want, got) {\n\t\tt.Fatalf(\"should have %+v osRelease: got %+v\", want, got)\n\t}\n}\n\nfunc TestParseOSSupportEnd(t *testing.T) {\n\twant := &osRelease{\n\t\tBuildID:         \"23.11.20240328.219951b\",\n\t\tName:            \"NixOS\",\n\t\tID:              \"nixos\",\n\t\tIDLike:          \"\",\n\t\tImageID:         \"\",\n\t\tImageVersion:    \"\",\n\t\tPrettyName:      \"NixOS 23.11 (Tapir)\",\n\t\tSupportEnd:      \"2024-06-30\",\n\t\tVariant:         \"\",\n\t\tVariantID:       \"\",\n\t\tVersion:         \"23.11 (Tapir)\",\n\t\tVersionID:       \"23.11\",\n\t\tVersionCodename: \"tapir\",\n\t}\n\n\tgot, err := parseOSRelease(strings.NewReader(nixosTapir))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif !reflect.DeepEqual(want, got) {\n\t\tt.Fatalf(\"should have %+v osRelease: got %+v\", want, got)\n\t}\n}\n\nfunc TestUpdateStruct(t *testing.T) {\n\twantedOS := &osRelease{\n\t\tName:            \"Ubuntu\",\n\t\tID:              \"ubuntu\",\n\t\tIDLike:          \"debian\",\n\t\tPrettyName:      \"Ubuntu 20.04.2 LTS\",\n\t\tVersion:         \"20.04.2 LTS (Focal Fossa)\",\n\t\tVersionID:       \"20.04\",\n\t\tVersionCodename: \"focal\",\n\t}\n\twantedVersion := 20.04\n\n\tcollector, err := NewOSCollector(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tc := collector.(*osReleaseCollector)\n\n\terr = c.UpdateStruct(\"fixtures\" + usrLibOSRelease)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !reflect.DeepEqual(wantedOS, c.os) {\n\t\tt.Fatalf(\"should have %+v osRelease: got %+v\", wantedOS, c.os)\n\t}\n\tif wantedVersion != c.version {\n\t\tt.Errorf(\"Expected '%v' but got '%v'\", wantedVersion, c.version)\n\t}\n}\n"
  },
  {
    "path": "collector/partition_aix.go",
    "content": "// Copyright 2025 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nopartition\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/power-devops/perfstat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype partitionCollector struct {\n\tlogger           *slog.Logger\n\tentitledCapacity *prometheus.Desc\n\tmemoryMax        *prometheus.Desc\n\tmemoryOnline     *prometheus.Desc\n\tcpuOnline        *prometheus.Desc\n\tcpuSys           *prometheus.Desc\n\tcpuPool          *prometheus.Desc\n\tpowerSaveMode    *prometheus.Desc\n\tsmtThreads       *prometheus.Desc\n}\n\nconst (\n\tpartitionCollectorSubsystem = \"partition\"\n)\n\nfunc init() {\n\tregisterCollector(\"partition\", defaultEnabled, NewPartitionCollector)\n}\n\nfunc NewPartitionCollector(logger *slog.Logger) (Collector, error) {\n\treturn &partitionCollector{\n\t\tlogger: logger,\n\t\tentitledCapacity: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, partitionCollectorSubsystem, \"entitled_capacity\"),\n\t\t\t\"Entitled processor capacity of the partition in CPU units (e.g. 1.0 = one core).\",\n\t\t\tnil, nil,\n\t\t),\n\t\tmemoryMax: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, partitionCollectorSubsystem, \"memory_max\"),\n\t\t\t\"Maximum memory of the partition in bytes.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tmemoryOnline: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, partitionCollectorSubsystem, \"memory_online\"),\n\t\t\t\"Online memory of the partition in bytes.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tcpuOnline: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, partitionCollectorSubsystem, \"cpus_online\"),\n\t\t\t\"Number of online CPUs in the partition.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tcpuSys: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, partitionCollectorSubsystem, \"cpus_sys\"),\n\t\t\t\"Number of physical CPUs in the system.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tcpuPool: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, partitionCollectorSubsystem, \"cpus_pool\"),\n\t\t\t\"Number of physical CPUs in the pool.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tpowerSaveMode: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, partitionCollectorSubsystem, \"power_save_mode\"),\n\t\t\t\"Power save mode of the partition (1 for enabled, 0 for disabled).\",\n\t\t\tnil, nil,\n\t\t),\n\t\tsmtThreads: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, partitionCollectorSubsystem, \"smt_threads\"),\n\t\t\t\"Number of SMT threads per core.\",\n\t\t\tnil, nil,\n\t\t),\n\t}, nil\n}\n\nfunc (c *partitionCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := perfstat.PartitionStat()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tpowerSaveMode := 0.0\n\tif stats.Conf.PowerSave {\n\t\tpowerSaveMode = 1.0\n\t}\n\n\tch <- prometheus.MustNewConstMetric(c.entitledCapacity, prometheus.GaugeValue, float64(stats.EntCapacity)/100.0)\n\n\tch <- prometheus.MustNewConstMetric(c.memoryMax, prometheus.GaugeValue, float64(stats.Mem.Max)*1024*1024)\n\tch <- prometheus.MustNewConstMetric(c.memoryOnline, prometheus.GaugeValue, float64(stats.Mem.Online)*1024*1024)\n\n\tch <- prometheus.MustNewConstMetric(c.cpuOnline, prometheus.GaugeValue, float64(stats.VCpus.Online))\n\n\tch <- prometheus.MustNewConstMetric(c.cpuSys, prometheus.GaugeValue, float64(stats.NumProcessors.Online))\n\n\tch <- prometheus.MustNewConstMetric(c.cpuPool, prometheus.GaugeValue, float64(stats.ActiveCpusInPool))\n\n\tch <- prometheus.MustNewConstMetric(c.powerSaveMode, prometheus.GaugeValue, powerSaveMode)\n\tch <- prometheus.MustNewConstMetric(c.smtThreads, prometheus.GaugeValue, float64(stats.SmtThreads))\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/paths.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/procfs\"\n)\n\nvar (\n\t// The path of the proc filesystem.\n\tprocPath     = kingpin.Flag(\"path.procfs\", \"procfs mountpoint.\").Default(procfs.DefaultMountPoint).String()\n\tsysPath      = kingpin.Flag(\"path.sysfs\", \"sysfs mountpoint.\").Default(\"/sys\").String()\n\trootfsPath   = kingpin.Flag(\"path.rootfs\", \"rootfs mountpoint.\").Default(\"/\").String()\n\tudevDataPath = kingpin.Flag(\"path.udev.data\", \"udev data path.\").Default(\"/run/udev/data\").String()\n)\n\nfunc procFilePath(name string) string {\n\treturn filepath.Join(*procPath, name)\n}\n\nfunc sysFilePath(name string) string {\n\treturn filepath.Join(*sysPath, name)\n}\n\nfunc rootfsFilePath(name string) string {\n\treturn filepath.Join(*rootfsPath, name)\n}\n\nfunc udevDataFilePath(name string) string {\n\treturn filepath.Join(*udevDataPath, name)\n}\n\nfunc rootfsStripPrefix(path string) string {\n\tif *rootfsPath == \"/\" {\n\t\treturn path\n\t}\n\tstripped := strings.TrimPrefix(path, *rootfsPath)\n\tif stripped == \"\" {\n\t\treturn \"/\"\n\t}\n\treturn stripped\n}\n"
  },
  {
    "path": "collector/paths_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"testing\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/procfs\"\n)\n\nfunc TestDefaultProcPath(t *testing.T) {\n\tif _, err := kingpin.CommandLine.Parse([]string{\"--path.procfs\", procfs.DefaultMountPoint}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif got, want := procFilePath(\"somefile\"), \"/proc/somefile\"; got != want {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n\n\tif got, want := procFilePath(\"some/file\"), \"/proc/some/file\"; got != want {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n}\n\nfunc TestCustomProcPath(t *testing.T) {\n\tif _, err := kingpin.CommandLine.Parse([]string{\"--path.procfs\", \"./../some/./place/\"}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif got, want := procFilePath(\"somefile\"), \"../some/place/somefile\"; got != want {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n\n\tif got, want := procFilePath(\"some/file\"), \"../some/place/some/file\"; got != want {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n}\n\nfunc TestDefaultSysPath(t *testing.T) {\n\tif _, err := kingpin.CommandLine.Parse([]string{\"--path.sysfs\", \"/sys\"}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif got, want := sysFilePath(\"somefile\"), \"/sys/somefile\"; got != want {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n\n\tif got, want := sysFilePath(\"some/file\"), \"/sys/some/file\"; got != want {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n}\n\nfunc TestCustomSysPath(t *testing.T) {\n\tif _, err := kingpin.CommandLine.Parse([]string{\"--path.sysfs\", \"./../some/./place/\"}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif got, want := sysFilePath(\"somefile\"), \"../some/place/somefile\"; got != want {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n\n\tif got, want := sysFilePath(\"some/file\"), \"../some/place/some/file\"; got != want {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n}\n"
  },
  {
    "path": "collector/pcidevice_linux.go",
    "content": "// Copyright 2017-2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nopcidevice\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nconst (\n\tpcideviceSubsystem = \"pcidevice\"\n)\n\nvar (\n\tpciIdsPaths = []string{\n\t\t\"/usr/share/misc/pci.ids\",\n\t\t\"/usr/share/hwdata/pci.ids\",\n\t}\n\tpciIdsFile = kingpin.Flag(\"collector.pcidevice.idsfile\", \"Path to pci.ids file to use for PCI device identification.\").String()\n\tpciNames   = kingpin.Flag(\"collector.pcidevice.names\", \"Enable PCI device name resolution (requires pci.ids file).\").Default(\"false\").Bool()\n\n\tpcideviceLabelNames = []string{\"segment\", \"bus\", \"device\", \"function\"}\n\n\tpcideviceMaxLinkTSDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"max_link_transfers_per_second\"),\n\t\t\t\"Value of maximum link's transfers per second (T/s)\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcideviceMaxLinkWidthDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"max_link_width\"),\n\t\t\t\"Value of maximum link's width (number of lanes)\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcideviceCurrentLinkTSDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"current_link_transfers_per_second\"),\n\t\t\t\"Value of current link's transfers per second (T/s)\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\tpcideviceCurrentLinkWidthDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"current_link_width\"),\n\t\t\t\"Value of current link's width (number of lanes)\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcidevicePowerStateDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"power_state\"),\n\t\t\t\"PCIe device power state, one of: D0, D1, D2, D3hot, D3cold, unknown or error.\",\n\t\t\tappend(pcideviceLabelNames, \"state\"), nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcideviceD3coldAllowedDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"d3cold_allowed\"),\n\t\t\t\"Whether the PCIe device supports D3cold power state (0/1).\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcideviceSriovDriversAutoprobeDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"sriov_drivers_autoprobe\"),\n\t\t\t\"Whether SR-IOV drivers autoprobe is enabled for the device (0/1).\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcideviceSriovNumvfsDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"sriov_numvfs\"),\n\t\t\t\"Number of Virtual Functions (VFs) currently enabled for SR-IOV.\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcideviceSriovTotalvfsDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"sriov_totalvfs\"),\n\t\t\t\"Total number of Virtual Functions (VFs) supported by the device.\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcideviceSriovVfTotalMsixDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"sriov_vf_total_msix\"),\n\t\t\t\"Total number of MSI-X vectors for Virtual Functions.\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\tpcideviceNumaNodeDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"numa_node\"),\n\t\t\t\"NUMA node number for the PCI device. -1 indicates unknown or not available.\",\n\t\t\tpcideviceLabelNames, nil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n)\n\ntype pcideviceCollector struct {\n\tfs            sysfs.FS\n\tinfoDesc      typedDesc\n\tlogger        *slog.Logger\n\tpciVendors    map[string]string\n\tpciDevices    map[string]map[string]string\n\tpciSubsystems map[string]map[string]string\n\tpciClasses    map[string]string\n\tpciSubclasses map[string]string\n\tpciProgIfs    map[string]string\n\tpciNames      bool\n}\n\nfunc init() {\n\tregisterCollector(\"pcidevice\", defaultDisabled, NewPcideviceCollector)\n}\n\n// NewPcideviceCollector returns a new Collector exposing PCI devices stats.\nfunc NewPcideviceCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\t// Initialize PCI ID maps\n\tc := &pcideviceCollector{\n\t\tfs:       fs,\n\t\tlogger:   logger,\n\t\tpciNames: *pciNames,\n\t}\n\n\t// Build label names based on whether name resolution is enabled\n\tlabelNames := append(pcideviceLabelNames,\n\t\t[]string{\"parent_segment\", \"parent_bus\", \"parent_device\", \"parent_function\",\n\t\t\t\"class_id\", \"vendor_id\", \"device_id\", \"subsystem_vendor_id\", \"subsystem_device_id\", \"revision\"}...)\n\n\tif c.pciNames {\n\t\tc.loadPCIIds()\n\t\t// Add name labels when name resolution is enabled\n\t\tlabelNames = append(labelNames, \"vendor_name\", \"device_name\", \"subsystem_vendor_name\", \"subsystem_device_name\", \"class_name\")\n\t}\n\n\tc.infoDesc = typedDesc{\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, pcideviceSubsystem, \"info\"),\n\t\t\t\"Non-numeric data from /sys/bus/pci/devices/<location>, value is always 1.\",\n\t\t\tlabelNames,\n\t\t\tnil,\n\t\t),\n\t\tvalueType: prometheus.GaugeValue,\n\t}\n\n\treturn c, nil\n}\n\nfunc (c *pcideviceCollector) Update(ch chan<- prometheus.Metric) error {\n\tdevices, err := c.fs.PciDevices()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"PCI device not found, skipping\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"error obtaining PCI device info: %w\", err)\n\t}\n\n\tfor _, device := range devices {\n\t\t// The device location is represented in separated format.\n\t\tvalues := device.Location.Strings()\n\t\tif device.ParentLocation != nil {\n\t\t\tvalues = append(values, device.ParentLocation.Strings()...)\n\t\t} else {\n\t\t\tvalues = append(values, []string{\"*\", \"*\", \"*\", \"*\"}...)\n\t\t}\n\n\t\t// Add basic device information\n\t\tclassID := fmt.Sprintf(\"0x%06x\", device.Class)\n\t\tvendorID := fmt.Sprintf(\"0x%04x\", device.Vendor)\n\t\tdeviceID := fmt.Sprintf(\"0x%04x\", device.Device)\n\t\tsubsysVendorID := fmt.Sprintf(\"0x%04x\", device.SubsystemVendor)\n\t\tsubsysDeviceID := fmt.Sprintf(\"0x%04x\", device.SubsystemDevice)\n\n\t\tvalues = append(values, classID, vendorID, deviceID, subsysVendorID, subsysDeviceID, fmt.Sprintf(\"0x%02x\", device.Revision))\n\n\t\t// Add name values if name resolution is enabled\n\t\tif c.pciNames {\n\t\t\tvendorName := c.getPCIVendorName(vendorID)\n\t\t\tdeviceName := c.getPCIDeviceName(vendorID, deviceID)\n\t\t\tsubsysVendorName := c.getPCIVendorName(subsysVendorID)\n\t\t\tsubsysDeviceName := c.getPCISubsystemName(vendorID, deviceID, subsysVendorID, subsysDeviceID)\n\t\t\tclassName := c.getPCIClassName(classID)\n\n\t\t\tvalues = append(values, vendorName, deviceName, subsysVendorName, subsysDeviceName, className)\n\t\t}\n\n\t\tch <- c.infoDesc.mustNewConstMetric(1.0, values...)\n\n\t\t// MaxLinkSpeed and CurrentLinkSpeed are represented in GT/s\n\t\tvar maxLinkSpeedTS float64\n\t\tif device.MaxLinkSpeed != nil {\n\t\t\tmaxLinkSpeedTS = (*device.MaxLinkSpeed) * 1e9\n\t\t} else {\n\t\t\tmaxLinkSpeedTS = -1\n\t\t}\n\n\t\tvar currentLinkSpeedTS float64\n\t\tif device.CurrentLinkSpeed != nil {\n\t\t\tcurrentLinkSpeedTS = (*device.CurrentLinkSpeed) * 1e9\n\t\t} else {\n\t\t\tcurrentLinkSpeedTS = -1\n\t\t}\n\n\t\t// Get power state information directly from device object\n\t\tvar currentPowerState string\n\t\tvar hasPowerState bool\n\t\tif device.PowerState != nil {\n\t\t\tcurrentPowerState = device.PowerState.String()\n\t\t\thasPowerState = true\n\t\t}\n\n\t\tvar d3coldAllowed float64\n\t\tif device.D3coldAllowed != nil {\n\t\t\tif *device.D3coldAllowed {\n\t\t\t\td3coldAllowed = 1\n\t\t\t} else {\n\t\t\t\td3coldAllowed = 0\n\t\t\t}\n\t\t}\n\n\t\t// Get SR-IOV information directly from device object\n\t\tvar sriovDriversAutoprobe float64\n\t\tif device.SriovDriversAutoprobe != nil {\n\t\t\tif *device.SriovDriversAutoprobe {\n\t\t\t\tsriovDriversAutoprobe = 1\n\t\t\t} else {\n\t\t\t\tsriovDriversAutoprobe = 0\n\t\t\t}\n\t\t}\n\n\t\tvar sriovNumvfs float64\n\t\tif device.SriovNumvfs != nil {\n\t\t\tsriovNumvfs = float64(*device.SriovNumvfs)\n\t\t}\n\n\t\tvar sriovTotalvfs float64\n\t\tif device.SriovTotalvfs != nil {\n\t\t\tsriovTotalvfs = float64(*device.SriovTotalvfs)\n\t\t}\n\n\t\tvar sriovVfTotalMsix float64\n\t\tif device.SriovVfTotalMsix != nil {\n\t\t\tsriovVfTotalMsix = float64(*device.SriovVfTotalMsix)\n\t\t}\n\n\t\t// Handle numa_node with nil safety\n\t\tvar numaNode float64\n\t\tif device.NumaNode != nil {\n\t\t\tnumaNode = float64(*device.NumaNode)\n\t\t} else {\n\t\t\tnumaNode = -1\n\t\t}\n\n\t\t// Handle link width fields with nil safety\n\t\tvar maxLinkWidth float64\n\t\tif device.MaxLinkWidth != nil {\n\t\t\tmaxLinkWidth = float64(*device.MaxLinkWidth)\n\t\t} else {\n\t\t\tmaxLinkWidth = -1\n\t\t}\n\n\t\tvar currentLinkWidth float64\n\t\tif device.CurrentLinkWidth != nil {\n\t\t\tcurrentLinkWidth = float64(*device.CurrentLinkWidth)\n\t\t} else {\n\t\t\tcurrentLinkWidth = -1\n\t\t}\n\n\t\t// Emit metrics for all fields except numa_node and power_state\n\t\tch <- pcideviceMaxLinkTSDesc.mustNewConstMetric(maxLinkSpeedTS, device.Location.Strings()...)\n\t\tch <- pcideviceMaxLinkWidthDesc.mustNewConstMetric(maxLinkWidth, device.Location.Strings()...)\n\t\tch <- pcideviceCurrentLinkTSDesc.mustNewConstMetric(currentLinkSpeedTS, device.Location.Strings()...)\n\t\tch <- pcideviceCurrentLinkWidthDesc.mustNewConstMetric(currentLinkWidth, device.Location.Strings()...)\n\t\tch <- pcideviceD3coldAllowedDesc.mustNewConstMetric(d3coldAllowed, device.Location.Strings()...)\n\t\tch <- pcideviceSriovDriversAutoprobeDesc.mustNewConstMetric(sriovDriversAutoprobe, device.Location.Strings()...)\n\t\tch <- pcideviceSriovNumvfsDesc.mustNewConstMetric(sriovNumvfs, device.Location.Strings()...)\n\t\tch <- pcideviceSriovTotalvfsDesc.mustNewConstMetric(sriovTotalvfs, device.Location.Strings()...)\n\t\tch <- pcideviceSriovVfTotalMsixDesc.mustNewConstMetric(sriovVfTotalMsix, device.Location.Strings()...)\n\n\t\t// Emit power state metrics with state labels only if power state is available\n\t\tif hasPowerState {\n\t\t\tpowerStates := []string{\"D0\", \"D1\", \"D2\", \"D3hot\", \"D3cold\", \"unknown\", \"error\"}\n\t\t\tdeviceLabels := device.Location.Strings()\n\t\t\tfor _, state := range powerStates {\n\t\t\t\tvar value float64\n\t\t\t\tif state == currentPowerState {\n\t\t\t\t\tvalue = 1\n\t\t\t\t} else {\n\t\t\t\t\tvalue = 0\n\t\t\t\t}\n\t\t\t\tstateLabels := append(deviceLabels, state)\n\t\t\t\tch <- pcidevicePowerStateDesc.mustNewConstMetric(value, stateLabels...)\n\t\t\t}\n\t\t}\n\n\t\t// Only emit numa_node metric if the value is available (not -1)\n\t\tif numaNode != -1 {\n\t\t\tch <- pcideviceNumaNodeDesc.mustNewConstMetric(numaNode, device.Location.Strings()...)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// loadPCIIds loads PCI device information from pci.ids file\nfunc (c *pcideviceCollector) loadPCIIds() {\n\tvar file *os.File\n\tvar err error\n\n\tc.pciVendors = make(map[string]string)\n\tc.pciDevices = make(map[string]map[string]string)\n\tc.pciSubsystems = make(map[string]map[string]string)\n\tc.pciClasses = make(map[string]string)\n\tc.pciSubclasses = make(map[string]string)\n\tc.pciProgIfs = make(map[string]string)\n\n\t// Use custom pci.ids file if specified\n\tif *pciIdsFile != \"\" {\n\t\tfile, err = os.Open(*pciIdsFile)\n\t\tif err != nil {\n\t\t\tc.logger.Debug(\"Failed to open PCI IDs file\", \"file\", *pciIdsFile, \"error\", err)\n\t\t\treturn\n\t\t}\n\t\tc.logger.Debug(\"Loading PCI IDs from\", \"file\", *pciIdsFile)\n\t} else {\n\t\t// Try each possible default path\n\t\tfor _, path := range pciIdsPaths {\n\t\t\tfile, err = os.Open(path)\n\t\t\tif err == nil {\n\t\t\t\tc.logger.Debug(\"Loading PCI IDs from default path\", \"path\", path)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tc.logger.Debug(\"Failed to open any default PCI IDs file\", \"error\", err)\n\t\t\treturn\n\t\t}\n\t}\n\tdefer file.Close()\n\n\tscanner := bufio.NewScanner(file)\n\tvar currentVendor, currentDevice, currentBaseClass, currentSubclass string\n\tvar inClassContext bool\n\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\t\tif line == \"\" || strings.HasPrefix(line, \"#\") {\n\t\t\tcontinue\n\t\t}\n\n\t\t// Handle class lines (starts with 'C')\n\t\tif strings.HasPrefix(line, \"C \") {\n\t\t\tparts := strings.SplitN(line, \"  \", 2)\n\t\t\tif len(parts) >= 2 {\n\t\t\t\tclassID := strings.TrimSpace(parts[0][1:]) // Remove 'C' prefix\n\t\t\t\tclassName := strings.TrimSpace(parts[1])\n\t\t\t\tc.pciClasses[classID] = className\n\t\t\t\tcurrentBaseClass = classID\n\t\t\t\tinClassContext = true\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// Handle subclass lines (single tab after class)\n\t\tif strings.HasPrefix(line, \"\\t\") && !strings.HasPrefix(line, \"\\t\\t\") && inClassContext {\n\t\t\tline = strings.TrimPrefix(line, \"\\t\")\n\t\t\tparts := strings.SplitN(line, \"  \", 2)\n\t\t\tif len(parts) >= 2 && currentBaseClass != \"\" {\n\t\t\t\tsubclassID := strings.TrimSpace(parts[0])\n\t\t\t\tsubclassName := strings.TrimSpace(parts[1])\n\t\t\t\t// Store as base class + subclass (e.g., \"0100\" for SCSI storage controller)\n\t\t\t\tfullClassID := currentBaseClass + subclassID\n\t\t\t\tc.pciSubclasses[fullClassID] = subclassName\n\t\t\t\tcurrentSubclass = fullClassID\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// Handle programming interface lines (double tab after subclass)\n\t\tif strings.HasPrefix(line, \"\\t\\t\") && !strings.HasPrefix(line, \"\\t\\t\\t\") && inClassContext {\n\t\t\tline = strings.TrimPrefix(line, \"\\t\\t\")\n\t\t\tparts := strings.SplitN(line, \"  \", 2)\n\t\t\tif len(parts) >= 2 && currentSubclass != \"\" {\n\t\t\t\tprogIfID := strings.TrimSpace(parts[0])\n\t\t\t\tprogIfName := strings.TrimSpace(parts[1])\n\t\t\t\t// Store as base class + subclass + programming interface (e.g., \"010802\" for NVM Express)\n\t\t\t\tfullClassID := currentSubclass + progIfID\n\t\t\t\tc.pciProgIfs[fullClassID] = progIfName\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// Handle vendor lines (no leading whitespace, not starting with 'C')\n\t\tif !strings.HasPrefix(line, \"\\t\") && !strings.HasPrefix(line, \"C \") {\n\t\t\tparts := strings.SplitN(line, \"  \", 2)\n\t\t\tif len(parts) >= 2 {\n\t\t\t\tcurrentVendor = strings.TrimSpace(parts[0])\n\t\t\t\tc.pciVendors[currentVendor] = strings.TrimSpace(parts[1])\n\t\t\t\tcurrentDevice = \"\"\n\t\t\t\tinClassContext = false\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// Handle device lines (single tab)\n\t\tif strings.HasPrefix(line, \"\\t\") && !strings.HasPrefix(line, \"\\t\\t\") {\n\t\t\tline = strings.TrimPrefix(line, \"\\t\")\n\t\t\tparts := strings.SplitN(line, \"  \", 2)\n\t\t\tif len(parts) >= 2 && currentVendor != \"\" {\n\t\t\t\tcurrentDevice = strings.TrimSpace(parts[0])\n\t\t\t\tif c.pciDevices[currentVendor] == nil {\n\t\t\t\t\tc.pciDevices[currentVendor] = make(map[string]string)\n\t\t\t\t}\n\t\t\t\tc.pciDevices[currentVendor][currentDevice] = strings.TrimSpace(parts[1])\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\t// Handle subsystem lines (double tab)\n\t\tif strings.HasPrefix(line, \"\\t\\t\") {\n\t\t\tline = strings.TrimPrefix(line, \"\\t\\t\")\n\t\t\tparts := strings.SplitN(line, \"  \", 2)\n\t\t\tif len(parts) >= 2 && currentVendor != \"\" && currentDevice != \"\" {\n\t\t\t\tsubsysID := strings.TrimSpace(parts[0])\n\t\t\t\tsubsysName := strings.TrimSpace(parts[1])\n\t\t\t\tkey := fmt.Sprintf(\"%s:%s\", currentVendor, currentDevice)\n\t\t\t\tif c.pciSubsystems[key] == nil {\n\t\t\t\t\tc.pciSubsystems[key] = make(map[string]string)\n\t\t\t\t}\n\t\t\t\t// Convert subsystem ID from \"vendor device\" format to \"vendor:device\" format\n\t\t\t\tsubsysParts := strings.Fields(subsysID)\n\t\t\t\tif len(subsysParts) == 2 {\n\t\t\t\t\tsubsysKey := fmt.Sprintf(\"%s:%s\", subsysParts[0], subsysParts[1])\n\t\t\t\t\tc.pciSubsystems[key][subsysKey] = subsysName\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Debug summary\n\ttotalDevices := 0\n\tfor _, devices := range c.pciDevices {\n\t\ttotalDevices += len(devices)\n\t}\n\ttotalSubsystems := 0\n\tfor _, subsystems := range c.pciSubsystems {\n\t\ttotalSubsystems += len(subsystems)\n\t}\n\n\tc.logger.Debug(\"Loaded PCI device data\",\n\t\t\"vendors\", len(c.pciVendors),\n\t\t\"devices\", totalDevices,\n\t\t\"subsystems\", totalSubsystems,\n\t\t\"classes\", len(c.pciClasses),\n\t\t\"subclasses\", len(c.pciSubclasses),\n\t\t\"progIfs\", len(c.pciProgIfs),\n\t)\n}\n\n// getPCIVendorName converts PCI vendor ID to human-readable string using pci.ids\nfunc (c *pcideviceCollector) getPCIVendorName(vendorID string) string {\n\t// Return original ID if name resolution is disabled\n\tif !c.pciNames {\n\t\treturn vendorID\n\t}\n\n\t// Remove \"0x\" prefix if present\n\tvendorID = strings.TrimPrefix(vendorID, \"0x\")\n\tvendorID = strings.ToLower(vendorID)\n\n\tif name, ok := c.pciVendors[vendorID]; ok {\n\t\treturn name\n\t}\n\treturn vendorID // Return ID if name not found\n}\n\n// getPCIDeviceName converts PCI device ID to human-readable string using pci.ids\nfunc (c *pcideviceCollector) getPCIDeviceName(vendorID, deviceID string) string {\n\t// Return original ID if name resolution is disabled\n\tif !c.pciNames {\n\t\treturn deviceID\n\t}\n\n\t// Remove \"0x\" prefix if present\n\tvendorID = strings.TrimPrefix(vendorID, \"0x\")\n\tdeviceID = strings.TrimPrefix(deviceID, \"0x\")\n\tvendorID = strings.ToLower(vendorID)\n\tdeviceID = strings.ToLower(deviceID)\n\n\tif devices, ok := c.pciDevices[vendorID]; ok {\n\t\tif name, ok := devices[deviceID]; ok {\n\t\t\treturn name\n\t\t}\n\t}\n\treturn deviceID // Return ID if name not found\n}\n\n// getPCISubsystemName converts PCI subsystem ID to human-readable string using pci.ids\nfunc (c *pcideviceCollector) getPCISubsystemName(vendorID, deviceID, subsysVendorID, subsysDeviceID string) string {\n\t// Return original ID if name resolution is disabled\n\tif !c.pciNames {\n\t\treturn subsysDeviceID\n\t}\n\n\t// Normalize all IDs\n\tvendorID = strings.TrimPrefix(vendorID, \"0x\")\n\tdeviceID = strings.TrimPrefix(deviceID, \"0x\")\n\tsubsysVendorID = strings.TrimPrefix(subsysVendorID, \"0x\")\n\tsubsysDeviceID = strings.TrimPrefix(subsysDeviceID, \"0x\")\n\n\tkey := fmt.Sprintf(\"%s:%s\", vendorID, deviceID)\n\tsubsysKey := fmt.Sprintf(\"%s:%s\", subsysVendorID, subsysDeviceID)\n\n\tif subsystems, ok := c.pciSubsystems[key]; ok {\n\t\tif name, ok := subsystems[subsysKey]; ok {\n\t\t\treturn name\n\t\t}\n\t}\n\treturn subsysDeviceID\n}\n\n// getPCIClassName converts PCI class ID to human-readable string using pci.ids\nfunc (c *pcideviceCollector) getPCIClassName(classID string) string {\n\t// Return original ID if name resolution is disabled\n\tif !c.pciNames {\n\t\treturn classID\n\t}\n\n\t// Remove \"0x\" prefix if present and normalize\n\tclassID = strings.TrimPrefix(classID, \"0x\")\n\tclassID = strings.ToLower(classID)\n\n\t// Try to find the programming interface first (6 digits: base class + subclass + programming interface)\n\tif len(classID) >= 6 {\n\t\tprogIf := classID[:6]\n\t\tif className, exists := c.pciProgIfs[progIf]; exists {\n\t\t\treturn className\n\t\t}\n\t}\n\n\t// Try to find the subclass (4 digits: base class + subclass)\n\tif len(classID) >= 4 {\n\t\tsubclass := classID[:4]\n\t\tif className, exists := c.pciSubclasses[subclass]; exists {\n\t\t\treturn className\n\t\t}\n\t}\n\n\t// If not found, try with just the base class (first 2 digits)\n\tif len(classID) >= 2 {\n\t\tbaseClass := classID[:2]\n\t\tif className, exists := c.pciClasses[baseClass]; exists {\n\t\t\treturn className\n\t\t}\n\t}\n\n\t// Return the original class ID if not found\n\treturn \"Unknown class (\" + classID + \")\"\n}\n"
  },
  {
    "path": "collector/pcidevice_linux_test.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nopcidevice\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/client_golang/prometheus/testutil\"\n)\n\nfunc TestPCICollectorWithNameResolution(t *testing.T) {\n\t// Test the PCI collector with name resolution enabled and compare against expected output\n\tif _, err := kingpin.CommandLine.Parse([]string{\n\t\t\"--path.sysfs\", \"fixtures/sys\",\n\t\t\"--path.procfs\", \"fixtures/proc\",\n\t\t\"--path.rootfs\", \"fixtures\",\n\t\t\"--collector.pcidevice\",\n\t\t\"--collector.pcidevice.names\",\n\t\t//\t\"--collector.pcidevice.idsfile\", \"/usr/share/misc/pci.ids\",\n\t\t\"--collector.pcidevice.idsfile\", \"fixtures/pci.ids\",\n\t}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tlogger := slog.New(slog.NewTextHandler(io.Discard, nil))\n\tc, err := NewPcideviceCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\treg := prometheus.NewRegistry()\n\treg.MustRegister(&testPCICollector{pc: c})\n\n\t// Read expected output from fixture file\n\texpectedOutput, err := os.ReadFile(\"fixtures/pcidevice-names-output.txt\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\terr = testutil.GatherAndCompare(reg, strings.NewReader(string(expectedOutput)))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n\n// testPCICollector wraps the PCI collector for testing\ntype testPCICollector struct {\n\tpc Collector\n}\n\nfunc (tc *testPCICollector) Collect(ch chan<- prometheus.Metric) {\n\tsink := make(chan prometheus.Metric)\n\tgo func() {\n\t\terr := tc.pc.Update(sink)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"failed to update collector: %s\", err))\n\t\t}\n\t\tclose(sink)\n\t}()\n\n\tfor m := range sink {\n\t\tch <- m\n\t}\n}\n\nfunc (tc *testPCICollector) Describe(ch chan<- *prometheus.Desc) {\n\t// No-op for testing\n}\n"
  },
  {
    "path": "collector/perf_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noperf\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/hodgesds/perf-utils\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\tperfSubsystem = \"perf\"\n)\n\nvar (\n\tperfCPUsFlag       = kingpin.Flag(\"collector.perf.cpus\", \"List of CPUs from which perf metrics should be collected\").Default(\"\").String()\n\tperfTracepointFlag = kingpin.Flag(\"collector.perf.tracepoint\", \"perf tracepoint that should be collected\").Strings()\n\tperfNoHwProfiler   = kingpin.Flag(\"collector.perf.disable-hardware-profilers\", \"disable perf hardware profilers\").Default(\"false\").Bool()\n\tperfHwProfilerFlag = kingpin.Flag(\"collector.perf.hardware-profilers\", \"perf hardware profilers that should be collected\").Strings()\n\tperfNoSwProfiler   = kingpin.Flag(\"collector.perf.disable-software-profilers\", \"disable perf software profilers\").Default(\"false\").Bool()\n\tperfSwProfilerFlag = kingpin.Flag(\"collector.perf.software-profilers\", \"perf software profilers that should be collected\").Strings()\n\tperfNoCaProfiler   = kingpin.Flag(\"collector.perf.disable-cache-profilers\", \"disable perf cache profilers\").Default(\"false\").Bool()\n\tperfCaProfilerFlag = kingpin.Flag(\"collector.perf.cache-profilers\", \"perf cache profilers that should be collected\").Strings()\n)\n\nfunc init() {\n\tregisterCollector(perfSubsystem, defaultDisabled, NewPerfCollector)\n}\n\nvar (\n\tperfHardwareProfilerMap = map[string]perf.HardwareProfilerType{\n\t\t\"CpuCycles\":             perf.CpuCyclesProfiler,\n\t\t\"CpuInstr\":              perf.CpuInstrProfiler,\n\t\t\"CacheRef\":              perf.CacheRefProfiler,\n\t\t\"CacheMisses\":           perf.CacheMissesProfiler,\n\t\t\"BranchInstr\":           perf.BranchInstrProfiler,\n\t\t\"BranchMisses\":          perf.BranchMissesProfiler,\n\t\t\"StalledCyclesBackend\":  perf.StalledCyclesBackendProfiler,\n\t\t\"StalledCyclesFrontend\": perf.StalledCyclesFrontendProfiler,\n\t\t\"RefCpuCycles\":          perf.RefCpuCyclesProfiler,\n\t\t// \"BusCycles\":             perf.BusCyclesProfiler,\n\t}\n\tperfSoftwareProfilerMap = map[string]perf.SoftwareProfilerType{\n\t\t\"PageFault\":     perf.PageFaultProfiler,\n\t\t\"ContextSwitch\": perf.ContextSwitchProfiler,\n\t\t\"CpuMigration\":  perf.CpuMigrationProfiler,\n\t\t\"MinorFault\":    perf.MinorFaultProfiler,\n\t\t\"MajorFault\":    perf.MajorFaultProfiler,\n\t\t// \"CpuClock\":      perf.CpuClockProfiler,\n\t\t// \"TaskClock\":     perf.TaskClockProfiler,\n\t\t// \"AlignFault\":    perf.AlignFaultProfiler,\n\t\t// \"EmuFault\":      perf.EmuFaultProfiler,\n\t}\n\tperfCacheProfilerMap = map[string]perf.CacheProfilerType{\n\t\t\"L1DataReadHit\":    perf.L1DataReadHitProfiler,\n\t\t\"L1DataReadMiss\":   perf.L1DataReadMissProfiler,\n\t\t\"L1DataWriteHit\":   perf.L1DataWriteHitProfiler,\n\t\t\"L1InstrReadMiss\":  perf.L1InstrReadMissProfiler,\n\t\t\"LLReadHit\":        perf.LLReadHitProfiler,\n\t\t\"LLReadMiss\":       perf.LLReadMissProfiler,\n\t\t\"LLWriteHit\":       perf.LLWriteHitProfiler,\n\t\t\"LLWriteMiss\":      perf.LLWriteMissProfiler,\n\t\t\"InstrTLBReadHit\":  perf.InstrTLBReadHitProfiler,\n\t\t\"InstrTLBReadMiss\": perf.InstrTLBReadMissProfiler,\n\t\t\"BPUReadHit\":       perf.BPUReadHitProfiler,\n\t\t\"BPUReadMiss\":      perf.BPUReadMissProfiler,\n\t\t// \"L1InstrReadHit\":     perf.L1InstrReadHitProfiler,\n\t\t\"DataTLBReadHit\":   perf.DataTLBReadHitProfiler,\n\t\t\"DataTLBReadMiss\":  perf.DataTLBReadMissProfiler,\n\t\t\"DataTLBWriteHit\":  perf.DataTLBWriteHitProfiler,\n\t\t\"DataTLBWriteMiss\": perf.DataTLBWriteMissProfiler,\n\t\t// \"NodeCacheReadHit\":   perf.NodeCacheReadHitProfiler,\n\t\t// \"NodeCacheReadMiss\":  perf.NodeCacheReadMissProfiler,\n\t\t// \"NodeCacheWriteHit\":  perf.NodeCacheWriteHitProfiler,\n\t\t// \"NodeCacheWriteMiss\": perf.NodeCacheWriteMissProfiler,\n\t}\n)\n\n// perfTracepointFlagToTracepoints returns the set of configured tracepoints.\nfunc perfTracepointFlagToTracepoints(tracepointsFlag []string) ([]*perfTracepoint, error) {\n\ttracepoints := make([]*perfTracepoint, len(tracepointsFlag))\n\n\tfor i, tracepoint := range tracepointsFlag {\n\t\tsplit := strings.Split(tracepoint, \":\")\n\t\tif len(split) != 2 {\n\t\t\treturn nil, fmt.Errorf(\"invalid tracepoint config %v\", tracepoint)\n\t\t}\n\t\ttracepoints[i] = &perfTracepoint{\n\t\t\tsubsystem: split[0],\n\t\t\tevent:     split[1],\n\t\t}\n\t}\n\treturn tracepoints, nil\n}\n\n// perfCPUFlagToCPUs returns a set of CPUs for the perf collectors to monitor.\nfunc perfCPUFlagToCPUs(cpuFlag string) ([]int, error) {\n\tvar err error\n\tcpus := []int{}\n\tfor subset := range strings.SplitSeq(cpuFlag, \",\") {\n\t\t// First parse a single CPU.\n\t\tif !strings.Contains(subset, \"-\") {\n\t\t\tcpu, err := strconv.Atoi(subset)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcpus = append(cpus, cpu)\n\t\t\tcontinue\n\t\t}\n\n\t\tstride := 1\n\t\t// Handle strides, ie 1-10:5 should yield 1,5,10\n\t\tstrideSet := strings.Split(subset, \":\")\n\t\tif len(strideSet) == 2 {\n\t\t\tstride, err = strconv.Atoi(strideSet[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\trangeSet := strings.Split(strideSet[0], \"-\")\n\t\tif len(rangeSet) != 2 {\n\t\t\treturn nil, fmt.Errorf(\"invalid flag value %q\", cpuFlag)\n\t\t}\n\t\tstart, err := strconv.Atoi(rangeSet[0])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tend, err := strconv.Atoi(rangeSet[1])\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor i := start; i <= end; i += stride {\n\t\t\tcpus = append(cpus, i)\n\t\t}\n\t}\n\n\treturn cpus, nil\n}\n\n// perfTracepoint is a struct for holding tracepoint information.\ntype perfTracepoint struct {\n\tsubsystem string\n\tevent     string\n}\n\n// label returns the tracepoint name in the format of subsystem_tracepoint.\nfunc (t *perfTracepoint) label() string {\n\treturn t.subsystem + \"_\" + t.event\n}\n\n// tracepoint returns the tracepoint name in the format of subsystem:tracepoint.\nfunc (t *perfTracepoint) tracepoint() string {\n\treturn t.subsystem + \":\" + t.event\n}\n\n// perfCollector is a Collector that uses the perf subsystem to collect\n// metrics. It uses perf_event_open an ioctls for profiling. Due to the fact\n// that the perf subsystem is highly dependent on kernel configuration and\n// settings not all profiler values may be exposed on the target system at any\n// given time.\ntype perfCollector struct {\n\thwProfilerCPUMap    map[*perf.HardwareProfiler]int\n\tswProfilerCPUMap    map[*perf.SoftwareProfiler]int\n\tcacheProfilerCPUMap map[*perf.CacheProfiler]int\n\tperfHwProfilers     map[int]*perf.HardwareProfiler\n\tperfSwProfilers     map[int]*perf.SoftwareProfiler\n\tperfCacheProfilers  map[int]*perf.CacheProfiler\n\tdesc                map[string]*prometheus.Desc\n\tlogger              *slog.Logger\n\ttracepointCollector *perfTracepointCollector\n}\n\ntype perfTracepointCollector struct {\n\t// desc is the mapping of subsystem to tracepoint *prometheus.Desc.\n\tdescs map[string]map[string]*prometheus.Desc\n\t// collection order is the sorted configured collection order of the profiler.\n\tcollectionOrder []string\n\n\tlogger    *slog.Logger\n\tprofilers map[int]perf.GroupProfiler\n}\n\n// update is used collect all tracepoints across all tracepoint profilers.\nfunc (c *perfTracepointCollector) update(ch chan<- prometheus.Metric) error {\n\tfor cpu := range c.profilers {\n\t\tif err := c.updateCPU(cpu, ch); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// updateCPU is used to update metrics per CPU profiler.\nfunc (c *perfTracepointCollector) updateCPU(cpu int, ch chan<- prometheus.Metric) error {\n\tprofiler := c.profilers[cpu]\n\tp := &perf.GroupProfileValue{}\n\tif err := profiler.Profile(p); err != nil {\n\t\tc.logger.Error(\"Failed to collect tracepoint profile\", \"err\", err)\n\t\treturn err\n\t}\n\n\tcpuid := strconv.Itoa(cpu)\n\n\tfor i, value := range p.Values {\n\t\t// Get the Desc from the ordered group value.\n\t\tdescKey := c.collectionOrder[i]\n\t\tdescKeySlice := strings.Split(descKey, \":\")\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.descs[descKeySlice[0]][descKeySlice[1]],\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(value),\n\t\t\tcpuid,\n\t\t)\n\t}\n\treturn nil\n}\n\n// newPerfTracepointCollector returns a configured perfTracepointCollector.\nfunc newPerfTracepointCollector(\n\tlogger *slog.Logger,\n\ttracepointsFlag []string,\n\tcpus []int,\n) (*perfTracepointCollector, error) {\n\ttracepoints, err := perfTracepointFlagToTracepoints(tracepointsFlag)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcollectionOrder := make([]string, len(tracepoints))\n\tdescs := map[string]map[string]*prometheus.Desc{}\n\teventAttrs := make([]unix.PerfEventAttr, len(tracepoints))\n\n\tfor i, tracepoint := range tracepoints {\n\t\teventAttr, err := perf.TracepointEventAttr(tracepoint.subsystem, tracepoint.event)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\teventAttrs[i] = *eventAttr\n\t\tcollectionOrder[i] = tracepoint.tracepoint()\n\t\tif _, ok := descs[tracepoint.subsystem]; !ok {\n\t\t\tdescs[tracepoint.subsystem] = map[string]*prometheus.Desc{}\n\t\t}\n\t\tdescs[tracepoint.subsystem][tracepoint.event] = prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\ttracepoint.label(),\n\t\t\t),\n\t\t\t\"Perf tracepoint \"+tracepoint.tracepoint(),\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t)\n\t}\n\n\tprofilers := make(map[int]perf.GroupProfiler, len(cpus))\n\tfor _, cpu := range cpus {\n\t\tprofiler, err := perf.NewGroupProfiler(-1, cpu, 0, eventAttrs...)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tprofilers[cpu] = profiler\n\t}\n\n\tc := &perfTracepointCollector{\n\t\tdescs:           descs,\n\t\tcollectionOrder: collectionOrder,\n\t\tprofilers:       profilers,\n\t\tlogger:          logger,\n\t}\n\n\tfor _, profiler := range c.profilers {\n\t\tif err := profiler.Start(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\treturn c, nil\n}\n\n// NewPerfCollector returns a new perf based collector, it creates a profiler\n// per CPU.\nfunc NewPerfCollector(logger *slog.Logger) (Collector, error) {\n\tcollector := &perfCollector{\n\t\tperfHwProfilers:     map[int]*perf.HardwareProfiler{},\n\t\tperfSwProfilers:     map[int]*perf.SoftwareProfiler{},\n\t\tperfCacheProfilers:  map[int]*perf.CacheProfiler{},\n\t\thwProfilerCPUMap:    map[*perf.HardwareProfiler]int{},\n\t\tswProfilerCPUMap:    map[*perf.SoftwareProfiler]int{},\n\t\tcacheProfilerCPUMap: map[*perf.CacheProfiler]int{},\n\t\tlogger:              logger,\n\t}\n\n\tvar (\n\t\tcpus []int\n\t\terr  error\n\t)\n\tif perfCPUsFlag != nil && *perfCPUsFlag != \"\" {\n\t\tcpus, err = perfCPUFlagToCPUs(*perfCPUsFlag)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\tcpus = make([]int, runtime.NumCPU())\n\t\tfor i := range cpus {\n\t\t\tcpus[i] = i\n\t\t}\n\t}\n\n\t// First configure any tracepoints.\n\tif len(*perfTracepointFlag) > 0 {\n\t\ttracepointCollector, err := newPerfTracepointCollector(logger, *perfTracepointFlag, cpus)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tcollector.tracepointCollector = tracepointCollector\n\t}\n\n\t// Configure perf profilers\n\thardwareProfilers := perf.AllHardwareProfilers\n\tif len(*perfHwProfilerFlag) > 0 {\n\t\t// hardwareProfilers = 0\n\t\tfor _, hf := range *perfHwProfilerFlag {\n\t\t\tif v, ok := perfHardwareProfilerMap[hf]; ok {\n\t\t\t\thardwareProfilers |= v\n\t\t\t}\n\t\t}\n\t}\n\tsoftwareProfilers := perf.AllSoftwareProfilers\n\tif len(*perfSwProfilerFlag) > 0 {\n\t\t// softwareProfilers = 0\n\t\tfor _, sf := range *perfSwProfilerFlag {\n\t\t\tif v, ok := perfSoftwareProfilerMap[sf]; ok {\n\t\t\t\tsoftwareProfilers |= v\n\t\t\t}\n\t\t}\n\t}\n\tcacheProfilers := perf.L1DataReadHitProfiler | perf.L1DataReadMissProfiler | perf.L1DataWriteHitProfiler | perf.L1InstrReadMissProfiler | perf.InstrTLBReadHitProfiler | perf.InstrTLBReadMissProfiler | perf.DataTLBReadHitProfiler | perf.DataTLBReadMissProfiler | perf.DataTLBWriteHitProfiler | perf.DataTLBWriteMissProfiler | perf.LLReadHitProfiler | perf.LLReadMissProfiler | perf.LLWriteHitProfiler | perf.LLWriteMissProfiler | perf.BPUReadHitProfiler | perf.BPUReadMissProfiler\n\tif len(*perfCaProfilerFlag) > 0 {\n\t\tcacheProfilers = 0\n\t\tfor _, cf := range *perfCaProfilerFlag {\n\t\t\tif v, ok := perfCacheProfilerMap[cf]; ok {\n\t\t\t\tcacheProfilers |= v\n\t\t\t}\n\t\t}\n\t}\n\n\t// Configure all profilers for the specified CPUs.\n\tfor _, cpu := range cpus {\n\t\t// Use -1 to profile all processes on the CPU, see:\n\t\t// man perf_event_open\n\t\tif !*perfNoHwProfiler {\n\t\t\thwProf, err := perf.NewHardwareProfiler(\n\t\t\t\t-1,\n\t\t\t\tcpu,\n\t\t\t\thardwareProfilers,\n\t\t\t)\n\t\t\tif err != nil && !hwProf.HasProfilers() {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif err := hwProf.Start(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcollector.perfHwProfilers[cpu] = &hwProf\n\t\t\tcollector.hwProfilerCPUMap[&hwProf] = cpu\n\t\t}\n\n\t\tif !*perfNoSwProfiler {\n\t\t\tswProf, err := perf.NewSoftwareProfiler(-1, cpu, softwareProfilers)\n\t\t\tif err != nil && !swProf.HasProfilers() {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif err := swProf.Start(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcollector.perfSwProfilers[cpu] = &swProf\n\t\t\tcollector.swProfilerCPUMap[&swProf] = cpu\n\t\t}\n\n\t\tif !*perfNoCaProfiler {\n\t\t\tcacheProf, err := perf.NewCacheProfiler(\n\t\t\t\t-1,\n\t\t\t\tcpu,\n\t\t\t\tcacheProfilers,\n\t\t\t)\n\t\t\tif err != nil && !cacheProf.HasProfilers() {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif err := cacheProf.Start(); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcollector.perfCacheProfilers[cpu] = &cacheProf\n\t\t\tcollector.cacheProfilerCPUMap[&cacheProf] = cpu\n\t\t}\n\t}\n\n\tcollector.desc = map[string]*prometheus.Desc{\n\t\t\"cpucycles_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cpucycles_total\",\n\t\t\t),\n\t\t\t\"Number of CPU cycles (frequency scaled)\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"instructions_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"instructions_total\",\n\t\t\t),\n\t\t\t\"Number of CPU instructions\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"branch_instructions_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"branch_instructions_total\",\n\t\t\t),\n\t\t\t\"Number of CPU branch instructions\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"branch_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"branch_misses_total\",\n\t\t\t),\n\t\t\t\"Number of CPU branch misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_refs_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_refs_total\",\n\t\t\t),\n\t\t\t\"Number of cache references (non frequency scaled)\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_misses_total\",\n\t\t\t),\n\t\t\t\"Number of cache misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"ref_cpucycles_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"ref_cpucycles_total\",\n\t\t\t),\n\t\t\t\"Number of CPU cycles\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"stalled_cycles_backend_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"stalled_cycles_backend_total\",\n\t\t\t),\n\t\t\t\"Number of stalled backend CPU cycles\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"stalled_cycles_frontend_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"stalled_cycles_frontend_total\",\n\t\t\t),\n\t\t\t\"Number of stalled frontend CPU cycles\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"page_faults_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"page_faults_total\",\n\t\t\t),\n\t\t\t\"Number of page faults\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"context_switches_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"context_switches_total\",\n\t\t\t),\n\t\t\t\"Number of context switches\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cpu_migrations_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cpu_migrations_total\",\n\t\t\t),\n\t\t\t\"Number of CPU process migrations\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"minor_faults_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"minor_faults_total\",\n\t\t\t),\n\t\t\t\"Number of minor page faults\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"major_faults_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"major_faults_total\",\n\t\t\t),\n\t\t\t\"Number of major page faults\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_l1d_read_hits_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_l1d_read_hits_total\",\n\t\t\t),\n\t\t\t\"Number L1 data cache read hits\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_l1d_read_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_l1d_read_misses_total\",\n\t\t\t),\n\t\t\t\"Number L1 data cache read misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_l1d_write_hits_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_l1d_write_hits_total\",\n\t\t\t),\n\t\t\t\"Number L1 data cache write hits\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_l1_instr_read_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_l1_instr_read_misses_total\",\n\t\t\t),\n\t\t\t\"Number instruction L1 instruction read misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_tlb_instr_read_hits_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_tlb_instr_read_hits_total\",\n\t\t\t),\n\t\t\t\"Number instruction TLB read hits\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_tlb_instr_read_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_tlb_instr_read_misses_total\",\n\t\t\t),\n\t\t\t\"Number instruction TLB read misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_tlb_data_read_hits_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_tlb_data_read_hits_total\",\n\t\t\t),\n\t\t\t\"Number of data TLB read hits\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_tlb_data_read_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_tlb_data_read_misses_total\",\n\t\t\t),\n\t\t\t\"Number of data TLB read misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_tlb_data_write_hits_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_tlb_data_write_hits_total\",\n\t\t\t),\n\t\t\t\"Number of data TLB write hits\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_tlb_data_write_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_tlb_data_write_misses_total\",\n\t\t\t),\n\t\t\t\"Number of data TLB write misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_ll_read_hits_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_ll_read_hits_total\",\n\t\t\t),\n\t\t\t\"Number last level read hits\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_ll_read_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_ll_read_misses_total\",\n\t\t\t),\n\t\t\t\"Number last level read misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_ll_write_hits_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_ll_write_hits_total\",\n\t\t\t),\n\t\t\t\"Number last level write hits\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_ll_write_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_ll_write_misses_total\",\n\t\t\t),\n\t\t\t\"Number last level write misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_bpu_read_hits_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_bpu_read_hits_total\",\n\t\t\t),\n\t\t\t\"Number BPU read hits\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t\t\"cache_bpu_read_misses_total\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(\n\t\t\t\tnamespace,\n\t\t\t\tperfSubsystem,\n\t\t\t\t\"cache_bpu_read_misses_total\",\n\t\t\t),\n\t\t\t\"Number BPU read misses\",\n\t\t\t[]string{\"cpu\"},\n\t\t\tnil,\n\t\t),\n\t}\n\n\treturn collector, nil\n}\n\n// Update implements the Collector interface and will collect metrics per CPU.\nfunc (c *perfCollector) Update(ch chan<- prometheus.Metric) error {\n\tif err := c.updateHardwareStats(ch); err != nil {\n\t\treturn err\n\t}\n\n\tif err := c.updateSoftwareStats(ch); err != nil {\n\t\treturn err\n\t}\n\n\tif err := c.updateCacheStats(ch); err != nil {\n\t\treturn err\n\t}\n\tif c.tracepointCollector != nil {\n\t\treturn c.tracepointCollector.update(ch)\n\t}\n\n\treturn nil\n}\n\nfunc (c *perfCollector) updateHardwareStats(ch chan<- prometheus.Metric) error {\n\tfor _, profiler := range c.perfHwProfilers {\n\t\thwProfile := &perf.HardwareProfile{}\n\t\tif err := (*profiler).Profile(hwProfile); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tcpuid := strconv.Itoa(c.hwProfilerCPUMap[profiler])\n\n\t\tif hwProfile.CPUCycles != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cpucycles_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.CPUCycles),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif hwProfile.Instructions != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"instructions_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.Instructions),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif hwProfile.BranchInstr != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"branch_instructions_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.BranchInstr),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif hwProfile.BranchMisses != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"branch_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.BranchMisses),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif hwProfile.CacheRefs != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_refs_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.CacheRefs),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif hwProfile.CacheMisses != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.CacheMisses),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif hwProfile.RefCPUCycles != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"ref_cpucycles_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.RefCPUCycles),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif hwProfile.StalledCyclesBackend != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"stalled_cycles_backend_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.StalledCyclesBackend),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif hwProfile.StalledCyclesFrontend != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"stalled_cycles_frontend_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*hwProfile.StalledCyclesFrontend),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *perfCollector) updateSoftwareStats(ch chan<- prometheus.Metric) error {\n\tfor _, profiler := range c.perfSwProfilers {\n\t\tswProfile := &perf.SoftwareProfile{}\n\t\tif err := (*profiler).Profile(swProfile); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tcpuid := strconv.Itoa(c.swProfilerCPUMap[profiler])\n\n\t\tif swProfile.PageFaults != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"page_faults_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*swProfile.PageFaults),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif swProfile.ContextSwitches != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"context_switches_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*swProfile.ContextSwitches),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif swProfile.CPUMigrations != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cpu_migrations_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*swProfile.CPUMigrations),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif swProfile.MinorPageFaults != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"minor_faults_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*swProfile.MinorPageFaults),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif swProfile.MajorPageFaults != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"major_faults_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*swProfile.MajorPageFaults),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *perfCollector) updateCacheStats(ch chan<- prometheus.Metric) error {\n\tfor _, profiler := range c.perfCacheProfilers {\n\t\tcacheProfile := &perf.CacheProfile{}\n\t\tif err := (*profiler).Profile(cacheProfile); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tcpuid := strconv.Itoa(c.cacheProfilerCPUMap[profiler])\n\n\t\tif cacheProfile.L1DataReadHit != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_l1d_read_hits_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.L1DataReadHit),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.L1DataReadMiss != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_l1d_read_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.L1DataReadMiss),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.L1DataWriteHit != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_l1d_write_hits_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.L1DataWriteHit),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.L1InstrReadMiss != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_l1_instr_read_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.L1InstrReadMiss),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.InstrTLBReadHit != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_tlb_instr_read_hits_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.InstrTLBReadHit),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.InstrTLBReadMiss != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_tlb_instr_read_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.InstrTLBReadMiss),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.DataTLBReadHit != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_tlb_data_read_hits_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.DataTLBReadHit),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.DataTLBReadMiss != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_tlb_data_read_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.DataTLBReadMiss),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.DataTLBWriteHit != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_tlb_data_write_hits_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.DataTLBWriteHit),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.DataTLBWriteMiss != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_tlb_data_write_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.DataTLBWriteMiss),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.LastLevelReadHit != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_ll_read_hits_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.LastLevelReadHit),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.LastLevelReadMiss != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_ll_read_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.LastLevelReadMiss),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.LastLevelWriteHit != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_ll_write_hits_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.LastLevelWriteHit),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.LastLevelWriteMiss != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_ll_write_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.LastLevelWriteMiss),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.BPUReadHit != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_bpu_read_hits_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.BPUReadHit),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\n\t\tif cacheProfile.BPUReadMiss != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.desc[\"cache_bpu_read_misses_total\"],\n\t\t\t\tprometheus.CounterValue, float64(*cacheProfile.BPUReadMiss),\n\t\t\t\tcpuid,\n\t\t\t)\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/perf_linux_test.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noperf\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nfunc canTestPerf(t *testing.T) {\n\tparanoidBytes, err := os.ReadFile(\"/proc/sys/kernel/perf_event_paranoid\")\n\tif err != nil {\n\t\tt.Skip(\"Procfs not mounted, skipping perf tests\")\n\t}\n\tparanoidStr := strings.ReplaceAll(string(paranoidBytes), \"\\n\", \"\")\n\tparanoid, err := strconv.Atoi(paranoidStr)\n\tif err != nil {\n\t\tt.Fatalf(\"expected perf_event_paranoid to be an int, got: %s\", paranoidStr)\n\t}\n\tif paranoid >= 1 {\n\t\tt.Skip(\"Skipping perf tests, set perf_event_paranoid to 0\")\n\t}\n}\n\nfunc TestPerfCollector(t *testing.T) {\n\tcanTestPerf(t)\n\tcollector, err := NewPerfCollector(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\t// Setup background goroutine to capture metrics.\n\tmetrics := make(chan prometheus.Metric)\n\tdefer close(metrics)\n\tgo func() {\n\t\ti := 0\n\t\tfor range metrics {\n\t\t\ti++\n\t\t}\n\t}()\n\tif err := collector.Update(metrics); err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n\nfunc TestPerfCollectorStride(t *testing.T) {\n\tcanTestPerf(t)\n\n\ttests := []struct {\n\t\tname   string\n\t\tflag   string\n\t\texCPUs []int\n\t}{\n\t\t{\n\t\t\tname:   \"valid single CPU\",\n\t\t\tflag:   \"1\",\n\t\t\texCPUs: []int{1},\n\t\t},\n\t\t{\n\t\t\tname:   \"valid range CPUs\",\n\t\t\tflag:   \"1-5\",\n\t\t\texCPUs: []int{1, 2, 3, 4, 5},\n\t\t},\n\t\t{\n\t\t\tname:   \"valid stride\",\n\t\t\tflag:   \"1-8:2\",\n\t\t\texCPUs: []int{1, 3, 5, 7},\n\t\t},\n\t}\n\n\tfor _, test := range tests {\n\t\tt.Run(test.name, func(t *testing.T) {\n\t\t\tncpu := runtime.NumCPU()\n\t\t\tfor _, cpu := range test.exCPUs {\n\t\t\t\tif cpu > ncpu {\n\t\t\t\t\tt.Skipf(\"Skipping test because runtime.NumCPU < %d\", cpu)\n\t\t\t\t}\n\t\t\t}\n\t\t\tperfCPUsFlag = &test.flag\n\t\t\tcollector, err := NewPerfCollector(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\t\t\tif err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\n\t\t\tc := collector.(*perfCollector)\n\t\t\tfor _, cpu := range test.exCPUs {\n\t\t\t\tif _, ok := c.perfHwProfilers[cpu]; !ok {\n\t\t\t\t\tt.Fatalf(\"Expected CPU %v in hardware profilers\", cpu)\n\t\t\t\t}\n\t\t\t\tif _, ok := c.perfSwProfilers[cpu]; !ok {\n\t\t\t\t\tt.Fatalf(\"Expected CPU %v in software profilers\", cpu)\n\t\t\t\t}\n\t\t\t\tif _, ok := c.perfCacheProfilers[cpu]; !ok {\n\t\t\t\t\tt.Fatalf(\"Expected CPU %v in cache profilers\", cpu)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestPerfCPUFlagToCPUs(t *testing.T) {\n\ttests := []struct {\n\t\tname   string\n\t\tflag   string\n\t\texCpus []int\n\t\terrStr string\n\t}{\n\t\t{\n\t\t\tname:   \"valid single CPU\",\n\t\t\tflag:   \"1\",\n\t\t\texCpus: []int{1},\n\t\t},\n\t\t{\n\t\t\tname:   \"valid range CPUs\",\n\t\t\tflag:   \"1-5\",\n\t\t\texCpus: []int{1, 2, 3, 4, 5},\n\t\t},\n\t\t{\n\t\t\tname:   \"valid double digit\",\n\t\t\tflag:   \"10\",\n\t\t\texCpus: []int{10},\n\t\t},\n\t\t{\n\t\t\tname:   \"valid double digit range\",\n\t\t\tflag:   \"10-12\",\n\t\t\texCpus: []int{10, 11, 12},\n\t\t},\n\t\t{\n\t\t\tname:   \"valid double digit stride\",\n\t\t\tflag:   \"10-20:5\",\n\t\t\texCpus: []int{10, 15, 20},\n\t\t},\n\t}\n\n\tfor _, test := range tests {\n\t\tt.Run(test.name, func(t *testing.T) {\n\t\t\tcpus, err := perfCPUFlagToCPUs(test.flag)\n\t\t\tif test.errStr != \"\" {\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Fatal(\"expected error to not be nil\")\n\t\t\t\t}\n\t\t\t\tif test.errStr != err.Error() {\n\t\t\t\t\tt.Fatalf(\n\t\t\t\t\t\t\"expected error %q, got %q\",\n\t\t\t\t\t\ttest.errStr,\n\t\t\t\t\t\terr.Error(),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\t\t\tif len(cpus) != len(test.exCpus) {\n\t\t\t\tt.Fatalf(\n\t\t\t\t\t\"expected CPUs %v, got %v\",\n\t\t\t\t\ttest.exCpus,\n\t\t\t\t\tcpus,\n\t\t\t\t)\n\t\t\t}\n\t\t\tfor i := range cpus {\n\t\t\t\tif test.exCpus[i] != cpus[i] {\n\t\t\t\t\tt.Fatalf(\n\t\t\t\t\t\t\"expected CPUs %v, got %v\",\n\t\t\t\t\t\ttest.exCpus[i],\n\t\t\t\t\t\tcpus[i],\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n\nfunc TestPerfTracepointFlagToTracepoints(t *testing.T) {\n\ttests := []struct {\n\t\tname          string\n\t\tflag          []string\n\t\texTracepoints []*perfTracepoint\n\t\terrStr        string\n\t}{\n\t\t{\n\t\t\tname: \"valid single tracepoint\",\n\t\t\tflag: []string{\"sched:sched_kthread_stop\"},\n\t\t\texTracepoints: []*perfTracepoint{\n\t\t\t\t{\n\t\t\t\t\tsubsystem: \"sched\",\n\t\t\t\t\tevent:     \"sched_kthread_stop\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"valid multiple tracepoints\",\n\t\t\tflag: []string{\"sched:sched_kthread_stop\", \"sched:sched_process_fork\"},\n\t\t\texTracepoints: []*perfTracepoint{\n\t\t\t\t{\n\t\t\t\t\tsubsystem: \"sched\",\n\t\t\t\t\tevent:     \"sched_kthread_stop\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tsubsystem: \"sched\",\n\t\t\t\t\tevent:     \"sched_process_fork\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}\n\n\tfor _, test := range tests {\n\t\tt.Run(test.name, func(t *testing.T) {\n\t\t\ttracepoints, err := perfTracepointFlagToTracepoints(test.flag)\n\t\t\tif test.errStr != \"\" {\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Fatal(\"expected error to not be nil\")\n\t\t\t\t}\n\t\t\t\tif test.errStr != err.Error() {\n\t\t\t\t\tt.Fatalf(\n\t\t\t\t\t\t\"expected error %q, got %q\",\n\t\t\t\t\t\ttest.errStr,\n\t\t\t\t\t\terr.Error(),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\tt.Fatal(err)\n\t\t\t}\n\t\t\tfor i := range tracepoints {\n\t\t\t\tif test.exTracepoints[i].event != tracepoints[i].event &&\n\t\t\t\t\ttest.exTracepoints[i].subsystem != tracepoints[i].subsystem {\n\t\t\t\t\tt.Fatalf(\n\t\t\t\t\t\t\"expected tracepoint %v, got %v\",\n\t\t\t\t\t\ttest.exTracepoints[i],\n\t\t\t\t\t\ttracepoints[i],\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "collector/powersupplyclass.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nopowersupplyclass && (linux || darwin)\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\t\"regexp\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tpowerSupplyClassIgnoredPowerSupplies = kingpin.Flag(\"collector.powersupply.ignored-supplies\", \"Regexp of power supplies to ignore for powersupplyclass collector.\").Default(\"^$\").String()\n)\n\ntype powerSupplyClassCollector struct {\n\tsubsystem      string\n\tignoredPattern *regexp.Regexp\n\tmetricDescs    map[string]*prometheus.Desc\n\tlogger         *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"powersupplyclass\", defaultEnabled, NewPowerSupplyClassCollector)\n}\n\nfunc NewPowerSupplyClassCollector(logger *slog.Logger) (Collector, error) {\n\tpattern := regexp.MustCompile(*powerSupplyClassIgnoredPowerSupplies)\n\treturn &powerSupplyClassCollector{\n\t\tsubsystem:      \"power_supply\",\n\t\tignoredPattern: pattern,\n\t\tmetricDescs:    map[string]*prometheus.Desc{},\n\t\tlogger:         logger,\n\t}, nil\n}\n"
  },
  {
    "path": "collector/powersupplyclass_darwin.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nopowersupplyclass\n\npackage collector\n\n/*\n#cgo LDFLAGS: -framework IOKit -framework CoreFoundation\n#include <CoreFoundation/CFNumber.h>\n#include <CoreFoundation/CFRunLoop.h>\n#include <CoreFoundation/CFString.h>\n#include <IOKit/ps/IOPowerSources.h>\n#include <IOKit/ps/IOPSKeys.h>\n\n// values collected from IOKit Power Source APIs\n// Functions documentation available at\n// https://developer.apple.com/documentation/iokit/iopowersources_h\n// CFDictionary keys definition\n// https://developer.apple.com/documentation/iokit/iopskeys_h/defines\nstruct macos_powersupply {\n   char *Name;\n   char *PowerSourceState;\n   char *Type;\n   char *TransportType;\n   char *BatteryHealth;\n   char *HardwareSerialNumber;\n\n   int *PowerSourceID;\n   int *CurrentCapacity;\n   int *MaxCapacity;\n   int *DesignCapacity;\n   int *NominalCapacity;\n\n   int *TimeToEmpty;\n   int *TimeToFullCharge;\n\n   int *Voltage;\n   int *Current;\n\n   int *Temperature;\n\n   // boolean values\n   int *IsCharged;\n   int *IsCharging;\n   int *InternalFailure;\n   int *IsPresent;\n};\n\nint *CFDictionaryGetInt(CFDictionaryRef theDict, const void *key) {\n    CFNumberRef tmp;\n    int *value;\n\n    tmp = CFDictionaryGetValue(theDict, key);\n\n    if (tmp == NULL)\n        return NULL;\n\n    value = (int*)malloc(sizeof(int));\n    if (CFNumberGetValue(tmp, kCFNumberIntType, value)) {\n        return value;\n    }\n\n    free(value);\n    return NULL;\n}\n\nint *CFDictionaryGetBoolean(CFDictionaryRef theDict, const void *key) {\n    CFBooleanRef tmp;\n    int *value;\n\n    tmp = CFDictionaryGetValue(theDict, key);\n\n    if (tmp == NULL)\n        return NULL;\n\n    value = (int*)malloc(sizeof(int));\n    if (CFBooleanGetValue(tmp)) {\n        *value = 1;\n    } else {\n        *value = 0;\n    }\n\n    return value;\n}\n\nchar *CFDictionaryGetSring(CFDictionaryRef theDict, const void *key) {\n    CFStringRef tmp;\n    CFIndex size;\n    char *value;\n\n    tmp = CFDictionaryGetValue(theDict, key);\n\n    if (tmp == NULL)\n        return NULL;\n\n    size = CFStringGetLength(tmp) + 1;\n    value = (char*)malloc(size);\n\n    if(CFStringGetCString(tmp, value, size, kCFStringEncodingUTF8)) {\n         return value;\n    }\n\n    free(value);\n    return NULL;\n}\n\nstruct macos_powersupply* getPowerSupplyInfo(CFDictionaryRef powerSourceInformation) {\n    struct macos_powersupply *ret;\n\n    if (powerSourceInformation == NULL)\n        return NULL;\n\n    ret = (struct macos_powersupply*)malloc(sizeof(struct macos_powersupply));\n\n    ret->PowerSourceID    = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSPowerSourceIDKey));\n    ret->CurrentCapacity  = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSCurrentCapacityKey));\n    ret->MaxCapacity      = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSMaxCapacityKey));\n    ret->DesignCapacity   = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSDesignCapacityKey));\n    ret->NominalCapacity  = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSNominalCapacityKey));\n    ret->TimeToEmpty      = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSTimeToEmptyKey));\n    ret->TimeToFullCharge = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSTimeToFullChargeKey));\n    ret->Voltage          = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSVoltageKey));\n    ret->Current          = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSCurrentKey));\n    ret->Temperature      = CFDictionaryGetInt(powerSourceInformation, CFSTR(kIOPSTemperatureKey));\n\n    ret->Name = CFDictionaryGetSring(powerSourceInformation, CFSTR(kIOPSNameKey));\n    ret->PowerSourceState = CFDictionaryGetSring(powerSourceInformation, CFSTR(kIOPSPowerSourceStateKey));\n    ret->Type = CFDictionaryGetSring(powerSourceInformation, CFSTR(kIOPSTypeKey));\n    ret->TransportType = CFDictionaryGetSring(powerSourceInformation, CFSTR(kIOPSTransportTypeKey));\n    ret->BatteryHealth = CFDictionaryGetSring(powerSourceInformation, CFSTR(kIOPSBatteryHealthKey));\n    ret->HardwareSerialNumber = CFDictionaryGetSring(powerSourceInformation, CFSTR(kIOPSHardwareSerialNumberKey));\n\n    ret->IsCharged       = CFDictionaryGetBoolean(powerSourceInformation, CFSTR(kIOPSIsChargedKey));\n    ret->IsCharging      = CFDictionaryGetBoolean(powerSourceInformation, CFSTR(kIOPSIsChargingKey));\n    ret->InternalFailure = CFDictionaryGetBoolean(powerSourceInformation, CFSTR(kIOPSInternalFailureKey));\n    ret->IsPresent       = CFDictionaryGetBoolean(powerSourceInformation, CFSTR(kIOPSIsPresentKey));\n\n    return ret;\n}\n\n\n\nvoid releasePowerSupply(struct macos_powersupply *ps) {\n    free(ps->Name);\n    free(ps->PowerSourceState);\n    free(ps->Type);\n    free(ps->TransportType);\n    free(ps->BatteryHealth);\n    free(ps->HardwareSerialNumber);\n\n    free(ps->PowerSourceID);\n    free(ps->CurrentCapacity);\n    free(ps->MaxCapacity);\n    free(ps->DesignCapacity);\n    free(ps->NominalCapacity);\n    free(ps->TimeToEmpty);\n    free(ps->TimeToFullCharge);\n    free(ps->Voltage);\n    free(ps->Current);\n    free(ps->Temperature);\n\n    free(ps->IsCharged);\n    free(ps->IsCharging);\n    free(ps->InternalFailure);\n    free(ps->IsPresent);\n\n    free(ps);\n}\n*/\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nfunc (c *powerSupplyClassCollector) Update(ch chan<- prometheus.Metric) error {\n\tpsList, err := getPowerSourceList()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get IOPPowerSourcesList: %w\", err)\n\t}\n\n\tfor _, info := range psList {\n\t\tlabels := getPowerSourceDescriptorLabels(info)\n\t\tpowerSupplyName := labels[\"power_supply\"]\n\n\t\tif c.ignoredPattern.MatchString(powerSupplyName) {\n\t\t\tcontinue\n\t\t}\n\n\t\tfor name, value := range getPowerSourceDescriptorMap(info) {\n\t\t\tif value == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tprometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, c.subsystem, name),\n\t\t\t\t\tfmt.Sprintf(\"IOKit Power Source information field %s for <power_supply>.\", name),\n\t\t\t\t\t[]string{\"power_supply\"}, nil,\n\t\t\t\t),\n\t\t\t\tprometheus.GaugeValue, *value, powerSupplyName,\n\t\t\t)\n\t\t}\n\n\t\tpushEnumMetric(\n\t\t\tch,\n\t\t\tgetPowerSourceDescriptorState(info),\n\t\t\t\"power_source_state\",\n\t\t\tc.subsystem,\n\t\t\tpowerSupplyName,\n\t\t)\n\n\t\tpushEnumMetric(\n\t\t\tch,\n\t\t\tgetPowerSourceDescriptorBatteryHealth(info),\n\t\t\t\"battery_health\",\n\t\t\tc.subsystem,\n\t\t\tpowerSupplyName,\n\t\t)\n\n\t\tvar (\n\t\t\tkeys   []string\n\t\t\tvalues []string\n\t\t)\n\t\tfor name, value := range labels {\n\t\t\tif value != \"\" {\n\t\t\t\tkeys = append(keys, name)\n\t\t\t\tvalues = append(values, value)\n\t\t\t}\n\t\t}\n\t\tfieldDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"info\"),\n\t\t\t\"IOKit Power Source information for <power_supply>.\",\n\t\t\tkeys,\n\t\t\tnil,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(fieldDesc, prometheus.GaugeValue, 1.0, values...)\n\n\t\tC.releasePowerSupply(info)\n\t}\n\n\treturn nil\n}\n\n// getPowerSourceList fetches information from IOKit APIs\n//\n// Data is provided as opaque CoreFoundation references\n// C.getPowerSupplyInfo will convert those objects in something\n// easily manageable in Go.\n// https://developer.apple.com/documentation/iokit/iopowersources_h\nfunc getPowerSourceList() ([]*C.struct_macos_powersupply, error) {\n\tinfos, err := C.IOPSCopyPowerSourcesInfo()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer C.CFRelease(infos)\n\n\tpsList, err := C.IOPSCopyPowerSourcesList(infos)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif psList == C.CFArrayRef(0) {\n\t\treturn nil, nil\n\t}\n\tdefer C.CFRelease(C.CFTypeRef(psList))\n\n\tsize, err := C.CFArrayGetCount(psList)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tret := make([]*C.struct_macos_powersupply, size)\n\tfor i := C.CFIndex(0); i < size; i++ {\n\t\tps, err := C.CFArrayGetValueAtIndex(psList, i)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tdict, err := C.IOPSGetPowerSourceDescription(infos, (C.CFTypeRef)(ps))\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tinfo, err := C.getPowerSupplyInfo(dict)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tret[int(i)] = info\n\t}\n\n\treturn ret, nil\n}\n\nfunc getPowerSourceDescriptorMap(info *C.struct_macos_powersupply) map[string]*float64 {\n\treturn map[string]*float64{\n\t\t\"current_capacity\":      convertValue(info.CurrentCapacity),\n\t\t\"max_capacity\":          convertValue(info.MaxCapacity),\n\t\t\"design_capacity\":       convertValue(info.DesignCapacity),\n\t\t\"nominal_capacity\":      convertValue(info.NominalCapacity),\n\t\t\"time_to_empty_seconds\": minutesToSeconds(info.TimeToEmpty),\n\t\t\"time_to_full_seconds\":  minutesToSeconds(info.TimeToFullCharge),\n\t\t\"voltage_volt\":          scaleValue(info.Voltage, 1e3),\n\t\t\"current_ampere\":        scaleValue(info.Current, 1e3),\n\t\t\"temp_celsius\":          convertValue(info.Temperature),\n\t\t\"present\":               convertValue(info.IsPresent),\n\t\t\"charging\":              convertValue(info.IsCharging),\n\t\t\"charged\":               convertValue(info.IsCharged),\n\t\t\"internal_failure\":      convertValue(info.InternalFailure),\n\t}\n}\n\nfunc getPowerSourceDescriptorLabels(info *C.struct_macos_powersupply) map[string]string {\n\treturn map[string]string{\n\t\t\"id\":             strconv.FormatInt(int64(*info.PowerSourceID), 10),\n\t\t\"power_supply\":   C.GoString(info.Name),\n\t\t\"type\":           C.GoString(info.Type),\n\t\t\"transport_type\": C.GoString(info.TransportType),\n\t\t\"serial_number\":  C.GoString(info.HardwareSerialNumber),\n\t}\n}\n\nfunc getPowerSourceDescriptorState(info *C.struct_macos_powersupply) map[string]float64 {\n\tstateMap := map[string]float64{\n\t\t\"Off Line\":      0,\n\t\t\"AC Power\":      0,\n\t\t\"Battery Power\": 0,\n\t}\n\n\t// This field is always present\n\t// https://developer.apple.com/documentation/iokit/kiopspowersourcestatekey\n\tstateMap[C.GoString(info.PowerSourceState)] = 1\n\n\treturn stateMap\n}\n\nfunc getPowerSourceDescriptorBatteryHealth(info *C.struct_macos_powersupply) map[string]float64 {\n\t// This field is optional\n\t// https://developer.apple.com/documentation/iokit/kiopsBatteryHealthkey\n\tif info.BatteryHealth == nil {\n\t\treturn nil\n\t}\n\n\tstateMap := map[string]float64{\n\t\t\"Good\": 0,\n\t\t\"Fair\": 0,\n\t\t\"Poor\": 0,\n\t}\n\n\tstateMap[C.GoString(info.BatteryHealth)] = 1\n\n\treturn stateMap\n}\n\nfunc convertValue(value *C.int) *float64 {\n\tif value == nil {\n\t\treturn nil\n\t}\n\n\tret := new(float64)\n\t*ret = (float64)(*value)\n\treturn ret\n}\n\nfunc scaleValue(value *C.int, scale float64) *float64 {\n\tret := convertValue(value)\n\tif ret == nil {\n\t\treturn nil\n\t}\n\n\t*ret /= scale\n\n\treturn ret\n}\n\n// minutesToSeconds converts *C.int minutes into *float64 seconds.\n//\n// Only positive values will be scaled to seconds, because negative ones\n// have special meanings. I.e. -1 indicates \"Still Calculating the Time\"\nfunc minutesToSeconds(minutes *C.int) *float64 {\n\tret := convertValue(minutes)\n\tif ret == nil {\n\t\treturn nil\n\t}\n\n\tif *ret > 0 {\n\t\t*ret *= 60\n\t}\n\n\treturn ret\n}\n\nfunc pushEnumMetric(ch chan<- prometheus.Metric, values map[string]float64, name, subsystem, powerSupply string) {\n\tfor state, value := range values {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, subsystem, name),\n\t\t\t\tfmt.Sprintf(\"IOKit Power Source information field %s for <power_supply>.\", name),\n\t\t\t\t[]string{\"power_supply\", \"state\"}, nil,\n\t\t\t),\n\t\t\tprometheus.GaugeValue, value, powerSupply, state,\n\t\t)\n\t}\n}\n"
  },
  {
    "path": "collector/powersupplyclass_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nopowersupplyclass\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nfunc (c *powerSupplyClassCollector) Update(ch chan<- prometheus.Metric) error {\n\tpowerSupplyClass, err := getPowerSupplyClassInfo(c.ignoredPattern)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"could not get power_supply class info: %w\", err)\n\t}\n\tfor _, powerSupply := range powerSupplyClass {\n\n\t\tfor name, value := range map[string]*int64{\n\t\t\t\"authentic\":             powerSupply.Authentic,\n\t\t\t\"calibrate\":             powerSupply.Calibrate,\n\t\t\t\"capacity\":              powerSupply.Capacity,\n\t\t\t\"capacity_alert_max\":    powerSupply.CapacityAlertMax,\n\t\t\t\"capacity_alert_min\":    powerSupply.CapacityAlertMin,\n\t\t\t\"cyclecount\":            powerSupply.CycleCount,\n\t\t\t\"online\":                powerSupply.Online,\n\t\t\t\"present\":               powerSupply.Present,\n\t\t\t\"time_to_empty_seconds\": powerSupply.TimeToEmptyNow,\n\t\t\t\"time_to_full_seconds\":  powerSupply.TimeToFullNow,\n\t\t} {\n\t\t\tif value != nil {\n\t\t\t\tpushPowerSupplyMetric(ch, c.subsystem, name, float64(*value), powerSupply.Name, prometheus.GaugeValue)\n\t\t\t}\n\t\t}\n\n\t\tfor name, value := range map[string]*int64{\n\t\t\t\"current_boot\":                powerSupply.CurrentBoot,\n\t\t\t\"current_max\":                 powerSupply.CurrentMax,\n\t\t\t\"current_ampere\":              powerSupply.CurrentNow,\n\t\t\t\"energy_empty\":                powerSupply.EnergyEmpty,\n\t\t\t\"energy_empty_design\":         powerSupply.EnergyEmptyDesign,\n\t\t\t\"energy_full\":                 powerSupply.EnergyFull,\n\t\t\t\"energy_full_design\":          powerSupply.EnergyFullDesign,\n\t\t\t\"energy_watthour\":             powerSupply.EnergyNow,\n\t\t\t\"voltage_boot\":                powerSupply.VoltageBoot,\n\t\t\t\"voltage_max\":                 powerSupply.VoltageMax,\n\t\t\t\"voltage_max_design\":          powerSupply.VoltageMaxDesign,\n\t\t\t\"voltage_min\":                 powerSupply.VoltageMin,\n\t\t\t\"voltage_min_design\":          powerSupply.VoltageMinDesign,\n\t\t\t\"voltage_volt\":                powerSupply.VoltageNow,\n\t\t\t\"voltage_ocv\":                 powerSupply.VoltageOCV,\n\t\t\t\"charge_control_limit\":        powerSupply.ChargeControlLimit,\n\t\t\t\"charge_control_limit_max\":    powerSupply.ChargeControlLimitMax,\n\t\t\t\"charge_counter\":              powerSupply.ChargeCounter,\n\t\t\t\"charge_empty\":                powerSupply.ChargeEmpty,\n\t\t\t\"charge_empty_design\":         powerSupply.ChargeEmptyDesign,\n\t\t\t\"charge_full\":                 powerSupply.ChargeFull,\n\t\t\t\"charge_full_design\":          powerSupply.ChargeFullDesign,\n\t\t\t\"charge_ampere\":               powerSupply.ChargeNow,\n\t\t\t\"charge_term_current\":         powerSupply.ChargeTermCurrent,\n\t\t\t\"constant_charge_current\":     powerSupply.ConstantChargeCurrent,\n\t\t\t\"constant_charge_current_max\": powerSupply.ConstantChargeCurrentMax,\n\t\t\t\"constant_charge_voltage\":     powerSupply.ConstantChargeVoltage,\n\t\t\t\"constant_charge_voltage_max\": powerSupply.ConstantChargeVoltageMax,\n\t\t\t\"precharge_current\":           powerSupply.PrechargeCurrent,\n\t\t\t\"input_current_limit\":         powerSupply.InputCurrentLimit,\n\t\t\t\"power_watt\":                  powerSupply.PowerNow,\n\t\t} {\n\t\t\tif value != nil {\n\t\t\t\tpushPowerSupplyMetric(ch, c.subsystem, name, float64(*value)/1e6, powerSupply.Name, prometheus.GaugeValue)\n\t\t\t}\n\t\t}\n\n\t\tfor name, value := range map[string]*int64{\n\t\t\t\"temp_celsius\":             powerSupply.Temp,\n\t\t\t\"temp_alert_max_celsius\":   powerSupply.TempAlertMax,\n\t\t\t\"temp_alert_min_celsius\":   powerSupply.TempAlertMin,\n\t\t\t\"temp_ambient_celsius\":     powerSupply.TempAmbient,\n\t\t\t\"temp_ambient_max_celsius\": powerSupply.TempAmbientMax,\n\t\t\t\"temp_ambient_min_celsius\": powerSupply.TempAmbientMin,\n\t\t\t\"temp_max_celsius\":         powerSupply.TempMax,\n\t\t\t\"temp_min_celsius\":         powerSupply.TempMin,\n\t\t} {\n\t\t\tif value != nil {\n\t\t\t\tpushPowerSupplyMetric(ch, c.subsystem, name, float64(*value)/10.0, powerSupply.Name, prometheus.GaugeValue)\n\t\t\t}\n\t\t}\n\n\t\tvar (\n\t\t\tkeys   []string\n\t\t\tvalues []string\n\t\t)\n\t\tfor name, value := range map[string]string{\n\t\t\t\"power_supply\":   powerSupply.Name,\n\t\t\t\"capacity_level\": powerSupply.CapacityLevel,\n\t\t\t\"charge_type\":    powerSupply.ChargeType,\n\t\t\t\"health\":         powerSupply.Health,\n\t\t\t\"manufacturer\":   powerSupply.Manufacturer,\n\t\t\t\"model_name\":     powerSupply.ModelName,\n\t\t\t\"serial_number\":  powerSupply.SerialNumber,\n\t\t\t\"status\":         powerSupply.Status,\n\t\t\t\"technology\":     powerSupply.Technology,\n\t\t\t\"type\":           powerSupply.Type,\n\t\t\t\"usb_type\":       powerSupply.UsbType,\n\t\t\t\"scope\":          powerSupply.Scope,\n\t\t} {\n\t\t\tif value != \"\" {\n\t\t\t\tkeys = append(keys, name)\n\t\t\t\tvalues = append(values, strings.ToValidUTF8(value, \"�\"))\n\t\t\t}\n\t\t}\n\n\t\tfieldDesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, c.subsystem, \"info\"),\n\t\t\t\"info of /sys/class/power_supply/<power_supply>.\",\n\t\t\tkeys,\n\t\t\tnil,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(fieldDesc, prometheus.GaugeValue, 1.0, values...)\n\n\t}\n\n\treturn nil\n}\n\nfunc pushPowerSupplyMetric(ch chan<- prometheus.Metric, subsystem string, name string, value float64, powerSupplyName string, valueType prometheus.ValueType) {\n\tfieldDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, name),\n\t\tfmt.Sprintf(\"%s value of /sys/class/power_supply/<power_supply>.\", name),\n\t\t[]string{\"power_supply\"},\n\t\tnil,\n\t)\n\n\tch <- prometheus.MustNewConstMetric(fieldDesc, valueType, value, powerSupplyName)\n}\n\nfunc getPowerSupplyClassInfo(ignore *regexp.Regexp) (sysfs.PowerSupplyClass, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpowerSupplyClass, err := fs.PowerSupplyClass()\n\n\tif err != nil {\n\t\treturn powerSupplyClass, fmt.Errorf(\"error obtaining power_supply class info: %w\", err)\n\t}\n\n\tfor device := range powerSupplyClass {\n\t\tif ignore.MatchString(device) {\n\t\t\tdelete(powerSupplyClass, device)\n\t\t}\n\t}\n\n\treturn powerSupplyClass, nil\n}\n"
  },
  {
    "path": "collector/pressure_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nopressure\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"syscall\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nconst (\n\tpsiResourceCPU    = \"cpu\"\n\tpsiResourceIO     = \"io\"\n\tpsiResourceMemory = \"memory\"\n\tpsiResourceIRQ    = \"irq\"\n)\n\nvar (\n\tpsiResources = []string{psiResourceCPU, psiResourceIO, psiResourceMemory, psiResourceIRQ}\n)\n\ntype pressureStatsCollector struct {\n\tcpu     *prometheus.Desc\n\tio      *prometheus.Desc\n\tioFull  *prometheus.Desc\n\tmem     *prometheus.Desc\n\tmemFull *prometheus.Desc\n\tirqFull *prometheus.Desc\n\n\tfs procfs.FS\n\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"pressure\", defaultEnabled, NewPressureStatsCollector)\n}\n\n// NewPressureStatsCollector returns a Collector exposing pressure stall information\nfunc NewPressureStatsCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &pressureStatsCollector{\n\t\tcpu: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"pressure\", \"cpu_waiting_seconds_total\"),\n\t\t\t\"Total time in seconds that processes have waited for CPU time\",\n\t\t\tnil, nil,\n\t\t),\n\t\tio: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"pressure\", \"io_waiting_seconds_total\"),\n\t\t\t\"Total time in seconds that processes have waited due to IO congestion\",\n\t\t\tnil, nil,\n\t\t),\n\t\tioFull: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"pressure\", \"io_stalled_seconds_total\"),\n\t\t\t\"Total time in seconds no process could make progress due to IO congestion\",\n\t\t\tnil, nil,\n\t\t),\n\t\tmem: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"pressure\", \"memory_waiting_seconds_total\"),\n\t\t\t\"Total time in seconds that processes have waited for memory\",\n\t\t\tnil, nil,\n\t\t),\n\t\tmemFull: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"pressure\", \"memory_stalled_seconds_total\"),\n\t\t\t\"Total time in seconds no process could make progress due to memory congestion\",\n\t\t\tnil, nil,\n\t\t),\n\t\tirqFull: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"pressure\", \"irq_stalled_seconds_total\"),\n\t\t\t\"Total time in seconds no process could make progress due to IRQ congestion\",\n\t\t\tnil, nil,\n\t\t),\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update calls procfs.NewPSIStatsForResource for the different resources and updates the values\nfunc (c *pressureStatsCollector) Update(ch chan<- prometheus.Metric) error {\n\tfoundResources := 0\n\tfor _, res := range psiResources {\n\t\tc.logger.Debug(\"collecting statistics for resource\", \"resource\", res)\n\t\tvals, err := c.fs.PSIStatsForResource(res)\n\t\tif err != nil {\n\t\t\tif errors.Is(err, os.ErrNotExist) && res != psiResourceIRQ {\n\t\t\t\tc.logger.Debug(\"pressure information is unavailable, you need a Linux kernel >= 4.20 and/or CONFIG_PSI enabled for your kernel\", \"resource\", res)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif errors.Is(err, os.ErrNotExist) && res == psiResourceIRQ {\n\t\t\t\tc.logger.Debug(\"IRQ pressure information is unavailable, you need a Linux kernel >= 6.1 and/or CONFIG_PSI enabled for your kernel\", \"resource\", res)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif errors.Is(err, syscall.ENOTSUP) {\n\t\t\t\tc.logger.Debug(\"pressure information is disabled, add psi=1 kernel command line to enable it\")\n\t\t\t\treturn ErrNoData\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"failed to retrieve pressure stats: %w\", err)\n\t\t}\n\t\t// IRQ pressure does not have 'some' data.\n\t\t// See https://github.com/torvalds/linux/blob/v6.9/include/linux/psi_types.h#L65\n\t\tif vals.Some == nil && res != psiResourceIRQ {\n\t\t\tc.logger.Debug(\"pressure information returned no 'some' data\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\tif vals.Full == nil && res != psiResourceCPU {\n\t\t\tc.logger.Debug(\"pressure information returned no 'full' data\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\tswitch res {\n\t\tcase psiResourceCPU:\n\t\t\tch <- prometheus.MustNewConstMetric(c.cpu, prometheus.CounterValue, float64(vals.Some.Total)/1000.0/1000.0)\n\t\tcase psiResourceIO:\n\t\t\tch <- prometheus.MustNewConstMetric(c.io, prometheus.CounterValue, float64(vals.Some.Total)/1000.0/1000.0)\n\t\t\tch <- prometheus.MustNewConstMetric(c.ioFull, prometheus.CounterValue, float64(vals.Full.Total)/1000.0/1000.0)\n\t\tcase psiResourceMemory:\n\t\t\tch <- prometheus.MustNewConstMetric(c.mem, prometheus.CounterValue, float64(vals.Some.Total)/1000.0/1000.0)\n\t\t\tch <- prometheus.MustNewConstMetric(c.memFull, prometheus.CounterValue, float64(vals.Full.Total)/1000.0/1000.0)\n\t\tcase psiResourceIRQ:\n\t\t\tch <- prometheus.MustNewConstMetric(c.irqFull, prometheus.CounterValue, float64(vals.Full.Total)/1000.0/1000.0)\n\t\tdefault:\n\t\t\tc.logger.Debug(\"did not account for resource\", \"resource\", res)\n\t\t\tcontinue\n\t\t}\n\t\tfoundResources++\n\t}\n\n\tif foundResources == 0 {\n\t\tc.logger.Debug(\"pressure information is unavailable, you need a Linux kernel >= 4.20 and/or CONFIG_PSI enabled for your kernel\")\n\t\treturn ErrNoData\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/processes_linux.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noprocesses\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path\"\n\t\"strconv\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype processCollector struct {\n\tfs           procfs.FS\n\tthreadAlloc  *prometheus.Desc\n\tthreadLimit  *prometheus.Desc\n\tthreadsState *prometheus.Desc\n\tprocsState   *prometheus.Desc\n\tpidUsed      *prometheus.Desc\n\tpidMax       *prometheus.Desc\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"processes\", defaultDisabled, NewProcessStatCollector)\n}\n\n// NewProcessStatCollector returns a new Collector exposing process data read from the proc filesystem.\nfunc NewProcessStatCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\tsubsystem := \"processes\"\n\treturn &processCollector{\n\t\tfs: fs,\n\t\tthreadAlloc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"threads\"),\n\t\t\t\"Allocated threads in system\",\n\t\t\tnil, nil,\n\t\t),\n\t\tthreadLimit: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"max_threads\"),\n\t\t\t\"Limit of threads in the system\",\n\t\t\tnil, nil,\n\t\t),\n\t\tthreadsState: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"threads_state\"),\n\t\t\t\"Number of threads in each state.\",\n\t\t\t[]string{\"thread_state\"}, nil,\n\t\t),\n\t\tprocsState: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"state\"),\n\t\t\t\"Number of processes in each state.\",\n\t\t\t[]string{\"state\"}, nil,\n\t\t),\n\t\tpidUsed: prometheus.NewDesc(prometheus.BuildFQName(namespace, subsystem, \"pids\"),\n\t\t\t\"Number of PIDs\", nil, nil,\n\t\t),\n\t\tpidMax: prometheus.NewDesc(prometheus.BuildFQName(namespace, subsystem, \"max_processes\"),\n\t\t\t\"Number of max PIDs limit\", nil, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\nfunc (c *processCollector) Update(ch chan<- prometheus.Metric) error {\n\tpids, states, threads, threadStates, err := c.getAllocatedThreads()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to retrieve number of allocated threads: %w\", err)\n\t}\n\n\tch <- prometheus.MustNewConstMetric(c.threadAlloc, prometheus.GaugeValue, float64(threads))\n\tmaxThreads, err := readUintFromFile(procFilePath(\"sys/kernel/threads-max\"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to retrieve limit number of threads: %w\", err)\n\t}\n\tch <- prometheus.MustNewConstMetric(c.threadLimit, prometheus.GaugeValue, float64(maxThreads))\n\n\tfor state := range states {\n\t\tch <- prometheus.MustNewConstMetric(c.procsState, prometheus.GaugeValue, float64(states[state]), state)\n\t}\n\n\tfor state := range threadStates {\n\t\tch <- prometheus.MustNewConstMetric(c.threadsState, prometheus.GaugeValue, float64(threadStates[state]), state)\n\t}\n\n\tpidM, err := readUintFromFile(procFilePath(\"sys/kernel/pid_max\"))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to retrieve limit number of maximum pids allowed: %w\", err)\n\t}\n\tch <- prometheus.MustNewConstMetric(c.pidUsed, prometheus.GaugeValue, float64(pids))\n\tch <- prometheus.MustNewConstMetric(c.pidMax, prometheus.GaugeValue, float64(pidM))\n\n\treturn nil\n}\n\nfunc (c *processCollector) getAllocatedThreads() (int, map[string]int32, int, map[string]int32, error) {\n\tp, err := c.fs.AllProcs()\n\tif err != nil {\n\t\treturn 0, nil, 0, nil, fmt.Errorf(\"unable to list all processes: %w\", err)\n\t}\n\tpids := 0\n\tthread := 0\n\tprocStates := make(map[string]int32)\n\tthreadStates := make(map[string]int32)\n\n\tfor _, pid := range p {\n\t\tstat, err := pid.Stat()\n\t\tif err != nil {\n\t\t\t// PIDs can vanish between getting the list and getting stats.\n\t\t\tif c.isIgnoredError(err) {\n\t\t\t\tc.logger.Debug(\"file not found when retrieving stats for pid\", \"pid\", pid.PID, \"err\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tc.logger.Debug(\"error reading stat for pid\", \"pid\", pid.PID, \"err\", err)\n\t\t\treturn 0, nil, 0, nil, fmt.Errorf(\"error reading stat for pid %d: %w\", pid.PID, err)\n\t\t}\n\t\tpids++\n\t\tprocStates[stat.State]++\n\t\tthread += stat.NumThreads\n\t\terr = c.getThreadStates(pid.PID, stat, threadStates)\n\t\tif err != nil {\n\t\t\treturn 0, nil, 0, nil, err\n\t\t}\n\t}\n\treturn pids, procStates, thread, threadStates, nil\n}\n\nfunc (c *processCollector) getThreadStates(pid int, pidStat procfs.ProcStat, threadStates map[string]int32) error {\n\tfs, err := procfs.NewFS(procFilePath(path.Join(strconv.Itoa(pid), \"task\")))\n\tif err != nil {\n\t\tif c.isIgnoredError(err) {\n\t\t\tc.logger.Debug(\"file not found when retrieving tasks for pid\", \"pid\", pid, \"err\", err)\n\t\t\treturn nil\n\t\t}\n\t\tc.logger.Debug(\"error reading tasks for pid\", \"pid\", pid, \"err\", err)\n\t\treturn fmt.Errorf(\"error reading task for pid %d: %w\", pid, err)\n\t}\n\n\tt, err := fs.AllProcs()\n\tif err != nil {\n\t\tif c.isIgnoredError(err) {\n\t\t\tc.logger.Debug(\"file not found when retrieving tasks for pid\", \"pid\", pid, \"err\", err)\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"unable to list all threads for pid: %d %w\", pid, err)\n\t}\n\n\tfor _, thread := range t {\n\t\tif pid == thread.PID {\n\t\t\tthreadStates[pidStat.State]++\n\t\t\tcontinue\n\t\t}\n\t\tthreadStat, err := thread.Stat()\n\t\tif err != nil {\n\t\t\tif c.isIgnoredError(err) {\n\t\t\t\tc.logger.Debug(\"file not found when retrieving stats for thread\", \"pid\", pid, \"threadId\", thread.PID, \"err\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tc.logger.Debug(\"error reading stat for thread\", \"pid\", pid, \"threadId\", thread.PID, \"err\", err)\n\t\t\treturn fmt.Errorf(\"error reading stat for pid:%d thread:%d err:%w\", pid, thread.PID, err)\n\t\t}\n\t\tthreadStates[threadStat.State]++\n\t}\n\treturn nil\n}\n\nfunc (c *processCollector) isIgnoredError(err error) bool {\n\tif errors.Is(err, os.ErrNotExist) || strings.Contains(err.Error(), syscall.ESRCH.Error()) {\n\t\treturn true\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "collector/processes_linux_test.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noprocesses\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"testing\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/procfs\"\n)\n\nfunc TestReadProcessStatus(t *testing.T) {\n\tif _, err := kingpin.CommandLine.Parse([]string{\"--path.procfs\", \"fixtures/proc\"}); err != nil {\n\t\tt.Fatal(err)\n\t}\n\twant := 1\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\tt.Errorf(\"failed to open procfs: %v\", err)\n\t}\n\tc := processCollector{fs: fs, logger: slog.New(slog.NewTextHandler(io.Discard, nil))}\n\tpids, states, threads, _, err := c.getAllocatedThreads()\n\tif err != nil {\n\t\tt.Fatalf(\"Cannot retrieve data from procfs getAllocatedThreads function: %v \", err)\n\t}\n\tif threads < want {\n\t\tt.Fatalf(\"Current threads: %d Shouldn't be less than wanted %d\", threads, want)\n\t}\n\tif states == nil {\n\n\t\tt.Fatalf(\"Process states cannot be nil %v:\", states)\n\t}\n\tmaxPid, err := readUintFromFile(procFilePath(\"sys/kernel/pid_max\"))\n\tif err != nil {\n\t\tt.Fatalf(\"Unable to retrieve limit number of maximum pids allowed %v\\n\", err)\n\t}\n\tif uint64(pids) > maxPid || pids == 0 {\n\t\tt.Fatalf(\"Total running pids cannot be greater than %d or equals to 0\", maxPid)\n\t}\n}\n"
  },
  {
    "path": "collector/qdisc_linux.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noqdisc\n\npackage collector\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/ema/qdisc\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype qdiscStatCollector struct {\n\tlogger       *slog.Logger\n\tdeviceFilter deviceFilter\n\tbytes        typedDesc\n\tpackets      typedDesc\n\tdrops        typedDesc\n\trequeues     typedDesc\n\toverlimits   typedDesc\n\tqlength      typedDesc\n\tbacklog      typedDesc\n}\n\nvar (\n\tcollectorQdisc                 = kingpin.Flag(\"collector.qdisc.fixtures\", \"test fixtures to use for qdisc collector end-to-end testing\").Default(\"\").String()\n\tcollectorQdiscDeviceInclude    = kingpin.Flag(\"collector.qdisc.device-include\", \"Regexp of qdisc devices to include (mutually exclusive to device-exclude).\").String()\n\toldCollectorQdiskDeviceInclude = kingpin.Flag(\"collector.qdisk.device-include\", \"DEPRECATED: Use collector.qdisc.device-include\").Hidden().String()\n\tcollectorQdiscDeviceExclude    = kingpin.Flag(\"collector.qdisc.device-exclude\", \"Regexp of qdisc devices to exclude (mutually exclusive to device-include).\").String()\n\toldCollectorQdiskDeviceExclude = kingpin.Flag(\"collector.qdisk.device-exclude\", \"DEPRECATED: Use collector.qdisc.device-exclude\").Hidden().String()\n)\n\nfunc init() {\n\tregisterCollector(\"qdisc\", defaultDisabled, NewQdiscStatCollector)\n}\n\n// NewQdiscStatCollector returns a new Collector exposing queuing discipline statistics.\nfunc NewQdiscStatCollector(logger *slog.Logger) (Collector, error) {\n\tif *oldCollectorQdiskDeviceInclude != \"\" {\n\t\tif *collectorQdiscDeviceInclude == \"\" {\n\t\t\tlogger.Warn(\"--collector.qdisk.device-include is DEPRECATED and will be removed in 2.0.0, use --collector.qdisc.device-include\")\n\t\t\t*collectorQdiscDeviceInclude = *oldCollectorQdiskDeviceInclude\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"--collector.qdisk.device-include and --collector.qdisc.device-include are mutually exclusive\")\n\t\t}\n\t}\n\n\tif *oldCollectorQdiskDeviceExclude != \"\" {\n\t\tif *collectorQdiscDeviceExclude == \"\" {\n\t\t\tlogger.Warn(\"--collector.qdisk.device-exclude is DEPRECATED and will be removed in 2.0.0, use --collector.qdisc.device-exclude\")\n\t\t\t*collectorQdiscDeviceExclude = *oldCollectorQdiskDeviceExclude\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"--collector.qdisk.device-exclude and --collector.qdisc.device-exclude are mutually exclusive\")\n\t\t}\n\t}\n\n\tif *collectorQdiscDeviceExclude != \"\" && *collectorQdiscDeviceInclude != \"\" {\n\t\treturn nil, fmt.Errorf(\"collector.qdisc.device-include and collector.qdisc.device-exclude are mutaly exclusive\")\n\t}\n\n\treturn &qdiscStatCollector{\n\t\tbytes: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"qdisc\", \"bytes_total\"),\n\t\t\t\"Number of bytes sent.\",\n\t\t\t[]string{\"device\", \"kind\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\tpackets: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"qdisc\", \"packets_total\"),\n\t\t\t\"Number of packets sent.\",\n\t\t\t[]string{\"device\", \"kind\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\tdrops: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"qdisc\", \"drops_total\"),\n\t\t\t\"Number of packets dropped.\",\n\t\t\t[]string{\"device\", \"kind\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\trequeues: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"qdisc\", \"requeues_total\"),\n\t\t\t\"Number of packets dequeued, not transmitted, and requeued.\",\n\t\t\t[]string{\"device\", \"kind\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\toverlimits: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"qdisc\", \"overlimits_total\"),\n\t\t\t\"Number of overlimit packets.\",\n\t\t\t[]string{\"device\", \"kind\"}, nil,\n\t\t), prometheus.CounterValue},\n\t\tqlength: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"qdisc\", \"current_queue_length\"),\n\t\t\t\"Number of packets currently in queue to be sent.\",\n\t\t\t[]string{\"device\", \"kind\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tbacklog: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"qdisc\", \"backlog\"),\n\t\t\t\"Number of bytes currently in queue to be sent.\",\n\t\t\t[]string{\"device\", \"kind\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tlogger:       logger,\n\t\tdeviceFilter: newDeviceFilter(*collectorQdiscDeviceExclude, *collectorQdiscDeviceInclude),\n\t}, nil\n}\n\nfunc testQdiscGet(fixtures string) ([]qdisc.QdiscInfo, error) {\n\tvar res []qdisc.QdiscInfo\n\n\tb, err := os.ReadFile(filepath.Join(fixtures, \"results.json\"))\n\tif err != nil {\n\t\treturn res, err\n\t}\n\n\terr = json.Unmarshal(b, &res)\n\treturn res, err\n}\n\nfunc (c *qdiscStatCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar msgs []qdisc.QdiscInfo\n\tvar err error\n\n\tfixtures := *collectorQdisc\n\n\tif fixtures == \"\" {\n\t\tmsgs, err = qdisc.Get()\n\t} else {\n\t\tmsgs, err = testQdiscGet(fixtures)\n\t}\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, msg := range msgs {\n\t\t// Only report root qdisc information.\n\t\tif msg.Parent != 0 {\n\t\t\tcontinue\n\t\t}\n\n\t\tif c.deviceFilter.ignored(msg.IfaceName) {\n\t\t\tcontinue\n\t\t}\n\n\t\tch <- c.bytes.mustNewConstMetric(float64(msg.Bytes), msg.IfaceName, msg.Kind)\n\t\tch <- c.packets.mustNewConstMetric(float64(msg.Packets), msg.IfaceName, msg.Kind)\n\t\tch <- c.drops.mustNewConstMetric(float64(msg.Drops), msg.IfaceName, msg.Kind)\n\t\tch <- c.requeues.mustNewConstMetric(float64(msg.Requeues), msg.IfaceName, msg.Kind)\n\t\tch <- c.overlimits.mustNewConstMetric(float64(msg.Overlimits), msg.IfaceName, msg.Kind)\n\t\tch <- c.qlength.mustNewConstMetric(float64(msg.Qlen), msg.IfaceName, msg.Kind)\n\t\tch <- c.backlog.mustNewConstMetric(float64(msg.Backlog), msg.IfaceName, msg.Kind)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/rapl_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !norapl\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strconv\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nconst raplCollectorSubsystem = \"rapl\"\n\ntype raplCollector struct {\n\tfs     sysfs.FS\n\tlogger *slog.Logger\n\n\tjoulesMetricDesc *prometheus.Desc\n}\n\nfunc init() {\n\tregisterCollector(raplCollectorSubsystem, defaultEnabled, NewRaplCollector)\n}\n\nvar (\n\traplZoneLabel = kingpin.Flag(\"collector.rapl.enable-zone-label\", \"Enables service unit metric unit_start_time_seconds\").Bool()\n)\n\n// NewRaplCollector returns a new Collector exposing RAPL metrics.\nfunc NewRaplCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tjoulesMetricDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, raplCollectorSubsystem, \"joules_total\"),\n\t\t\"Current RAPL value in joules\",\n\t\t[]string{\"index\", \"path\", \"rapl_zone\"}, nil,\n\t)\n\n\tcollector := raplCollector{\n\t\tfs:               fs,\n\t\tlogger:           logger,\n\t\tjoulesMetricDesc: joulesMetricDesc,\n\t}\n\treturn &collector, nil\n}\n\n// Update implements Collector and exposes RAPL related metrics.\nfunc (c *raplCollector) Update(ch chan<- prometheus.Metric) error {\n\t// nil zones are fine when platform doesn't have powercap files present.\n\tzones, err := sysfs.GetRaplZones(c.fs)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"Platform doesn't have powercap files present\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\tif errors.Is(err, os.ErrPermission) {\n\t\t\tc.logger.Debug(\"Can't access powercap files\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"failed to retrieve rapl stats: %w\", err)\n\t}\n\n\tfor _, rz := range zones {\n\t\tmicroJoules, err := rz.GetEnergyMicrojoules()\n\t\tif err != nil {\n\t\t\tif errors.Is(err, os.ErrPermission) {\n\t\t\t\tc.logger.Debug(\"Can't access energy_uj file\", \"zone\", rz, \"err\", err)\n\t\t\t\treturn ErrNoData\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\n\t\tjoules := float64(microJoules) / 1000000.0\n\n\t\tif *raplZoneLabel {\n\t\t\tch <- c.joulesMetricWithZoneLabel(rz, joules)\n\t\t} else {\n\t\t\tch <- c.joulesMetric(rz, joules)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (c *raplCollector) joulesMetric(z sysfs.RaplZone, v float64) prometheus.Metric {\n\tindex := strconv.Itoa(z.Index)\n\tdescriptor := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(\n\t\t\tnamespace,\n\t\t\traplCollectorSubsystem,\n\t\t\tfmt.Sprintf(\"%s_joules_total\", SanitizeMetricName(z.Name)),\n\t\t),\n\t\tfmt.Sprintf(\"Current RAPL %s value in joules\", z.Name),\n\t\t[]string{\"index\", \"path\"}, nil,\n\t)\n\n\treturn prometheus.MustNewConstMetric(\n\t\tdescriptor,\n\t\tprometheus.CounterValue,\n\t\tv,\n\t\tindex,\n\t\tz.Path,\n\t)\n}\n\nfunc (c *raplCollector) joulesMetricWithZoneLabel(z sysfs.RaplZone, v float64) prometheus.Metric {\n\tindex := strconv.Itoa(z.Index)\n\n\treturn prometheus.MustNewConstMetric(\n\t\tc.joulesMetricDesc,\n\t\tprometheus.CounterValue,\n\t\tv,\n\t\tindex,\n\t\tz.Path,\n\t\tz.Name,\n\t)\n}\n"
  },
  {
    "path": "collector/runit.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !norunit\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus-community/go-runit/runit\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar runitServiceDir = kingpin.Flag(\"collector.runit.servicedir\", \"Path to runit service directory.\").Default(\"/etc/service\").String()\n\ntype runitCollector struct {\n\tstate          typedDesc\n\tstateDesired   typedDesc\n\tstateNormal    typedDesc\n\tstateTimestamp typedDesc\n\tlogger         *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"runit\", defaultDisabled, NewRunitCollector)\n}\n\n// NewRunitCollector returns a new Collector exposing runit statistics.\nfunc NewRunitCollector(logger *slog.Logger) (Collector, error) {\n\tvar (\n\t\tsubsystem   = \"service\"\n\t\tconstLabels = prometheus.Labels{\"supervisor\": \"runit\"}\n\t\tlabelNames  = []string{\"service\"}\n\t)\n\n\tlogger.Warn(\"This collector is deprecated and will be removed in the next major version release.\")\n\n\treturn &runitCollector{\n\t\tstate: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"state\"),\n\t\t\t\"State of runit service.\",\n\t\t\tlabelNames, constLabels,\n\t\t), prometheus.GaugeValue},\n\t\tstateDesired: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"desired_state\"),\n\t\t\t\"Desired state of runit service.\",\n\t\t\tlabelNames, constLabels,\n\t\t), prometheus.GaugeValue},\n\t\tstateNormal: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"normal_state\"),\n\t\t\t\"Normal state of runit service.\",\n\t\t\tlabelNames, constLabels,\n\t\t), prometheus.GaugeValue},\n\t\tstateTimestamp: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"state_last_change_timestamp_seconds\"),\n\t\t\t\"Unix timestamp of the last runit service state change.\",\n\t\t\tlabelNames, constLabels,\n\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *runitCollector) Update(ch chan<- prometheus.Metric) error {\n\tservices, err := runit.GetServices(*runitServiceDir)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, service := range services {\n\t\tstatus, err := service.Status()\n\t\tif err != nil {\n\t\t\tc.logger.Debug(\"Couldn't get status\", \"service\", service.Name, \"err\", err)\n\t\t\tcontinue\n\t\t}\n\n\t\tc.logger.Debug(\"duration\", \"service\", service.Name, \"status\", status.State, \"pid\", status.Pid, \"duration_seconds\", status.Duration)\n\t\tch <- c.state.mustNewConstMetric(float64(status.State), service.Name)\n\t\tch <- c.stateDesired.mustNewConstMetric(float64(status.Want), service.Name)\n\t\tch <- c.stateTimestamp.mustNewConstMetric(float64(status.Timestamp.Unix()), service.Name)\n\t\tif status.NormallyUp {\n\t\t\tch <- c.stateNormal.mustNewConstMetric(1, service.Name)\n\t\t} else {\n\t\t\tch <- c.stateNormal.mustNewConstMetric(0, service.Name)\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/schedstat_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noshedstat\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nconst nsPerSec = 1e9\n\nvar (\n\trunningSecondsTotal = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"schedstat\", \"running_seconds_total\"),\n\t\t\"Number of seconds CPU spent running a process.\",\n\t\t[]string{\"cpu\"},\n\t\tnil,\n\t)\n\n\twaitingSecondsTotal = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"schedstat\", \"waiting_seconds_total\"),\n\t\t\"Number of seconds spent by processing waiting for this CPU.\",\n\t\t[]string{\"cpu\"},\n\t\tnil,\n\t)\n\n\ttimeslicesTotal = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"schedstat\", \"timeslices_total\"),\n\t\t\"Number of timeslices executed by CPU.\",\n\t\t[]string{\"cpu\"},\n\t\tnil,\n\t)\n)\n\n// NewSchedstatCollector returns a new Collector exposing task scheduler statistics\nfunc NewSchedstatCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &schedstatCollector{fs, logger}, nil\n}\n\ntype schedstatCollector struct {\n\tfs     procfs.FS\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"schedstat\", defaultEnabled, NewSchedstatCollector)\n}\n\nfunc (c *schedstatCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.fs.Schedstat()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"schedstat file does not exist\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn err\n\t}\n\n\tfor _, cpu := range stats.CPUs {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\trunningSecondsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpu.RunningNanoseconds)/nsPerSec,\n\t\t\tcpu.CPUNum,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\twaitingSecondsTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpu.WaitingNanoseconds)/nsPerSec,\n\t\t\tcpu.CPUNum,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\ttimeslicesTotal,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpu.RunTimeslices),\n\t\t\tcpu.CPUNum,\n\t\t)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/selinux_linux.go",
    "content": "// Copyright 2022 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noselinux\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/opencontainers/selinux/go-selinux\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype selinuxCollector struct {\n\tconfigMode  *prometheus.Desc\n\tcurrentMode *prometheus.Desc\n\tenabled     *prometheus.Desc\n\tlogger      *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"selinux\", defaultEnabled, NewSelinuxCollector)\n}\n\n// NewSelinuxCollector returns a new Collector exposing SELinux statistics.\nfunc NewSelinuxCollector(logger *slog.Logger) (Collector, error) {\n\tconst subsystem = \"selinux\"\n\n\treturn &selinuxCollector{\n\t\tconfigMode: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"config_mode\"),\n\t\t\t\"Configured SELinux enforcement mode\",\n\t\t\tnil, nil,\n\t\t),\n\t\tcurrentMode: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"current_mode\"),\n\t\t\t\"Current SELinux enforcement mode\",\n\t\t\tnil, nil,\n\t\t),\n\t\tenabled: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"enabled\"),\n\t\t\t\"SELinux is enabled, 1 is true, 0 is false\",\n\t\t\tnil, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *selinuxCollector) Update(ch chan<- prometheus.Metric) error {\n\tif !selinux.GetEnabled() {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.enabled, prometheus.GaugeValue, 0)\n\n\t\treturn nil\n\t}\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.enabled, prometheus.GaugeValue, 1)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.configMode, prometheus.GaugeValue, float64(selinux.DefaultEnforceMode()))\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.currentMode, prometheus.GaugeValue, float64(selinux.EnforceMode()))\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/slabinfo_linux.go",
    "content": "// Copyright 2022 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noslabinfo\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nvar (\n\tslabNameInclude = kingpin.Flag(\"collector.slabinfo.slabs-include\", \"Regexp of slabs to include in slabinfo collector.\").Default(\".*\").String()\n\tslabNameExclude = kingpin.Flag(\"collector.slabinfo.slabs-exclude\", \"Regexp of slabs to exclude in slabinfo collector.\").Default(\"\").String()\n)\n\ntype slabinfoCollector struct {\n\tfs             procfs.FS\n\tlogger         *slog.Logger\n\tsubsystem      string\n\tlabels         []string\n\tslabNameFilter deviceFilter\n}\n\nfunc init() {\n\tregisterCollector(\"slabinfo\", defaultDisabled, NewSlabinfoCollector)\n}\n\nfunc NewSlabinfoCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &slabinfoCollector{logger: logger,\n\t\tfs:             fs,\n\t\tsubsystem:      \"slabinfo\",\n\t\tlabels:         []string{\"slab\"},\n\t\tslabNameFilter: newDeviceFilter(*slabNameExclude, *slabNameInclude),\n\t}, nil\n}\n\nfunc (c *slabinfoCollector) Update(ch chan<- prometheus.Metric) error {\n\tslabinfo, err := c.fs.SlabInfo()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get %s: %w\", c.subsystem, err)\n\t}\n\n\tfor _, slab := range slabinfo.Slabs {\n\t\tif c.slabNameFilter.ignored(slab.Name) {\n\t\t\tcontinue\n\t\t}\n\t\tch <- c.activeObjects(slab.Name, slab.ObjActive)\n\t\tch <- c.objects(slab.Name, slab.ObjNum)\n\t\tch <- c.objectSizeBytes(slab.Name, slab.ObjSize)\n\t\tch <- c.objectsPerSlab(slab.Name, slab.ObjPerSlab)\n\t\tch <- c.pagesPerSlab(slab.Name, slab.PagesPerSlab)\n\t}\n\n\treturn nil\n}\n\nfunc (c *slabinfoCollector) activeObjects(label string, val int64) prometheus.Metric {\n\tdesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, c.subsystem, \"active_objects\"),\n\t\t\"The number of objects that are currently active (i.e., in use).\",\n\t\tc.labels, nil)\n\n\treturn prometheus.MustNewConstMetric(\n\t\tdesc, prometheus.GaugeValue, float64(val), label,\n\t)\n}\n\nfunc (c *slabinfoCollector) objects(label string, val int64) prometheus.Metric {\n\tdesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, c.subsystem, \"objects\"),\n\t\t\"The total number of allocated objects (i.e., objects that are both in use and not in use).\",\n\t\tc.labels, nil)\n\n\treturn prometheus.MustNewConstMetric(\n\t\tdesc, prometheus.GaugeValue, float64(val), label,\n\t)\n}\n\nfunc (c *slabinfoCollector) objectSizeBytes(label string, val int64) prometheus.Metric {\n\tdesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, c.subsystem, \"object_size_bytes\"),\n\t\t\"The size of objects in this slab, in bytes.\",\n\t\tc.labels, nil)\n\n\treturn prometheus.MustNewConstMetric(\n\t\tdesc, prometheus.GaugeValue, float64(val), label,\n\t)\n}\n\nfunc (c *slabinfoCollector) objectsPerSlab(label string, val int64) prometheus.Metric {\n\tdesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, c.subsystem, \"objects_per_slab\"),\n\t\t\"The number of objects stored in each slab.\",\n\t\tc.labels, nil)\n\n\treturn prometheus.MustNewConstMetric(\n\t\tdesc, prometheus.GaugeValue, float64(val), label,\n\t)\n}\n\nfunc (c *slabinfoCollector) pagesPerSlab(label string, val int64) prometheus.Metric {\n\tdesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, c.subsystem, \"pages_per_slab\"),\n\t\t\"The number of pages allocated for each slab.\",\n\t\tc.labels, nil)\n\n\treturn prometheus.MustNewConstMetric(\n\t\tdesc, prometheus.GaugeValue, float64(val), label,\n\t)\n}\n"
  },
  {
    "path": "collector/sockstat_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nosockstat\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nconst (\n\tsockStatSubsystem = \"sockstat\"\n)\n\n// Used for calculating the total memory bytes on TCP and UDP.\nvar pageSize = os.Getpagesize()\n\ntype sockStatCollector struct {\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(sockStatSubsystem, defaultEnabled, NewSockStatCollector)\n}\n\n// NewSockStatCollector returns a new Collector exposing socket stats.\nfunc NewSockStatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &sockStatCollector{logger}, nil\n}\n\nfunc (c *sockStatCollector) Update(ch chan<- prometheus.Metric) error {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\t// If IPv4 and/or IPv6 are disabled on this kernel, handle it gracefully.\n\tstat4, err := fs.NetSockstat()\n\tswitch {\n\tcase err == nil:\n\tcase errors.Is(err, os.ErrNotExist):\n\t\tc.logger.Debug(\"IPv4 sockstat statistics not found, skipping\")\n\tdefault:\n\t\treturn fmt.Errorf(\"failed to get IPv4 sockstat data: %w\", err)\n\t}\n\n\tstat6, err := fs.NetSockstat6()\n\tswitch {\n\tcase err == nil:\n\tcase errors.Is(err, os.ErrNotExist):\n\t\tc.logger.Debug(\"IPv6 sockstat statistics not found, skipping\")\n\tdefault:\n\t\treturn fmt.Errorf(\"failed to get IPv6 sockstat data: %w\", err)\n\t}\n\n\tstats := []struct {\n\t\tisIPv6 bool\n\t\tstat   *procfs.NetSockstat\n\t}{\n\t\t{\n\t\t\tstat: stat4,\n\t\t},\n\t\t{\n\t\t\tisIPv6: true,\n\t\t\tstat:   stat6,\n\t\t},\n\t}\n\n\tfor _, s := range stats {\n\t\tc.update(ch, s.isIPv6, s.stat)\n\t}\n\n\treturn nil\n}\n\nfunc (c *sockStatCollector) update(ch chan<- prometheus.Metric, isIPv6 bool, s *procfs.NetSockstat) {\n\tif s == nil {\n\t\t// IPv6 disabled or similar; nothing to do.\n\t\treturn\n\t}\n\n\t// If sockstat contains the number of used sockets, export it.\n\tif !isIPv6 && s.Used != nil {\n\t\t// TODO: this must be updated if sockstat6 ever exports this data.\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, sockStatSubsystem, \"sockets_used\"),\n\t\t\t\t\"Number of IPv4 sockets in use.\",\n\t\t\t\tnil,\n\t\t\t\tnil,\n\t\t\t),\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(*s.Used),\n\t\t)\n\t}\n\n\t// A name and optional value for a sockstat metric.\n\ttype ssPair struct {\n\t\tname string\n\t\tv    *int\n\t}\n\n\t// Previously these metric names were generated directly from the file output.\n\t// In order to keep the same level of compatibility, we must map the fields\n\t// to their correct names.\n\tfor _, p := range s.Protocols {\n\t\tpairs := []ssPair{\n\t\t\t{\n\t\t\t\tname: \"inuse\",\n\t\t\t\tv:    &p.InUse,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: \"orphan\",\n\t\t\t\tv:    p.Orphan,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: \"tw\",\n\t\t\t\tv:    p.TW,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: \"alloc\",\n\t\t\t\tv:    p.Alloc,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: \"mem\",\n\t\t\t\tv:    p.Mem,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: \"memory\",\n\t\t\t\tv:    p.Memory,\n\t\t\t},\n\t\t}\n\n\t\t// Also export mem_bytes values for sockets which have a mem value\n\t\t// stored in pages.\n\t\tif p.Mem != nil {\n\t\t\tv := *p.Mem * pageSize\n\t\t\tpairs = append(pairs, ssPair{\n\t\t\t\tname: \"mem_bytes\",\n\t\t\t\tv:    &v,\n\t\t\t})\n\t\t}\n\n\t\tfor _, pair := range pairs {\n\t\t\tif pair.v == nil {\n\t\t\t\t// This value is not set for this protocol; nothing to do.\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tprometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(\n\t\t\t\t\t\tnamespace,\n\t\t\t\t\t\tsockStatSubsystem,\n\t\t\t\t\t\tfmt.Sprintf(\"%s_%s\", p.Protocol, pair.name),\n\t\t\t\t\t),\n\t\t\t\t\tfmt.Sprintf(\"Number of %s sockets in state %s.\", p.Protocol, pair.name),\n\t\t\t\t\tnil,\n\t\t\t\t\tnil,\n\t\t\t\t),\n\t\t\t\tprometheus.GaugeValue,\n\t\t\t\tfloat64(*pair.v),\n\t\t\t)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "collector/softirqs_common.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build linux && !nosoftirqs\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype softirqsCollector struct {\n\tfs     procfs.FS\n\tdesc   typedDesc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"softirqs\", defaultDisabled, NewSoftirqsCollector)\n}\n\n// NewSoftirqsCollector returns a new Collector exposing softirq stats.\nfunc NewSoftirqsCollector(logger *slog.Logger) (Collector, error) {\n\tdesc := typedDesc{prometheus.NewDesc(\n\t\tnamespace+\"_softirqs_functions_total\",\n\t\t\"Softirq counts per CPU.\",\n\t\tsoftirqLabelNames, nil,\n\t), prometheus.CounterValue}\n\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &softirqsCollector{fs, desc, logger}, nil\n}\n"
  },
  {
    "path": "collector/softirqs_linux.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nosoftirqs\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tsoftirqLabelNames = []string{\"cpu\", \"type\"}\n)\n\nfunc (c *softirqsCollector) Update(ch chan<- prometheus.Metric) (err error) {\n\tsoftirqs, err := c.fs.Softirqs()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get softirqs: %w\", err)\n\t}\n\n\tfor cpuNo, value := range softirqs.Hi {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"HI\")\n\t}\n\tfor cpuNo, value := range softirqs.Timer {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"TIMER\")\n\t}\n\tfor cpuNo, value := range softirqs.NetTx {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"NET_TX\")\n\t}\n\tfor cpuNo, value := range softirqs.NetRx {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"NET_RX\")\n\t}\n\tfor cpuNo, value := range softirqs.Block {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"BLOCK\")\n\t}\n\tfor cpuNo, value := range softirqs.IRQPoll {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"IRQ_POLL\")\n\t}\n\tfor cpuNo, value := range softirqs.Tasklet {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"TASKLET\")\n\t}\n\tfor cpuNo, value := range softirqs.Sched {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"SCHED\")\n\t}\n\tfor cpuNo, value := range softirqs.HRTimer {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"HRTIMER\")\n\t}\n\tfor cpuNo, value := range softirqs.RCU {\n\t\tch <- c.desc.mustNewConstMetric(float64(value), strconv.Itoa(cpuNo), \"RCU\")\n\t}\n\n\treturn err\n}\n"
  },
  {
    "path": "collector/softnet_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nosoftnet\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype softnetCollector struct {\n\tfs                procfs.FS\n\tprocessed         *prometheus.Desc\n\tdropped           *prometheus.Desc\n\ttimeSqueezed      *prometheus.Desc\n\tcpuCollision      *prometheus.Desc\n\treceivedRps       *prometheus.Desc\n\tflowLimitCount    *prometheus.Desc\n\tsoftnetBacklogLen *prometheus.Desc\n\tlogger            *slog.Logger\n}\n\nconst (\n\tsoftnetSubsystem = \"softnet\"\n)\n\nfunc init() {\n\tregisterCollector(\"softnet\", defaultEnabled, NewSoftnetCollector)\n}\n\n// NewSoftnetCollector returns a new Collector exposing softnet metrics.\nfunc NewSoftnetCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &softnetCollector{\n\t\tfs: fs,\n\t\tprocessed: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, softnetSubsystem, \"processed_total\"),\n\t\t\t\"Number of processed packets\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tdropped: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, softnetSubsystem, \"dropped_total\"),\n\t\t\t\"Number of dropped packets\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\ttimeSqueezed: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, softnetSubsystem, \"times_squeezed_total\"),\n\t\t\t\"Number of times processing packets ran out of quota\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tcpuCollision: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, softnetSubsystem, \"cpu_collision_total\"),\n\t\t\t\"Number of collision occur while obtaining device lock while transmitting\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\treceivedRps: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, softnetSubsystem, \"received_rps_total\"),\n\t\t\t\"Number of times cpu woken up received_rps\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tflowLimitCount: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, softnetSubsystem, \"flow_limit_count_total\"),\n\t\t\t\"Number of times flow limit has been reached\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tsoftnetBacklogLen: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, softnetSubsystem, \"backlog_len\"),\n\t\t\t\"Softnet backlog status\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update gets parsed softnet statistics using procfs.\nfunc (c *softnetCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar cpu string\n\n\tstats, err := c.fs.NetSoftnetStat()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not get softnet statistics: %w\", err)\n\t}\n\n\tfor _, cpuStats := range stats {\n\t\tcpu = strconv.FormatUint(uint64(cpuStats.Index), 10)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.processed,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpuStats.Processed),\n\t\t\tcpu,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.dropped,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpuStats.Dropped),\n\t\t\tcpu,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.timeSqueezed,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpuStats.TimeSqueezed),\n\t\t\tcpu,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.cpuCollision,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpuStats.CPUCollision),\n\t\t\tcpu,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.receivedRps,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpuStats.ReceivedRps),\n\t\t\tcpu,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.flowLimitCount,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpuStats.FlowLimitCount),\n\t\t\tcpu,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.softnetBacklogLen,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(cpuStats.SoftnetBacklogLen),\n\t\t\tcpu,\n\t\t)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/stat_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nostat\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype statCollector struct {\n\tfs           procfs.FS\n\tintr         *prometheus.Desc\n\tctxt         *prometheus.Desc\n\tforks        *prometheus.Desc\n\tbtime        *prometheus.Desc\n\tprocsRunning *prometheus.Desc\n\tprocsBlocked *prometheus.Desc\n\tsoftIRQ      *prometheus.Desc\n\tlogger       *slog.Logger\n}\n\nvar statSoftirqFlag = kingpin.Flag(\"collector.stat.softirq\", \"Export softirq calls per vector\").Default(\"false\").Bool()\n\nfunc init() {\n\tregisterCollector(\"stat\", defaultEnabled, NewStatCollector)\n}\n\n// NewStatCollector returns a new Collector exposing kernel/system statistics.\nfunc NewStatCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\treturn &statCollector{\n\t\tfs: fs,\n\t\tintr: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"intr_total\"),\n\t\t\t\"Total number of interrupts serviced.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tctxt: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"context_switches_total\"),\n\t\t\t\"Total number of context switches.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tforks: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"forks_total\"),\n\t\t\t\"Total number of forks.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tbtime: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"boot_time_seconds\"),\n\t\t\t\"Node boot time, in unixtime.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tprocsRunning: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"procs_running\"),\n\t\t\t\"Number of processes in runnable state.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tprocsBlocked: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"procs_blocked\"),\n\t\t\t\"Number of processes blocked waiting for I/O to complete.\",\n\t\t\tnil, nil,\n\t\t),\n\t\tsoftIRQ: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"\", \"softirqs_total\"),\n\t\t\t\"Number of softirq calls.\",\n\t\t\t[]string{\"vector\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update implements Collector and exposes kernel and system statistics.\nfunc (c *statCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.fs.Stat()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tch <- prometheus.MustNewConstMetric(c.intr, prometheus.CounterValue, float64(stats.IRQTotal))\n\tch <- prometheus.MustNewConstMetric(c.ctxt, prometheus.CounterValue, float64(stats.ContextSwitches))\n\tch <- prometheus.MustNewConstMetric(c.forks, prometheus.CounterValue, float64(stats.ProcessCreated))\n\n\tch <- prometheus.MustNewConstMetric(c.btime, prometheus.GaugeValue, float64(stats.BootTime))\n\n\tch <- prometheus.MustNewConstMetric(c.procsRunning, prometheus.GaugeValue, float64(stats.ProcessesRunning))\n\tch <- prometheus.MustNewConstMetric(c.procsBlocked, prometheus.GaugeValue, float64(stats.ProcessesBlocked))\n\n\tif *statSoftirqFlag {\n\t\tsi := stats.SoftIRQ\n\n\t\tfor _, vec := range []struct {\n\t\t\tname  string\n\t\t\tvalue uint64\n\t\t}{\n\t\t\t{name: \"hi\", value: si.Hi},\n\t\t\t{name: \"timer\", value: si.Timer},\n\t\t\t{name: \"net_tx\", value: si.NetTx},\n\t\t\t{name: \"net_rx\", value: si.NetRx},\n\t\t\t{name: \"block\", value: si.Block},\n\t\t\t{name: \"block_iopoll\", value: si.BlockIoPoll},\n\t\t\t{name: \"tasklet\", value: si.Tasklet},\n\t\t\t{name: \"sched\", value: si.Sched},\n\t\t\t{name: \"hrtimer\", value: si.Hrtimer},\n\t\t\t{name: \"rcu\", value: si.Rcu},\n\t\t} {\n\t\t\tch <- prometheus.MustNewConstMetric(c.softIRQ, prometheus.CounterValue, float64(vec.value), vec.name)\n\t\t}\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/supervisord.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nosupervisord\n\npackage collector\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/mattn/go-xmlrpc\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tsupervisordURL = kingpin.Flag(\"collector.supervisord.url\", \"XML RPC endpoint.\").Default(\"http://localhost:9001/RPC2\").Envar(\"SUPERVISORD_URL\").String()\n\txrpc           *xmlrpc.Client\n)\n\ntype supervisordCollector struct {\n\tupDesc         *prometheus.Desc\n\tstateDesc      *prometheus.Desc\n\texitStatusDesc *prometheus.Desc\n\tstartTimeDesc  *prometheus.Desc\n\tlogger         *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"supervisord\", defaultDisabled, NewSupervisordCollector)\n}\n\n// NewSupervisordCollector returns a new Collector exposing supervisord statistics.\nfunc NewSupervisordCollector(logger *slog.Logger) (Collector, error) {\n\tvar (\n\t\tsubsystem  = \"supervisord\"\n\t\tlabelNames = []string{\"name\", \"group\"}\n\t)\n\n\tif u, err := url.Parse(*supervisordURL); err == nil && u.Scheme == \"unix\" {\n\t\t// Fake the URI scheme as http, since net/http.*Transport.roundTrip will complain\n\t\t// about a non-http(s) transport.\n\t\txrpc = xmlrpc.NewClient(\"http://unix/RPC2\")\n\t\txrpc.HttpClient.Transport = &http.Transport{\n\t\t\tDialContext: func(ctx context.Context, _, _ string) (net.Conn, error) {\n\t\t\t\td := net.Dialer{Timeout: 10 * time.Second}\n\t\t\t\treturn d.DialContext(ctx, \"unix\", u.Path)\n\t\t\t},\n\t\t}\n\t} else {\n\t\txrpc = xmlrpc.NewClient(*supervisordURL)\n\t}\n\n\tlogger.Warn(\"This collector is deprecated and will be removed in the next major version release.\")\n\n\treturn &supervisordCollector{\n\t\tupDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"up\"),\n\t\t\t\"Process Up\",\n\t\t\tlabelNames,\n\t\t\tnil,\n\t\t),\n\t\tstateDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"state\"),\n\t\t\t\"Process State\",\n\t\t\tlabelNames,\n\t\t\tnil,\n\t\t),\n\t\texitStatusDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"exit_status\"),\n\t\t\t\"Process Exit Status\",\n\t\t\tlabelNames,\n\t\t\tnil,\n\t\t),\n\t\tstartTimeDesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"start_time_seconds\"),\n\t\t\t\"Process start time\",\n\t\t\tlabelNames,\n\t\t\tnil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *supervisordCollector) isRunning(state int) bool {\n\t// http://supervisord.org/subprocess.html#process-states\n\tconst (\n\t\t// STOPPED  = 0\n\t\tSTARTING = 10\n\t\tRUNNING  = 20\n\t\t// BACKOFF  = 30\n\t\tSTOPPING = 40\n\t\t// EXITED   = 100\n\t\t// FATAL    = 200\n\t\t// UNKNOWN  = 1000\n\t)\n\tswitch state {\n\tcase STARTING, RUNNING, STOPPING:\n\t\treturn true\n\t}\n\treturn false\n}\n\nfunc (c *supervisordCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar info struct {\n\t\tName          string `xmlrpc:\"name\"`\n\t\tGroup         string `xmlrpc:\"group\"`\n\t\tStart         int    `xmlrpc:\"start\"`\n\t\tStop          int    `xmlrpc:\"stop\"`\n\t\tNow           int    `xmlrpc:\"now\"`\n\t\tState         int    `xmlrpc:\"state\"`\n\t\tStateName     string `xmlrpc:\"statename\"`\n\t\tSpawnErr      string `xmlrpc:\"spanerr\"`\n\t\tExitStatus    int    `xmlrpc:\"exitstatus\"`\n\t\tStdoutLogfile string `xmlrcp:\"stdout_logfile\"`\n\t\tStderrLogfile string `xmlrcp:\"stderr_logfile\"`\n\t\tPID           int    `xmlrpc:\"pid\"`\n\t}\n\n\tres, err := xrpc.Call(\"supervisor.getAllProcessInfo\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to call supervisord: %w\", err)\n\t}\n\n\tfor _, p := range res.(xmlrpc.Array) {\n\t\tfor k, v := range p.(xmlrpc.Struct) {\n\t\t\tswitch k {\n\t\t\tcase \"name\":\n\t\t\t\tinfo.Name = v.(string)\n\t\t\tcase \"group\":\n\t\t\t\tinfo.Group = v.(string)\n\t\t\tcase \"start\":\n\t\t\t\tinfo.Start = v.(int)\n\t\t\tcase \"stop\":\n\t\t\t\tinfo.Stop = v.(int)\n\t\t\tcase \"now\":\n\t\t\t\tinfo.Now = v.(int)\n\t\t\tcase \"state\":\n\t\t\t\tinfo.State = v.(int)\n\t\t\tcase \"statename\":\n\t\t\t\tinfo.StateName = v.(string)\n\t\t\tcase \"exitstatus\":\n\t\t\t\tinfo.ExitStatus = v.(int)\n\t\t\tcase \"pid\":\n\t\t\t\tinfo.PID = v.(int)\n\t\t\t}\n\t\t}\n\t\tlabels := []string{info.Name, info.Group}\n\n\t\tch <- prometheus.MustNewConstMetric(c.stateDesc, prometheus.GaugeValue, float64(info.State), labels...)\n\t\tch <- prometheus.MustNewConstMetric(c.exitStatusDesc, prometheus.GaugeValue, float64(info.ExitStatus), labels...)\n\n\t\tif c.isRunning(info.State) {\n\t\t\tch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 1, labels...)\n\t\t\tch <- prometheus.MustNewConstMetric(c.startTimeDesc, prometheus.CounterValue, float64(info.Start), labels...)\n\t\t} else {\n\t\t\tch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 0, labels...)\n\t\t}\n\t\tc.logger.Debug(\"process info\", \"group\", info.Group, \"name\", info.Name, \"state\", info.StateName, \"pid\", info.PID)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/swap_linux.go",
    "content": "// Copyright The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noswap\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nconst (\n\tswapSubsystem = \"swap\"\n)\n\nvar swapLabelNames = []string{\"device\", \"swap_type\"}\n\ntype swapCollector struct {\n\tfs     procfs.FS\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"swap\", defaultDisabled, NewSwapCollector)\n}\n\n// NewSwapCollector returns a new Collector exposing swap device statistics.\nfunc NewSwapCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &swapCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\ntype SwapsEntry struct {\n\tDevice   string\n\tType     string\n\tPriority int\n\tSize     int\n\tUsed     int\n}\n\nfunc (c *swapCollector) getSwapInfo() ([]SwapsEntry, error) {\n\tswaps, err := c.fs.Swaps()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"couldn't get proc/swap information: %w\", err)\n\t}\n\n\tmetrics := make([]SwapsEntry, 0, len(swaps))\n\n\tfor _, swap := range swaps {\n\t\tmetrics = append(metrics, SwapsEntry{Device: swap.Filename, Type: swap.Type,\n\t\t\tPriority: swap.Priority, Size: swap.Size, Used: swap.Used})\n\t}\n\n\treturn metrics, nil\n}\n\nfunc (c *swapCollector) Update(ch chan<- prometheus.Metric) error {\n\tswaps, err := c.getSwapInfo()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get swap information: %w\", err)\n\t}\n\n\tfor _, swap := range swaps {\n\t\tswapLabelValues := []string{swap.Device, swap.Type}\n\n\t\t// Export swap size in bytes\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, swapSubsystem, \"size_bytes\"),\n\t\t\t\t\"Swap device size in bytes.\",\n\t\t\t\t[]string{\"device\", \"swap_type\"}, nil,\n\t\t\t),\n\t\t\tprometheus.GaugeValue,\n\t\t\t// Size is provided in kbytes (not bytes), translate to bytes\n\t\t\t// see https://github.com/torvalds/linux/blob/fd94619c43360eb44d28bd3ef326a4f85c600a07/mm/swapfile.c#L3079-L3080\n\t\t\tfloat64(swap.Size*1024),\n\t\t\tswapLabelValues...,\n\t\t)\n\n\t\t// Export swap used in bytes\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, swapSubsystem, \"used_bytes\"),\n\t\t\t\t\"Swap device used in bytes.\",\n\t\t\t\tswapLabelNames, nil,\n\t\t\t),\n\t\t\tprometheus.GaugeValue,\n\t\t\t// Swap used is also provided in kbytes, translate to bytes\n\t\t\tfloat64(swap.Used*1024),\n\t\t\tswapLabelValues...,\n\t\t)\n\n\t\t// Export swap priority\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, swapSubsystem, \"priority\"),\n\t\t\t\t\"Swap device priority.\",\n\t\t\t\tswapLabelNames, nil,\n\t\t\t),\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(swap.Priority),\n\t\t\tswapLabelValues...,\n\t\t)\n\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/swap_linux_test.go",
    "content": "// Copyright The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noswap\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"testing\"\n)\n\nfunc TestSwap(t *testing.T) {\n\t*procPath = \"fixtures/proc\"\n\tlogger := slog.New(slog.NewTextHandler(io.Discard, nil))\n\n\tcollector, err := NewSwapCollector(logger)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tswapInfo, err := collector.(*swapCollector).getSwapInfo()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif want, got := \"/dev/zram0\", swapInfo[0].Device; want != got {\n\t\tt.Errorf(\"want swap device %s, got %s\", want, got)\n\t}\n\n\tif want, got := \"partition\", swapInfo[0].Type; want != got {\n\t\tt.Errorf(\"want swap type %s, got %s\", want, got)\n\t}\n\n\tif want, got := 100, swapInfo[0].Priority; want != got {\n\t\tt.Errorf(\"want swap priority %d, got %d\", want, got)\n\t}\n\n\tif want, got := 8388604, swapInfo[0].Size; want != got {\n\t\tt.Errorf(\"want swap size %d, got %d\", want, got)\n\t}\n\n\tif want, got := 76, swapInfo[0].Used; want != got {\n\t\tt.Errorf(\"want swpa used %d, got %d\", want, got)\n\t}\n}\n"
  },
  {
    "path": "collector/sysctl_bsd.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (freebsd || dragonfly || openbsd || netbsd || darwin) && cgo\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\n// #include <sys/types.h>\nimport \"C\"\n\ntype bsdSysctlType uint8\n\n// BSD-specific sysctl value types.  There is an impedience mismatch between\n// native C types, e.g. int vs long, and the golang unix.Sysctl variables\nconst (\n\t// Default to uint32.\n\tbsdSysctlTypeUint32 bsdSysctlType = iota\n\tbsdSysctlTypeUint64\n\tbsdSysctlTypeCLong\n)\n\n// Contains all the info needed to map a single bsd-sysctl to a prometheus\n// value.\ntype bsdSysctl struct {\n\t// Prometheus name\n\tname string\n\n\t// Simple prometheus description\n\tdescription string\n\n\t// Prometheus type\n\tvalueType prometheus.ValueType\n\n\t// Sysctl name\n\tmib string\n\n\t// Sysctl data-type\n\tdataType bsdSysctlType\n\n\t// Post-retrieval conversion hooks\n\tconversion func(float64) float64\n}\n\nfunc (b bsdSysctl) Value() (float64, error) {\n\tvar tmp32 uint32\n\tvar tmp64 uint64\n\tvar tmpf64 float64\n\tvar err error\n\n\tswitch b.dataType {\n\tcase bsdSysctlTypeUint32:\n\t\ttmp32, err = unix.SysctlUint32(b.mib)\n\t\ttmpf64 = float64(tmp32)\n\tcase bsdSysctlTypeUint64:\n\t\ttmp64, err = unix.SysctlUint64(b.mib)\n\t\ttmpf64 = float64(tmp64)\n\tcase bsdSysctlTypeCLong:\n\t\ttmpf64, err = b.getCLong()\n\t}\n\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tif b.conversion != nil {\n\t\treturn b.conversion(tmpf64), nil\n\t}\n\n\treturn tmpf64, nil\n}\n\nfunc (b bsdSysctl) getCLong() (float64, error) {\n\traw, err := unix.SysctlRaw(b.mib)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tif len(raw) == C.sizeof_long {\n\t\treturn float64(*(*C.long)(unsafe.Pointer(&raw[0]))), nil\n\t}\n\n\tif len(raw) == C.sizeof_int {\n\t\t// This is valid for at least vfs.bufspace, and the default\n\t\t// long handler - which can clamp longs to 32-bits:\n\t\t//   https://github.com/freebsd/freebsd/blob/releng/10.3/sys/kern/vfs_bio.c#L338\n\t\t//   https://github.com/freebsd/freebsd/blob/releng/10.3/sys/kern/kern_sysctl.c#L1062\n\t\treturn float64(*(*C.int)(unsafe.Pointer(&raw[0]))), nil\n\t}\n\n\treturn 0, fmt.Errorf(\n\t\t\"length of bytes received from sysctl (%d) does not match expected bytes (long: %d), (int: %d)\",\n\t\tlen(raw),\n\t\tC.sizeof_long,\n\t\tC.sizeof_int,\n\t)\n\n}\n"
  },
  {
    "path": "collector/sysctl_linux.go",
    "content": "// Copyright 2022 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nvar (\n\tsysctlInclude     = kingpin.Flag(\"collector.sysctl.include\", \"Select sysctl metrics to include\").Strings()\n\tsysctlIncludeInfo = kingpin.Flag(\"collector.sysctl.include-info\", \"Select sysctl metrics to include as info metrics\").Strings()\n\n\tsysctlInfoDesc = prometheus.NewDesc(prometheus.BuildFQName(namespace, \"sysctl\", \"info\"), \"sysctl info\", []string{\"name\", \"value\", \"index\"}, nil)\n)\n\ntype sysctlCollector struct {\n\tfs      procfs.FS\n\tlogger  *slog.Logger\n\tsysctls []*sysctl\n}\n\nfunc init() {\n\tregisterCollector(\"sysctl\", defaultDisabled, NewSysctlCollector)\n}\n\nfunc NewSysctlCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\tc := &sysctlCollector{\n\t\tlogger:  logger,\n\t\tfs:      fs,\n\t\tsysctls: []*sysctl{},\n\t}\n\n\tfor _, include := range *sysctlInclude {\n\t\tsysctl, err := newSysctl(include, true)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tc.sysctls = append(c.sysctls, sysctl)\n\t}\n\n\tfor _, include := range *sysctlIncludeInfo {\n\t\tsysctl, err := newSysctl(include, false)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tc.sysctls = append(c.sysctls, sysctl)\n\t}\n\treturn c, nil\n}\n\nfunc (c *sysctlCollector) Update(ch chan<- prometheus.Metric) error {\n\tfor _, sysctl := range c.sysctls {\n\t\tmetrics, err := c.newMetrics(sysctl)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfor _, metric := range metrics {\n\t\t\tch <- metric\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (c *sysctlCollector) newMetrics(s *sysctl) ([]prometheus.Metric, error) {\n\tvar (\n\t\tvalues any\n\t\tlength int\n\t\terr    error\n\t)\n\n\tif s.numeric {\n\t\tvalues, err = c.fs.SysctlInts(s.name)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error obtaining sysctl info: %w\", err)\n\t\t}\n\t\tlength = len(values.([]int))\n\t} else {\n\t\tvalues, err = c.fs.SysctlStrings(s.name)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error obtaining sysctl info: %w\", err)\n\t\t}\n\t\tlength = len(values.([]string))\n\t}\n\n\tswitch length {\n\tcase 0:\n\t\treturn nil, fmt.Errorf(\"sysctl %s has no values\", s.name)\n\tcase 1:\n\t\tif len(s.keys) > 0 {\n\t\t\treturn nil, fmt.Errorf(\"sysctl %s has only one value, but expected %v\", s.name, s.keys)\n\t\t}\n\t\treturn []prometheus.Metric{s.newConstMetric(values)}, nil\n\n\tdefault:\n\n\t\tif len(s.keys) == 0 {\n\t\t\treturn s.newIndexedMetrics(values), nil\n\t\t}\n\n\t\tif length != len(s.keys) {\n\t\t\treturn nil, fmt.Errorf(\"sysctl %s has %d keys but only %d defined in f lag\", s.name, length, len(s.keys))\n\t\t}\n\n\t\treturn s.newMappedMetrics(values)\n\t}\n}\n\ntype sysctl struct {\n\tnumeric bool\n\tname    string\n\tkeys    []string\n}\n\nfunc newSysctl(include string, numeric bool) (*sysctl, error) {\n\tparts := strings.SplitN(include, \":\", 2)\n\ts := &sysctl{\n\t\tnumeric: numeric,\n\t\tname:    parts[0],\n\t}\n\tif len(parts) == 2 {\n\t\ts.keys = strings.Split(parts[1], \",\")\n\t\ts.name = parts[0]\n\t}\n\treturn s, nil\n}\n\nfunc (s *sysctl) metricName() string {\n\treturn SanitizeMetricName(s.name)\n}\n\nfunc (s *sysctl) newConstMetric(v any) prometheus.Metric {\n\tif s.numeric {\n\t\treturn prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"sysctl\", s.metricName()),\n\t\t\t\tfmt.Sprintf(\"sysctl %s\", s.name),\n\t\t\t\tnil, nil),\n\t\t\tprometheus.UntypedValue,\n\t\t\tfloat64(v.([]int)[0]))\n\t}\n\treturn prometheus.MustNewConstMetric(\n\t\tsysctlInfoDesc,\n\t\tprometheus.GaugeValue,\n\t\t1.0,\n\t\ts.name,\n\t\tv.([]string)[0],\n\t\t\"0\",\n\t)\n}\n\nfunc (s *sysctl) newIndexedMetrics(v any) []prometheus.Metric {\n\tdesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"sysctl\", s.metricName()),\n\t\tfmt.Sprintf(\"sysctl %s\", s.name),\n\t\t[]string{\"index\"}, nil,\n\t)\n\tswitch values := v.(type) {\n\tcase []int:\n\t\tmetrics := make([]prometheus.Metric, len(values))\n\t\tfor i, n := range values {\n\t\t\tmetrics[i] = prometheus.MustNewConstMetric(desc, prometheus.UntypedValue, float64(n), strconv.Itoa(i))\n\t\t}\n\t\treturn metrics\n\tcase []string:\n\t\tmetrics := make([]prometheus.Metric, len(values))\n\t\tfor i, str := range values {\n\t\t\tmetrics[i] = prometheus.MustNewConstMetric(sysctlInfoDesc, prometheus.GaugeValue, 1.0, s.name, str, strconv.Itoa(i))\n\t\t}\n\t\treturn metrics\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"unexpected type %T\", values))\n\t}\n}\n\nfunc (s *sysctl) newMappedMetrics(v any) ([]prometheus.Metric, error) {\n\tswitch values := v.(type) {\n\tcase []int:\n\t\tmetrics := make([]prometheus.Metric, len(values))\n\t\tfor i, n := range values {\n\t\t\tkey := s.keys[i]\n\t\t\tdesc := prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, \"sysctl\", s.metricName()+\"_\"+key),\n\t\t\t\tfmt.Sprintf(\"sysctl %s, field %d\", s.name, i),\n\t\t\t\tnil,\n\t\t\t\tnil,\n\t\t\t)\n\t\t\tmetrics[i] = prometheus.MustNewConstMetric(desc, prometheus.UntypedValue, float64(n))\n\t\t}\n\t\treturn metrics, nil\n\tcase []string:\n\t\treturn nil, fmt.Errorf(\"mapped sysctl string values not supported\")\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unexpected type %T\", values)\n\t}\n}\n"
  },
  {
    "path": "collector/sysctl_openbsd_amd64.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc int8ToString(a []int8) string {\n\tbuf := make([]byte, len(a))\n\tfor i, v := range a {\n\t\tif byte(v) == 0 {\n\t\t\tbuf = buf[:i]\n\t\t\tbreak\n\t\t}\n\t\tbuf[i] = byte(v)\n\t}\n\treturn string(buf)\n}\n\n// unix._C_int\ntype _C_int int32\n\nvar _zero uintptr\n\nfunc errnoErr(e syscall.Errno) error {\n\tswitch e {\n\tcase 0:\n\t\treturn nil\n\tcase unix.EAGAIN:\n\t\treturn syscall.EAGAIN\n\tcase unix.EINVAL:\n\t\treturn syscall.EINVAL\n\tcase unix.ENOENT:\n\t\treturn syscall.ENOENT\n\t}\n\treturn e\n}\n\nfunc _sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tfor {\n\t\t_, _, e1 := unix.Syscall6(unix.SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\t\tif e1 != 0 {\n\t\t\terr = errnoErr(e1)\n\t\t}\n\t\tif err != unix.EINTR {\n\t\t\treturn\n\t\t}\n\t}\n\treturn\n}\n\nfunc sysctl(mib []_C_int) ([]byte, error) {\n\tn := uintptr(0)\n\tif err := _sysctl(mib, nil, &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\tif n == 0 {\n\t\treturn nil, nil\n\t}\n\n\tbuf := make([]byte, n)\n\tif err := _sysctl(mib, &buf[0], &n, nil, 0); err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf[:n], nil\n}\n"
  },
  {
    "path": "collector/systemd_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nosystemd\n\npackage collector\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"math\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/coreos/go-systemd/v22/dbus\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\t// minSystemdVersionSystemState is the minimum SystemD version for availability of\n\t// the 'SystemState' manager property and the timer property 'LastTriggerUSec'\n\t// https://github.com/prometheus/node_exporter/issues/291\n\tminSystemdVersionSystemState = 212\n)\n\nvar (\n\tsystemdUnitIncludeSet bool\n\tsystemdUnitInclude    = kingpin.Flag(\"collector.systemd.unit-include\", \"Regexp of systemd units to include. Units must both match include and not match exclude to be included.\").Default(\".+\").PreAction(func(c *kingpin.ParseContext) error {\n\t\tsystemdUnitIncludeSet = true\n\t\treturn nil\n\t}).String()\n\toldSystemdUnitInclude = kingpin.Flag(\"collector.systemd.unit-whitelist\", \"DEPRECATED: Use --collector.systemd.unit-include\").Hidden().String()\n\tsystemdUnitExcludeSet bool\n\tsystemdUnitExclude    = kingpin.Flag(\"collector.systemd.unit-exclude\", \"Regexp of systemd units to exclude. Units must both match include and not match exclude to be included.\").Default(\".+\\\\.(automount|device|mount|scope|slice)\").PreAction(func(c *kingpin.ParseContext) error {\n\t\tsystemdUnitExcludeSet = true\n\t\treturn nil\n\t}).String()\n\toldSystemdUnitExclude  = kingpin.Flag(\"collector.systemd.unit-blacklist\", \"DEPRECATED: Use collector.systemd.unit-exclude\").Hidden().String()\n\tsystemdPrivate         = kingpin.Flag(\"collector.systemd.private\", \"Establish a private, direct connection to systemd without dbus (Strongly discouraged since it requires root. For testing purposes only).\").Hidden().Bool()\n\tenableTaskMetrics      = kingpin.Flag(\"collector.systemd.enable-task-metrics\", \"Enables service unit tasks metrics unit_tasks_current and unit_tasks_max\").Bool()\n\tenableRestartsMetrics  = kingpin.Flag(\"collector.systemd.enable-restarts-metrics\", \"Enables service unit metric service_restart_total\").Bool()\n\tenableStartTimeMetrics = kingpin.Flag(\"collector.systemd.enable-start-time-metrics\", \"Enables service unit metric unit_start_time_seconds\").Bool()\n\n\tsystemdVersionRE = regexp.MustCompile(`[0-9]{3,}(\\.[0-9]+)?`)\n)\n\ntype systemdCollector struct {\n\tunitDesc                      *prometheus.Desc\n\tunitStartTimeDesc             *prometheus.Desc\n\tunitTasksCurrentDesc          *prometheus.Desc\n\tunitTasksMaxDesc              *prometheus.Desc\n\tsystemRunningDesc             *prometheus.Desc\n\tsummaryDesc                   *prometheus.Desc\n\tnRestartsDesc                 *prometheus.Desc\n\ttimerLastTriggerDesc          *prometheus.Desc\n\tsocketAcceptedConnectionsDesc *prometheus.Desc\n\tsocketCurrentConnectionsDesc  *prometheus.Desc\n\tsocketRefusedConnectionsDesc  *prometheus.Desc\n\tsystemdVersionDesc            *prometheus.Desc\n\tvirtualizationDesc            *prometheus.Desc\n\t// Use regexps for more flexibility than device_filter.go allows\n\tsystemdUnitIncludePattern *regexp.Regexp\n\tsystemdUnitExcludePattern *regexp.Regexp\n\tlogger                    *slog.Logger\n}\n\nvar unitStatesName = []string{\"active\", \"activating\", \"deactivating\", \"inactive\", \"failed\"}\n\nfunc init() {\n\tregisterCollector(\"systemd\", defaultDisabled, NewSystemdCollector)\n}\n\n// NewSystemdCollector returns a new Collector exposing systemd statistics.\nfunc NewSystemdCollector(logger *slog.Logger) (Collector, error) {\n\tconst subsystem = \"systemd\"\n\n\tunitDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"unit_state\"),\n\t\t\"Systemd unit\", []string{\"name\", \"state\", \"type\"}, nil,\n\t)\n\tunitStartTimeDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"unit_start_time_seconds\"),\n\t\t\"Start time of the unit since unix epoch in seconds.\", []string{\"name\"}, nil,\n\t)\n\tunitTasksCurrentDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"unit_tasks_current\"),\n\t\t\"Current number of tasks per Systemd unit\", []string{\"name\"}, nil,\n\t)\n\tunitTasksMaxDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"unit_tasks_max\"),\n\t\t\"Maximum number of tasks per Systemd unit\", []string{\"name\"}, nil,\n\t)\n\tsystemRunningDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"system_running\"),\n\t\t\"Whether the system is operational (see 'systemctl is-system-running')\",\n\t\tnil, nil,\n\t)\n\tsummaryDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"units\"),\n\t\t\"Summary of systemd unit states\", []string{\"state\"}, nil)\n\tnRestartsDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"service_restart_total\"),\n\t\t\"Service unit count of Restart triggers\", []string{\"name\"}, nil)\n\ttimerLastTriggerDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"timer_last_trigger_seconds\"),\n\t\t\"Seconds since epoch of last trigger.\", []string{\"name\"}, nil)\n\tsocketAcceptedConnectionsDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"socket_accepted_connections_total\"),\n\t\t\"Total number of accepted socket connections\", []string{\"name\"}, nil)\n\tsocketCurrentConnectionsDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"socket_current_connections\"),\n\t\t\"Current number of socket connections\", []string{\"name\"}, nil)\n\tsocketRefusedConnectionsDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"socket_refused_connections_total\"),\n\t\t\"Total number of refused socket connections\", []string{\"name\"}, nil)\n\tsystemdVersionDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"version\"),\n\t\t\"Detected systemd version\", []string{\"version\"}, nil)\n\tvirtualizationDesc := prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, subsystem, \"virtualization_info\"),\n\t\t\"Detected virtualization technology\", []string{\"virtualization_type\"}, nil)\n\n\tif *oldSystemdUnitExclude != \"\" {\n\t\tif !systemdUnitExcludeSet {\n\t\t\tlogger.Warn(\"--collector.systemd.unit-blacklist is DEPRECATED and will be removed in 2.0.0, use --collector.systemd.unit-exclude\")\n\t\t\t*systemdUnitExclude = *oldSystemdUnitExclude\n\t\t} else {\n\t\t\treturn nil, errors.New(\"--collector.systemd.unit-blacklist and --collector.systemd.unit-exclude are mutually exclusive\")\n\t\t}\n\t}\n\tif *oldSystemdUnitInclude != \"\" {\n\t\tif !systemdUnitIncludeSet {\n\t\t\tlogger.Warn(\"--collector.systemd.unit-whitelist is DEPRECATED and will be removed in 2.0.0, use --collector.systemd.unit-include\")\n\t\t\t*systemdUnitInclude = *oldSystemdUnitInclude\n\t\t} else {\n\t\t\treturn nil, errors.New(\"--collector.systemd.unit-whitelist and --collector.systemd.unit-include are mutually exclusive\")\n\t\t}\n\t}\n\tlogger.Info(\"Parsed flag --collector.systemd.unit-include\", \"flag\", *systemdUnitInclude)\n\tsystemdUnitIncludePattern := regexp.MustCompile(fmt.Sprintf(\"^(?:%s)$\", *systemdUnitInclude))\n\tlogger.Info(\"Parsed flag --collector.systemd.unit-exclude\", \"flag\", *systemdUnitExclude)\n\tsystemdUnitExcludePattern := regexp.MustCompile(fmt.Sprintf(\"^(?:%s)$\", *systemdUnitExclude))\n\n\treturn &systemdCollector{\n\t\tunitDesc:                      unitDesc,\n\t\tunitStartTimeDesc:             unitStartTimeDesc,\n\t\tunitTasksCurrentDesc:          unitTasksCurrentDesc,\n\t\tunitTasksMaxDesc:              unitTasksMaxDesc,\n\t\tsystemRunningDesc:             systemRunningDesc,\n\t\tsummaryDesc:                   summaryDesc,\n\t\tnRestartsDesc:                 nRestartsDesc,\n\t\ttimerLastTriggerDesc:          timerLastTriggerDesc,\n\t\tsocketAcceptedConnectionsDesc: socketAcceptedConnectionsDesc,\n\t\tsocketCurrentConnectionsDesc:  socketCurrentConnectionsDesc,\n\t\tsocketRefusedConnectionsDesc:  socketRefusedConnectionsDesc,\n\t\tsystemdVersionDesc:            systemdVersionDesc,\n\t\tvirtualizationDesc:            virtualizationDesc,\n\t\tsystemdUnitIncludePattern:     systemdUnitIncludePattern,\n\t\tsystemdUnitExcludePattern:     systemdUnitExcludePattern,\n\t\tlogger:                        logger,\n\t}, nil\n}\n\n// Update gathers metrics from systemd.  Dbus collection is done in parallel\n// to reduce wait time for responses.\nfunc (c *systemdCollector) Update(ch chan<- prometheus.Metric) error {\n\tbegin := time.Now()\n\tconn, err := newSystemdDbusConn()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get dbus connection: %w\", err)\n\t}\n\tdefer conn.Close()\n\n\tsystemdVersion, systemdVersionFull := c.getSystemdVersion(conn)\n\tif systemdVersion < minSystemdVersionSystemState {\n\t\tc.logger.Debug(\"Detected systemd version is lower than minimum, some systemd state and timer metrics will not be available\", \"current\", systemdVersion, \"minimum\", minSystemdVersionSystemState)\n\t}\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.systemdVersionDesc,\n\t\tprometheus.GaugeValue,\n\t\tsystemdVersion,\n\t\tsystemdVersionFull,\n\t)\n\n\tsystemdVirtualization := c.getSystemdVirtualization(conn)\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.virtualizationDesc,\n\t\tprometheus.GaugeValue,\n\t\t1.0,\n\t\tsystemdVirtualization,\n\t)\n\n\tallUnits, err := c.getAllUnits(conn)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get units: %w\", err)\n\t}\n\tc.logger.Debug(\"getAllUnits took\", \"duration_seconds\", time.Since(begin).Seconds())\n\n\tbegin = time.Now()\n\tsummary := summarizeUnits(allUnits)\n\tc.collectSummaryMetrics(ch, summary)\n\tc.logger.Debug(\"collectSummaryMetrics took\", \"duration_seconds\", time.Since(begin).Seconds())\n\n\tbegin = time.Now()\n\tunits := filterUnits(allUnits, c.systemdUnitIncludePattern, c.systemdUnitExcludePattern, c.logger)\n\tc.logger.Debug(\"filterUnits took\", \"duration_seconds\", time.Since(begin).Seconds())\n\n\tvar wg sync.WaitGroup\n\tdefer wg.Wait()\n\n\twg.Add(1)\n\tgo func() {\n\t\tdefer wg.Done()\n\t\tbegin := time.Now()\n\t\tc.collectUnitStatusMetrics(conn, ch, units)\n\t\tc.logger.Debug(\"collectUnitStatusMetrics took\", \"duration_seconds\", time.Since(begin).Seconds())\n\t}()\n\n\tif *enableStartTimeMetrics {\n\t\twg.Add(1)\n\t\tgo func() {\n\t\t\tdefer wg.Done()\n\t\t\tbegin := time.Now()\n\t\t\tc.collectUnitStartTimeMetrics(conn, ch, units)\n\t\t\tc.logger.Debug(\"collectUnitStartTimeMetrics took\", \"duration_seconds\", time.Since(begin).Seconds())\n\t\t}()\n\t}\n\n\tif *enableTaskMetrics {\n\t\twg.Add(1)\n\t\tgo func() {\n\t\t\tdefer wg.Done()\n\t\t\tbegin := time.Now()\n\t\t\tc.collectUnitTasksMetrics(conn, ch, units)\n\t\t\tc.logger.Debug(\"collectUnitTasksMetrics took\", \"duration_seconds\", time.Since(begin).Seconds())\n\t\t}()\n\t}\n\n\tif systemdVersion >= minSystemdVersionSystemState {\n\t\twg.Add(1)\n\t\tgo func() {\n\t\t\tdefer wg.Done()\n\t\t\tbegin := time.Now()\n\t\t\tc.collectTimers(conn, ch, units)\n\t\t\tc.logger.Debug(\"collectTimers took\", \"duration_seconds\", time.Since(begin).Seconds())\n\t\t}()\n\t}\n\n\twg.Add(1)\n\tgo func() {\n\t\tdefer wg.Done()\n\t\tbegin := time.Now()\n\t\tc.collectSockets(conn, ch, units)\n\t\tc.logger.Debug(\"collectSockets took\", \"duration_seconds\", time.Since(begin).Seconds())\n\t}()\n\n\tif systemdVersion >= minSystemdVersionSystemState {\n\t\tbegin := time.Now()\n\t\terr = c.collectSystemState(conn, ch)\n\t\tc.logger.Debug(\"collectSystemState took\", \"duration_seconds\", time.Since(begin).Seconds())\n\t}\n\n\treturn err\n}\n\nfunc (c *systemdCollector) collectUnitStatusMetrics(conn *dbus.Conn, ch chan<- prometheus.Metric, units []unit) {\n\tfor _, unit := range units {\n\t\tserviceType := \"\"\n\t\tif strings.HasSuffix(unit.Name, \".service\") {\n\t\t\tserviceTypeProperty, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Service\", \"Type\")\n\t\t\tif err != nil {\n\t\t\t\tc.logger.Debug(\"couldn't get unit type\", \"unit\", unit.Name, \"err\", err)\n\t\t\t} else {\n\t\t\t\tserviceType = serviceTypeProperty.Value.Value().(string)\n\t\t\t}\n\t\t} else if strings.HasSuffix(unit.Name, \".mount\") {\n\t\t\tserviceTypeProperty, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Mount\", \"Type\")\n\t\t\tif err != nil {\n\t\t\t\tc.logger.Debug(\"couldn't get unit type\", \"unit\", unit.Name, \"err\", err)\n\t\t\t} else {\n\t\t\t\tserviceType = serviceTypeProperty.Value.Value().(string)\n\t\t\t}\n\t\t}\n\t\tfor _, stateName := range unitStatesName {\n\t\t\tisActive := 0.0\n\t\t\tif stateName == unit.ActiveState {\n\t\t\t\tisActive = 1.0\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.unitDesc, prometheus.GaugeValue, isActive,\n\t\t\t\tunit.Name, stateName, serviceType)\n\t\t}\n\t\tif *enableRestartsMetrics && strings.HasSuffix(unit.Name, \".service\") {\n\t\t\t// NRestarts wasn't added until systemd 235.\n\t\t\trestartsCount, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Service\", \"NRestarts\")\n\t\t\tif err != nil {\n\t\t\t\tc.logger.Debug(\"couldn't get unit NRestarts\", \"unit\", unit.Name, \"err\", err)\n\t\t\t} else {\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tc.nRestartsDesc, prometheus.CounterValue,\n\t\t\t\t\tfloat64(restartsCount.Value.Value().(uint32)), unit.Name)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (c *systemdCollector) collectSockets(conn *dbus.Conn, ch chan<- prometheus.Metric, units []unit) {\n\tfor _, unit := range units {\n\t\tif !strings.HasSuffix(unit.Name, \".socket\") {\n\t\t\tcontinue\n\t\t}\n\n\t\tacceptedConnectionCount, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Socket\", \"NAccepted\")\n\t\tif err != nil {\n\t\t\tc.logger.Debug(\"couldn't get unit NAccepted\", \"unit\", unit.Name, \"err\", err)\n\t\t\tcontinue\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.socketAcceptedConnectionsDesc, prometheus.CounterValue,\n\t\t\tfloat64(acceptedConnectionCount.Value.Value().(uint32)), unit.Name)\n\n\t\tcurrentConnectionCount, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Socket\", \"NConnections\")\n\t\tif err != nil {\n\t\t\tc.logger.Debug(\"couldn't get unit NConnections\", \"unit\", unit.Name, \"err\", err)\n\t\t\tcontinue\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.socketCurrentConnectionsDesc, prometheus.GaugeValue,\n\t\t\tfloat64(currentConnectionCount.Value.Value().(uint32)), unit.Name)\n\n\t\t// NRefused wasn't added until systemd 239.\n\t\trefusedConnectionCount, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Socket\", \"NRefused\")\n\t\tif err == nil {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.socketRefusedConnectionsDesc, prometheus.GaugeValue,\n\t\t\t\tfloat64(refusedConnectionCount.Value.Value().(uint32)), unit.Name)\n\t\t}\n\t}\n}\n\nfunc (c *systemdCollector) collectUnitStartTimeMetrics(conn *dbus.Conn, ch chan<- prometheus.Metric, units []unit) {\n\tvar startTimeUsec uint64\n\n\tfor _, unit := range units {\n\t\tif unit.ActiveState != \"active\" {\n\t\t\tstartTimeUsec = 0\n\t\t} else {\n\t\t\ttimestampValue, err := conn.GetUnitPropertyContext(context.TODO(), unit.Name, \"ActiveEnterTimestamp\")\n\t\t\tif err != nil {\n\t\t\t\tc.logger.Debug(\"couldn't get unit StartTimeUsec\", \"unit\", unit.Name, \"err\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tstartTimeUsec = timestampValue.Value.Value().(uint64)\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.unitStartTimeDesc, prometheus.GaugeValue,\n\t\t\tfloat64(startTimeUsec)/1e6, unit.Name)\n\t}\n}\n\nfunc (c *systemdCollector) collectUnitTasksMetrics(conn *dbus.Conn, ch chan<- prometheus.Metric, units []unit) {\n\tvar val uint64\n\tfor _, unit := range units {\n\t\tif strings.HasSuffix(unit.Name, \".service\") {\n\t\t\ttasksCurrentCount, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Service\", \"TasksCurrent\")\n\t\t\tif err != nil {\n\t\t\t\tc.logger.Debug(\"couldn't get unit TasksCurrent\", \"unit\", unit.Name, \"err\", err)\n\t\t\t} else {\n\t\t\t\tval = tasksCurrentCount.Value.Value().(uint64)\n\t\t\t\t// Don't set if tasksCurrent if dbus reports MaxUint64.\n\t\t\t\tif val != math.MaxUint64 {\n\t\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\t\tc.unitTasksCurrentDesc, prometheus.GaugeValue,\n\t\t\t\t\t\tfloat64(val), unit.Name)\n\t\t\t\t}\n\t\t\t}\n\t\t\ttasksMaxCount, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Service\", \"TasksMax\")\n\t\t\tif err != nil {\n\t\t\t\tc.logger.Debug(\"couldn't get unit TasksMax\", \"unit\", unit.Name, \"err\", err)\n\t\t\t} else {\n\t\t\t\tval = tasksMaxCount.Value.Value().(uint64)\n\t\t\t\t// Don't set if tasksMax if dbus reports MaxUint64.\n\t\t\t\tif val != math.MaxUint64 {\n\t\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\t\tc.unitTasksMaxDesc, prometheus.GaugeValue,\n\t\t\t\t\t\tfloat64(val), unit.Name)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (c *systemdCollector) collectTimers(conn *dbus.Conn, ch chan<- prometheus.Metric, units []unit) {\n\tfor _, unit := range units {\n\t\tif !strings.HasSuffix(unit.Name, \".timer\") {\n\t\t\tcontinue\n\t\t}\n\n\t\tlastTriggerValue, err := conn.GetUnitTypePropertyContext(context.TODO(), unit.Name, \"Timer\", \"LastTriggerUSec\")\n\t\tif err != nil {\n\t\t\tc.logger.Debug(\"couldn't get unit LastTriggerUSec\", \"unit\", unit.Name, \"err\", err)\n\t\t\tcontinue\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.timerLastTriggerDesc, prometheus.GaugeValue,\n\t\t\tfloat64(lastTriggerValue.Value.Value().(uint64))/1e6, unit.Name)\n\t}\n}\n\nfunc (c *systemdCollector) collectSummaryMetrics(ch chan<- prometheus.Metric, summary map[string]float64) {\n\tfor stateName, count := range summary {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.summaryDesc, prometheus.GaugeValue, count, stateName)\n\t}\n}\n\nfunc (c *systemdCollector) collectSystemState(conn *dbus.Conn, ch chan<- prometheus.Metric) error {\n\tsystemState, err := conn.GetManagerProperty(\"SystemState\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get system state: %w\", err)\n\t}\n\tisSystemRunning := 0.0\n\tif systemState == `\"running\"` {\n\t\tisSystemRunning = 1.0\n\t}\n\tch <- prometheus.MustNewConstMetric(c.systemRunningDesc, prometheus.GaugeValue, isSystemRunning)\n\treturn nil\n}\n\nfunc newSystemdDbusConn() (*dbus.Conn, error) {\n\tif *systemdPrivate {\n\t\treturn dbus.NewSystemdConnectionContext(context.TODO())\n\t}\n\treturn dbus.NewWithContext(context.TODO())\n}\n\ntype unit struct {\n\tdbus.UnitStatus\n}\n\nfunc (c *systemdCollector) getAllUnits(conn *dbus.Conn) ([]unit, error) {\n\tallUnits, err := conn.ListUnitsContext(context.TODO())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tresult := make([]unit, 0, len(allUnits))\n\tfor _, status := range allUnits {\n\t\tunit := unit{\n\t\t\tUnitStatus: status,\n\t\t}\n\t\tresult = append(result, unit)\n\t}\n\n\treturn result, nil\n}\n\nfunc summarizeUnits(units []unit) map[string]float64 {\n\tsummarized := make(map[string]float64)\n\n\tfor _, unitStateName := range unitStatesName {\n\t\tsummarized[unitStateName] = 0.0\n\t}\n\n\tfor _, unit := range units {\n\t\tsummarized[unit.ActiveState] += 1.0\n\t}\n\n\treturn summarized\n}\n\nfunc filterUnits(units []unit, includePattern, excludePattern *regexp.Regexp, logger *slog.Logger) []unit {\n\tfiltered := make([]unit, 0, len(units))\n\tfor _, unit := range units {\n\t\tif includePattern.MatchString(unit.Name) && !excludePattern.MatchString(unit.Name) && unit.LoadState == \"loaded\" {\n\t\t\tlogger.Debug(\"Adding unit\", \"unit\", unit.Name)\n\t\t\tfiltered = append(filtered, unit)\n\t\t} else {\n\t\t\tlogger.Debug(\"Ignoring unit\", \"unit\", unit.Name)\n\t\t}\n\t}\n\n\treturn filtered\n}\n\nfunc (c *systemdCollector) getSystemdVersion(conn *dbus.Conn) (float64, string) {\n\tversion, err := conn.GetManagerProperty(\"Version\")\n\tif err != nil {\n\t\tc.logger.Debug(\"Unable to get systemd version property, defaulting to 0\")\n\t\treturn 0, \"\"\n\t}\n\tversion = strings.TrimPrefix(strings.TrimSuffix(version, `\"`), `\"`)\n\tc.logger.Debug(\"Got systemd version\", \"version\", version)\n\tparsedVersion := systemdVersionRE.FindString(version)\n\tv, err := strconv.ParseFloat(parsedVersion, 64)\n\tif err != nil {\n\t\tc.logger.Debug(\"Got invalid systemd version\", \"version\", version)\n\t\treturn 0, \"\"\n\t}\n\treturn v, version\n}\n\nfunc (c *systemdCollector) getSystemdVirtualization(conn *dbus.Conn) string {\n\tvirt, err := conn.GetManagerProperty(\"Virtualization\")\n\tif err != nil {\n\t\tc.logger.Debug(\"Could not get Virtualization property\", \"err\", err)\n\t\treturn \"unknown\"\n\t}\n\n\tvirtStr := strings.Trim(virt, `\"`)\n\tif virtStr == \"\" {\n\t\t// If no virtualization type is returned, assume it's bare metal.\n\t\treturn \"none\"\n\t}\n\n\treturn virtStr\n}\n"
  },
  {
    "path": "collector/systemd_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nosystemd\n\npackage collector\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"regexp\"\n\t\"testing\"\n\n\t\"github.com/coreos/go-systemd/v22/dbus\"\n)\n\n// Creates mock UnitLists\nfunc getUnitListFixtures() [][]unit {\n\tfixture1 := []unit{\n\t\t{\n\t\t\tUnitStatus: dbus.UnitStatus{\n\t\t\t\tName:        \"foo\",\n\t\t\t\tDescription: \"foo desc\",\n\t\t\t\tLoadState:   \"loaded\",\n\t\t\t\tActiveState: \"active\",\n\t\t\t\tSubState:    \"running\",\n\t\t\t\tFollowed:    \"\",\n\t\t\t\tPath:        \"/org/freedesktop/systemd1/unit/foo\",\n\t\t\t\tJobId:       0,\n\t\t\t\tJobType:     \"\",\n\t\t\t\tJobPath:     \"/\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tUnitStatus: dbus.UnitStatus{\n\t\t\t\tName:        \"bar\",\n\t\t\t\tDescription: \"bar desc\",\n\t\t\t\tLoadState:   \"not-found\",\n\t\t\t\tActiveState: \"inactive\",\n\t\t\t\tSubState:    \"dead\",\n\t\t\t\tFollowed:    \"\",\n\t\t\t\tPath:        \"/org/freedesktop/systemd1/unit/bar\",\n\t\t\t\tJobId:       0,\n\t\t\t\tJobType:     \"\",\n\t\t\t\tJobPath:     \"/\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tUnitStatus: dbus.UnitStatus{\n\t\t\t\tName:        \"foobar\",\n\t\t\t\tDescription: \"bar desc\",\n\t\t\t\tLoadState:   \"not-found\",\n\t\t\t\tActiveState: \"inactive\",\n\t\t\t\tSubState:    \"dead\",\n\t\t\t\tFollowed:    \"\",\n\t\t\t\tPath:        \"/org/freedesktop/systemd1/unit/bar\",\n\t\t\t\tJobId:       0,\n\t\t\t\tJobType:     \"\",\n\t\t\t\tJobPath:     \"/\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tUnitStatus: dbus.UnitStatus{\n\t\t\t\tName:        \"baz\",\n\t\t\t\tDescription: \"bar desc\",\n\t\t\t\tLoadState:   \"not-found\",\n\t\t\t\tActiveState: \"inactive\",\n\t\t\t\tSubState:    \"dead\",\n\t\t\t\tFollowed:    \"\",\n\t\t\t\tPath:        \"/org/freedesktop/systemd1/unit/bar\",\n\t\t\t\tJobId:       0,\n\t\t\t\tJobType:     \"\",\n\t\t\t\tJobPath:     \"/\",\n\t\t\t},\n\t\t},\n\t}\n\n\tfixture2 := []unit{}\n\n\treturn [][]unit{fixture1, fixture2}\n}\n\nfunc TestSystemdIgnoreFilter(t *testing.T) {\n\tfixtures := getUnitListFixtures()\n\tincludePattern := regexp.MustCompile(\"^foo$\")\n\texcludePattern := regexp.MustCompile(\"^bar$\")\n\tfiltered := filterUnits(fixtures[0], includePattern, excludePattern, slog.New(slog.NewTextHandler(io.Discard, nil)))\n\tfor _, unit := range filtered {\n\t\tif excludePattern.MatchString(unit.Name) || !includePattern.MatchString(unit.Name) {\n\t\t\tt.Error(unit.Name, \"should not be in the filtered list\")\n\t\t}\n\t}\n}\nfunc TestSystemdIgnoreFilterDefaultKeepsAll(t *testing.T) {\n\tlogger := slog.New(slog.NewTextHandler(io.Discard, nil))\n\tc, err := NewSystemdCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tfixtures := getUnitListFixtures()\n\tcollector := c.(*systemdCollector)\n\tfiltered := filterUnits(fixtures[0], collector.systemdUnitIncludePattern, collector.systemdUnitExcludePattern, logger)\n\t// Adjust fixtures by 3 \"not-found\" units.\n\tif len(filtered) != len(fixtures[0])-3 {\n\t\tt.Error(\"Default filters removed units\")\n\t}\n}\n\nfunc TestSystemdSummary(t *testing.T) {\n\tfixtures := getUnitListFixtures()\n\tsummary := summarizeUnits(fixtures[0])\n\n\tfor _, state := range unitStatesName {\n\t\tswitch state {\n\t\tcase \"inactive\":\n\t\t\ttestSummaryHelper(t, state, summary[state], 3.0)\n\t\tcase \"active\":\n\t\t\ttestSummaryHelper(t, state, summary[state], 1.0)\n\t\tdefault:\n\t\t\ttestSummaryHelper(t, state, summary[state], 0.0)\n\t\t}\n\t}\n}\n\nfunc testSummaryHelper(t *testing.T, state string, actual float64, expected float64) {\n\tif actual != expected {\n\t\tt.Errorf(\"Summary mode didn't count %s jobs correctly. Actual: %f, expected: %f\", state, actual, expected)\n\t}\n}\n"
  },
  {
    "path": "collector/tapestats_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notapestats\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"regexp\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nvar (\n\tignoredTapeDevices = kingpin.Flag(\"collector.tapestats.ignored-devices\", \"Regexp of devices to ignore for tapestats.\").Default(\"^$\").String()\n)\n\ntype tapestatsCollector struct {\n\tignoredDevicesPattern *regexp.Regexp\n\tioNow                 *prometheus.Desc\n\tioTimeSeconds         *prometheus.Desc\n\tothersCompletedTotal  *prometheus.Desc\n\treadByteTotal         *prometheus.Desc\n\treadsCompletedTotal   *prometheus.Desc\n\treadTimeSeconds       *prometheus.Desc\n\twrittenByteTotal      *prometheus.Desc\n\twritesCompletedTotal  *prometheus.Desc\n\twriteTimeSeconds      *prometheus.Desc\n\tresidualTotal         *prometheus.Desc\n\tfs                    sysfs.FS\n\tlogger                *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"tapestats\", defaultEnabled, NewTapestatsCollector)\n}\n\n// NewTapestatsCollector returns a new Collector exposing tape device stats.\n// Docs from https://www.kernel.org/doc/html/latest/scsi/st.html#sysfs-and-statistics-for-tape-devices\nfunc NewTapestatsCollector(logger *slog.Logger) (Collector, error) {\n\tvar tapeLabelNames = []string{\"device\"}\n\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\ttapeSubsystem := \"tape\"\n\n\treturn &tapestatsCollector{\n\t\tignoredDevicesPattern: regexp.MustCompile(*ignoredTapeDevices),\n\n\t\tioNow: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"io_now\"),\n\t\t\t\"The number of I/Os currently outstanding to this device.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\tioTimeSeconds: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"io_time_seconds_total\"),\n\t\t\t\"The amount of time spent waiting for all I/O to complete (including read and write). This includes tape movement commands such as seeking between file or set marks and implicit tape movement such as when rewind on close tape devices are used.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\tothersCompletedTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"io_others_total\"),\n\t\t\t\"The number of I/Os issued to the tape drive other than read or write commands. The time taken to complete these commands uses the following calculation io_time_seconds_total-read_time_seconds_total-write_time_seconds_total\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\treadByteTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"read_bytes_total\"),\n\t\t\t\"The number of bytes read from the tape drive.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\treadsCompletedTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"reads_completed_total\"),\n\t\t\t\"The number of read requests issued to the tape drive.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\treadTimeSeconds: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"read_time_seconds_total\"),\n\t\t\t\"The amount of time spent waiting for read requests to complete.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\twrittenByteTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"written_bytes_total\"),\n\t\t\t\"The number of bytes written to the tape drive.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\twritesCompletedTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"writes_completed_total\"),\n\t\t\t\"The number of write requests issued to the tape drive.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\twriteTimeSeconds: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"write_time_seconds_total\"),\n\t\t\t\"The amount of time spent waiting for write requests to complete.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\tresidualTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, tapeSubsystem, \"residual_total\"),\n\t\t\t\"The number of times during a read or write we found the residual amount to be non-zero. This should mean that a program is issuing a read larger thean the block size on tape. For write not all data made it to tape.\",\n\t\t\ttapeLabelNames, nil,\n\t\t),\n\t\tlogger: logger,\n\t\tfs:     fs,\n\t}, nil\n}\n\nfunc (c *tapestatsCollector) Update(ch chan<- prometheus.Metric) error {\n\ttapes, err := c.fs.SCSITapeClass()\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\tc.logger.Debug(\"scsi_tape stats not found, skipping\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"error obtaining SCSITape class info: %s\", err)\n\t}\n\n\tfor _, tape := range tapes {\n\t\tif c.ignoredDevicesPattern.MatchString(tape.Name) {\n\t\t\tc.logger.Debug(\"Ignoring device\", \"device\", tape.Name)\n\t\t\tcontinue\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(c.ioNow, prometheus.GaugeValue, float64(tape.Counters.InFlight), tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.ioTimeSeconds, prometheus.CounterValue, float64(tape.Counters.IoNs)*0.000000001, tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.othersCompletedTotal, prometheus.CounterValue, float64(tape.Counters.OtherCnt), tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.readByteTotal, prometheus.CounterValue, float64(tape.Counters.ReadByteCnt), tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.readsCompletedTotal, prometheus.CounterValue, float64(tape.Counters.ReadCnt), tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.readTimeSeconds, prometheus.CounterValue, float64(tape.Counters.ReadNs)*0.000000001, tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.residualTotal, prometheus.CounterValue, float64(tape.Counters.ResidCnt), tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.writtenByteTotal, prometheus.CounterValue, float64(tape.Counters.WriteByteCnt), tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.writesCompletedTotal, prometheus.CounterValue, float64(tape.Counters.WriteCnt), tape.Name)\n\t\tch <- prometheus.MustNewConstMetric(c.writeTimeSeconds, prometheus.CounterValue, float64(tape.Counters.WriteNs)*0.000000001, tape.Name)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/tcpstat_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notcpstat\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"syscall\"\n\t\"unsafe\"\n\n\t\"github.com/mdlayher/netlink\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype tcpConnectionState int\n\nconst (\n\t// TCP_ESTABLISHED\n\ttcpEstablished tcpConnectionState = iota + 1\n\t// TCP_SYN_SENT\n\ttcpSynSent\n\t// TCP_SYN_RECV\n\ttcpSynRecv\n\t// TCP_FIN_WAIT1\n\ttcpFinWait1\n\t// TCP_FIN_WAIT2\n\ttcpFinWait2\n\t// TCP_TIME_WAIT\n\ttcpTimeWait\n\t// TCP_CLOSE\n\ttcpClose\n\t// TCP_CLOSE_WAIT\n\ttcpCloseWait\n\t// TCP_LAST_ACK\n\ttcpLastAck\n\t// TCP_LISTEN\n\ttcpListen\n\t// TCP_CLOSING\n\ttcpClosing\n\t// TCP_RX_BUFFER\n\ttcpRxQueuedBytes\n\t// TCP_TX_BUFFER\n\ttcpTxQueuedBytes\n)\n\ntype tcpStatCollector struct {\n\tdesc   typedDesc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"tcpstat\", defaultDisabled, NewTCPStatCollector)\n}\n\n// NewTCPStatCollector returns a new Collector exposing network stats.\nfunc NewTCPStatCollector(logger *slog.Logger) (Collector, error) {\n\treturn &tcpStatCollector{\n\t\tdesc: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"tcp\", \"connection_states\"),\n\t\t\t\"Number of connection states.\",\n\t\t\t[]string{\"state\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\n// InetDiagSockID (inet_diag_sockid) contains the socket identity.\n// https://github.com/torvalds/linux/blob/v4.0/include/uapi/linux/inet_diag.h#L13\ntype InetDiagSockID struct {\n\tSourcePort [2]byte\n\tDestPort   [2]byte\n\tSourceIP   [4][4]byte\n\tDestIP     [4][4]byte\n\tInterface  uint32\n\tCookie     [2]uint32\n}\n\n// InetDiagReqV2 (inet_diag_req_v2) is used to request diagnostic data.\n// https://github.com/torvalds/linux/blob/v4.0/include/uapi/linux/inet_diag.h#L37\ntype InetDiagReqV2 struct {\n\tFamily   uint8\n\tProtocol uint8\n\tExt      uint8\n\tPad      uint8\n\tStates   uint32\n\tID       InetDiagSockID\n}\n\nconst sizeOfDiagRequest = 0x38\n\nfunc (req *InetDiagReqV2) Serialize() []byte {\n\treturn (*(*[sizeOfDiagRequest]byte)(unsafe.Pointer(req)))[:]\n}\n\nfunc (req *InetDiagReqV2) Len() int {\n\treturn sizeOfDiagRequest\n}\n\ntype InetDiagMsg struct {\n\tFamily  uint8\n\tState   uint8\n\tTimer   uint8\n\tRetrans uint8\n\tID      InetDiagSockID\n\tExpires uint32\n\tRQueue  uint32\n\tWQueue  uint32\n\tUID     uint32\n\tInode   uint32\n}\n\nfunc parseInetDiagMsg(b []byte) *InetDiagMsg {\n\treturn (*InetDiagMsg)(unsafe.Pointer(&b[0]))\n}\n\nfunc (c *tcpStatCollector) Update(ch chan<- prometheus.Metric) error {\n\ttcpStats, err := getTCPStats(syscall.AF_INET)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get tcpstats: %w\", err)\n\t}\n\n\t// if enabled ipv6 system\n\tif _, hasIPv6 := os.Stat(procFilePath(\"net/tcp6\")); hasIPv6 == nil {\n\t\ttcp6Stats, err := getTCPStats(syscall.AF_INET6)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"couldn't get tcp6stats: %w\", err)\n\t\t}\n\n\t\tfor st, value := range tcp6Stats {\n\t\t\ttcpStats[st] += value\n\t\t}\n\t}\n\n\tfor st, value := range tcpStats {\n\t\tch <- c.desc.mustNewConstMetric(value, st.String())\n\t}\n\n\treturn nil\n}\n\nfunc getTCPStats(family uint8) (map[tcpConnectionState]float64, error) {\n\tconst TCPFAll = 0xFFF\n\tconst InetDiagInfo = 2\n\tconst SockDiagByFamily = 20\n\n\tconn, err := netlink.Dial(syscall.NETLINK_INET_DIAG, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"couldn't connect netlink: %w\", err)\n\t}\n\tdefer conn.Close()\n\n\tmsg := netlink.Message{\n\t\tHeader: netlink.Header{\n\t\t\tType:  SockDiagByFamily,\n\t\t\tFlags: syscall.NLM_F_REQUEST | syscall.NLM_F_DUMP,\n\t\t},\n\t\tData: (&InetDiagReqV2{\n\t\t\tFamily:   family,\n\t\t\tProtocol: syscall.IPPROTO_TCP,\n\t\t\tStates:   TCPFAll,\n\t\t\tExt:      0 | 1<<(InetDiagInfo-1),\n\t\t}).Serialize(),\n\t}\n\n\tmessages, err := conn.Execute(msg)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn parseTCPStats(messages)\n}\n\nfunc parseTCPStats(msgs []netlink.Message) (map[tcpConnectionState]float64, error) {\n\ttcpStats := map[tcpConnectionState]float64{}\n\n\tfor _, m := range msgs {\n\t\tmsg := parseInetDiagMsg(m.Data)\n\n\t\ttcpStats[tcpTxQueuedBytes] += float64(msg.WQueue)\n\t\ttcpStats[tcpRxQueuedBytes] += float64(msg.RQueue)\n\t\ttcpStats[tcpConnectionState(msg.State)]++\n\t}\n\n\treturn tcpStats, nil\n}\n\nfunc (st tcpConnectionState) String() string {\n\tswitch st {\n\tcase tcpEstablished:\n\t\treturn \"established\"\n\tcase tcpSynSent:\n\t\treturn \"syn_sent\"\n\tcase tcpSynRecv:\n\t\treturn \"syn_recv\"\n\tcase tcpFinWait1:\n\t\treturn \"fin_wait1\"\n\tcase tcpFinWait2:\n\t\treturn \"fin_wait2\"\n\tcase tcpTimeWait:\n\t\treturn \"time_wait\"\n\tcase tcpClose:\n\t\treturn \"close\"\n\tcase tcpCloseWait:\n\t\treturn \"close_wait\"\n\tcase tcpLastAck:\n\t\treturn \"last_ack\"\n\tcase tcpListen:\n\t\treturn \"listen\"\n\tcase tcpClosing:\n\t\treturn \"closing\"\n\tcase tcpRxQueuedBytes:\n\t\treturn \"rx_queued_bytes\"\n\tcase tcpTxQueuedBytes:\n\t\treturn \"tx_queued_bytes\"\n\tdefault:\n\t\treturn \"unknown\"\n\t}\n}\n"
  },
  {
    "path": "collector/tcpstat_linux_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notcpstat\n\npackage collector\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"syscall\"\n\t\"testing\"\n\n\t\"github.com/mdlayher/netlink\"\n)\n\nfunc Test_parseTCPStats(t *testing.T) {\n\tencode := func(m InetDiagMsg) []byte {\n\t\tvar buf bytes.Buffer\n\t\terr := binary.Write(&buf, binary.NativeEndian, m)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\treturn buf.Bytes()\n\t}\n\n\tmsg := []netlink.Message{\n\t\t{\n\t\t\tData: encode(InetDiagMsg{\n\t\t\t\tFamily:  syscall.AF_INET,\n\t\t\t\tState:   uint8(tcpEstablished),\n\t\t\t\tTimer:   0,\n\t\t\t\tRetrans: 0,\n\t\t\t\tID:      InetDiagSockID{},\n\t\t\t\tExpires: 0,\n\t\t\t\tRQueue:  11,\n\t\t\t\tWQueue:  21,\n\t\t\t\tUID:     0,\n\t\t\t\tInode:   0,\n\t\t\t}),\n\t\t},\n\t\t{\n\t\t\tData: encode(InetDiagMsg{\n\t\t\t\tFamily:  syscall.AF_INET,\n\t\t\t\tState:   uint8(tcpListen),\n\t\t\t\tTimer:   0,\n\t\t\t\tRetrans: 0,\n\t\t\t\tID:      InetDiagSockID{},\n\t\t\t\tExpires: 0,\n\t\t\t\tRQueue:  11,\n\t\t\t\tWQueue:  21,\n\t\t\t\tUID:     0,\n\t\t\t\tInode:   0,\n\t\t\t}),\n\t\t},\n\t}\n\n\ttcpStats, err := parseTCPStats(msg)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif want, got := 1, int(tcpStats[tcpEstablished]); want != got {\n\t\tt.Errorf(\"want tcpstat number of established state %d, got %d\", want, got)\n\t}\n\n\tif want, got := 1, int(tcpStats[tcpListen]); want != got {\n\t\tt.Errorf(\"want tcpstat number of listen state %d, got %d\", want, got)\n\t}\n\n\tif want, got := 42, int(tcpStats[tcpTxQueuedBytes]); want != got {\n\t\tt.Errorf(\"want tcpstat number of bytes in tx queue %d, got %d\", want, got)\n\t}\n\tif want, got := 22, int(tcpStats[tcpRxQueuedBytes]); want != got {\n\t\tt.Errorf(\"want tcpstat number of bytes in rx queue %d, got %d\", want, got)\n\t}\n\n}\n"
  },
  {
    "path": "collector/textfile.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notextfile\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\tdto \"github.com/prometheus/client_model/go\"\n\t\"github.com/prometheus/common/expfmt\"\n\t\"github.com/prometheus/common/model\"\n)\n\nvar (\n\ttextFileDirectories = kingpin.Flag(\"collector.textfile.directory\", \"Directory to read text files with metrics from, supports glob matching. (repeatable)\").Default(\"\").Strings()\n\tmtimeDesc           = prometheus.NewDesc(\n\t\t\"node_textfile_mtime_seconds\",\n\t\t\"Unixtime mtime of textfiles successfully read.\",\n\t\t[]string{\"file\"},\n\t\tnil,\n\t)\n)\n\ntype textFileCollector struct {\n\tpaths []string\n\t// Only set for testing to get predictable output.\n\tmtime  *float64\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"textfile\", defaultEnabled, NewTextFileCollector)\n}\n\n// NewTextFileCollector returns a new Collector exposing metrics read from files\n// in the given textfile directory.\nfunc NewTextFileCollector(logger *slog.Logger) (Collector, error) {\n\tc := &textFileCollector{\n\t\tpaths:  *textFileDirectories,\n\t\tlogger: logger,\n\t}\n\treturn c, nil\n}\n\nfunc convertMetricFamily(metricFamily *dto.MetricFamily, ch chan<- prometheus.Metric, logger *slog.Logger) {\n\tvar valType prometheus.ValueType\n\tvar val float64\n\n\tallLabelNames := map[string]struct{}{}\n\tfor _, metric := range metricFamily.Metric {\n\t\tlabels := metric.GetLabel()\n\t\tfor _, label := range labels {\n\t\t\tif _, ok := allLabelNames[label.GetName()]; !ok {\n\t\t\t\tallLabelNames[label.GetName()] = struct{}{}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor _, metric := range metricFamily.Metric {\n\t\tif metric.TimestampMs != nil {\n\t\t\tlogger.Warn(\"Ignoring unsupported custom timestamp on textfile collector metric\", \"metric\", metric)\n\t\t}\n\n\t\tlabels := metric.GetLabel()\n\t\tvar names []string\n\t\tvar values []string\n\t\tfor _, label := range labels {\n\t\t\tnames = append(names, label.GetName())\n\t\t\tvalues = append(values, label.GetValue())\n\t\t}\n\n\t\tfor k := range allLabelNames {\n\t\t\tif !slices.Contains(names, k) {\n\t\t\t\tnames = append(names, k)\n\t\t\t\tvalues = append(values, \"\")\n\t\t\t}\n\t\t}\n\n\t\tmetricType := metricFamily.GetType()\n\t\tswitch metricType {\n\t\tcase dto.MetricType_COUNTER:\n\t\t\tvalType = prometheus.CounterValue\n\t\t\tval = metric.Counter.GetValue()\n\n\t\tcase dto.MetricType_GAUGE:\n\t\t\tvalType = prometheus.GaugeValue\n\t\t\tval = metric.Gauge.GetValue()\n\n\t\tcase dto.MetricType_UNTYPED:\n\t\t\tvalType = prometheus.UntypedValue\n\t\t\tval = metric.Untyped.GetValue()\n\n\t\tcase dto.MetricType_SUMMARY:\n\t\t\tquantiles := map[float64]float64{}\n\t\t\tfor _, q := range metric.Summary.Quantile {\n\t\t\t\tquantiles[q.GetQuantile()] = q.GetValue()\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstSummary(\n\t\t\t\tprometheus.NewDesc(\n\t\t\t\t\t*metricFamily.Name,\n\t\t\t\t\tmetricFamily.GetHelp(),\n\t\t\t\t\tnames, nil,\n\t\t\t\t),\n\t\t\t\tmetric.Summary.GetSampleCount(),\n\t\t\t\tmetric.Summary.GetSampleSum(),\n\t\t\t\tquantiles, values...,\n\t\t\t)\n\t\tcase dto.MetricType_HISTOGRAM:\n\t\t\tbuckets := map[float64]uint64{}\n\t\t\tfor _, b := range metric.Histogram.Bucket {\n\t\t\t\tbuckets[b.GetUpperBound()] = b.GetCumulativeCount()\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstHistogram(\n\t\t\t\tprometheus.NewDesc(\n\t\t\t\t\t*metricFamily.Name,\n\t\t\t\t\tmetricFamily.GetHelp(),\n\t\t\t\t\tnames, nil,\n\t\t\t\t),\n\t\t\t\tmetric.Histogram.GetSampleCount(),\n\t\t\t\tmetric.Histogram.GetSampleSum(),\n\t\t\t\tbuckets, values...,\n\t\t\t)\n\t\tdefault:\n\t\t\tpanic(\"unknown metric type\")\n\t\t}\n\t\tif metricType == dto.MetricType_GAUGE || metricType == dto.MetricType_COUNTER || metricType == dto.MetricType_UNTYPED {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tprometheus.NewDesc(\n\t\t\t\t\t*metricFamily.Name,\n\t\t\t\t\tmetricFamily.GetHelp(),\n\t\t\t\t\tnames, nil,\n\t\t\t\t),\n\t\t\t\tvalType, val, values...,\n\t\t\t)\n\t\t}\n\t}\n}\n\nfunc (c *textFileCollector) exportMTimes(mtimes map[string]time.Time, ch chan<- prometheus.Metric) {\n\tif len(mtimes) == 0 {\n\t\treturn\n\t}\n\n\t// Export the mtimes of the successful files.\n\t// Sorting is needed for predictable output comparison in tests.\n\tfilepaths := make([]string, 0, len(mtimes))\n\tfor path := range mtimes {\n\t\tfilepaths = append(filepaths, path)\n\t}\n\tsort.Strings(filepaths)\n\n\tfor _, path := range filepaths {\n\t\tmtime := float64(mtimes[path].UnixNano() / 1e9)\n\t\tif c.mtime != nil {\n\t\t\tmtime = *c.mtime\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(mtimeDesc, prometheus.GaugeValue, mtime, path)\n\t}\n}\n\n// Update implements the Collector interface.\nfunc (c *textFileCollector) Update(ch chan<- prometheus.Metric) error {\n\t// Iterate over files and accumulate their metrics, but also track any\n\t// parsing errors so an error metric can be reported.\n\tvar errored bool\n\tvar parsedFamilies []*dto.MetricFamily\n\tmetricsNamesToFiles := map[string][]string{}\n\tmetricsNamesToHelpTexts := map[string][2]string{}\n\n\tpaths := []string{}\n\tfor _, glob := range c.paths {\n\t\tps, err := filepath.Glob(glob)\n\t\tif err != nil || len(ps) == 0 {\n\t\t\t// not glob or not accessible path either way assume single\n\t\t\t// directory and let os.ReadDir handle it\n\t\t\tps = []string{glob}\n\t\t}\n\t\tpaths = append(paths, ps...)\n\t}\n\n\tmtimes := make(map[string]time.Time)\n\tfor _, path := range paths {\n\t\tfiles, err := os.ReadDir(path)\n\t\tif err != nil && path != \"\" {\n\t\t\terrored = true\n\t\t\tc.logger.Error(\"failed to read textfile collector directory\", \"path\", path, \"err\", err)\n\t\t}\n\n\t\tfor _, f := range files {\n\t\t\tmetricsFilePath := filepath.Join(path, f.Name())\n\t\t\tif !strings.HasSuffix(f.Name(), \".prom\") {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tmtime, families, err := c.processFile(path, f.Name(), ch)\n\n\t\t\tfor _, mf := range families {\n\t\t\t\t// Check for metrics with inconsistent help texts and take the first help text occurrence.\n\t\t\t\tif helpTexts, seen := metricsNamesToHelpTexts[*mf.Name]; seen {\n\t\t\t\t\tif mf.Help != nil && helpTexts[0] != *mf.Help || helpTexts[1] != \"\" {\n\t\t\t\t\t\tmetricsNamesToHelpTexts[*mf.Name] = [2]string{helpTexts[0], *mf.Help}\n\t\t\t\t\t\terrored = true\n\t\t\t\t\t\tc.logger.Error(\"inconsistent metric help text\",\n\t\t\t\t\t\t\t\"metric\", *mf.Name,\n\t\t\t\t\t\t\t\"original_help_text\", helpTexts[0],\n\t\t\t\t\t\t\t\"new_help_text\", *mf.Help,\n\t\t\t\t\t\t\t// Only the first file path will be recorded in case of two or more inconsistent help texts.\n\t\t\t\t\t\t\t\"file\", metricsNamesToFiles[*mf.Name][0])\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif mf.Help != nil {\n\t\t\t\t\tmetricsNamesToHelpTexts[*mf.Name] = [2]string{*mf.Help}\n\t\t\t\t}\n\t\t\t\tmetricsNamesToFiles[*mf.Name] = append(metricsNamesToFiles[*mf.Name], metricsFilePath)\n\t\t\t\tparsedFamilies = append(parsedFamilies, mf)\n\t\t\t}\n\n\t\t\tif err != nil {\n\t\t\t\terrored = true\n\t\t\t\tc.logger.Error(\"failed to collect textfile data\", \"file\", f.Name(), \"err\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tmtimes[metricsFilePath] = *mtime\n\t\t}\n\t}\n\n\tmfHelp := make(map[string]*string)\n\tfor _, mf := range parsedFamilies {\n\t\tif mf.Help == nil {\n\t\t\tif help, ok := mfHelp[*mf.Name]; ok {\n\t\t\t\tmf.Help = help\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\thelp := fmt.Sprintf(\"Metric read from %s\", strings.Join(metricsNamesToFiles[*mf.Name], \", \"))\n\t\t\tmf.Help = &help\n\t\t\tmfHelp[*mf.Name] = &help\n\t\t}\n\t}\n\n\tfor _, mf := range parsedFamilies {\n\t\tconvertMetricFamily(mf, ch, c.logger)\n\t}\n\n\tc.exportMTimes(mtimes, ch)\n\n\t// Export if there were errors.\n\tvar errVal float64\n\tif errored {\n\t\terrVal = 1.0\n\t}\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\t\"node_textfile_scrape_error\",\n\t\t\t\"1 if there was an error opening or reading a file, 0 otherwise\",\n\t\t\tnil, nil,\n\t\t),\n\t\tprometheus.GaugeValue, errVal,\n\t)\n\n\treturn nil\n}\n\n// processFile processes a single file, returning its modification time on success.\nfunc (c *textFileCollector) processFile(dir, name string, ch chan<- prometheus.Metric) (*time.Time, map[string]*dto.MetricFamily, error) {\n\tpath := filepath.Join(dir, name)\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to open textfile data file %q: %w\", path, err)\n\t}\n\tdefer f.Close()\n\n\tparser := expfmt.NewTextParser(model.LegacyValidation)\n\tfamilies, err := parser.TextToMetricFamilies(f)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to parse textfile data from %q: %w\", path, err)\n\t}\n\n\tif hasTimestamps(families) {\n\t\treturn nil, nil, fmt.Errorf(\"textfile %q contains unsupported client-side timestamps, skipping entire file\", path)\n\t}\n\n\t// Only stat the file once it has been parsed and validated, so that\n\t// a failure does not appear fresh.\n\tstat, err := f.Stat()\n\tif err != nil {\n\t\treturn nil, families, fmt.Errorf(\"failed to stat %q: %w\", path, err)\n\t}\n\n\tt := stat.ModTime()\n\treturn &t, families, nil\n}\n\n// hasTimestamps returns true when metrics contain unsupported timestamps.\nfunc hasTimestamps(parsedFamilies map[string]*dto.MetricFamily) bool {\n\tfor _, mf := range parsedFamilies {\n\t\tfor _, m := range mf.Metric {\n\t\t\tif m.TimestampMs != nil {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n"
  },
  {
    "path": "collector/textfile_test.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notextfile\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/client_golang/prometheus/promhttp\"\n\t\"github.com/prometheus/common/promslog\"\n\t\"github.com/prometheus/common/promslog/flag\"\n)\n\ntype collectorAdapter struct {\n\tCollector\n}\n\n// Describe implements the prometheus.Collector interface.\nfunc (a collectorAdapter) Describe(ch chan<- *prometheus.Desc) {\n\t// We have to send *some* metric in Describe, but we don't know which ones\n\t// we're going to get, so just send a dummy metric.\n\tch <- prometheus.NewDesc(\"dummy_metric\", \"Dummy metric.\", nil, nil)\n}\n\n// Collect implements the prometheus.Collector interface.\nfunc (a collectorAdapter) Collect(ch chan<- prometheus.Metric) {\n\tif err := a.Update(ch); err != nil {\n\t\tpanic(fmt.Sprintf(\"failed to update collector: %v\", err))\n\t}\n}\n\nfunc TestTextfileCollector(t *testing.T) {\n\ttests := []struct {\n\t\tpaths []string\n\t\tout   string\n\t}{\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/no_metric_files\"},\n\t\t\tout:   \"fixtures/textfile/no_metric_files.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/two_metric_files\"},\n\t\t\tout:   \"fixtures/textfile/two_metric_files.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/nonexistent_path\"},\n\t\t\tout:   \"fixtures/textfile/nonexistent_path.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/client_side_timestamp\"},\n\t\t\tout:   \"fixtures/textfile/client_side_timestamp.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/different_metric_types\"},\n\t\t\tout:   \"fixtures/textfile/different_metric_types.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/inconsistent_metrics\"},\n\t\t\tout:   \"fixtures/textfile/inconsistent_metrics.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/histogram\"},\n\t\t\tout:   \"fixtures/textfile/histogram.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/histogram_extra_dimension\"},\n\t\t\tout:   \"fixtures/textfile/histogram_extra_dimension.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/summary\"},\n\t\t\tout:   \"fixtures/textfile/summary.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/summary_extra_dimension\"},\n\t\t\tout:   \"fixtures/textfile/summary_extra_dimension.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\n\t\t\t\t\"fixtures/textfile/histogram_extra_dimension\",\n\t\t\t\t\"fixtures/textfile/summary_extra_dimension\",\n\t\t\t},\n\t\t\tout: \"fixtures/textfile/glob_extra_dimension.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/*_extra_dimension\"},\n\t\t\tout:   \"fixtures/textfile/glob_extra_dimension.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/metrics_merge_empty_help\"},\n\t\t\tout:   \"fixtures/textfile/metrics_merge_empty_help.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/metrics_merge_no_help\"},\n\t\t\tout:   \"fixtures/textfile/metrics_merge_no_help.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/metrics_merge_same_help\"},\n\t\t\tout:   \"fixtures/textfile/metrics_merge_same_help.out\",\n\t\t},\n\t\t{\n\t\t\tpaths: []string{\"fixtures/textfile/metrics_merge_different_help\"},\n\t\t\tout:   \"fixtures/textfile/metrics_merge_different_help.out\",\n\t\t},\n\t}\n\n\tfor i, test := range tests {\n\t\tmtime := 1.0\n\t\tc := &textFileCollector{\n\t\t\tpaths:  test.paths,\n\t\t\tmtime:  &mtime,\n\t\t\tlogger: slog.New(slog.NewTextHandler(io.Discard, nil)),\n\t\t}\n\n\t\t// Suppress a log message about `nonexistent_path` not existing, this is\n\t\t// expected and clutters the test output.\n\t\tpromslogConfig := &promslog.Config{}\n\t\tflag.AddFlags(kingpin.CommandLine, promslogConfig)\n\t\tif _, err := kingpin.CommandLine.Parse([]string{\"--log.level\", \"debug\"}); err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\n\t\tregistry := prometheus.NewRegistry()\n\t\tregistry.MustRegister(collectorAdapter{c})\n\n\t\trw := httptest.NewRecorder()\n\t\tpromhttp.HandlerFor(registry, promhttp.HandlerOpts{ErrorHandling: promhttp.ContinueOnError}).ServeHTTP(rw, &http.Request{})\n\t\tgot := string(rw.Body.String())\n\n\t\twant, err := os.ReadFile(test.out)\n\t\tif err != nil {\n\t\t\tt.Fatalf(\"%d. error reading fixture file %s: %s\", i, test.out, err)\n\t\t}\n\n\t\tif string(want) != got {\n\t\t\tt.Fatalf(\"%d.%q want:\\n\\n%s\\n\\ngot:\\n\\n%s\", i, test.paths, string(want), got)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "collector/thermal_darwin.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notherm\n\npackage collector\n\n/*\n#cgo LDFLAGS: -framework IOKit -framework CoreFoundation\n#include <stdio.h>\n#include <CoreFoundation/CoreFoundation.h>\n#include <IOKit/IOKitLib.h>\n#include <IOKit/pwr_mgt/IOPMLib.h>\n#include <IOKit/pwr_mgt/IOPM.h>\n\nstruct ref_with_ret {\n    CFDictionaryRef ref;\n    IOReturn ret;\n};\n\nstruct ref_with_ret FetchThermal();\n\nstruct ref_with_ret FetchThermal() {\n    CFDictionaryRef ref;\n    IOReturn ret;\n    ret = IOPMCopyCPUPowerStatus(&ref);\n    struct ref_with_ret result = {\n            ref,\n            ret,\n    };\n    return result;\n}\n*/\nimport \"C\"\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"unsafe\"\n\n\t\"github.com/prometheus/node_exporter/collector/utils\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype thermCollector struct {\n\tcpuSchedulerLimit typedDesc\n\tcpuAvailableCPU   typedDesc\n\tcpuSpeedLimit     typedDesc\n\ttemperature       typedDesc\n\tlogger            *slog.Logger\n}\n\nconst thermal = \"thermal\"\n\nfunc init() {\n\tregisterCollector(thermal, defaultEnabled, NewThermCollector)\n}\n\n// NewThermCollector returns a new Collector exposing current CPU power levels.\nfunc NewThermCollector(logger *slog.Logger) (Collector, error) {\n\treturn &thermCollector{\n\t\tcpuSchedulerLimit: typedDesc{\n\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, thermal, \"cpu_scheduler_limit_ratio\"),\n\t\t\t\t\"Represents the percentage (0-100) of CPU time available. 100% at normal operation. The OS may limit this time for a percentage less than 100%.\",\n\t\t\t\tnil,\n\t\t\t\tnil),\n\t\t\tvalueType: prometheus.GaugeValue,\n\t\t},\n\t\tcpuAvailableCPU: typedDesc{\n\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, thermal, \"cpu_available_cpu\"),\n\t\t\t\t\"Reflects how many, if any, CPUs have been taken offline. Represented as an integer number of CPUs (0 - Max CPUs).\",\n\t\t\t\tnil,\n\t\t\t\tnil,\n\t\t\t),\n\t\t\tvalueType: prometheus.GaugeValue,\n\t\t},\n\t\tcpuSpeedLimit: typedDesc{\n\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, thermal, \"cpu_speed_limit_ratio\"),\n\t\t\t\t\"Defines the speed & voltage limits placed on the CPU. Represented as a percentage (0-100) of maximum CPU speed.\",\n\t\t\t\tnil,\n\t\t\t\tnil,\n\t\t\t),\n\t\t\tvalueType: prometheus.GaugeValue,\n\t\t},\n\t\ttemperature: typedDesc{\n\t\t\tdesc: prometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, thermal, \"temperature_celsius\"),\n\t\t\t\t\"Temperature of the thermal sensor in Celsius.\",\n\t\t\t\t[]string{\"sensor\"},\n\t\t\t\tnil,\n\t\t\t),\n\t\t\tvalueType: prometheus.GaugeValue,\n\t\t},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *thermCollector) Update(ch chan<- prometheus.Metric) error {\n\tcpuPowerStatus, err := fetchCPUPowerStatus()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif value, ok := cpuPowerStatus[(string(C.kIOPMCPUPowerLimitSchedulerTimeKey))]; ok {\n\t\tch <- c.cpuSchedulerLimit.mustNewConstMetric(float64(value) / 100.0)\n\t}\n\tif value, ok := cpuPowerStatus[(string(C.kIOPMCPUPowerLimitProcessorCountKey))]; ok {\n\t\tch <- c.cpuAvailableCPU.mustNewConstMetric(float64(value))\n\t}\n\tif value, ok := cpuPowerStatus[(string(C.kIOPMCPUPowerLimitProcessorSpeedKey))]; ok {\n\t\tch <- c.cpuSpeedLimit.mustNewConstMetric(float64(value) / 100.0)\n\t}\n\n\treturn c.updateTemperatures(ch)\n}\n\nfunc fetchCPUPowerStatus() (map[string]int, error) {\n\tcfDictRef, _ := C.FetchThermal()\n\tdefer func() {\n\t\tif cfDictRef.ref != 0x0 {\n\t\t\tC.CFRelease(C.CFTypeRef(cfDictRef.ref))\n\t\t}\n\t}()\n\n\tif C.kIOReturnNotFound == cfDictRef.ret {\n\t\treturn nil, errors.New(\"no CPU power status has been recorded\")\n\t}\n\n\tif C.kIOReturnSuccess != cfDictRef.ret {\n\t\treturn nil, fmt.Errorf(\"no CPU power status with error code 0x%08x\", int(cfDictRef.ret))\n\t}\n\n\t// mapping CFDictionary to map\n\tcfDict := CFDict(cfDictRef.ref)\n\treturn mappingCFDictToMap(cfDict), nil\n}\n\ntype CFDict uintptr\n\nfunc mappingCFDictToMap(dict CFDict) map[string]int {\n\tif C.CFNullRef(dict) == C.kCFNull {\n\t\treturn nil\n\t}\n\tcfDict := C.CFDictionaryRef(dict)\n\n\tvar result map[string]int\n\tcount := C.CFDictionaryGetCount(cfDict)\n\tif count > 0 {\n\t\tkeys := make([]C.CFTypeRef, count)\n\t\tvalues := make([]C.CFTypeRef, count)\n\t\tC.CFDictionaryGetKeysAndValues(cfDict, (*unsafe.Pointer)(unsafe.Pointer(&keys[0])), (*unsafe.Pointer)(unsafe.Pointer(&values[0])))\n\t\tresult = make(map[string]int, count)\n\t\tfor i := C.CFIndex(0); i < count; i++ {\n\t\t\tresult[mappingCFStringToString(C.CFStringRef(keys[i]))] = mappingCFNumberLongToInt(C.CFNumberRef(values[i]))\n\t\t}\n\t}\n\treturn result\n}\n\n// CFStringToString converts a CFStringRef to a string.\nfunc mappingCFStringToString(s C.CFStringRef) string {\n\tp := C.CFStringGetCStringPtr(s, C.kCFStringEncodingUTF8)\n\tif p != nil {\n\t\treturn C.GoString(p)\n\t}\n\tlength := C.CFStringGetLength(s)\n\tif length == 0 {\n\t\treturn \"\"\n\t}\n\tmaxBufLen := C.CFStringGetMaximumSizeForEncoding(length, C.kCFStringEncodingUTF8)\n\tif maxBufLen == 0 {\n\t\treturn \"\"\n\t}\n\tbuf := make([]byte, maxBufLen)\n\tvar usedBufLen C.CFIndex\n\t_ = C.CFStringGetBytes(s, C.CFRange{0, length}, C.kCFStringEncodingUTF8, C.UInt8(0), C.false, (*C.UInt8)(&buf[0]), maxBufLen, &usedBufLen)\n\treturn utils.SafeBytesToString(buf[:usedBufLen])\n}\n\nfunc mappingCFNumberLongToInt(n C.CFNumberRef) int {\n\ttyp := C.CFNumberGetType(n)\n\tvar long C.long\n\tC.CFNumberGetValue(n, typ, unsafe.Pointer(&long))\n\treturn int(long)\n}\n"
  },
  {
    "path": "collector/thermal_darwin_amd64.go",
    "content": "// Copyright The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notherm && darwin && amd64 && cgo\n\npackage collector\n\nimport \"github.com/prometheus/client_golang/prometheus\"\n\nfunc (c *thermCollector) updateTemperatures(ch chan<- prometheus.Metric) error {\n\treturn nil\n}\n"
  },
  {
    "path": "collector/thermal_darwin_arm64.go",
    "content": "// Copyright The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notherm && darwin && arm64\n\npackage collector\n\n/*\n#cgo LDFLAGS: -framework IOKit -framework CoreFoundation\n#include <CoreFoundation/CoreFoundation.h>\n#include <IOKit/IOKitLib.h>\n#include <stdlib.h>\n\ntypedef struct __IOHIDEventSystemClient * IOHIDEventSystemClientRef;\ntypedef struct __IOHIDServiceClient * IOHIDServiceClientRef;\ntypedef struct __IOHIDEvent * IOHIDEventRef;\n\n#define kIOHIDEventTypeTemperature 15\n#define IOHIDEventFieldBase(type) (type << 16)\n\nint32_t GetIOHIDEventFieldBase(int32_t type) {\n    return IOHIDEventFieldBase(type);\n}\n\n// External functions\nIOHIDEventSystemClientRef IOHIDEventSystemClientCreate(CFAllocatorRef allocator);\nvoid IOHIDEventSystemClientSetMatching(IOHIDEventSystemClientRef client, CFDictionaryRef match);\nCFArrayRef IOHIDEventSystemClientCopyServices(IOHIDEventSystemClientRef client);\nIOHIDEventRef IOHIDServiceClientCopyEvent(IOHIDServiceClientRef service, int64_t type, int32_t options, int64_t timestamp);\ndouble IOHIDEventGetFloatValue(IOHIDEventRef event, int32_t field);\nCFTypeRef IOHIDServiceClientCopyProperty(IOHIDServiceClientRef service, CFStringRef key);\n*/\nimport \"C\"\n\nimport (\n\t\"unsafe\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/node_exporter/collector/utils\"\n)\n\nconst absoluteZeroCelsius = -273.15\n\nfunc (c *thermCollector) updateTemperatures(ch chan<- prometheus.Metric) error {\n\tclient := C.IOHIDEventSystemClientCreate(C.kCFAllocatorDefault)\n\tif client == nil {\n\t\treturn nil\n\t}\n\tdefer C.CFRelease(C.CFTypeRef(unsafe.Pointer(client)))\n\n\tpage := 0xff00\n\tusage := 5\n\n\tpageNum := C.CFNumberCreate(C.kCFAllocatorDefault, C.kCFNumberIntType, unsafe.Pointer(&page))\n\tdefer C.CFRelease(C.CFTypeRef(pageNum))\n\tusageNum := C.CFNumberCreate(C.kCFAllocatorDefault, C.kCFNumberIntType, unsafe.Pointer(&usage))\n\tdefer C.CFRelease(C.CFTypeRef(usageNum))\n\n\tkeyPage := C.CString(\"PrimaryUsagePage\")\n\tdefer C.free(unsafe.Pointer(keyPage))\n\tkeyUsage := C.CString(\"PrimaryUsage\")\n\tdefer C.free(unsafe.Pointer(keyUsage))\n\n\tcfKeyPage := C.CFStringCreateWithCString(C.kCFAllocatorDefault, keyPage, C.kCFStringEncodingUTF8)\n\tdefer C.CFRelease(C.CFTypeRef(cfKeyPage))\n\tcfKeyUsage := C.CFStringCreateWithCString(C.kCFAllocatorDefault, keyUsage, C.kCFStringEncodingUTF8)\n\tdefer C.CFRelease(C.CFTypeRef(cfKeyUsage))\n\n\tkeys := []C.CFTypeRef{C.CFTypeRef(cfKeyPage), C.CFTypeRef(cfKeyUsage)}\n\tvalues := []C.CFTypeRef{C.CFTypeRef(pageNum), C.CFTypeRef(usageNum)}\n\n\tmatching := C.CFDictionaryCreate(C.kCFAllocatorDefault,\n\t\t(*unsafe.Pointer)(unsafe.Pointer(&keys[0])),\n\t\t(*unsafe.Pointer)(unsafe.Pointer(&values[0])),\n\t\t2,\n\t\t&C.kCFTypeDictionaryKeyCallBacks,\n\t\t&C.kCFTypeDictionaryValueCallBacks)\n\tdefer C.CFRelease(C.CFTypeRef(matching))\n\n\tC.IOHIDEventSystemClientSetMatching(client, matching)\n\n\tservices := C.IOHIDEventSystemClientCopyServices(client)\n\tif services == 0 {\n\t\treturn nil\n\t}\n\tdefer C.CFRelease(C.CFTypeRef(services))\n\n\tcount := C.CFArrayGetCount(services)\n\n\tprodKey := C.CString(\"Product\")\n\tdefer C.free(unsafe.Pointer(prodKey))\n\tcfProdKey := C.CFStringCreateWithCString(C.kCFAllocatorDefault, prodKey, C.kCFStringEncodingUTF8)\n\tdefer C.CFRelease(C.CFTypeRef(cfProdKey))\n\n\tfor i := 0; i < int(count); i++ {\n\t\tservice := C.CFArrayGetValueAtIndex(services, C.CFIndex(i))\n\n\t\tevent := C.IOHIDServiceClientCopyEvent((C.IOHIDServiceClientRef)(service), C.kIOHIDEventTypeTemperature, 0, 0)\n\t\tif event == nil {\n\t\t\tcontinue\n\t\t}\n\n\t\ttemp := C.IOHIDEventGetFloatValue(event, C.GetIOHIDEventFieldBase(C.kIOHIDEventTypeTemperature))\n\t\tC.CFRelease(C.CFTypeRef(unsafe.Pointer(event)))\n\n\t\t// Observed invalid values on some Apple Silicon devices are around -9200.\n\t\t// Filter out physically impossible temperatures.\n\t\tif temp < absoluteZeroCelsius {\n\t\t\tcontinue\n\t\t}\n\n\t\tnameRef := C.IOHIDServiceClientCopyProperty((C.IOHIDServiceClientRef)(service), cfProdKey)\n\t\tname := \"Unknown\"\n\t\tif nameRef != 0 {\n\t\t\tname = cfStringToString((C.CFStringRef)(nameRef))\n\t\t\tC.CFRelease(C.CFTypeRef(nameRef))\n\t\t}\n\n\t\tch <- c.temperature.mustNewConstMetric(float64(temp), name)\n\t}\n\treturn nil\n}\n\nfunc cfStringToString(s C.CFStringRef) string {\n\tp := C.CFStringGetCStringPtr(s, C.kCFStringEncodingUTF8)\n\tif p != nil {\n\t\treturn C.GoString(p)\n\t}\n\tlength := C.CFStringGetLength(s)\n\tif length <= 0 {\n\t\treturn \"\"\n\t}\n\tmaxBufLen := C.CFStringGetMaximumSizeForEncoding(length, C.kCFStringEncodingUTF8)\n\tif maxBufLen <= 0 {\n\t\treturn \"\"\n\t}\n\tif maxBufLen > 4096 {\n\t\tmaxBufLen = 4096\n\t}\n\tbuf := make([]byte, maxBufLen)\n\tvar usedBufLen C.CFIndex\n\t_ = C.CFStringGetBytes(s, C.CFRange{0, length}, C.kCFStringEncodingUTF8, C.UInt8(0), C.false, (*C.UInt8)(&buf[0]), maxBufLen, &usedBufLen)\n\treturn utils.SafeBytesToString(buf[:usedBufLen])\n}\n"
  },
  {
    "path": "collector/thermal_zone_linux.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nothermalzone\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nconst coolingDevice = \"cooling_device\"\nconst thermalZone = \"thermal_zone\"\n\ntype thermalZoneCollector struct {\n\tfs                    sysfs.FS\n\tcoolingDeviceCurState *prometheus.Desc\n\tcoolingDeviceMaxState *prometheus.Desc\n\tzoneTemp              *prometheus.Desc\n\tlogger                *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"thermal_zone\", defaultEnabled, NewThermalZoneCollector)\n}\n\n// NewThermalZoneCollector returns a new Collector exposing kernel/system statistics.\nfunc NewThermalZoneCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\treturn &thermalZoneCollector{\n\t\tfs: fs,\n\t\tzoneTemp: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, thermalZone, \"temp\"),\n\t\t\t\"Zone temperature in Celsius\",\n\t\t\t[]string{\"zone\", \"type\"}, nil,\n\t\t),\n\t\tcoolingDeviceCurState: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, coolingDevice, \"cur_state\"),\n\t\t\t\"Current throttle state of the cooling device\",\n\t\t\t[]string{\"name\", \"type\"}, nil,\n\t\t),\n\t\tcoolingDeviceMaxState: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, coolingDevice, \"max_state\"),\n\t\t\t\"Maximum throttle state of the cooling device\",\n\t\t\t[]string{\"name\", \"type\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *thermalZoneCollector) Update(ch chan<- prometheus.Metric) error {\n\tthermalZones, err := c.fs.ClassThermalZoneStats()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) || errors.Is(err, os.ErrPermission) || errors.Is(err, os.ErrInvalid) {\n\t\t\tc.logger.Debug(\"Could not read thermal zone stats\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn err\n\t}\n\n\tfor _, stats := range thermalZones {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.zoneTemp,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(stats.Temp)/1000.0,\n\t\t\tstats.Name,\n\t\t\tstats.Type,\n\t\t)\n\t}\n\n\tcoolingDevices, err := c.fs.ClassCoolingDeviceStats()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, stats := range coolingDevices {\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.coolingDeviceCurState,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(stats.CurState),\n\t\t\tstats.Name,\n\t\t\tstats.Type,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.coolingDeviceMaxState,\n\t\t\tprometheus.GaugeValue,\n\t\t\tfloat64(stats.MaxState),\n\t\t\tstats.Name,\n\t\t\tstats.Type,\n\t\t)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/time.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notime\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\t\"time\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype timeCollector struct {\n\tnow                   typedDesc\n\tzone                  typedDesc\n\tclocksourcesAvailable typedDesc\n\tclocksourceCurrent    typedDesc\n\tlogger                *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"time\", defaultEnabled, NewTimeCollector)\n}\n\n// NewTimeCollector returns a new Collector exposing the current system time in\n// seconds since epoch.\nfunc NewTimeCollector(logger *slog.Logger) (Collector, error) {\n\tconst subsystem = \"time\"\n\treturn &timeCollector{\n\t\tnow: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"seconds\"),\n\t\t\t\"System time in seconds since epoch (1970).\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tzone: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"zone_offset_seconds\"),\n\t\t\t\"System time zone offset in seconds.\",\n\t\t\t[]string{\"time_zone\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tclocksourcesAvailable: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"clocksource_available_info\"),\n\t\t\t\"Available clocksources read from '/sys/devices/system/clocksource'.\",\n\t\t\t[]string{\"device\", \"clocksource\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tclocksourceCurrent: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"clocksource_current_info\"),\n\t\t\t\"Current clocksource read from '/sys/devices/system/clocksource'.\",\n\t\t\t[]string{\"device\", \"clocksource\"}, nil,\n\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *timeCollector) Update(ch chan<- prometheus.Metric) error {\n\tnow := time.Now()\n\tnowSec := float64(now.UnixNano()) / 1e9\n\tzone, zoneOffset := now.Zone()\n\n\tc.logger.Debug(\"Return time\", \"now\", nowSec)\n\tch <- c.now.mustNewConstMetric(nowSec)\n\tc.logger.Debug(\"Zone offset\", \"offset\", zoneOffset, \"time_zone\", zone)\n\tch <- c.zone.mustNewConstMetric(float64(zoneOffset), zone)\n\treturn c.update(ch)\n}\n"
  },
  {
    "path": "collector/time_linux.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !notime\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\nfunc (c *timeCollector) update(ch chan<- prometheus.Metric) error {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\tclocksources, err := fs.ClockSources()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get clocksources: %w\", err)\n\t}\n\tc.logger.Debug(\"in Update\", \"clocksources\", fmt.Sprintf(\"%v\", clocksources))\n\n\tfor i, clocksource := range clocksources {\n\t\tis := strconv.Itoa(i)\n\t\tfor _, cs := range clocksource.Available {\n\t\t\tch <- c.clocksourcesAvailable.mustNewConstMetric(1.0, is, cs)\n\t\t}\n\t\tch <- c.clocksourceCurrent.mustNewConstMetric(1.0, is, clocksource.Current)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/time_other.go",
    "content": "// Copyright 2021 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !linux && !notime\n\npackage collector\n\nimport (\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nfunc (c *timeCollector) update(ch chan<- prometheus.Metric) error {\n\treturn nil\n}\n"
  },
  {
    "path": "collector/timex.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build linux && !notimex\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"golang.org/x/sys/unix\"\n)\n\nconst (\n\t// The system clock is not synchronized to a reliable\n\t// server (TIME_ERROR).\n\ttimeError = 5\n\t// The timex.Status time resolution bit (STA_NANO),\n\t// 0 = microsecond, 1 = nanoseconds.\n\tstaNano = 0x2000\n\n\t// 1 second in\n\tnanoSeconds  = 1000000000\n\tmicroSeconds = 1000000\n\n\t// See NOTES in adjtimex(2).\n\tppm16frac = 1000000.0 * 65536.0\n)\n\ntype timexCollector struct {\n\toffset,\n\tfreq,\n\tmaxerror,\n\testerror,\n\tstatus,\n\tconstant,\n\ttick,\n\tppsfreq,\n\tjitter,\n\tshift,\n\tstabil,\n\tjitcnt,\n\tcalcnt,\n\terrcnt,\n\tstbcnt,\n\ttai,\n\tsyncStatus typedDesc\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"timex\", defaultEnabled, NewTimexCollector)\n}\n\n// NewTimexCollector returns a new Collector exposing adjtime(3) stats.\nfunc NewTimexCollector(logger *slog.Logger) (Collector, error) {\n\tconst subsystem = \"timex\"\n\n\treturn &timexCollector{\n\t\toffset: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"offset_seconds\"),\n\t\t\t\"Time offset in between local system and reference clock.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tfreq: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"frequency_adjustment_ratio\"),\n\t\t\t\"Local clock frequency adjustment.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tmaxerror: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"maxerror_seconds\"),\n\t\t\t\"Maximum error in seconds.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\testerror: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"estimated_error_seconds\"),\n\t\t\t\"Estimated error in seconds.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tstatus: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"status\"),\n\t\t\t\"Value of the status array bits.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tconstant: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"loop_time_constant\"),\n\t\t\t\"Phase-locked loop time constant.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\ttick: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"tick_seconds\"),\n\t\t\t\"Seconds between clock ticks.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tppsfreq: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"pps_frequency_hertz\"),\n\t\t\t\"Pulse per second frequency.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tjitter: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"pps_jitter_seconds\"),\n\t\t\t\"Pulse per second jitter.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tshift: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"pps_shift_seconds\"),\n\t\t\t\"Pulse per second interval duration.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tstabil: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"pps_stability_hertz\"),\n\t\t\t\"Pulse per second stability, average of recent frequency changes.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tjitcnt: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"pps_jitter_total\"),\n\t\t\t\"Pulse per second count of jitter limit exceeded events.\",\n\t\t\tnil, nil,\n\t\t), prometheus.CounterValue},\n\t\tcalcnt: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"pps_calibration_total\"),\n\t\t\t\"Pulse per second count of calibration intervals.\",\n\t\t\tnil, nil,\n\t\t), prometheus.CounterValue},\n\t\terrcnt: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"pps_error_total\"),\n\t\t\t\"Pulse per second count of calibration errors.\",\n\t\t\tnil, nil,\n\t\t), prometheus.CounterValue},\n\t\tstbcnt: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"pps_stability_exceeded_total\"),\n\t\t\t\"Pulse per second count of stability limit exceeded events.\",\n\t\t\tnil, nil,\n\t\t), prometheus.CounterValue},\n\t\ttai: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"tai_offset_seconds\"),\n\t\t\t\"International Atomic Time (TAI) offset.\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tsyncStatus: typedDesc{prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"sync_status\"),\n\t\t\t\"Is clock synchronized to a reliable server (1 = yes, 0 = no).\",\n\t\t\tnil, nil,\n\t\t), prometheus.GaugeValue},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *timexCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar syncStatus float64\n\tvar divisor float64\n\tvar timex = new(unix.Timex)\n\n\tstatus, err := unix.Adjtimex(timex)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrPermission) {\n\t\t\tc.logger.Debug(\"Not collecting timex metrics\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn fmt.Errorf(\"failed to retrieve adjtimex stats: %w\", err)\n\t}\n\n\tif status == timeError {\n\t\tsyncStatus = 0\n\t} else {\n\t\tsyncStatus = 1\n\t}\n\tif (timex.Status & staNano) != 0 {\n\t\tdivisor = nanoSeconds\n\t} else {\n\t\tdivisor = microSeconds\n\t}\n\n\tch <- c.syncStatus.mustNewConstMetric(syncStatus)\n\tch <- c.offset.mustNewConstMetric(float64(timex.Offset) / divisor)\n\tch <- c.freq.mustNewConstMetric(1 + float64(timex.Freq)/ppm16frac)\n\tch <- c.maxerror.mustNewConstMetric(float64(timex.Maxerror) / microSeconds)\n\tch <- c.esterror.mustNewConstMetric(float64(timex.Esterror) / microSeconds)\n\tch <- c.status.mustNewConstMetric(float64(timex.Status))\n\tch <- c.constant.mustNewConstMetric(float64(timex.Constant))\n\tch <- c.tick.mustNewConstMetric(float64(timex.Tick) / microSeconds)\n\tch <- c.ppsfreq.mustNewConstMetric(float64(timex.Ppsfreq) / ppm16frac)\n\tch <- c.jitter.mustNewConstMetric(float64(timex.Jitter) / divisor)\n\tch <- c.shift.mustNewConstMetric(float64(timex.Shift))\n\tch <- c.stabil.mustNewConstMetric(float64(timex.Stabil) / ppm16frac)\n\tch <- c.jitcnt.mustNewConstMetric(float64(timex.Jitcnt))\n\tch <- c.calcnt.mustNewConstMetric(float64(timex.Calcnt))\n\tch <- c.errcnt.mustNewConstMetric(float64(timex.Errcnt))\n\tch <- c.stbcnt.mustNewConstMetric(float64(timex.Stbcnt))\n\tch <- c.tai.mustNewConstMetric(float64(timex.Tai))\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/udp_queues_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noudp_queues\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype (\n\tudpQueuesCollector struct {\n\t\tfs     procfs.FS\n\t\tdesc   *prometheus.Desc\n\t\tlogger *slog.Logger\n\t}\n)\n\nfunc init() {\n\tregisterCollector(\"udp_queues\", defaultEnabled, NewUDPqueuesCollector)\n}\n\n// NewUDPqueuesCollector returns a new Collector exposing network udp queued bytes.\nfunc NewUDPqueuesCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\treturn &udpQueuesCollector{\n\t\tfs: fs,\n\t\tdesc: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"udp\", \"queues\"),\n\t\t\t\"Number of allocated memory in the kernel for UDP datagrams in bytes.\",\n\t\t\t[]string{\"queue\", \"ip\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *udpQueuesCollector) Update(ch chan<- prometheus.Metric) error {\n\n\ts4, errIPv4 := c.fs.NetUDPSummary()\n\tif errIPv4 == nil {\n\t\tch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, float64(s4.TxQueueLength), \"tx\", \"v4\")\n\t\tch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, float64(s4.RxQueueLength), \"rx\", \"v4\")\n\t} else {\n\t\tif errors.Is(errIPv4, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"not collecting ipv4 based metrics\")\n\t\t} else {\n\t\t\treturn fmt.Errorf(\"couldn't get udp queued bytes: %w\", errIPv4)\n\t\t}\n\t}\n\n\ts6, errIPv6 := c.fs.NetUDP6Summary()\n\tif errIPv6 == nil {\n\t\tch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, float64(s6.TxQueueLength), \"tx\", \"v6\")\n\t\tch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, float64(s6.RxQueueLength), \"rx\", \"v6\")\n\t} else {\n\t\tif errors.Is(errIPv6, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"not collecting ipv6 based metrics\")\n\t\t} else {\n\t\t\treturn fmt.Errorf(\"couldn't get udp6 queued bytes: %w\", errIPv6)\n\t\t}\n\t}\n\n\tif errors.Is(errIPv4, os.ErrNotExist) && errors.Is(errIPv6, os.ErrNotExist) {\n\t\treturn ErrNoData\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/uname.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (darwin || freebsd || openbsd || netbsd || linux || aix) && !nouname\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar unameDesc = prometheus.NewDesc(\n\tprometheus.BuildFQName(namespace, \"uname\", \"info\"),\n\t\"Labeled system information as provided by the uname system call.\",\n\t[]string{\n\t\t\"sysname\",\n\t\t\"release\",\n\t\t\"version\",\n\t\t\"machine\",\n\t\t\"nodename\",\n\t\t\"domainname\",\n\t},\n\tnil,\n)\n\ntype unameCollector struct {\n\tlogger *slog.Logger\n}\ntype uname struct {\n\tSysName    string\n\tRelease    string\n\tVersion    string\n\tMachine    string\n\tNodeName   string\n\tDomainName string\n}\n\nfunc init() {\n\tregisterCollector(\"uname\", defaultEnabled, NewUnameCollector)\n}\n\n// NewUnameCollector returns new unameCollector.\nfunc NewUnameCollector(logger *slog.Logger) (Collector, error) {\n\treturn &unameCollector{logger}, nil\n}\n\nfunc (c *unameCollector) Update(ch chan<- prometheus.Metric) error {\n\tuname, err := getUname()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tch <- prometheus.MustNewConstMetric(unameDesc, prometheus.GaugeValue, 1,\n\t\tuname.SysName,\n\t\tuname.Release,\n\t\tuname.Version,\n\t\tuname.Machine,\n\t\tuname.NodeName,\n\t\tuname.DomainName,\n\t)\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/uname_bsd.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build (darwin || freebsd || openbsd || netbsd || aix) && !nouname\n\npackage collector\n\nimport (\n\t\"strings\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc getUname() (uname, error) {\n\tvar utsname unix.Utsname\n\tif err := unix.Uname(&utsname); err != nil {\n\t\treturn uname{}, err\n\t}\n\n\tnodeName, domainName := parseHostNameAndDomainName(utsname)\n\n\toutput := uname{\n\t\tSysName:    unix.ByteSliceToString(utsname.Sysname[:]),\n\t\tRelease:    unix.ByteSliceToString(utsname.Release[:]),\n\t\tVersion:    unix.ByteSliceToString(utsname.Version[:]),\n\t\tMachine:    unix.ByteSliceToString(utsname.Machine[:]),\n\t\tNodeName:   nodeName,\n\t\tDomainName: domainName,\n\t}\n\n\treturn output, nil\n}\n\n// parseHostNameAndDomainName for FreeBSD,OpenBSD,Darwin.\n// Attempts to emulate what happens in the Linux uname calls since these OS doesn't have a Domainname.\nfunc parseHostNameAndDomainName(utsname unix.Utsname) (hostname string, domainname string) {\n\tnodename := unix.ByteSliceToString(utsname.Nodename[:])\n\tsplit := strings.SplitN(nodename, \".\", 2)\n\n\t// We'll always have at least a single element in the array. We assume this\n\t// is the hostname.\n\thostname = split[0]\n\n\t// If we have more than one element, we assume this is the domainname.\n\t// Otherwise leave it to \"(none)\" like Linux.\n\tdomainname = \"(none)\"\n\tif len(split) > 1 {\n\t\tdomainname = split[1]\n\t}\n\treturn hostname, domainname\n}\n"
  },
  {
    "path": "collector/uname_linux.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nouname\n\npackage collector\n\nimport \"golang.org/x/sys/unix\"\n\nfunc getUname() (uname, error) {\n\tvar utsname unix.Utsname\n\tif err := unix.Uname(&utsname); err != nil {\n\t\treturn uname{}, err\n\t}\n\n\toutput := uname{\n\t\tSysName:    unix.ByteSliceToString(utsname.Sysname[:]),\n\t\tRelease:    unix.ByteSliceToString(utsname.Release[:]),\n\t\tVersion:    unix.ByteSliceToString(utsname.Version[:]),\n\t\tMachine:    unix.ByteSliceToString(utsname.Machine[:]),\n\t\tNodeName:   unix.ByteSliceToString(utsname.Nodename[:]),\n\t\tDomainName: unix.ByteSliceToString(utsname.Domainname[:]),\n\t}\n\n\treturn output, nil\n}\n"
  },
  {
    "path": "collector/utils/utils.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage utils\n\nimport (\n\t\"bytes\"\n\t\"strings\"\n)\n\nfunc SafeDereference[T any](s ...*T) []T {\n\tvar resolved []T\n\tfor _, v := range s {\n\t\tif v != nil {\n\t\t\tresolved = append(resolved, *v)\n\t\t} else {\n\t\t\tvar zeroValue T\n\t\t\tresolved = append(resolved, zeroValue)\n\t\t}\n\t}\n\treturn resolved\n}\n\n// SafeBytesToString takes a slice of bytes and sanitizes it for Prometheus label\n// values.\n// * Terminate the string at the first null byte.\n// * Convert any invalid UTF-8 to \"�\".\nfunc SafeBytesToString(b []byte) string {\n\tvar s string\n\tzeroIndex := bytes.IndexByte(b, 0)\n\tif zeroIndex == -1 {\n\t\ts = string(b)\n\t} else {\n\t\ts = string(b[:zeroIndex])\n\t}\n\treturn strings.ToValidUTF8(s, \"�\")\n}\n"
  },
  {
    "path": "collector/utils/utils_test.go",
    "content": "// Copyright 2025 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file ewcept in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage utils\n\nimport (\n\t\"testing\"\n)\n\nfunc TestSafeBytesToString(t *testing.T) {\n\tfoo := []byte(\"foo\\x00\")\n\tif want, got := SafeBytesToString(foo), \"foo\"; want != got {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n\n\tfoo = []byte{115, 97, 110, 101, 253, 190, 214}\n\tif want, got := SafeBytesToString(foo), \"sane�\"; want != got {\n\t\tt.Errorf(\"Expected: %s, Got: %s\", want, got)\n\t}\n}\n"
  },
  {
    "path": "collector/vmstat_linux.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !novmstat\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nconst (\n\tvmStatSubsystem = \"vmstat\"\n)\n\nvar (\n\tvmStatFields = kingpin.Flag(\"collector.vmstat.fields\", \"Regexp of fields to return for vmstat collector.\").Default(\"^(oom_kill|pgpg|pswp|pg.*fault).*\").String()\n)\n\ntype vmStatCollector struct {\n\tfieldPattern *regexp.Regexp\n\tlogger       *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"vmstat\", defaultEnabled, NewvmStatCollector)\n}\n\n// NewvmStatCollector returns a new Collector exposing vmstat stats.\nfunc NewvmStatCollector(logger *slog.Logger) (Collector, error) {\n\tpattern := regexp.MustCompile(*vmStatFields)\n\treturn &vmStatCollector{\n\t\tfieldPattern: pattern,\n\t\tlogger:       logger,\n\t}, nil\n}\n\nfunc (c *vmStatCollector) Update(ch chan<- prometheus.Metric) error {\n\tfile, err := os.Open(procFilePath(\"vmstat\"))\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\n\tscanner := bufio.NewScanner(file)\n\tfor scanner.Scan() {\n\t\tparts := strings.Fields(scanner.Text())\n\t\tvalue, err := strconv.ParseFloat(parts[1], 64)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !c.fieldPattern.MatchString(parts[0]) {\n\t\t\tcontinue\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, vmStatSubsystem, parts[0]),\n\t\t\t\tfmt.Sprintf(\"/proc/vmstat information field %s.\", parts[0]),\n\t\t\t\tnil, nil),\n\t\t\tprometheus.UntypedValue,\n\t\t\tvalue,\n\t\t)\n\t}\n\treturn scanner.Err()\n}\n"
  },
  {
    "path": "collector/watchdog.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build linux && !nowatchdog\n\npackage collector\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/sysfs\"\n)\n\ntype watchdogCollector struct {\n\tfs     sysfs.FS\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"watchdog\", defaultEnabled, NewWatchdogCollector)\n}\n\n// NewWatchdogCollector returns a new Collector exposing watchdog stats.\nfunc NewWatchdogCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := sysfs.NewFS(*sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &watchdogCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\nvar (\n\twatchdogBootstatusDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"watchdog\", \"bootstatus\"),\n\t\t\"Value of /sys/class/watchdog/<watchdog>/bootstatus\",\n\t\t[]string{\"name\"}, nil,\n\t)\n\twatchdogFwVersionDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"watchdog\", \"fw_version\"),\n\t\t\"Value of /sys/class/watchdog/<watchdog>/fw_version\",\n\t\t[]string{\"name\"}, nil,\n\t)\n\twatchdogNowayoutDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"watchdog\", \"nowayout\"),\n\t\t\"Value of /sys/class/watchdog/<watchdog>/nowayout\",\n\t\t[]string{\"name\"}, nil,\n\t)\n\twatchdogTimeleftDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"watchdog\", \"timeleft_seconds\"),\n\t\t\"Value of /sys/class/watchdog/<watchdog>/timeleft\",\n\t\t[]string{\"name\"}, nil,\n\t)\n\twatchdogTimeoutDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"watchdog\", \"timeout_seconds\"),\n\t\t\"Value of /sys/class/watchdog/<watchdog>/timeout\",\n\t\t[]string{\"name\"}, nil,\n\t)\n\twatchdogPretimeoutDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"watchdog\", \"pretimeout_seconds\"),\n\t\t\"Value of /sys/class/watchdog/<watchdog>/pretimeout\",\n\t\t[]string{\"name\"}, nil,\n\t)\n\twatchdogAccessCs0Desc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"watchdog\", \"access_cs0\"),\n\t\t\"Value of /sys/class/watchdog/<watchdog>/access_cs0\",\n\t\t[]string{\"name\"}, nil,\n\t)\n\twatchdogInfoDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"watchdog\", \"info\"),\n\t\t\"Info of /sys/class/watchdog/<watchdog>\",\n\t\t[]string{\"name\", \"options\", \"identity\", \"state\", \"status\", \"pretimeout_governor\"}, nil,\n\t)\n)\n\nfunc toLabelValue(ptr *string) string {\n\tif ptr == nil {\n\t\treturn \"\"\n\t}\n\treturn *ptr\n}\n\nfunc (c *watchdogCollector) Update(ch chan<- prometheus.Metric) error {\n\twatchdogClass, err := c.fs.WatchdogClass()\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) || errors.Is(err, os.ErrPermission) || errors.Is(err, os.ErrInvalid) {\n\t\t\tc.logger.Debug(\"Could not read watchdog stats\", \"err\", err)\n\t\t\treturn ErrNoData\n\t\t}\n\t\treturn err\n\t}\n\n\tfor _, wd := range watchdogClass {\n\t\tif wd.Bootstatus != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(watchdogBootstatusDesc, prometheus.GaugeValue, float64(*wd.Bootstatus), wd.Name)\n\t\t}\n\t\tif wd.FwVersion != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(watchdogFwVersionDesc, prometheus.GaugeValue, float64(*wd.FwVersion), wd.Name)\n\t\t}\n\t\tif wd.Nowayout != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(watchdogNowayoutDesc, prometheus.GaugeValue, float64(*wd.Nowayout), wd.Name)\n\t\t}\n\t\tif wd.Timeleft != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(watchdogTimeleftDesc, prometheus.GaugeValue, float64(*wd.Timeleft), wd.Name)\n\t\t}\n\t\tif wd.Timeout != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(watchdogTimeoutDesc, prometheus.GaugeValue, float64(*wd.Timeout), wd.Name)\n\t\t}\n\t\tif wd.Pretimeout != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(watchdogPretimeoutDesc, prometheus.GaugeValue, float64(*wd.Pretimeout), wd.Name)\n\t\t}\n\t\tif wd.AccessCs0 != nil {\n\t\t\tch <- prometheus.MustNewConstMetric(watchdogAccessCs0Desc, prometheus.GaugeValue, float64(*wd.AccessCs0), wd.Name)\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(watchdogInfoDesc, prometheus.GaugeValue, 1.0,\n\t\t\twd.Name, toLabelValue(wd.Options), toLabelValue(wd.Identity), toLabelValue(wd.State), toLabelValue(wd.Status), toLabelValue(wd.PretimeoutGovernor))\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/watchdog_test.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file ewcept in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build linux && !nowatchdog\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/client_golang/prometheus/testutil\"\n)\n\ntype testWatchdogCollector struct {\n\twc Collector\n}\n\nfunc (c testWatchdogCollector) Collect(ch chan<- prometheus.Metric) {\n\tc.wc.Update(ch)\n}\n\nfunc (c testWatchdogCollector) Describe(ch chan<- *prometheus.Desc) {\n\tprometheus.DescribeByCollect(c, ch)\n}\n\nfunc TestWatchdogStats(t *testing.T) {\n\ttestcase := `# HELP node_watchdog_access_cs0 Value of /sys/class/watchdog/<watchdog>/access_cs0\n\t# TYPE node_watchdog_access_cs0 gauge\n\tnode_watchdog_access_cs0{name=\"watchdog0\"} 0\n\t# HELP node_watchdog_bootstatus Value of /sys/class/watchdog/<watchdog>/bootstatus\n\t# TYPE node_watchdog_bootstatus gauge\n\tnode_watchdog_bootstatus{name=\"watchdog0\"} 1\n\t# HELP node_watchdog_fw_version Value of /sys/class/watchdog/<watchdog>/fw_version\n\t# TYPE node_watchdog_fw_version gauge\n\tnode_watchdog_fw_version{name=\"watchdog0\"} 2\n\t# HELP node_watchdog_info Info of /sys/class/watchdog/<watchdog>\n\t# TYPE node_watchdog_info gauge\n\tnode_watchdog_info{identity=\"\",name=\"watchdog1\",options=\"\",pretimeout_governor=\"\",state=\"\",status=\"\"} 1\n\tnode_watchdog_info{identity=\"Software Watchdog\",name=\"watchdog0\",options=\"0x8380\",pretimeout_governor=\"noop\",state=\"active\",status=\"0x8000\"} 1\n\t# HELP node_watchdog_nowayout Value of /sys/class/watchdog/<watchdog>/nowayout\n\t# TYPE node_watchdog_nowayout gauge\n\tnode_watchdog_nowayout{name=\"watchdog0\"} 0\n\t# HELP node_watchdog_pretimeout_seconds Value of /sys/class/watchdog/<watchdog>/pretimeout\n\t# TYPE node_watchdog_pretimeout_seconds gauge\n\tnode_watchdog_pretimeout_seconds{name=\"watchdog0\"} 120\n\t# HELP node_watchdog_timeleft_seconds Value of /sys/class/watchdog/<watchdog>/timeleft\n\t# TYPE node_watchdog_timeleft_seconds gauge\n\tnode_watchdog_timeleft_seconds{name=\"watchdog0\"} 300\n\t# HELP node_watchdog_timeout_seconds Value of /sys/class/watchdog/<watchdog>/timeout\n\t# TYPE node_watchdog_timeout_seconds gauge\n\tnode_watchdog_timeout_seconds{name=\"watchdog0\"} 60\n\t`\n\t*sysPath = \"fixtures/sys\"\n\n\tlogger := slog.New(slog.NewTextHandler(io.Discard, nil))\n\tc, err := NewWatchdogCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\treg := prometheus.NewRegistry()\n\treg.MustRegister(&testWatchdogCollector{wc: c})\n\n\tsink := make(chan prometheus.Metric)\n\tgo func() {\n\t\terr = c.Update(sink)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"failed to update collector: %s\", err))\n\t\t}\n\t\tclose(sink)\n\t}()\n\n\terr = testutil.GatherAndCompare(reg, strings.NewReader(testcase))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n"
  },
  {
    "path": "collector/wifi_linux.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nowifi\n\npackage collector\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/mdlayher/wifi\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype wifiCollector struct {\n\tinterfaceFrequencyHertz *prometheus.Desc\n\tstationInfo             *prometheus.Desc\n\n\tstationConnectedSecondsTotal   *prometheus.Desc\n\tstationInactiveSeconds         *prometheus.Desc\n\tstationReceiveBitsPerSecond    *prometheus.Desc\n\tstationTransmitBitsPerSecond   *prometheus.Desc\n\tstationReceiveBytesTotal       *prometheus.Desc\n\tstationTransmitBytesTotal      *prometheus.Desc\n\tstationSignalDBM               *prometheus.Desc\n\tstationTransmitRetriesTotal    *prometheus.Desc\n\tstationTransmitFailedTotal     *prometheus.Desc\n\tstationBeaconLossTotal         *prometheus.Desc\n\tstationTransmittedPacketsTotal *prometheus.Desc\n\tstationReceivedPacketsTotal    *prometheus.Desc\n\n\tlogger *slog.Logger\n}\n\nvar (\n\tcollectorWifi = kingpin.Flag(\"collector.wifi.fixtures\", \"test fixtures to use for wifi collector metrics\").Default(\"\").String()\n)\n\nfunc init() {\n\tregisterCollector(\"wifi\", defaultDisabled, NewWifiCollector)\n}\n\nvar _ wifiStater = &wifi.Client{}\n\n// wifiStater is an interface used to swap out a *wifi.Client for end to end tests.\ntype wifiStater interface {\n\tBSS(ifi *wifi.Interface) (*wifi.BSS, error)\n\tClose() error\n\tInterfaces() ([]*wifi.Interface, error)\n\tStationInfo(ifi *wifi.Interface) ([]*wifi.StationInfo, error)\n}\n\n// NewWifiCollector returns a new Collector exposing Wifi statistics.\nfunc NewWifiCollector(logger *slog.Logger) (Collector, error) {\n\tconst (\n\t\tsubsystem = \"wifi\"\n\t)\n\n\tvar (\n\t\tlabels = []string{\"device\", \"mac_address\"}\n\t)\n\n\treturn &wifiCollector{\n\t\tinterfaceFrequencyHertz: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"interface_frequency_hertz\"),\n\t\t\t\"The current frequency a WiFi interface is operating at, in hertz.\",\n\t\t\t[]string{\"device\"},\n\t\t\tnil,\n\t\t),\n\n\t\tstationInfo: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_info\"),\n\t\t\t\"Labeled WiFi interface station information as provided by the operating system.\",\n\t\t\t[]string{\"device\", \"bssid\", \"ssid\", \"mode\"},\n\t\t\tnil,\n\t\t),\n\n\t\tstationConnectedSecondsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_connected_seconds_total\"),\n\t\t\t\"The total number of seconds a station has been connected to an access point.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationInactiveSeconds: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_inactive_seconds\"),\n\t\t\t\"The number of seconds since any wireless activity has occurred on a station.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationReceiveBitsPerSecond: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_receive_bits_per_second\"),\n\t\t\t\"The current WiFi receive bitrate of a station, in bits per second.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationTransmitBitsPerSecond: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_transmit_bits_per_second\"),\n\t\t\t\"The current WiFi transmit bitrate of a station, in bits per second.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationReceiveBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_receive_bytes_total\"),\n\t\t\t\"The total number of bytes received by a WiFi station.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationTransmitBytesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_transmit_bytes_total\"),\n\t\t\t\"The total number of bytes transmitted by a WiFi station.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationSignalDBM: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_signal_dbm\"),\n\t\t\t\"The current WiFi signal strength, in decibel-milliwatts (dBm).\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationTransmitRetriesTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_transmit_retries_total\"),\n\t\t\t\"The total number of times a station has had to retry while sending a packet.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationTransmitFailedTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_transmit_failed_total\"),\n\t\t\t\"The total number of times a station has failed to send a packet.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationBeaconLossTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_beacon_loss_total\"),\n\t\t\t\"The total number of times a station has detected a beacon loss.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationTransmittedPacketsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_transmitted_packets_total\"),\n\t\t\t\"The total number of packets transmitted by a station.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\n\t\tstationReceivedPacketsTotal: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, \"station_received_packets_total\"),\n\t\t\t\"The total number of packets received by a station.\",\n\t\t\tlabels,\n\t\t\tnil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *wifiCollector) Update(ch chan<- prometheus.Metric) error {\n\tstat, err := newWifiStater(*collectorWifi)\n\tif err != nil {\n\t\t// Cannot access wifi metrics, report no error.\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.logger.Debug(\"wifi collector metrics are not available for this system\")\n\t\t\treturn ErrNoData\n\t\t}\n\t\tif errors.Is(err, os.ErrPermission) {\n\t\t\tc.logger.Debug(\"wifi collector got permission denied when accessing metrics\")\n\t\t\treturn ErrNoData\n\t\t}\n\n\t\treturn fmt.Errorf(\"failed to access wifi data: %w\", err)\n\t}\n\tdefer stat.Close()\n\n\tifis, err := stat.Interfaces()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to retrieve wifi interfaces: %w\", err)\n\t}\n\n\tfor _, ifi := range ifis {\n\t\t// Some virtual devices have no \"name\" and should be skipped.\n\t\tif ifi.Name == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tc.logger.Debug(\"probing wifi device with type\", \"wifi\", ifi.Name, \"type\", ifi.Type)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.interfaceFrequencyHertz,\n\t\t\tprometheus.GaugeValue,\n\t\t\tmHzToHz(ifi.Frequency),\n\t\t\tifi.Name,\n\t\t)\n\n\t\t// When a statistic is not available for a given interface, package wifi\n\t\t// returns a os.ErrNotExist error.  We leverage this to only export\n\t\t// metrics which are actually valid for given interface types.\n\n\t\tbss, err := stat.BSS(ifi)\n\t\tswitch {\n\t\tcase err == nil:\n\t\t\tc.updateBSSStats(ch, ifi.Name, bss)\n\t\tcase errors.Is(err, os.ErrNotExist):\n\t\t\tc.logger.Debug(\"BSS information not found for wifi device\", \"name\", ifi.Name)\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"failed to retrieve BSS for device %s: %v\",\n\t\t\t\tifi.Name, err)\n\t\t}\n\n\t\tstations, err := stat.StationInfo(ifi)\n\t\tswitch {\n\t\tcase err == nil:\n\t\t\tfor _, station := range stations {\n\t\t\t\tc.updateStationStats(ch, ifi.Name, station)\n\t\t\t}\n\t\tcase errors.Is(err, os.ErrNotExist):\n\t\t\tc.logger.Debug(\"station information not found for wifi device\", \"name\", ifi.Name)\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"failed to retrieve station info for device %q: %v\",\n\t\t\t\tifi.Name, err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *wifiCollector) updateBSSStats(ch chan<- prometheus.Metric, device string, bss *wifi.BSS) {\n\t// Synthetic metric which provides wifi station info, such as SSID, BSSID, etc.\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationInfo,\n\t\tprometheus.GaugeValue,\n\t\t1,\n\t\tdevice,\n\t\tbss.BSSID.String(),\n\t\tbss.SSID,\n\t\tbssStatusMode(bss.Status),\n\t)\n}\n\nfunc (c *wifiCollector) updateStationStats(ch chan<- prometheus.Metric, device string, info *wifi.StationInfo) {\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationConnectedSecondsTotal,\n\t\tprometheus.CounterValue,\n\t\tinfo.Connected.Seconds(),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationInactiveSeconds,\n\t\tprometheus.GaugeValue,\n\t\tinfo.Inactive.Seconds(),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationReceiveBitsPerSecond,\n\t\tprometheus.GaugeValue,\n\t\tfloat64(info.ReceiveBitrate),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationTransmitBitsPerSecond,\n\t\tprometheus.GaugeValue,\n\t\tfloat64(info.TransmitBitrate),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationReceiveBytesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(info.ReceivedBytes),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationTransmitBytesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(info.TransmittedBytes),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationSignalDBM,\n\t\tprometheus.GaugeValue,\n\t\tfloat64(info.Signal),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationTransmitRetriesTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(info.TransmitRetries),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationTransmitFailedTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(info.TransmitFailed),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationBeaconLossTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(info.BeaconLoss),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationTransmittedPacketsTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(info.TransmittedPackets),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n\n\tch <- prometheus.MustNewConstMetric(\n\t\tc.stationReceivedPacketsTotal,\n\t\tprometheus.CounterValue,\n\t\tfloat64(info.ReceivedPackets),\n\t\tdevice,\n\t\tinfo.HardwareAddr.String(),\n\t)\n}\n\nfunc mHzToHz(mHz int) float64 {\n\treturn float64(mHz) * 1000 * 1000\n}\n\nfunc bssStatusMode(status wifi.BSSStatus) string {\n\tswitch status {\n\tcase wifi.BSSStatusAuthenticated, wifi.BSSStatusAssociated:\n\t\treturn \"client\"\n\tcase wifi.BSSStatusIBSSJoined:\n\t\treturn \"ad-hoc\"\n\tdefault:\n\t\treturn \"unknown\"\n\t}\n}\n\n// All code below this point is used to assist with end-to-end tests for\n// the wifi collector, since wifi devices are not available in CI.\n\n// newWifiStater determines if mocked test fixtures from files should be used for\n// collecting wifi metrics, or if package wifi should be used.\nfunc newWifiStater(fixtures string) (wifiStater, error) {\n\tif fixtures != \"\" {\n\t\treturn &mockWifiStater{\n\t\t\tfixtures: fixtures,\n\t\t}, nil\n\t}\n\n\treturn wifi.New()\n}\n\nvar _ wifiStater = &mockWifiStater{}\n\ntype mockWifiStater struct {\n\tfixtures string\n}\n\nfunc (s *mockWifiStater) unmarshalJSONFile(filename string, v any) error {\n\tb, err := os.ReadFile(filepath.Join(s.fixtures, filename))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn json.Unmarshal(b, v)\n}\n\nfunc (s *mockWifiStater) Close() error { return nil }\n\nfunc (s *mockWifiStater) BSS(ifi *wifi.Interface) (*wifi.BSS, error) {\n\tp := filepath.Join(ifi.Name, \"bss.json\")\n\n\tvar bss wifi.BSS\n\tif err := s.unmarshalJSONFile(p, &bss); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &bss, nil\n}\n\nfunc (s *mockWifiStater) Interfaces() ([]*wifi.Interface, error) {\n\tvar ifis []*wifi.Interface\n\tif err := s.unmarshalJSONFile(\"interfaces.json\", &ifis); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn ifis, nil\n}\n\nfunc (s *mockWifiStater) StationInfo(ifi *wifi.Interface) ([]*wifi.StationInfo, error) {\n\tp := filepath.Join(ifi.Name, \"stationinfo.json\")\n\n\tvar stations []*wifi.StationInfo\n\tif err := s.unmarshalJSONFile(p, &stations); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn stations, nil\n}\n"
  },
  {
    "path": "collector/xfrm.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noxfrm\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\ntype xfrmCollector struct {\n\tfs     procfs.FS\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"xfrm\", defaultDisabled, NewXfrmCollector)\n}\n\n// NewXfrmCollector returns a new Collector exposing XFRM stats.\nfunc NewXfrmCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\n\treturn &xfrmCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\nvar (\n\txfrmInErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_error_packets_total\"),\n\t\t\"All errors not matched by other\",\n\t\tnil, nil,\n\t)\n\txfrmInBufferErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_buffer_error_packets_total\"),\n\t\t\"No buffer is left\",\n\t\tnil, nil,\n\t)\n\txfrmInHdrErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_hdr_error_packets_total\"),\n\t\t\"Header error\",\n\t\tnil, nil,\n\t)\n\txfrmInNoStatesDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_no_states_packets_total\"),\n\t\t\"No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\",\n\t\tnil, nil,\n\t)\n\txfrmInStateProtoErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_state_proto_error_packets_total\"),\n\t\t\"Transformation protocol specific error e.g. SA key is wrong\",\n\t\tnil, nil,\n\t)\n\txfrmInStateModeErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_state_mode_error_packets_total\"),\n\t\t\"Transformation mode specific error\",\n\t\tnil, nil,\n\t)\n\txfrmInStateSeqErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_state_seq_error_packets_total\"),\n\t\t\"Sequence error i.e. Sequence number is out of window\",\n\t\tnil, nil,\n\t)\n\txfrmInStateExpiredDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_state_expired_packets_total\"),\n\t\t\"State is expired\",\n\t\tnil, nil,\n\t)\n\txfrmInStateMismatchDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_state_mismatch_packets_total\"),\n\t\t\"State has mismatch option e.g. UDP encapsulation type is mismatch\",\n\t\tnil, nil,\n\t)\n\txfrmInStateInvalidDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_state_invalid_packets_total\"),\n\t\t\"State is invalid\",\n\t\tnil, nil,\n\t)\n\txfrmInTmplMismatchDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_tmpl_mismatch_packets_total\"),\n\t\t\"No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\",\n\t\tnil, nil,\n\t)\n\txfrmInNoPolsDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_no_pols_packets_total\"),\n\t\t\"No policy is found for states e.g. Inbound SAs are correct but no SP is found\",\n\t\tnil, nil,\n\t)\n\txfrmInPolBlockDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_pol_block_packets_total\"),\n\t\t\"Policy discards\",\n\t\tnil, nil,\n\t)\n\txfrmInPolErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"in_pol_error_packets_total\"),\n\t\t\"Policy error\",\n\t\tnil, nil,\n\t)\n\txfrmOutErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_error_packets_total\"),\n\t\t\"All errors which is not matched others\",\n\t\tnil, nil,\n\t)\n\txfrmOutBundleGenErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_bundle_gen_error_packets_total\"),\n\t\t\"Bundle generation error\",\n\t\tnil, nil,\n\t)\n\txfrmOutBundleCheckErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_bundle_check_error_packets_total\"),\n\t\t\"Bundle check error\",\n\t\tnil, nil,\n\t)\n\txfrmOutNoStatesDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_no_states_packets_total\"),\n\t\t\"No state is found\",\n\t\tnil, nil,\n\t)\n\txfrmOutStateProtoErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_state_proto_error_packets_total\"),\n\t\t\"Transformation protocol specific error\",\n\t\tnil, nil,\n\t)\n\txfrmOutStateModeErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_state_mode_error_packets_total\"),\n\t\t\"Transformation mode specific error\",\n\t\tnil, nil,\n\t)\n\txfrmOutStateSeqErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_state_seq_error_packets_total\"),\n\t\t\"Sequence error i.e. Sequence number overflow\",\n\t\tnil, nil,\n\t)\n\txfrmOutStateExpiredDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_state_expired_packets_total\"),\n\t\t\"State is expired\",\n\t\tnil, nil,\n\t)\n\txfrmOutPolBlockDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_pol_block_packets_total\"),\n\t\t\"Policy discards\",\n\t\tnil, nil,\n\t)\n\txfrmOutPolDeadDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_pol_dead_packets_total\"),\n\t\t\"Policy is dead\",\n\t\tnil, nil,\n\t)\n\txfrmOutPolErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_pol_error_packets_total\"),\n\t\t\"Policy error\",\n\t\tnil, nil,\n\t)\n\txfrmFwdHdrErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"fwd_hdr_error_packets_total\"),\n\t\t\"Forward routing of a packet is not allowed\",\n\t\tnil, nil,\n\t)\n\txfrmOutStateInvalidDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"out_state_invalid_packets_total\"),\n\t\t\"State is invalid, perhaps expired\",\n\t\tnil, nil,\n\t)\n\txfrmAcquireErrorDesc = prometheus.NewDesc(\n\t\tprometheus.BuildFQName(namespace, \"xfrm\", \"acquire_error_packets_total\"),\n\t\t\"State hasn’t been fully acquired before use\",\n\t\tnil, nil,\n\t)\n)\n\nfunc (c *xfrmCollector) Update(ch chan<- prometheus.Metric) error {\n\tstat, err := c.fs.NewXfrmStat()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tch <- prometheus.MustNewConstMetric(xfrmInErrorDesc, prometheus.CounterValue, float64(stat.XfrmInError))\n\tch <- prometheus.MustNewConstMetric(xfrmInBufferErrorDesc, prometheus.CounterValue, float64(stat.XfrmInBufferError))\n\tch <- prometheus.MustNewConstMetric(xfrmInHdrErrorDesc, prometheus.CounterValue, float64(stat.XfrmInHdrError))\n\tch <- prometheus.MustNewConstMetric(xfrmInNoStatesDesc, prometheus.CounterValue, float64(stat.XfrmInNoStates))\n\tch <- prometheus.MustNewConstMetric(xfrmInStateProtoErrorDesc, prometheus.CounterValue, float64(stat.XfrmInStateProtoError))\n\tch <- prometheus.MustNewConstMetric(xfrmInStateModeErrorDesc, prometheus.CounterValue, float64(stat.XfrmInStateModeError))\n\tch <- prometheus.MustNewConstMetric(xfrmInStateSeqErrorDesc, prometheus.CounterValue, float64(stat.XfrmInStateSeqError))\n\tch <- prometheus.MustNewConstMetric(xfrmInStateExpiredDesc, prometheus.CounterValue, float64(stat.XfrmInStateExpired))\n\tch <- prometheus.MustNewConstMetric(xfrmInStateMismatchDesc, prometheus.CounterValue, float64(stat.XfrmInStateMismatch))\n\tch <- prometheus.MustNewConstMetric(xfrmInStateInvalidDesc, prometheus.CounterValue, float64(stat.XfrmInStateInvalid))\n\tch <- prometheus.MustNewConstMetric(xfrmInTmplMismatchDesc, prometheus.CounterValue, float64(stat.XfrmInTmplMismatch))\n\tch <- prometheus.MustNewConstMetric(xfrmInNoPolsDesc, prometheus.CounterValue, float64(stat.XfrmInNoPols))\n\tch <- prometheus.MustNewConstMetric(xfrmInPolBlockDesc, prometheus.CounterValue, float64(stat.XfrmInPolBlock))\n\tch <- prometheus.MustNewConstMetric(xfrmInPolErrorDesc, prometheus.CounterValue, float64(stat.XfrmInPolError))\n\tch <- prometheus.MustNewConstMetric(xfrmOutErrorDesc, prometheus.CounterValue, float64(stat.XfrmOutError))\n\tch <- prometheus.MustNewConstMetric(xfrmOutBundleGenErrorDesc, prometheus.CounterValue, float64(stat.XfrmOutBundleGenError))\n\tch <- prometheus.MustNewConstMetric(xfrmOutBundleCheckErrorDesc, prometheus.CounterValue, float64(stat.XfrmOutBundleCheckError))\n\tch <- prometheus.MustNewConstMetric(xfrmOutNoStatesDesc, prometheus.CounterValue, float64(stat.XfrmOutNoStates))\n\tch <- prometheus.MustNewConstMetric(xfrmOutStateProtoErrorDesc, prometheus.CounterValue, float64(stat.XfrmOutStateProtoError))\n\tch <- prometheus.MustNewConstMetric(xfrmOutStateModeErrorDesc, prometheus.CounterValue, float64(stat.XfrmOutStateModeError))\n\tch <- prometheus.MustNewConstMetric(xfrmOutStateSeqErrorDesc, prometheus.CounterValue, float64(stat.XfrmOutStateSeqError))\n\tch <- prometheus.MustNewConstMetric(xfrmOutStateExpiredDesc, prometheus.CounterValue, float64(stat.XfrmOutStateExpired))\n\tch <- prometheus.MustNewConstMetric(xfrmOutPolBlockDesc, prometheus.CounterValue, float64(stat.XfrmOutPolBlock))\n\tch <- prometheus.MustNewConstMetric(xfrmOutPolDeadDesc, prometheus.CounterValue, float64(stat.XfrmOutPolDead))\n\tch <- prometheus.MustNewConstMetric(xfrmOutPolErrorDesc, prometheus.CounterValue, float64(stat.XfrmOutPolError))\n\tch <- prometheus.MustNewConstMetric(xfrmFwdHdrErrorDesc, prometheus.CounterValue, float64(stat.XfrmFwdHdrError))\n\tch <- prometheus.MustNewConstMetric(xfrmOutStateInvalidDesc, prometheus.CounterValue, float64(stat.XfrmOutStateInvalid))\n\tch <- prometheus.MustNewConstMetric(xfrmAcquireErrorDesc, prometheus.CounterValue, float64(stat.XfrmAcquireError))\n\n\treturn err\n}\n"
  },
  {
    "path": "collector/xfrm_test.go",
    "content": "// Copyright 2023 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noxfrm\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/client_golang/prometheus/testutil\"\n)\n\ntype testXfrmCollector struct {\n\txc Collector\n}\n\nfunc (c testXfrmCollector) Collect(ch chan<- prometheus.Metric) {\n\tc.xc.Update(ch)\n}\n\nfunc (c testXfrmCollector) Describe(ch chan<- *prometheus.Desc) {\n\tprometheus.DescribeByCollect(c, ch)\n}\n\nfunc TestXfrmStats(t *testing.T) {\n\ttestcase := `# HELP node_xfrm_acquire_error_packets_total State hasn’t been fully acquired before use\n\t# TYPE node_xfrm_acquire_error_packets_total counter\n\tnode_xfrm_acquire_error_packets_total 24532\n\t# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed\n\t# TYPE node_xfrm_fwd_hdr_error_packets_total counter\n\tnode_xfrm_fwd_hdr_error_packets_total 6654\n\t# HELP node_xfrm_in_buffer_error_packets_total No buffer is left\n\t# TYPE node_xfrm_in_buffer_error_packets_total counter\n\tnode_xfrm_in_buffer_error_packets_total 2\n\t# HELP node_xfrm_in_error_packets_total All errors not matched by other\n\t# TYPE node_xfrm_in_error_packets_total counter\n\tnode_xfrm_in_error_packets_total 1\n\t# HELP node_xfrm_in_hdr_error_packets_total Header error\n\t# TYPE node_xfrm_in_hdr_error_packets_total counter\n\tnode_xfrm_in_hdr_error_packets_total 4\n\t# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found\n\t# TYPE node_xfrm_in_no_pols_packets_total counter\n\tnode_xfrm_in_no_pols_packets_total 65432\n\t# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong\n\t# TYPE node_xfrm_in_no_states_packets_total counter\n\tnode_xfrm_in_no_states_packets_total 3\n\t# HELP node_xfrm_in_pol_block_packets_total Policy discards\n\t# TYPE node_xfrm_in_pol_block_packets_total counter\n\tnode_xfrm_in_pol_block_packets_total 100\n\t# HELP node_xfrm_in_pol_error_packets_total Policy error\n\t# TYPE node_xfrm_in_pol_error_packets_total counter\n\tnode_xfrm_in_pol_error_packets_total 10000\n\t# HELP node_xfrm_in_state_expired_packets_total State is expired\n\t# TYPE node_xfrm_in_state_expired_packets_total counter\n\tnode_xfrm_in_state_expired_packets_total 7\n\t# HELP node_xfrm_in_state_invalid_packets_total State is invalid\n\t# TYPE node_xfrm_in_state_invalid_packets_total counter\n\tnode_xfrm_in_state_invalid_packets_total 55555\n\t# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch\n\t# TYPE node_xfrm_in_state_mismatch_packets_total counter\n\tnode_xfrm_in_state_mismatch_packets_total 23451\n\t# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error\n\t# TYPE node_xfrm_in_state_mode_error_packets_total counter\n\tnode_xfrm_in_state_mode_error_packets_total 100\n\t# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong\n\t# TYPE node_xfrm_in_state_proto_error_packets_total counter\n\tnode_xfrm_in_state_proto_error_packets_total 40\n\t# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window\n\t# TYPE node_xfrm_in_state_seq_error_packets_total counter\n\tnode_xfrm_in_state_seq_error_packets_total 6000\n\t# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong\n\t# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter\n\tnode_xfrm_in_tmpl_mismatch_packets_total 51\n\t# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error\n\t# TYPE node_xfrm_out_bundle_check_error_packets_total counter\n\tnode_xfrm_out_bundle_check_error_packets_total 555\n\t# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error\n\t# TYPE node_xfrm_out_bundle_gen_error_packets_total counter\n\tnode_xfrm_out_bundle_gen_error_packets_total 43321\n\t# HELP node_xfrm_out_error_packets_total All errors which is not matched others\n\t# TYPE node_xfrm_out_error_packets_total counter\n\tnode_xfrm_out_error_packets_total 1e+06\n\t# HELP node_xfrm_out_no_states_packets_total No state is found\n\t# TYPE node_xfrm_out_no_states_packets_total counter\n\tnode_xfrm_out_no_states_packets_total 869\n\t# HELP node_xfrm_out_pol_block_packets_total Policy discards\n\t# TYPE node_xfrm_out_pol_block_packets_total counter\n\tnode_xfrm_out_pol_block_packets_total 43456\n\t# HELP node_xfrm_out_pol_dead_packets_total Policy is dead\n\t# TYPE node_xfrm_out_pol_dead_packets_total counter\n\tnode_xfrm_out_pol_dead_packets_total 7656\n\t# HELP node_xfrm_out_pol_error_packets_total Policy error\n\t# TYPE node_xfrm_out_pol_error_packets_total counter\n\tnode_xfrm_out_pol_error_packets_total 1454\n\t# HELP node_xfrm_out_state_expired_packets_total State is expired\n\t# TYPE node_xfrm_out_state_expired_packets_total counter\n\tnode_xfrm_out_state_expired_packets_total 565\n\t# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired\n\t# TYPE node_xfrm_out_state_invalid_packets_total counter\n\tnode_xfrm_out_state_invalid_packets_total 28765\n\t# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error\n\t# TYPE node_xfrm_out_state_mode_error_packets_total counter\n\tnode_xfrm_out_state_mode_error_packets_total 8\n\t# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error\n\t# TYPE node_xfrm_out_state_proto_error_packets_total counter\n\tnode_xfrm_out_state_proto_error_packets_total 4542\n\t# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow\n\t# TYPE node_xfrm_out_state_seq_error_packets_total counter\n\tnode_xfrm_out_state_seq_error_packets_total 543\n\t`\n\t*procPath = \"fixtures/proc\"\n\n\tlogger := slog.New(slog.NewTextHandler(io.Discard, nil))\n\tc, err := NewXfrmCollector(logger)\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\treg := prometheus.NewRegistry()\n\treg.MustRegister(&testXfrmCollector{xc: c})\n\n\tsink := make(chan prometheus.Metric)\n\tgo func() {\n\t\terr = c.Update(sink)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"failed to update collector: %s\", err))\n\t\t}\n\t\tclose(sink)\n\t}()\n\n\terr = testutil.GatherAndCompare(reg, strings.NewReader(testcase))\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n"
  },
  {
    "path": "collector/xfs_linux.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !noxfs\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs/xfs\"\n)\n\n// An xfsCollector is a Collector which gathers metrics from XFS filesystems.\ntype xfsCollector struct {\n\tfs     xfs.FS\n\tlogger *slog.Logger\n}\n\nfunc init() {\n\tregisterCollector(\"xfs\", defaultEnabled, NewXFSCollector)\n}\n\n// NewXFSCollector returns a new Collector exposing XFS statistics.\nfunc NewXFSCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := xfs.NewFS(*procPath, *sysPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open sysfs: %w\", err)\n\t}\n\n\treturn &xfsCollector{\n\t\tfs:     fs,\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update implements Collector.\nfunc (c *xfsCollector) Update(ch chan<- prometheus.Metric) error {\n\tstats, err := c.fs.SysStats()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to retrieve XFS stats: %w\", err)\n\t}\n\n\tfor _, s := range stats {\n\t\tc.updateXFSStats(ch, s)\n\t}\n\n\treturn nil\n}\n\n// updateXFSStats collects statistics for a single XFS filesystem.\nfunc (c *xfsCollector) updateXFSStats(ch chan<- prometheus.Metric, s *xfs.Stats) {\n\tconst (\n\t\tsubsystem = \"xfs\"\n\t)\n\n\tvar (\n\t\tlabels = []string{\"device\"}\n\t)\n\n\t// Metric names and descriptions are sourced from:\n\t// http://xfs.org/index.php/Runtime_Stats.\n\t//\n\t// Each metric has a name that roughly follows the pattern of\n\t// \"node_xfs_category_value_total\", using the categories and value names\n\t// found on the XFS wiki.\n\t//\n\t// Note that statistics for more than one internal B-tree are measured,\n\t// and as such, each one must be differentiated by name.\n\tmetrics := []struct {\n\t\tname  string\n\t\tdesc  string\n\t\tvalue float64\n\t}{\n\t\t{\n\t\t\tname:  \"extent_allocation_extents_allocated_total\",\n\t\t\tdesc:  \"Number of extents allocated for a filesystem.\",\n\t\t\tvalue: float64(s.ExtentAllocation.ExtentsAllocated),\n\t\t},\n\t\t{\n\t\t\tname:  \"extent_allocation_blocks_allocated_total\",\n\t\t\tdesc:  \"Number of blocks allocated for a filesystem.\",\n\t\t\tvalue: float64(s.ExtentAllocation.BlocksAllocated),\n\t\t},\n\t\t{\n\t\t\tname:  \"extent_allocation_extents_freed_total\",\n\t\t\tdesc:  \"Number of extents freed for a filesystem.\",\n\t\t\tvalue: float64(s.ExtentAllocation.ExtentsFreed),\n\t\t},\n\t\t{\n\t\t\tname:  \"extent_allocation_blocks_freed_total\",\n\t\t\tdesc:  \"Number of blocks freed for a filesystem.\",\n\t\t\tvalue: float64(s.ExtentAllocation.BlocksFreed),\n\t\t},\n\t\t{\n\t\t\tname:  \"allocation_btree_lookups_total\",\n\t\t\tdesc:  \"Number of allocation B-tree lookups for a filesystem.\",\n\t\t\tvalue: float64(s.AllocationBTree.Lookups),\n\t\t},\n\t\t{\n\t\t\tname:  \"allocation_btree_compares_total\",\n\t\t\tdesc:  \"Number of allocation B-tree compares for a filesystem.\",\n\t\t\tvalue: float64(s.AllocationBTree.Compares),\n\t\t},\n\t\t{\n\t\t\tname:  \"allocation_btree_records_inserted_total\",\n\t\t\tdesc:  \"Number of allocation B-tree records inserted for a filesystem.\",\n\t\t\tvalue: float64(s.AllocationBTree.RecordsInserted),\n\t\t},\n\t\t{\n\t\t\tname:  \"allocation_btree_records_deleted_total\",\n\t\t\tdesc:  \"Number of allocation B-tree records deleted for a filesystem.\",\n\t\t\tvalue: float64(s.AllocationBTree.RecordsDeleted),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_mapping_reads_total\",\n\t\t\tdesc:  \"Number of block map for read operations for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapping.Reads),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_mapping_writes_total\",\n\t\t\tdesc:  \"Number of block map for write operations for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapping.Writes),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_mapping_unmaps_total\",\n\t\t\tdesc:  \"Number of block unmaps (deletes) for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapping.Unmaps),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_mapping_extent_list_insertions_total\",\n\t\t\tdesc:  \"Number of extent list insertions for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapping.ExtentListInsertions),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_mapping_extent_list_deletions_total\",\n\t\t\tdesc:  \"Number of extent list deletions for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapping.ExtentListDeletions),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_mapping_extent_list_lookups_total\",\n\t\t\tdesc:  \"Number of extent list lookups for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapping.ExtentListLookups),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_mapping_extent_list_compares_total\",\n\t\t\tdesc:  \"Number of extent list compares for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapping.ExtentListCompares),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_map_btree_lookups_total\",\n\t\t\tdesc:  \"Number of block map B-tree lookups for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapBTree.Lookups),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_map_btree_compares_total\",\n\t\t\tdesc:  \"Number of block map B-tree compares for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapBTree.Compares),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_map_btree_records_inserted_total\",\n\t\t\tdesc:  \"Number of block map B-tree records inserted for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapBTree.RecordsInserted),\n\t\t},\n\t\t{\n\t\t\tname:  \"block_map_btree_records_deleted_total\",\n\t\t\tdesc:  \"Number of block map B-tree records deleted for a filesystem.\",\n\t\t\tvalue: float64(s.BlockMapBTree.RecordsDeleted),\n\t\t},\n\t\t{\n\t\t\tname:  \"directory_operation_lookup_total\",\n\t\t\tdesc:  \"Number of file name directory lookups which miss the operating systems directory name lookup cache.\",\n\t\t\tvalue: float64(s.DirectoryOperation.Lookups),\n\t\t},\n\t\t{\n\t\t\tname:  \"directory_operation_create_total\",\n\t\t\tdesc:  \"Number of times a new directory entry was created for a filesystem.\",\n\t\t\tvalue: float64(s.DirectoryOperation.Creates),\n\t\t},\n\t\t{\n\t\t\tname:  \"directory_operation_remove_total\",\n\t\t\tdesc:  \"Number of times an existing directory entry was created for a filesystem.\",\n\t\t\tvalue: float64(s.DirectoryOperation.Removes),\n\t\t},\n\t\t{\n\t\t\tname:  \"directory_operation_getdents_total\",\n\t\t\tdesc:  \"Number of times the directory getdents operation was performed for a filesystem.\",\n\t\t\tvalue: float64(s.DirectoryOperation.Getdents),\n\t\t},\n\t\t{\n\t\t\tname:  \"inode_operation_attempts_total\",\n\t\t\tdesc:  \"Number of times the OS looked for an XFS inode in the inode cache.\",\n\t\t\tvalue: float64(s.InodeOperation.Attempts),\n\t\t},\n\t\t{\n\t\t\tname:  \"inode_operation_found_total\",\n\t\t\tdesc:  \"Number of times the OS looked for and found an XFS inode in the inode cache.\",\n\t\t\tvalue: float64(s.InodeOperation.Found),\n\t\t},\n\t\t{\n\t\t\tname:  \"inode_operation_recycled_total\",\n\t\t\tdesc:  \"Number of times the OS found an XFS inode in the cache, but could not use it as it was being recycled.\",\n\t\t\tvalue: float64(s.InodeOperation.Recycle),\n\t\t},\n\t\t{\n\t\t\tname:  \"inode_operation_missed_total\",\n\t\t\tdesc:  \"Number of times the OS looked for an XFS inode in the cache, but did not find it.\",\n\t\t\tvalue: float64(s.InodeOperation.Missed),\n\t\t},\n\t\t{\n\t\t\tname:  \"inode_operation_duplicates_total\",\n\t\t\tdesc:  \"Number of times the OS tried to add a missing XFS inode to the inode cache, but found it had already been added by another process.\",\n\t\t\tvalue: float64(s.InodeOperation.Duplicate),\n\t\t},\n\t\t{\n\t\t\tname:  \"inode_operation_reclaims_total\",\n\t\t\tdesc:  \"Number of times the OS reclaimed an XFS inode from the inode cache to free memory for another purpose.\",\n\t\t\tvalue: float64(s.InodeOperation.Reclaims),\n\t\t},\n\t\t{\n\t\t\tname:  \"inode_operation_attribute_changes_total\",\n\t\t\tdesc:  \"Number of times the OS explicitly changed the attributes of an XFS inode.\",\n\t\t\tvalue: float64(s.InodeOperation.AttributeChange),\n\t\t},\n\t\t{\n\t\t\tname:  \"read_calls_total\",\n\t\t\tdesc:  \"Number of read(2) system calls made to files in a filesystem.\",\n\t\t\tvalue: float64(s.ReadWrite.Read),\n\t\t},\n\t\t{\n\t\t\tname:  \"write_calls_total\",\n\t\t\tdesc:  \"Number of write(2) system calls made to files in a filesystem.\",\n\t\t\tvalue: float64(s.ReadWrite.Write),\n\t\t},\n\t\t{\n\t\t\tname:  \"vnode_active_total\",\n\t\t\tdesc:  \"Number of vnodes not on free lists for a filesystem.\",\n\t\t\tvalue: float64(s.Vnode.Active),\n\t\t},\n\t\t{\n\t\t\tname:  \"vnode_allocate_total\",\n\t\t\tdesc:  \"Number of times vn_alloc called for a filesystem.\",\n\t\t\tvalue: float64(s.Vnode.Allocate),\n\t\t},\n\t\t{\n\t\t\tname:  \"vnode_get_total\",\n\t\t\tdesc:  \"Number of times vn_get called for a filesystem.\",\n\t\t\tvalue: float64(s.Vnode.Get),\n\t\t},\n\t\t{\n\t\t\tname:  \"vnode_hold_total\",\n\t\t\tdesc:  \"Number of times vn_hold called for a filesystem.\",\n\t\t\tvalue: float64(s.Vnode.Hold),\n\t\t},\n\t\t{\n\t\t\tname:  \"vnode_release_total\",\n\t\t\tdesc:  \"Number of times vn_rele called for a filesystem.\",\n\t\t\tvalue: float64(s.Vnode.Release),\n\t\t},\n\t\t{\n\t\t\tname:  \"vnode_reclaim_total\",\n\t\t\tdesc:  \"Number of times vn_reclaim called for a filesystem.\",\n\t\t\tvalue: float64(s.Vnode.Reclaim),\n\t\t},\n\t\t{\n\t\t\tname:  \"vnode_remove_total\",\n\t\t\tdesc:  \"Number of times vn_remove called for a filesystem.\",\n\t\t\tvalue: float64(s.Vnode.Remove),\n\t\t},\n\t}\n\n\tfor _, m := range metrics {\n\t\tdesc := prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, m.name),\n\t\t\tm.desc,\n\t\t\tlabels,\n\t\t\tnil,\n\t\t)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tdesc,\n\t\t\tprometheus.CounterValue,\n\t\t\tm.value,\n\t\t\ts.Name,\n\t\t)\n\t}\n}\n"
  },
  {
    "path": "collector/zfs_common.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nozfs && (freebsd || linux || solaris)\n\npackage collector\n\nfunc init() {\n\tregisterCollector(\"zfs\", defaultEnabled, NewZFSCollector)\n}\n"
  },
  {
    "path": "collector/zfs_freebsd.go",
    "content": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nozfs\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype zfsCollector struct {\n\tsysctls []bsdSysctl\n\tlogger  *slog.Logger\n}\n\nconst (\n\tzfsCollectorSubsystem = \"zfs\"\n)\n\nfunc NewZFSCollector(logger *slog.Logger) (Collector, error) {\n\treturn &zfsCollector{\n\t\tsysctls: []bsdSysctl{\n\t\t\t{\n\t\t\t\tname:        \"abdstats_linear_count_total\",\n\t\t\t\tdescription: \"ZFS ARC buffer data linear count\",\n\t\t\t\tmib:         \"kstat.zfs.misc.abdstats.linear_cnt\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"abdstats_linear_data_bytes\",\n\t\t\t\tdescription: \"ZFS ARC buffer data linear data size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.abdstats.linear_data_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"abdstats_scatter_chunk_waste_bytes\",\n\t\t\t\tdescription: \"ZFS ARC buffer data scatter chunk waste\",\n\t\t\t\tmib:         \"kstat.zfs.misc.abdstats.scatter_chunk_waste\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"abdstats_scatter_count_total\",\n\t\t\t\tdescription: \"ZFS ARC buffer data scatter count\",\n\t\t\t\tmib:         \"kstat.zfs.misc.abdstats.scatter_cnt\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"abdstats_scatter_data_bytes\",\n\t\t\t\tdescription: \"ZFS ARC buffer data scatter data size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.abdstats.scatter_data_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"abdstats_struct_bytes\",\n\t\t\t\tdescription: \"ZFS ARC buffer data struct size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.abdstats.struct_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_anon_bytes\",\n\t\t\t\tdescription: \"ZFS ARC anon size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.anon_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_c_bytes\",\n\t\t\t\tdescription: \"ZFS ARC target size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.c\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_c_max_bytes\",\n\t\t\t\tdescription: \"ZFS ARC maximum size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.c_max\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_c_min_bytes\",\n\t\t\t\tdescription: \"ZFS ARC minimum size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.c_min\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_data_bytes\",\n\t\t\t\tdescription: \"ZFS ARC data size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.data_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_demand_data_hits_total\",\n\t\t\t\tdescription: \"ZFS ARC demand data hits\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.demand_data_hits\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_demand_data_misses_total\",\n\t\t\t\tdescription: \"ZFS ARC demand data misses\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.demand_data_misses\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_demand_metadata_hits_total\",\n\t\t\t\tdescription: \"ZFS ARC demand metadata hits\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.demand_metadata_hits\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_demand_metadata_misses_total\",\n\t\t\t\tdescription: \"ZFS ARC demand metadata misses\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.demand_metadata_misses\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_hdr_bytes\",\n\t\t\t\tdescription: \"ZFS ARC header size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.hdr_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_hits_total\",\n\t\t\t\tdescription: \"ZFS ARC hits\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.hits\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_misses_total\",\n\t\t\t\tdescription: \"ZFS ARC misses\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.misses\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_mfu_ghost_hits_total\",\n\t\t\t\tdescription: \"ZFS ARC MFU ghost hits\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.mfu_ghost_hits\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_mfu_ghost_size\",\n\t\t\t\tdescription: \"ZFS ARC MFU ghost size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.mfu_ghost_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_mfu_bytes\",\n\t\t\t\tdescription: \"ZFS ARC MFU size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.mfu_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_mru_ghost_hits_total\",\n\t\t\t\tdescription: \"ZFS ARC MRU ghost hits\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.mru_ghost_hits\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_mru_ghost_bytes\",\n\t\t\t\tdescription: \"ZFS ARC MRU ghost size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.mru_ghost_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_mru_bytes\",\n\t\t\t\tdescription: \"ZFS ARC MRU size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.mru_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_other_bytes\",\n\t\t\t\tdescription: \"ZFS ARC other size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.other_size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t// when FreeBSD 14.0+, `meta/pm/pd` install of `p`.\n\t\t\t{\n\t\t\t\tname:        \"arcstats_p_bytes\",\n\t\t\t\tdescription: \"ZFS ARC MRU target size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.p\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_meta_bytes\",\n\t\t\t\tdescription: \"ZFS ARC metadata target frac \",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.meta\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_pd_bytes\",\n\t\t\t\tdescription: \"ZFS ARC data MRU target frac\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.pd\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_pm_bytes\",\n\t\t\t\tdescription: \"ZFS ARC meta MRU target frac\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.pm\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"arcstats_size_bytes\",\n\t\t\t\tdescription: \"ZFS ARC size\",\n\t\t\t\tmib:         \"kstat.zfs.misc.arcstats.size\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.GaugeValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"zfetchstats_hits_total\",\n\t\t\t\tdescription: \"ZFS cache fetch hits\",\n\t\t\t\tmib:         \"kstat.zfs.misc.zfetchstats.hits\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:        \"zfetchstats_misses_total\",\n\t\t\t\tdescription: \"ZFS cache fetch misses\",\n\t\t\t\tmib:         \"kstat.zfs.misc.zfetchstats.misses\",\n\t\t\t\tdataType:    bsdSysctlTypeUint64,\n\t\t\t\tvalueType:   prometheus.CounterValue,\n\t\t\t},\n\t\t},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *zfsCollector) Update(ch chan<- prometheus.Metric) error {\n\tfor _, m := range c.sysctls {\n\t\tv, err := m.Value()\n\t\tif err != nil {\n\t\t\t// debug logging\n\t\t\tc.logger.Debug(m.name, \"mib\", m.mib, \"couldn't get sysctl:\", err)\n\t\t\tcontinue\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tprometheus.NewDesc(\n\t\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, m.name),\n\t\t\t\tm.description,\n\t\t\t\tnil, nil,\n\t\t\t), m.valueType, v)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "collector/zfs_linux.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nozfs\n\npackage collector\n\nimport (\n\t\"bufio\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\n// constants from https://github.com/zfsonlinux/zfs/blob/master/lib/libspl/include/sys/kstat.h\n// kept as strings for comparison thus avoiding conversion to int\nconst (\n\t// kstatDataChar   = \"0\"\n\t// kstatDataInt32  = \"1\"\n\t// kstatDataUint32 = \"2\"\n\tkstatDataInt64  = \"3\"\n\tkstatDataUint64 = \"4\"\n\t// kstatDataLong   = \"5\"\n\t// kstatDataUlong  = \"6\"\n\t// kstatDataString = \"7\"\n)\n\nvar (\n\terrZFSNotAvailable = errors.New(\"ZFS / ZFS statistics are not available\")\n\n\tzfsPoolStatesName = [...]string{\"online\", \"degraded\", \"faulted\", \"offline\", \"removed\", \"unavail\", \"suspended\"}\n)\n\ntype zfsCollector struct {\n\tlinuxProcpathBase    string\n\tlinuxZpoolIoPath     string\n\tlinuxZpoolObjsetPath string\n\tlinuxZpoolStatePath  string\n\tlinuxPathMap         map[string]string\n\tlogger               *slog.Logger\n}\n\n// NewZFSCollector returns a new Collector exposing ZFS statistics.\nfunc NewZFSCollector(logger *slog.Logger) (Collector, error) {\n\treturn &zfsCollector{\n\t\tlinuxProcpathBase:    \"spl/kstat/zfs\",\n\t\tlinuxZpoolIoPath:     \"/*/io\",\n\t\tlinuxZpoolObjsetPath: \"/*/objset-*\",\n\t\tlinuxZpoolStatePath:  \"/*/state\",\n\t\tlinuxPathMap: map[string]string{\n\t\t\t\"zfs_abd\":         \"abdstats\",\n\t\t\t\"zfs_arc\":         \"arcstats\",\n\t\t\t\"zfs_dbuf\":        \"dbufstats\",\n\t\t\t\"zfs_dmu_tx\":      \"dmu_tx\",\n\t\t\t\"zfs_dnode\":       \"dnodestats\",\n\t\t\t\"zfs_fm\":          \"fm\",\n\t\t\t\"zfs_vdev_cache\":  \"vdev_cache_stats\", // vdev_cache is deprecated\n\t\t\t\"zfs_vdev_mirror\": \"vdev_mirror_stats\",\n\t\t\t\"zfs_xuio\":        \"xuio_stats\", // no known consumers of the XUIO interface on Linux exist\n\t\t\t\"zfs_zfetch\":      \"zfetchstats\",\n\t\t\t\"zfs_zil\":         \"zil\",\n\t\t},\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *zfsCollector) Update(ch chan<- prometheus.Metric) error {\n\tif _, err := c.openProcFile(c.linuxProcpathBase); err != nil {\n\t\tif err == errZFSNotAvailable {\n\t\t\tc.logger.Debug(err.Error())\n\t\t\treturn ErrNoData\n\t\t}\n\t}\n\n\tfor subsystem := range c.linuxPathMap {\n\t\tif err := c.updateZfsStats(subsystem, ch); err != nil {\n\t\t\tif err == errZFSNotAvailable {\n\t\t\t\tc.logger.Debug(err.Error())\n\t\t\t\t// ZFS /proc files are added as new features to ZFS arrive, it is ok to continue\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn err\n\t\t}\n\t}\n\n\t// Pool stats\n\treturn c.updatePoolStats(ch)\n}\n\nfunc (c *zfsCollector) openProcFile(path string) (*os.File, error) {\n\tfile, err := os.Open(procFilePath(path))\n\tif err != nil {\n\t\t// file not found error can occur if:\n\t\t// 1. zfs module is not loaded\n\t\t// 2. zfs version does not have the feature with metrics -- ok to ignore\n\t\tc.logger.Debug(\"Cannot open file for reading\", \"path\", procFilePath(path))\n\t\treturn nil, errZFSNotAvailable\n\t}\n\treturn file, nil\n}\n\nfunc (c *zfsCollector) updateZfsStats(subsystem string, ch chan<- prometheus.Metric) error {\n\tfile, err := c.openProcFile(filepath.Join(c.linuxProcpathBase, c.linuxPathMap[subsystem]))\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\n\treturn c.parseProcfsFile(file, c.linuxPathMap[subsystem], func(s zfsSysctl, v any) {\n\t\tvar valueAsFloat64 float64\n\t\tswitch value := v.(type) {\n\t\tcase int64:\n\t\t\tvalueAsFloat64 = float64(value)\n\t\tcase uint64:\n\t\t\tvalueAsFloat64 = float64(value)\n\t\t}\n\t\tch <- c.constSysctlMetric(subsystem, s, valueAsFloat64)\n\t})\n}\n\nfunc (c *zfsCollector) updatePoolStats(ch chan<- prometheus.Metric) error {\n\tzpoolPaths, err := filepath.Glob(procFilePath(filepath.Join(c.linuxProcpathBase, c.linuxZpoolIoPath)))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, zpoolPath := range zpoolPaths {\n\t\tfile, err := os.Open(zpoolPath)\n\t\tif err != nil {\n\t\t\t// this file should exist, but there is a race where an exporting pool can remove the files -- ok to ignore\n\t\t\tc.logger.Debug(\"Cannot open file for reading\", \"path\", zpoolPath)\n\t\t\treturn errZFSNotAvailable\n\t\t}\n\n\t\terr = c.parsePoolProcfsFile(file, zpoolPath, func(poolName string, s zfsSysctl, v uint64) {\n\t\t\tch <- c.constPoolMetric(poolName, s, v)\n\t\t})\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tzpoolObjsetPaths, err := filepath.Glob(procFilePath(filepath.Join(c.linuxProcpathBase, c.linuxZpoolObjsetPath)))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, zpoolPath := range zpoolObjsetPaths {\n\t\tfile, err := os.Open(zpoolPath)\n\t\tif err != nil {\n\t\t\t// This file should exist, but there is a race where an exporting pool can remove the files. Ok to ignore.\n\t\t\tc.logger.Debug(\"Cannot open file for reading\", \"path\", zpoolPath)\n\t\t\treturn errZFSNotAvailable\n\t\t}\n\n\t\terr = c.parsePoolObjsetFile(file, zpoolPath, func(poolName string, datasetName string, s zfsSysctl, v uint64) {\n\t\t\tch <- c.constPoolObjsetMetric(poolName, datasetName, s, v)\n\t\t})\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tzpoolStatePaths, err := filepath.Glob(procFilePath(filepath.Join(c.linuxProcpathBase, c.linuxZpoolStatePath)))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif zpoolStatePaths == nil {\n\t\tc.logger.Debug(\"No pool state files found\")\n\t\treturn nil\n\t}\n\n\tfor _, zpoolPath := range zpoolStatePaths {\n\t\tfile, err := os.Open(zpoolPath)\n\t\tif err != nil {\n\t\t\t// This file should exist, but there is a race where an exporting pool can remove the files. Ok to ignore.\n\t\t\tc.logger.Debug(\"Cannot open file for reading\", \"path\", zpoolPath)\n\t\t\treturn errZFSNotAvailable\n\t\t}\n\n\t\terr = c.parsePoolStateFile(file, zpoolPath, func(poolName string, stateName string, isActive uint64) {\n\t\t\tch <- c.constPoolStateMetric(poolName, stateName, isActive)\n\t\t})\n\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *zfsCollector) parseProcfsFile(reader io.Reader, fmtExt string, handler func(zfsSysctl, any)) error {\n\tscanner := bufio.NewScanner(reader)\n\n\tparseLine := false\n\tfor scanner.Scan() {\n\t\tparts := strings.Fields(scanner.Text())\n\n\t\tif !parseLine && len(parts) == 3 && parts[0] == \"name\" && parts[1] == \"type\" && parts[2] == \"data\" {\n\t\t\t// Start parsing from here.\n\t\t\tparseLine = true\n\t\t\tcontinue\n\t\t}\n\n\t\tif !parseLine || len(parts) < 3 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// kstat data type (column 2) should be KSTAT_DATA_UINT64, otherwise ignore\n\t\t// TODO: when other KSTAT_DATA_* types arrive, much of this will need to be restructured\n\t\tkey := fmt.Sprintf(\"kstat.zfs.misc.%s.%s\", fmtExt, parts[0])\n\t\tswitch parts[1] {\n\t\tcase kstatDataUint64:\n\t\t\tvalue, err := strconv.ParseUint(parts[2], 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not parse expected unsigned integer value for %q: %w\", key, err)\n\t\t\t}\n\t\t\thandler(zfsSysctl(key), value)\n\t\tcase kstatDataInt64:\n\t\t\tvalue, err := strconv.ParseInt(parts[2], 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not parse expected signed integer value for %q: %w\", key, err)\n\t\t\t}\n\t\t\thandler(zfsSysctl(key), value)\n\t\t}\n\t}\n\tif !parseLine {\n\t\treturn fmt.Errorf(\"did not parse a single %q metric\", fmtExt)\n\t}\n\n\treturn scanner.Err()\n}\n\nfunc (c *zfsCollector) parsePoolProcfsFile(reader io.Reader, zpoolPath string, handler func(string, zfsSysctl, uint64)) error {\n\tscanner := bufio.NewScanner(reader)\n\n\tparseLine := false\n\tvar fields []string\n\tfor scanner.Scan() {\n\t\tline := strings.Fields(scanner.Text())\n\n\t\tif !parseLine && len(line) >= 12 && line[0] == \"nread\" {\n\t\t\t//Start parsing from here.\n\t\t\tparseLine = true\n\t\t\tfields = make([]string, len(line))\n\t\t\tcopy(fields, line)\n\t\t\tcontinue\n\t\t}\n\t\tif !parseLine {\n\t\t\tcontinue\n\t\t}\n\n\t\tzpoolPathElements := strings.Split(zpoolPath, \"/\")\n\t\tpathLen := len(zpoolPathElements)\n\t\tif pathLen < 2 {\n\t\t\treturn fmt.Errorf(\"zpool path did not return at least two elements\")\n\t\t}\n\t\tzpoolName := zpoolPathElements[pathLen-2]\n\t\tzpoolFile := zpoolPathElements[pathLen-1]\n\n\t\tfor i, field := range fields {\n\t\t\tkey := fmt.Sprintf(\"kstat.zfs.misc.%s.%s\", zpoolFile, field)\n\n\t\t\tvalue, err := strconv.ParseUint(line[i], 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not parse expected integer value for %q: %w\", key, err)\n\t\t\t}\n\t\t\thandler(zpoolName, zfsSysctl(key), value)\n\t\t}\n\t}\n\n\treturn scanner.Err()\n}\n\nfunc (c *zfsCollector) parsePoolObjsetFile(reader io.Reader, zpoolPath string, handler func(string, string, zfsSysctl, uint64)) error {\n\tscanner := bufio.NewScanner(reader)\n\n\tparseLine := false\n\tvar zpoolName, datasetName string\n\tfor scanner.Scan() {\n\t\tline := scanner.Text()\n\t\tparts := strings.Fields(line)\n\n\t\tif !parseLine && len(parts) == 3 && parts[0] == \"name\" && parts[1] == \"type\" && parts[2] == \"data\" {\n\t\t\tparseLine = true\n\t\t\tcontinue\n\t\t}\n\n\t\tif !parseLine || len(parts) < 3 {\n\t\t\tcontinue\n\t\t}\n\t\tif parts[0] == \"dataset_name\" {\n\t\t\tzpoolPathElements := strings.Split(zpoolPath, \"/\")\n\t\t\tpathLen := len(zpoolPathElements)\n\t\t\tzpoolName = zpoolPathElements[pathLen-2]\n\t\t\tdatasetName = line[strings.Index(line, parts[2]):]\n\t\t\tcontinue\n\t\t}\n\n\t\tif parts[1] == kstatDataUint64 {\n\t\t\tkey := fmt.Sprintf(\"kstat.zfs.misc.objset.%s\", parts[0])\n\t\t\tvalue, err := strconv.ParseUint(parts[2], 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not parse expected integer value for %q\", key)\n\t\t\t}\n\t\t\thandler(zpoolName, datasetName, zfsSysctl(key), value)\n\t\t}\n\t}\n\tif !parseLine {\n\t\treturn fmt.Errorf(\"did not parse a single %s %s metric\", zpoolName, datasetName)\n\t}\n\n\treturn scanner.Err()\n}\n\nfunc (c *zfsCollector) parsePoolStateFile(reader io.Reader, zpoolPath string, handler func(string, string, uint64)) error {\n\tscanner := bufio.NewScanner(reader)\n\tscanner.Scan()\n\n\tactualStateName, err := scanner.Text(), scanner.Err()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tactualStateName = strings.ToLower(actualStateName)\n\n\tzpoolPathElements := strings.Split(zpoolPath, \"/\")\n\tpathLen := len(zpoolPathElements)\n\tif pathLen < 2 {\n\t\treturn fmt.Errorf(\"zpool path did not return at least two elements\")\n\t}\n\n\tzpoolName := zpoolPathElements[pathLen-2]\n\n\tfor _, stateName := range zfsPoolStatesName {\n\t\tisActive := uint64(0)\n\n\t\tif actualStateName == stateName {\n\t\t\tisActive = 1\n\t\t}\n\n\t\thandler(zpoolName, stateName, isActive)\n\t}\n\n\treturn nil\n}\n\nfunc (c *zfsCollector) constSysctlMetric(subsystem string, sysctl zfsSysctl, value float64) prometheus.Metric {\n\tmetricName := sysctl.metricName()\n\n\treturn prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, subsystem, metricName),\n\t\t\tstring(sysctl),\n\t\t\tnil,\n\t\t\tnil,\n\t\t),\n\t\tprometheus.UntypedValue,\n\t\tvalue,\n\t)\n}\n\nfunc (c *zfsCollector) constPoolMetric(poolName string, sysctl zfsSysctl, value uint64) prometheus.Metric {\n\tmetricName := sysctl.metricName()\n\n\treturn prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"zfs_zpool\", metricName),\n\t\t\tstring(sysctl),\n\t\t\t[]string{\"zpool\"},\n\t\t\tnil,\n\t\t),\n\t\tprometheus.UntypedValue,\n\t\tfloat64(value),\n\t\tpoolName,\n\t)\n}\n\nfunc (c *zfsCollector) constPoolObjsetMetric(poolName string, datasetName string, sysctl zfsSysctl, value uint64) prometheus.Metric {\n\tmetricName := sysctl.metricName()\n\n\treturn prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"zfs_zpool_dataset\", metricName),\n\t\t\tstring(sysctl),\n\t\t\t[]string{\"zpool\", \"dataset\"},\n\t\t\tnil,\n\t\t),\n\t\tprometheus.UntypedValue,\n\t\tfloat64(value),\n\t\tpoolName,\n\t\tdatasetName,\n\t)\n}\n\nfunc (c *zfsCollector) constPoolStateMetric(poolName string, stateName string, isActive uint64) prometheus.Metric {\n\treturn prometheus.MustNewConstMetric(\n\t\tprometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, \"zfs_zpool\", \"state\"),\n\t\t\t\"kstat.zfs.misc.state\",\n\t\t\t[]string{\"zpool\", \"state\"},\n\t\t\tnil,\n\t\t),\n\t\tprometheus.GaugeValue,\n\t\tfloat64(isActive),\n\t\tpoolName,\n\t\tstateName,\n\t)\n}\n\ntype zfsSysctl string\n\nfunc (s zfsSysctl) metricName() string {\n\tparts := strings.Split(string(s), \".\")\n\treturn strings.ReplaceAll(parts[len(parts)-1], \"-\", \"_\")\n}\n"
  },
  {
    "path": "collector/zfs_linux_test.go",
    "content": "// Copyright 2016 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nozfs\n\npackage collector\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n)\n\nfunc TestArcstatsParsing(t *testing.T) {\n\tarcstatsFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/arcstats\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer arcstatsFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(arcstatsFile, \"arcstats\", func(s zfsSysctl, v any) {\n\n\t\tif s == zfsSysctl(\"kstat.zfs.misc.arcstats.hits\") {\n\t\t\tif v.(uint64) != 8772612 {\n\t\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data\")\n\t\t\t}\n\t\t} else if s == zfsSysctl(\"kstat.zfs.misc.arcstats.memory_available_bytes\") {\n\t\t\tif v.(int64) != -922337203685477580 {\n\t\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data\")\n\t\t\t}\n\t\t} else {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\t})\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif !handlerCalled {\n\t\tt.Fatal(\"Arcstats parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestZfetchstatsParsing(t *testing.T) {\n\tzfetchstatsFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/zfetchstats\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer zfetchstatsFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(zfetchstatsFile, \"zfetchstats\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.zfetchstats.hits\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 7067992 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"Zfetchstats parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestZilParsing(t *testing.T) {\n\tzilFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/zil\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer zilFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(zilFile, \"zil\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.zil.zil_commit_count\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 10 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"Zil parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestVdevCacheStatsParsing(t *testing.T) {\n\tvdevCacheStatsFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/vdev_cache_stats\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer vdevCacheStatsFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(vdevCacheStatsFile, \"vdev_cache_stats\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.vdev_cache_stats.delegations\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 40 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"VdevCacheStats parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestXuioStatsParsing(t *testing.T) {\n\txuioStatsFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/xuio_stats\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer xuioStatsFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(xuioStatsFile, \"xuio_stats\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.xuio_stats.onloan_read_buf\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 32 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"XuioStats parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestFmParsing(t *testing.T) {\n\tfmFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/fm\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer fmFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(fmFile, \"fm\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.fm.erpt-dropped\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 18 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"Fm parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestDmuTxParsing(t *testing.T) {\n\tdmuTxFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/dmu_tx\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer dmuTxFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(dmuTxFile, \"dmu_tx\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.dmu_tx.dmu_tx_assigned\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 3532844 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"DmuTx parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestZpoolParsing(t *testing.T) {\n\tzpoolPaths, err := filepath.Glob(\"fixtures/proc/spl/kstat/zfs/*/io\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\tfor _, zpoolPath := range zpoolPaths {\n\t\tfile, err := os.Open(zpoolPath)\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\n\t\terr = c.parsePoolProcfsFile(file, zpoolPath, func(poolName string, s zfsSysctl, v uint64) {\n\t\t\tif s != zfsSysctl(\"kstat.zfs.misc.io.nread\") {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\thandlerCalled = true\n\n\t\t\tif v != 1884160 && v != 2826240 {\n\t\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data %v\", v)\n\t\t\t}\n\n\t\t})\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t}\n\tif !handlerCalled {\n\t\tt.Fatal(\"Zpool parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestZpoolObjsetParsingWithSpace(t *testing.T) {\n\ttests := []struct {\n\t\tpath            string\n\t\texpectedDataset string\n\t}{\n\t\t{\n\t\t\tpath:            \"fixtures/proc/spl/kstat/zfs/pool1/objset-1\",\n\t\t\texpectedDataset: \"pool1\",\n\t\t},\n\t\t{\n\t\t\tpath:            \"fixtures/proc/spl/kstat/zfs/pool1/objset-2\",\n\t\t\texpectedDataset: \"pool1/dataset1\",\n\t\t},\n\t\t{\n\t\t\tpath:            \"fixtures/proc/spl/kstat/zfs/pool3/objset-1\",\n\t\t\texpectedDataset: \"pool3\",\n\t\t},\n\t\t{\n\t\t\tpath:            \"fixtures/proc/spl/kstat/zfs/pool3/objset-2\",\n\t\t\texpectedDataset: \"pool3/dataset with  space\",\n\t\t},\n\t}\n\n\tc := zfsCollector{}\n\n\tvar handlerCalled bool\n\tfor _, test := range tests {\n\t\tfile, err := os.Open(test.path)\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\n\t\thandlerCalled = false\n\t\terr = c.parsePoolObjsetFile(file, test.path, func(poolName string, datasetName string, s zfsSysctl, v uint64) {\n\t\t\thandlerCalled = true\n\t\t\tif test.expectedDataset != datasetName {\n\t\t\t\tt.Fatalf(\"Incorrectly parsed dataset name: expected: '%s', got: '%s'\", test.expectedDataset, datasetName)\n\t\t\t}\n\t\t})\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t\tif !handlerCalled {\n\t\t\tt.Fatalf(\"Zpool parsing handler was not called for '%s'\", test.path)\n\t\t}\n\t}\n}\n\nfunc TestZpoolObjsetParsing(t *testing.T) {\n\tzpoolPaths, err := filepath.Glob(\"fixtures/proc/spl/kstat/zfs/*/objset-*\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\tfor _, zpoolPath := range zpoolPaths {\n\t\tfile, err := os.Open(zpoolPath)\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\n\t\terr = c.parsePoolObjsetFile(file, zpoolPath, func(poolName string, datasetName string, s zfsSysctl, v uint64) {\n\t\t\tif s != zfsSysctl(\"kstat.zfs.misc.objset.writes\") {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\thandlerCalled = true\n\n\t\t\tif v != 0 && v != 4 && v != 10 {\n\t\t\t\tt.Fatalf(\"Incorrect value parsed from procfs data %v\", v)\n\t\t\t}\n\n\t\t})\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t}\n\tif !handlerCalled {\n\t\tt.Fatal(\"Zpool parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestAbdstatsParsing(t *testing.T) {\n\tabdstatsFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/abdstats\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer abdstatsFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(abdstatsFile, \"abdstats\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.abdstats.linear_data_size\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 223232 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs abdstats data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"ABDStats parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestDbufstatsParsing(t *testing.T) {\n\tdbufstatsFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/dbufstats\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer dbufstatsFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(dbufstatsFile, \"dbufstats\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.dbufstats.hash_hits\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 108807 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs dbufstats data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"DbufStats parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestDnodestatsParsing(t *testing.T) {\n\tdnodestatsFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/dnodestats\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer dnodestatsFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(dnodestatsFile, \"dnodestats\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.dnodestats.dnode_hold_alloc_hits\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 37617 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs dnodestats data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"Dnodestats parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestVdevMirrorstatsParsing(t *testing.T) {\n\tvdevMirrorStatsFile, err := os.Open(\"fixtures/proc/spl/kstat/zfs/vdev_mirror_stats\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer vdevMirrorStatsFile.Close()\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\terr = c.parseProcfsFile(vdevMirrorStatsFile, \"vdev_mirror_stats\", func(s zfsSysctl, v any) {\n\n\t\tif s != zfsSysctl(\"kstat.zfs.misc.vdev_mirror_stats.preferred_not_found\") {\n\t\t\treturn\n\t\t}\n\n\t\thandlerCalled = true\n\n\t\tif v.(uint64) != 94 {\n\t\t\tt.Fatalf(\"Incorrect value parsed from procfs vdev_mirror_stats data\")\n\t\t}\n\n\t})\n\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif !handlerCalled {\n\t\tt.Fatal(\"VdevMirrorStats parsing handler was not called for some expected sysctls\")\n\t}\n}\n\nfunc TestPoolStateParsing(t *testing.T) {\n\tzpoolPaths, err := filepath.Glob(\"fixtures/proc/spl/kstat/zfs/*/state\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tc := zfsCollector{}\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\thandlerCalled := false\n\tfor _, zpoolPath := range zpoolPaths {\n\t\tfile, err := os.Open(zpoolPath)\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\n\t\terr = c.parsePoolStateFile(file, zpoolPath, func(poolName string, stateName string, isActive uint64) {\n\t\t\thandlerCalled = true\n\n\t\t\tif poolName == \"pool1\" {\n\t\t\t\tif isActive != 1 && stateName == \"online\" {\n\t\t\t\t\tt.Fatalf(\"Incorrect parsed value for online state\")\n\t\t\t\t}\n\t\t\t\tif isActive != 0 && stateName != \"online\" {\n\t\t\t\t\tt.Fatalf(\"Incorrect parsed value for online state\")\n\t\t\t\t}\n\t\t\t}\n\t\t\tif poolName == \"poolz1\" {\n\t\t\t\tif isActive != 1 && stateName == \"degraded\" {\n\t\t\t\t\tt.Fatalf(\"Incorrect parsed value for degraded state\")\n\t\t\t\t}\n\t\t\t\tif isActive != 0 && stateName != \"degraded\" {\n\t\t\t\t\tt.Fatalf(\"Incorrect parsed value for degraded state\")\n\t\t\t\t}\n\t\t\t}\n\t\t\tif poolName == \"pool2\" {\n\t\t\t\tif isActive != 1 && stateName == \"suspended\" {\n\t\t\t\t\tt.Fatalf(\"Incorrect parsed value for suspended state\")\n\t\t\t\t}\n\t\t\t\tif isActive != 0 && stateName != \"suspended\" {\n\t\t\t\t\tt.Fatalf(\"Incorrect parsed value for suspended state\")\n\t\t\t\t}\n\t\t\t}\n\n\t\t})\n\t\tfile.Close()\n\t\tif err != nil {\n\t\t\tt.Fatal(err)\n\t\t}\n\t}\n\tif !handlerCalled {\n\t\tt.Fatal(\"Zpool parsing handler was not called for some expected sysctls\")\n\t}\n\n}\n"
  },
  {
    "path": "collector/zfs_solaris.go",
    "content": "// Copyright 2018 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n//go:build !nozfs\n\npackage collector\n\nimport (\n\t\"log/slog\"\n\t\"strings\"\n\n\t\"github.com/illumos/go-kstat\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\ntype zfsCollector struct {\n\tabdstatsLinearCount          *prometheus.Desc\n\tabdstatsLinearDataSize       *prometheus.Desc\n\tabdstatsScatterChunkWaste    *prometheus.Desc\n\tabdstatsScatterCount         *prometheus.Desc\n\tabdstatsScatterDataSize      *prometheus.Desc\n\tabdstatsStructSize           *prometheus.Desc\n\tarcstatsAnonSize             *prometheus.Desc\n\tarcstatsC                    *prometheus.Desc\n\tarcstatsCMax                 *prometheus.Desc\n\tarcstatsCMin                 *prometheus.Desc\n\tarcstatsDataSize             *prometheus.Desc\n\tarcstatsDemandDataHits       *prometheus.Desc\n\tarcstatsDemandDataMisses     *prometheus.Desc\n\tarcstatsDemandMetadataHits   *prometheus.Desc\n\tarcstatsDemandMetadataMisses *prometheus.Desc\n\tarcstatsHeaderSize           *prometheus.Desc\n\tarcstatsHits                 *prometheus.Desc\n\tarcstatsMisses               *prometheus.Desc\n\tarcstatsMFUGhostHits         *prometheus.Desc\n\tarcstatsMFUGhostSize         *prometheus.Desc\n\tarcstatsMFUSize              *prometheus.Desc\n\tarcstatsMRUGhostHits         *prometheus.Desc\n\tarcstatsMRUGhostSize         *prometheus.Desc\n\tarcstatsMRUSize              *prometheus.Desc\n\tarcstatsOtherSize            *prometheus.Desc\n\tarcstatsP                    *prometheus.Desc\n\tarcstatsSize                 *prometheus.Desc\n\tzfetchstatsHits              *prometheus.Desc\n\tzfetchstatsMisses            *prometheus.Desc\n\tlogger                       *slog.Logger\n}\n\nconst (\n\tzfsCollectorSubsystem = \"zfs\"\n)\n\nfunc NewZFSCollector(logger *slog.Logger) (Collector, error) {\n\treturn &zfsCollector{\n\t\tabdstatsLinearCount: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"abdstats_linear_count_total\"),\n\t\t\t\"ZFS ARC buffer data linear count\", nil, nil,\n\t\t),\n\t\tabdstatsLinearDataSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"abdstats_linear_data_bytes\"),\n\t\t\t\"ZFS ARC buffer data linear data size\", nil, nil,\n\t\t),\n\t\tabdstatsScatterChunkWaste: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"abdstats_scatter_chunk_waste_bytes\"),\n\t\t\t\"ZFS ARC buffer data scatter chunk waste\", nil, nil,\n\t\t),\n\t\tabdstatsScatterCount: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"abdstats_scatter_count_total\"),\n\t\t\t\"ZFS ARC buffer data scatter count\", nil, nil,\n\t\t),\n\t\tabdstatsScatterDataSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"abdstats_scatter_data_bytes\"),\n\t\t\t\"ZFS ARC buffer data scatter data size\", nil, nil,\n\t\t),\n\t\tabdstatsStructSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"abdstats_struct_bytes\"),\n\t\t\t\"ZFS ARC buffer data struct size\", nil, nil,\n\t\t),\n\t\tarcstatsAnonSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_anon_bytes\"),\n\t\t\t\"ZFS ARC anon size\", nil, nil,\n\t\t),\n\t\tarcstatsC: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_c_bytes\"),\n\t\t\t\"ZFS ARC target size\", nil, nil,\n\t\t),\n\t\tarcstatsCMax: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_c_max_bytes\"),\n\t\t\t\"ZFS ARC maximum size\", nil, nil,\n\t\t),\n\t\tarcstatsCMin: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_c_min_bytes\"),\n\t\t\t\"ZFS ARC minimum size\", nil, nil,\n\t\t),\n\t\tarcstatsDataSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_data_bytes\"),\n\t\t\t\"ZFS ARC data size\", nil, nil,\n\t\t),\n\t\tarcstatsDemandDataHits: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_demand_data_hits_total\"),\n\t\t\t\"ZFS ARC demand data hits\", nil, nil,\n\t\t),\n\t\tarcstatsDemandDataMisses: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_demand_data_misses_total\"),\n\t\t\t\"ZFS ARC demand data misses\", nil, nil,\n\t\t),\n\t\tarcstatsDemandMetadataHits: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_demand_metadata_hits_total\"),\n\t\t\t\"ZFS ARC demand metadata hits\", nil, nil,\n\t\t),\n\t\tarcstatsDemandMetadataMisses: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_demand_metadata_misses_total\"),\n\t\t\t\"ZFS ARC demand metadata misses\", nil, nil,\n\t\t),\n\t\tarcstatsHeaderSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_hdr_bytes\"),\n\t\t\t\"ZFS ARC header size\", nil, nil,\n\t\t),\n\t\tarcstatsHits: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_hits_total\"),\n\t\t\t\"ZFS ARC hits\", nil, nil,\n\t\t),\n\t\tarcstatsMisses: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_misses_total\"),\n\t\t\t\"ZFS ARC misses\", nil, nil,\n\t\t),\n\t\tarcstatsMFUGhostHits: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_mfu_ghost_hits_total\"),\n\t\t\t\"ZFS ARC MFU ghost hits\", nil, nil,\n\t\t),\n\t\tarcstatsMFUGhostSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_mfu_ghost_size\"),\n\t\t\t\"ZFS ARC MFU ghost size\", nil, nil,\n\t\t),\n\t\tarcstatsMFUSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_mfu_bytes\"),\n\t\t\t\"ZFS ARC MFU size\", nil, nil,\n\t\t),\n\t\tarcstatsMRUGhostHits: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_mru_ghost_hits_total\"),\n\t\t\t\"ZFS ARC MRU ghost hits\", nil, nil,\n\t\t),\n\t\tarcstatsMRUGhostSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_mru_ghost_bytes\"),\n\t\t\t\"ZFS ARC MRU ghost size\", nil, nil,\n\t\t),\n\t\tarcstatsMRUSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_mru_bytes\"),\n\t\t\t\"ZFS ARC MRU size\", nil, nil,\n\t\t),\n\t\tarcstatsOtherSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_other_bytes\"),\n\t\t\t\"ZFS ARC other size\", nil, nil,\n\t\t),\n\t\tarcstatsP: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_p_bytes\"),\n\t\t\t\"ZFS ARC MRU target size\", nil, nil,\n\t\t),\n\t\tarcstatsSize: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"arcstats_size_bytes\"),\n\t\t\t\"ZFS ARC size\", nil, nil,\n\t\t),\n\t\tzfetchstatsHits: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"zfetchstats_hits_total\"),\n\t\t\t\"ZFS cache fetch hits\", nil, nil,\n\t\t),\n\t\tzfetchstatsMisses: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zfsCollectorSubsystem, \"zfetchstats_misses_total\"),\n\t\t\t\"ZFS cache fetch misses\", nil, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\nfunc (c *zfsCollector) updateZfsAbdStats(ch chan<- prometheus.Metric) error {\n\tvar metricType prometheus.ValueType\n\n\ttok, err := kstat.Open()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer tok.Close()\n\n\tksZFSInfo, err := tok.Lookup(\"zfs\", 0, \"abdstats\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor k, v := range map[string]*prometheus.Desc{\n\t\t\"linear_cnt\":          c.abdstatsLinearCount,\n\t\t\"linear_data_size\":    c.abdstatsLinearDataSize,\n\t\t\"scatter_chunk_waste\": c.abdstatsScatterChunkWaste,\n\t\t\"scatter_cnt\":         c.abdstatsScatterCount,\n\t\t\"scatter_data_size\":   c.abdstatsScatterDataSize,\n\t\t\"struct_size\":         c.abdstatsStructSize,\n\t} {\n\t\tksZFSInfoValue, err := ksZFSInfo.GetNamed(k)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif strings.HasSuffix(k, \"_cnt\") {\n\t\t\tmetricType = prometheus.CounterValue\n\t\t} else {\n\t\t\tmetricType = prometheus.GaugeValue\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tv,\n\t\t\tmetricType,\n\t\t\tfloat64(ksZFSInfoValue.UintVal),\n\t\t)\n\t}\n\n\treturn nil\n}\n\nfunc (c *zfsCollector) updateZfsArcStats(ch chan<- prometheus.Metric) error {\n\tvar metricType prometheus.ValueType\n\n\ttok, err := kstat.Open()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer tok.Close()\n\n\tksZFSInfo, err := tok.Lookup(\"zfs\", 0, \"arcstats\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor k, v := range map[string]*prometheus.Desc{\n\t\t\"anon_size\":              c.arcstatsAnonSize,\n\t\t\"c\":                      c.arcstatsC,\n\t\t\"c_max\":                  c.arcstatsCMax,\n\t\t\"c_min\":                  c.arcstatsCMin,\n\t\t\"data_size\":              c.arcstatsDataSize,\n\t\t\"demand_data_hits\":       c.arcstatsDemandDataHits,\n\t\t\"demand_data_misses\":     c.arcstatsDemandDataMisses,\n\t\t\"demand_metadata_hits\":   c.arcstatsDemandMetadataHits,\n\t\t\"demand_metadata_misses\": c.arcstatsDemandMetadataMisses,\n\t\t\"hdr_size\":               c.arcstatsHeaderSize,\n\t\t\"hits\":                   c.arcstatsHits,\n\t\t\"misses\":                 c.arcstatsMisses,\n\t\t\"mfu_ghost_hits\":         c.arcstatsMFUGhostHits,\n\t\t\"mfu_ghost_size\":         c.arcstatsMFUGhostSize,\n\t\t\"mfu_size\":               c.arcstatsMFUSize,\n\t\t\"mru_ghost_hits\":         c.arcstatsMRUGhostHits,\n\t\t\"mru_ghost_size\":         c.arcstatsMRUGhostSize,\n\t\t\"mru_size\":               c.arcstatsMRUSize,\n\t\t\"other_size\":             c.arcstatsOtherSize,\n\t\t\"p\":                      c.arcstatsP,\n\t\t\"size\":                   c.arcstatsSize,\n\t} {\n\t\tksZFSInfoValue, err := ksZFSInfo.GetNamed(k)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif strings.HasSuffix(k, \"_hits\") || strings.HasSuffix(k, \"_misses\") {\n\t\t\tmetricType = prometheus.CounterValue\n\t\t} else {\n\t\t\tmetricType = prometheus.GaugeValue\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tv,\n\t\t\tmetricType,\n\t\t\tfloat64(ksZFSInfoValue.UintVal),\n\t\t)\n\t}\n\n\treturn nil\n}\n\nfunc (c *zfsCollector) updateZfsFetchStats(ch chan<- prometheus.Metric) error {\n\ttok, err := kstat.Open()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tdefer tok.Close()\n\n\tksZFSInfo, err := tok.Lookup(\"zfs\", 0, \"zfetchstats\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor k, v := range map[string]*prometheus.Desc{\n\t\t\"hits\":   c.zfetchstatsHits,\n\t\t\"misses\": c.zfetchstatsMisses,\n\t} {\n\t\tksZFSInfoValue, err := ksZFSInfo.GetNamed(k)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tv,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(ksZFSInfoValue.UintVal),\n\t\t)\n\t}\n\n\treturn nil\n}\n\nfunc (c *zfsCollector) Update(ch chan<- prometheus.Metric) error {\n\tif err := c.updateZfsAbdStats(ch); err != nil {\n\t\treturn err\n\t}\n\tif err := c.updateZfsArcStats(ch); err != nil {\n\t\treturn err\n\t}\n\tif err := c.updateZfsFetchStats(ch); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "collector/zoneinfo_linux.go",
    "content": "// Copyright 2020 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage collector\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"reflect\"\n\n\t\"github.com/prometheus/client_golang/prometheus\"\n\t\"github.com/prometheus/procfs\"\n)\n\nconst zoneinfoSubsystem = \"zoneinfo\"\n\ntype zoneinfoCollector struct {\n\tgaugeMetricDescs   map[string]*prometheus.Desc\n\tcounterMetricDescs map[string]*prometheus.Desc\n\tlogger             *slog.Logger\n\tfs                 procfs.FS\n}\n\nfunc init() {\n\tregisterCollector(\"zoneinfo\", defaultDisabled, NewZoneinfoCollector)\n}\n\n// NewZoneinfoCollector returns a new Collector exposing zone stats.\nfunc NewZoneinfoCollector(logger *slog.Logger) (Collector, error) {\n\tfs, err := procfs.NewFS(*procPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to open procfs: %w\", err)\n\t}\n\treturn &zoneinfoCollector{\n\t\tgaugeMetricDescs:   createGaugeMetricDescriptions(),\n\t\tcounterMetricDescs: createCounterMetricDescriptions(),\n\t\tlogger:             logger,\n\t\tfs:                 fs,\n\t}, nil\n}\n\nfunc (c *zoneinfoCollector) Update(ch chan<- prometheus.Metric) error {\n\tmetrics, err := c.fs.Zoneinfo()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"couldn't get zoneinfo: %w\", err)\n\t}\n\tfor _, metric := range metrics {\n\t\tnode := metric.Node\n\t\tzone := metric.Zone\n\t\tmetricStruct := reflect.ValueOf(metric)\n\t\ttypeOfMetricStruct := metricStruct.Type()\n\t\tfor i := 0; i < metricStruct.NumField(); i++ {\n\t\t\tvalue := reflect.Indirect(metricStruct.Field(i))\n\t\t\tif value.Kind() != reflect.Int64 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tmetricName := typeOfMetricStruct.Field(i).Name\n\t\t\tdesc, ok := c.gaugeMetricDescs[metricName]\n\t\t\tmetricType := prometheus.GaugeValue\n\t\t\tif !ok {\n\t\t\t\tdesc = c.counterMetricDescs[metricName]\n\t\t\t\tmetricType = prometheus.CounterValue\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstMetric(desc, metricType,\n\t\t\t\tfloat64(reflect.Indirect(metricStruct.Field(i)).Int()),\n\t\t\t\tnode, zone)\n\t\t}\n\t\tfor i, value := range metric.Protection {\n\t\t\tmetricName := fmt.Sprintf(\"protection_%d\", i)\n\t\t\tdesc, ok := c.gaugeMetricDescs[metricName]\n\t\t\tif !ok {\n\t\t\t\tdesc = prometheus.NewDesc(\n\t\t\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, metricName),\n\t\t\t\t\tfmt.Sprintf(\"Protection array %d. field\", i),\n\t\t\t\t\t[]string{\"node\", \"zone\"}, nil)\n\t\t\t\tc.gaugeMetricDescs[metricName] = desc\n\t\t\t}\n\t\t\tch <- prometheus.MustNewConstMetric(desc, prometheus.GaugeValue,\n\t\t\t\tfloat64(*value), node, zone)\n\t\t}\n\n\t}\n\treturn nil\n}\nfunc createGaugeMetricDescriptions() map[string]*prometheus.Desc {\n\treturn map[string]*prometheus.Desc{\n\t\t\"NrFreePages\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_free_pages\"),\n\t\t\t\"Total number of free pages in the zone\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"Min\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"min_pages\"),\n\t\t\t\"Zone watermark pages_min\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"Low\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"low_pages\"),\n\t\t\t\"Zone watermark pages_low\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"High\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"high_pages\"),\n\t\t\t\"Zone watermark pages_high\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"Scanned\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"scanned_pages\"),\n\t\t\t\"Pages scanned since last reclaim\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"Spanned\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"spanned_pages\"),\n\t\t\t\"Total pages spanned by the zone, including holes\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"Present\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"present_pages\"),\n\t\t\t\"Physical pages existing within the zone\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"Managed\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"managed_pages\"),\n\t\t\t\"Present pages managed by the buddy system\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrActiveAnon\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_active_anon_pages\"),\n\t\t\t\"Number of anonymous pages recently more used\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrInactiveAnon\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_inactive_anon_pages\"),\n\t\t\t\"Number of anonymous pages recently less used\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrIsolatedAnon\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_isolated_anon_pages\"),\n\t\t\t\"Temporary isolated pages from anon lru\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrAnonPages\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_anon_pages\"),\n\t\t\t\"Number of anonymous pages currently used by the system\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrAnonTransparentHugepages\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_anon_transparent_hugepages\"),\n\t\t\t\"Number of anonymous transparent huge pages currently used by the system\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrActiveFile\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_active_file_pages\"),\n\t\t\t\"Number of active pages with file-backing\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrInactiveFile\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_inactive_file_pages\"),\n\t\t\t\"Number of inactive pages with file-backing\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrIsolatedFile\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_isolated_file_pages\"),\n\t\t\t\"Temporary isolated pages from file lru\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrFilePages\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_file_pages\"),\n\t\t\t\"Number of file pages\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrSlabReclaimable\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_slab_reclaimable_pages\"),\n\t\t\t\"Number of reclaimable slab pages\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrSlabUnreclaimable\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_slab_unreclaimable_pages\"),\n\t\t\t\"Number of unreclaimable slab pages\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrMlockStack\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_mlock_stack_pages\"),\n\t\t\t\"mlock()ed pages found and moved off LRU\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrKernelStack\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_kernel_stacks\"),\n\t\t\t\"Number of kernel stacks\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrMapped\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_mapped_pages\"),\n\t\t\t\"Number of mapped pages\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrDirty\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_dirty_pages\"),\n\t\t\t\"Number of dirty pages\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrWriteback\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_writeback_pages\"),\n\t\t\t\"Number of writeback pages\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrUnevictable\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_unevictable_pages\"),\n\t\t\t\"Number of unevictable pages\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrShmem\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_shmem_pages\"),\n\t\t\t\"Number of shmem pages (included tmpfs/GEM pages)\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t}\n\n}\nfunc createCounterMetricDescriptions() map[string]*prometheus.Desc {\n\treturn map[string]*prometheus.Desc{\n\t\t\"NrDirtied\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_dirtied_total\"),\n\t\t\t\"Page dirtyings since bootup\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NrWritten\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"nr_written_total\"),\n\t\t\t\"Page writings since bootup\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NumaHit\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"numa_hit_total\"),\n\t\t\t\"Allocated in intended node\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NumaMiss\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"numa_miss_total\"),\n\t\t\t\"Allocated in non intended node\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NumaForeign\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"numa_foreign_total\"),\n\t\t\t\"Was intended here, hit elsewhere\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NumaInterleave\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"numa_interleave_total\"),\n\t\t\t\"Interleaver preferred this zone\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NumaLocal\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"numa_local_total\"),\n\t\t\t\"Allocation from local node\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t\t\"NumaOther\": prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, zoneinfoSubsystem, \"numa_other_total\"),\n\t\t\t\"Allocation from other node\",\n\t\t\t[]string{\"node\", \"zone\"}, nil),\n\t}\n}\n"
  },
  {
    "path": "docs/TIME.md",
    "content": "# Monitoring time sync with node_exporter\n\n## `ntp` collector\n\nNOTE: This collector is deprecated and will be removed in the next major version release.\n\nThis collector is intended for usage with local NTP daemons including [ntp.org](http://ntp.org/), [chrony](https://chrony.tuxfamily.org/comparison.html), and [OpenNTPD](http://www.openntpd.org/).\n\nNote, some chrony packages have `local stratum 10` configuration value making chrony a valid server when it is unsynchronised. This configuration makes one of the heuristics that derive `node_ntp_sanity` unreliable.\n\nNote, OpenNTPD does not listen for SNTP queries by default. Add `listen on 127.0.0.1` to the OpenNTPD configuration when using this collector with that package.\n\n### `node_ntp_stratum`\n\nThis metric shows the [stratum](https://en.wikipedia.org/wiki/Network_Time_Protocol#Clock_strata) of the local NTP daemon.\n\nStratum `16` means that clock are unsynchronised. See also aforementioned note about default local stratum in chrony.\n\n### `node_ntp_leap`\n\nRaw leap flag value. 0 – OK, 1 – add leap second at UTC midnight, 2 – delete leap second at UTC midnight, 3 – unsynchronised.\n\nOpenNTPD ignores leap seconds and never sets leap flag to `1` or `2`.\n\n### `node_ntp_rtt`\n\nRTT (round-trip time) from node_exporter collector to local NTPD. This value is\nused in sanity check as part of causality violation estimate.\n\n### `node_ntp_offset`\n\n[Clock offset](https://en.wikipedia.org/wiki/Network_Time_Protocol#Clock_synchronization_algorithm) between local time and NTPD time.\n\nntp.org always sets NTPD time to local clock instead of relaying remote NTP\ntime, so this offset is irrelevant for this NTPD.\n\nThis value is used in sanity check as part of causality violation estimate.\n\n### `node_ntp_reference_timestamp_seconds`\n\nReference Time. This field show time when the last adjustment was made, but\nimplementation details vary from \"**local** wall-clock time\" to \"Reference Time\nfield in incoming SNTP packet\".\n\n`time() - node_ntp_reference_timestamp_seconds` and\n`node_time_seconds - node_ntp_reference_timestamp_seconds` represent some estimate of\n\"freshness\" of synchronization.\n\n### `node_ntp_root_delay` and `node_ntp_root_dispersion`\n\nThese values are used to calculate synchronization distance that is limited by\n`collector.ntp.max-distance`.\n\nntp.org adds known local offset to announced root dispersion and linearly\nincreases dispersion in case of NTP connectivity problems, OpenNTPD does not\naccount dispersion at all and always reports `0`.\n\n### `node_ntp_sanity`\n\nAggregate NTPD health including stratum, leap flag, sane freshness, root\ndistance being less than `collector.ntp.max-distance` and causality violation\nbeing less than `collector.ntp.local-offset-tolerance`.\n\nCausality violation is lower bound estimate of clock error done using SNTP,\nit's calculated as positive portion of `abs(node_ntp_offset) - node_ntp_rtt / 2`.\n\n## `timex` collector\n\nThis collector exports state of kernel time synchronization flag that should be\nmaintained by time-keeping daemon and is eventually raised by Linux kernel if\ntime-keeping daemon does not update it regularly.\n\nUnfortunately some daemons do not handle this flag properly, e.g. chrony-1.30\nfrom Debian/jessie clears `STA_UNSYNC` flag during daemon initialisation and\ndoes not indicate clock synchronization status using this flag. Modern chrony\nversions should work better. All chrony versions require `rtcsync` option to\nmaintain this flag. OpenNTPD does not touch this flag at all till\nOpenNTPD-5.9p1.\n\nOn the other hand combination of `sync_status` and `offset` exported by `timex`\nmodule is the way to monitor if systemd-timesyncd does its job.\n"
  },
  {
    "path": "docs/V0_16_UPGRADE_GUIDE.md",
    "content": "# Version 0.16.0 Upgrade Guide\n\nThe `node_exporter` 0.16.0 and newer renamed many metrics in order to conform with Prometheus [naming best practices].\n\nIn order to allow easy upgrades, there are several options.\n\n## Update dashboards\n\nGrafana users can add multiple queries in order to display both the old and new data simultaneously.\n\n## Use recording rules\n\nWe have provided a [sample recording rule set that translates old metrics to new ones] and the [one that translates new metrics format to old one] to create duplicate metrics (it translates \"old\" metrics format to new one).  This has a minor disadvantage that it creates a lot of extra data, and re-aligns the timestamps of the data.\n\n## Run both old and new versions simultaneously.\n\nIt's possible to run both the old and new exporter on different ports, and include an additional scrape job in Prometheus.  It's recommended to enable only the collectors that have name changes that you care about.\n\n[naming best practices]: https://prometheus.io/docs/practices/naming/\n[sample recording rule set that translates old metrics to new ones]: example-16-compatibility-rules.yml\n[one that translates new metrics format to old one]: example-16-compatibility-rules-new-to-old.yml\n"
  },
  {
    "path": "docs/example-16-compatibility-rules-new-to-old.yml",
    "content": "groups:\n  - name: node_exporter-16-bcache\n    rules:\n      - expr: node_bcache_cache_read_races\n        record: node_bcache_cache_read_races_total\n  - name: node_exporter-16-buddyinfo\n    rules:\n      - expr: node_buddyinfo_blocks\n        record: node_buddyinfo_count\n  - name: node_exporter-16-stat\n    rules:\n      - expr: node_boot_time_seconds\n        record: node_boot_time\n      - expr: node_time_seconds\n        record: node_time\n      - expr: node_context_switches_total\n        record: node_context_switches\n      - expr: node_forks_total\n        record: node_forks\n      - expr: node_intr_total\n        record: node_intr\n  - name: node_exporter-16-cpu\n    rules:\n      - expr: label_replace(node_cpu_seconds_total, \"cpu\", \"cpu$1\", \"cpu\", \"(.+)\")\n        record: node_cpu\n  - name: node_exporter-16-diskstats\n    rules:\n      - expr: node_disk_read_bytes_total\n        record: node_disk_bytes_read\n      - expr: node_disk_written_bytes_total\n        record: node_disk_bytes_written\n      - expr: node_disk_io_time_seconds_total * 1000\n        record: node_disk_io_time_ms\n      - expr: node_disk_io_time_weighted_seconds_total\n        record: node_disk_io_time_weighted\n      - expr: node_disk_reads_completed_total\n        record: node_disk_reads_completed\n      - expr: node_disk_reads_merged_total\n        record: node_disk_reads_merged\n      - expr: node_disk_read_time_seconds_total * 1000\n        record: node_disk_read_time_ms\n      - expr: node_disk_writes_completed_total\n        record: node_disk_writes_completed\n      - expr: node_disk_writes_merged_total\n        record: node_disk_writes_merged\n      - expr: node_disk_write_time_seconds_total * 1000\n        record: node_disk_write_time_ms\n  - name: node_exporter-16-filesystem\n    rules:\n      - expr: node_filesystem_free_bytes\n        record: node_filesystem_free\n      - expr: node_filesystem_avail_bytes\n        record: node_filesystem_avail\n      - expr: node_filesystem_size_bytes\n        record: node_filesystem_size\n  - name: node_exporter-16-infiniband\n    rules:\n      - expr: node_infiniband_port_data_received_bytes_total\n        record: node_infiniband_port_data_received_bytes\n      - expr: node_infiniband_port_data_transmitted_bytes_total\n        record: node_infiniband_port_data_transmitted_bytes\n  - name: node_exporter-16-interrupts\n    rules:\n      - expr: node_interrupts_total\n        record: node_interrupts\n  - name: node_exporter-16-memory\n    rules:\n      - expr: node_memory_Active_bytes\n        record: node_memory_Active\n      - expr: node_memory_Active_anon_bytes\n        record: node_memory_Active_anon\n      - expr: node_memory_Active_file_bytes\n        record: node_memory_Active_file\n      - expr: node_memory_AnonHugePages_bytes\n        record: node_memory_AnonHugePages\n      - expr: node_memory_AnonPages_bytes\n        record: node_memory_AnonPages\n      - expr: node_memory_Bounce_bytes\n        record: node_memory_Bounce\n      - expr: node_memory_Buffers_bytes\n        record: node_memory_Buffers\n      - expr: node_memory_Cached_bytes\n        record: node_memory_Cached\n      - expr: node_memory_CommitLimit_bytes\n        record: node_memory_CommitLimit\n      - expr: node_memory_Committed_AS_bytes\n        record: node_memory_Committed_AS\n      - expr: node_memory_DirectMap2M_bytes\n        record: node_memory_DirectMap2M\n      - expr: node_memory_DirectMap4k_bytes\n        record: node_memory_DirectMap4k\n      - expr: node_memory_Dirty_bytes\n        record: node_memory_Dirty\n      - expr: node_memory_HardwareCorrupted_bytes\n        record: node_memory_HardwareCorrupted\n      - expr: node_memory_Hugepagesize_bytes\n        record: node_memory_Hugepagesize\n      - expr: node_memory_Inactive_bytes\n        record: node_memory_Inactive\n      - expr: node_memory_Inactive_anon_bytes\n        record: node_memory_Inactive_anon\n      - expr: node_memory_Inactive_file_bytes\n        record: node_memory_Inactive_file\n      - expr: node_memory_KernelStack_bytes\n        record: node_memory_KernelStack\n      - expr: node_memory_Mapped_bytes\n        record: node_memory_Mapped\n      - expr: node_memory_MemAvailable_bytes\n        record: node_memory_MemAvailable\n      - expr: node_memory_MemFree_bytes\n        record: node_memory_MemFree\n      - expr: node_memory_MemTotal_bytes\n        record: node_memory_MemTotal\n      - expr: node_memory_Mlocked_bytes\n        record: node_memory_Mlocked\n      - expr: node_memory_NFS_Unstable_bytes\n        record: node_memory_NFS_Unstable\n      - expr: node_memory_PageTables_bytes\n        record: node_memory_PageTables\n      - expr: node_memory_Shmem_bytes\n        record: node_memory_Shmem\n      - expr: node_memory_ShmemHugePages_bytes\n        record: node_memory_ShmemHugePages\n      - expr: node_memory_ShmemPmdMapped_bytes\n        record: node_memory_ShmemPmdMapped\n      - expr: node_memory_Slab_bytes\n        record: node_memory_Slab\n      - expr: node_memory_SReclaimable_bytes\n        record: node_memory_SReclaimable\n      - expr: node_memory_SUnreclaim_bytes\n        record: node_memory_SUnreclaim\n      - expr: node_memory_SwapCached_bytes\n        record: node_memory_SwapCached\n      - expr: node_memory_SwapFree_bytes\n        record: node_memory_SwapFree\n      - expr: node_memory_SwapTotal_bytes\n        record: node_memory_SwapTotal\n      - expr: node_memory_Unevictable_bytes\n        record: node_memory_Unevictable\n      - expr: node_memory_VmallocChunk_bytes\n        record: node_memory_VmallocChunk\n      - expr: node_memory_VmallocTotal_bytes\n        record: node_memory_VmallocTotal\n      - expr: node_memory_VmallocUsed_bytes\n        record: node_memory_VmallocUsed\n      - expr: node_memory_Writeback_bytes\n        record: node_memory_Writeback\n      - expr: node_memory_WritebackTmp_bytes\n        record: node_memory_WritebackTmp\n  - name: node_exporter-16-network\n    rules:\n      - expr: node_network_receive_bytes_total\n        record: node_network_receive_bytes\n      - expr: node_network_receive_compressed_total\n        record: node_network_receive_compressed\n      - expr: node_network_receive_drop_total\n        record: node_network_receive_drop\n      - expr: node_network_receive_errs_total\n        record: node_network_receive_errs\n      - expr: node_network_receive_fifo_total\n        record: node_network_receive_fifo\n      - expr: node_network_receive_frame_total\n        record: node_network_receive_frame\n      - expr: node_network_receive_multicast_total\n        record: node_network_receive_multicast\n      - expr: node_network_receive_packets_total\n        record: node_network_receive_packets\n      - expr: node_network_transmit_bytes_total\n        record: node_network_transmit_bytes\n      - expr: node_network_transmit_compressed_total\n        record: node_network_transmit_compressed\n      - expr: node_network_transmit_drop_total\n        record: node_network_transmit_drop\n      - expr: node_network_transmit_errs_total\n        record: node_network_transmit_errs\n      - expr: node_network_transmit_fifo_total\n        record: node_network_transmit_fifo\n      - expr: node_network_transmit_frame_total\n        record: node_network_transmit_frame\n      - expr: node_network_transmit_multicast_total\n        record: node_network_transmit_multicast\n      - expr: node_network_transmit_packets_total\n        record: node_network_transmit_packets\n  - name: node_exporter-16-nfs\n    rules:\n      - expr: node_nfs_connections_total\n        record: node_nfs_net_connections\n      - expr: node_nfs_packets_total\n        record: node_nfs_net_reads\n      - expr: label_replace(label_replace(node_nfs_requests_total, \"proto\", \"$1\", \"version\", \"(.+)\"), \"method\", \"$1\", \"procedure\", \"(.+)\")\n        record: node_nfs_procedures\n      - expr: node_nfs_rpc_authentication_refreshes_total\n        record: node_nfs_rpc_authentication_refreshes\n      - expr: node_nfs_rpcs_total\n        record: node_nfs_rpc_operations\n      - expr: node_nfs_rpc_retransmissions_total\n        record: node_nfs_rpc_retransmissions\n  - name: node_exporter-16-textfile\n    rules:\n      - expr: node_textfile_mtime_seconds\n        record: node_textfile_mtime\n"
  },
  {
    "path": "docs/example-16-compatibility-rules.yml",
    "content": "groups:\n  - name: node_exporter-16-bcache\n    rules:\n      - record: node_bcache_cache_read_races\n        expr: node_bcache_cache_read_races_total\n  - name: node_exporter-16-buddyinfo\n    rules:\n      - record: node_buddyinfo_blocks\n        expr: node_buddyinfo_count\n  - name: node_exporter-16-stat\n    rules:\n      - record: node_boot_time_seconds\n        expr: node_boot_time\n      - record: node_time_seconds\n        expr: node_time\n      - record: node_context_switches_total\n        expr: node_context_switches\n      - record: node_forks_total\n        expr: node_forks\n      - record: node_intr_total\n        expr: node_intr\n  - name: node_exporter-16-cpu\n    rules:\n      - record: node_cpu\n        expr: label_replace(node_cpu_seconds_total, \"cpu\", \"$1\", \"cpu\", \"cpu(.+)\")\n  - name: node_exporter-16-diskstats\n    rules:\n      - record: node_disk_read_bytes_total\n        expr: node_disk_bytes_read\n      - record: node_disk_written_bytes_total\n        expr: node_disk_bytes_written\n      - record: node_disk_io_time_seconds_total\n        expr: node_disk_io_time_ms / 1000\n      - record: node_disk_io_time_weighted_seconds_total\n        expr: node_disk_io_time_weighted\n      - record: node_disk_reads_completed_total\n        expr: node_disk_reads_completed\n      - record: node_disk_reads_merged_total\n        expr: node_disk_reads_merged\n      - record: node_disk_read_time_seconds_total\n        expr: node_disk_read_time_ms / 1000\n      - record: node_disk_writes_completed_total\n        expr: node_disk_writes_completed\n      - record: node_disk_writes_merged_total\n        expr: node_disk_writes_merged\n      - record: node_disk_write_time_seconds_total\n        expr: node_disk_write_time_ms / 1000\n  - name: node_exporter-16-filesystem\n    rules:\n      - record: node_filesystem_free_bytes\n        expr: node_filesystem_free\n      - record: node_filesystem_avail_bytes\n        expr: node_filesystem_avail\n      - record: node_filesystem_size_bytes\n        expr: node_filesystem_size\n  - name: node_exporter-16-infiniband\n    rules:\n      - record: node_infiniband_port_data_received_bytes_total\n        expr: node_infiniband_port_data_received_bytes\n      - record: node_infiniband_port_data_transmitted_bytes_total\n        expr: node_infiniband_port_data_transmitted_bytes\n  - name: node_exporter-16-interrupts\n    rules:\n      - record: node_interrupts_total\n        expr: node_interrupts\n  - name: node_exporter-16-memory\n    rules:\n      - record: node_memory_Active_bytes\n        expr: node_memory_Active\n      - record: node_memory_Active_anon_bytes\n        expr: node_memory_Active_anon\n      - record: node_memory_Active_file_bytes\n        expr: node_memory_Active_file\n      - record: node_memory_AnonHugePages_bytes\n        expr: node_memory_AnonHugePages\n      - record: node_memory_AnonPages_bytes\n        expr: node_memory_AnonPages\n      - record: node_memory_Bounce_bytes\n        expr: node_memory_Bounce\n      - record: node_memory_Buffers_bytes\n        expr: node_memory_Buffers\n      - record: node_memory_Cached_bytes\n        expr: node_memory_Cached\n      - record: node_memory_CommitLimit_bytes\n        expr: node_memory_CommitLimit\n      - record: node_memory_Committed_AS_bytes\n        expr: node_memory_Committed_AS\n      - record: node_memory_DirectMap2M_bytes\n        expr: node_memory_DirectMap2M\n      - record: node_memory_DirectMap4k_bytes\n        expr: node_memory_DirectMap4k\n      - record: node_memory_Dirty_bytes\n        expr: node_memory_Dirty\n      - record: node_memory_HardwareCorrupted_bytes\n        expr: node_memory_HardwareCorrupted\n      - record: node_memory_Hugepagesize_bytes\n        expr: node_memory_Hugepagesize\n      - record: node_memory_Inactive_bytes\n        expr: node_memory_Inactive\n      - record: node_memory_Inactive_anon_bytes\n        expr: node_memory_Inactive_anon\n      - record: node_memory_Inactive_file_bytes\n        expr: node_memory_Inactive_file\n      - record: node_memory_KernelStack_bytes\n        expr: node_memory_KernelStack\n      - record: node_memory_Mapped_bytes\n        expr: node_memory_Mapped\n      - record: node_memory_MemAvailable_bytes\n        expr: node_memory_MemAvailable\n      - record: node_memory_MemFree_bytes\n        expr: node_memory_MemFree\n      - record: node_memory_MemTotal_bytes\n        expr: node_memory_MemTotal\n      - record: node_memory_Mlocked_bytes\n        expr: node_memory_Mlocked\n      - record: node_memory_NFS_Unstable_bytes\n        expr: node_memory_NFS_Unstable\n      - record: node_memory_PageTables_bytes\n        expr: node_memory_PageTables\n      - record: node_memory_Shmem_bytes\n        expr: node_memory_Shmem\n      - record: node_memory_ShmemHugePages_bytes\n        expr: node_memory_ShmemHugePages\n      - record: node_memory_ShmemPmdMapped_bytes\n        expr: node_memory_ShmemPmdMapped\n      - record: node_memory_Slab_bytes\n        expr: node_memory_Slab\n      - record: node_memory_SReclaimable_bytes\n        expr: node_memory_SReclaimable\n      - record: node_memory_SUnreclaim_bytes\n        expr: node_memory_SUnreclaim\n      - record: node_memory_SwapCached_bytes\n        expr: node_memory_SwapCached\n      - record: node_memory_SwapFree_bytes\n        expr: node_memory_SwapFree\n      - record: node_memory_SwapTotal_bytes\n        expr: node_memory_SwapTotal\n      - record: node_memory_Unevictable_bytes\n        expr: node_memory_Unevictable\n      - record: node_memory_VmallocChunk_bytes\n        expr: node_memory_VmallocChunk\n      - record: node_memory_VmallocTotal_bytes\n        expr: node_memory_VmallocTotal\n      - record: node_memory_VmallocUsed_bytes\n        expr: node_memory_VmallocUsed\n      - record: node_memory_Writeback_bytes\n        expr: node_memory_Writeback\n      - record: node_memory_WritebackTmp_bytes\n        expr: node_memory_WritebackTmp\n  - name: node_exporter-16-network\n    rules:\n      - record: node_network_receive_bytes_total\n        expr: node_network_receive_bytes\n      - record: node_network_receive_compressed_total\n        expr: node_network_receive_compressed\n      - record: node_network_receive_drop_total\n        expr: node_network_receive_drop\n      - record: node_network_receive_errs_total\n        expr: node_network_receive_errs\n      - record: node_network_receive_fifo_total\n        expr: node_network_receive_fifo\n      - record: node_network_receive_frame_total\n        expr: node_network_receive_frame\n      - record: node_network_receive_multicast_total\n        expr: node_network_receive_multicast\n      - record: node_network_receive_packets_total\n        expr: node_network_receive_packets\n      - record: node_network_transmit_bytes_total\n        expr: node_network_transmit_bytes\n      - record: node_network_transmit_compressed_total\n        expr: node_network_transmit_compressed\n      - record: node_network_transmit_drop_total\n        expr: node_network_transmit_drop\n      - record: node_network_transmit_errs_total\n        expr: node_network_transmit_errs\n      - record: node_network_transmit_fifo_total\n        expr: node_network_transmit_fifo\n      - record: node_network_transmit_frame_total\n        expr: node_network_transmit_frame\n      - record: node_network_transmit_multicast_total\n        expr: node_network_transmit_multicast\n      - record: node_network_transmit_packets_total\n        expr: node_network_transmit_packets\n  - name: node_exporter-16-nfs\n    rules:\n      - record: node_nfs_connections_total\n        expr: node_nfs_net_connections\n      - record: node_nfs_packets_total\n        expr: node_nfs_net_reads\n      - record: node_nfs_requests_total\n        expr: label_replace(label_replace(node_nfs_procedures, \"proto\", \"$1\", \"version\", \"(.+)\"), \"method\", \"$1\", \"procedure\", \"(.+)\")\n      - record: node_nfs_rpc_authentication_refreshes_total\n        expr: node_nfs_rpc_authentication_refreshes\n      - record: node_nfs_rpcs_total\n        expr: node_nfs_rpc_operations\n      - record: node_nfs_rpc_retransmissions_total\n        expr: node_nfs_rpc_retransmissions\n  - name: node_exporter-16-textfile\n    rules:\n      - record: node_textfile_mtime_seconds\n        expr: node_textfile_mtime\n"
  },
  {
    "path": "docs/example-17-compatibility-rules-new-to-old.yml",
    "content": "groups:\n  - name: node_exporter-17-supervisord\n    rules:\n      - record: node_supervisord_start_time_seconds\n        expr: node_supervisord_uptime + time()\n"
  },
  {
    "path": "docs/example-17-compatibility-rules.yml",
    "content": "groups:\n  - name: node_exporter-17-supervisord\n    rules:\n      - record: node_supervisord_uptime\n        expr: time() - node_supervisord_start_time_seconds\n"
  },
  {
    "path": "docs/node-mixin/.gitignore",
    "content": "jsonnetfile.lock.json\nvendor\n*.yaml\ndashboards_out\n"
  },
  {
    "path": "docs/node-mixin/Makefile",
    "content": "JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 2 --string-style s --comment-style s\n\nall: fmt node_alerts.yaml node_rules.yaml dashboards_out lint\n\nfmt:\n\tfind . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \\\n\t\txargs -n 1 -- $(JSONNET_FMT) -i\n\nnode_alerts.yaml: mixin.libsonnet config.libsonnet $(wildcard alerts/*)\n\tjsonnet -S alerts.jsonnet > $@\n\nnode_rules.yaml: mixin.libsonnet config.libsonnet $(wildcard rules/*)\n\tjsonnet -S rules.jsonnet > $@\n\ndashboards_out: mixin.libsonnet config.libsonnet $(wildcard dashboards/*)\n\t@mkdir -p dashboards_out\n\tjsonnet -J vendor -m dashboards_out dashboards.jsonnet\n\nlint: node_alerts.yaml node_rules.yaml\n\tfind . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \\\n\t\twhile read f; do \\\n\t\t\t$(JSONNET_FMT) \"$$f\" | diff -u \"$$f\" -; \\\n\t\tdone\n\n\tpromtool check rules node_alerts.yaml node_rules.yaml\n\n.PHONY: jb_install\njb_install:\n\tjb install\n\nclean:\n\trm -rf dashboards_out node_alerts.yaml node_rules.yaml\n"
  },
  {
    "path": "docs/node-mixin/README.md",
    "content": "# Node Mixin\n\n_This is a work in progress. We aim for it to become a good role model for alerts\nand dashboards eventually, but it is not quite there yet._\n\nThe Node Mixin is a set of configurable, reusable, and extensible alerts and\ndashboards based on the metrics exported by the Node Exporter. The mixin creates\nrecording and alerting rules for Prometheus and suitable dashboard descriptions\nfor Grafana.\n\nTo use them, you need to have `jsonnet` (v0.16+) and `jb` installed. If you\nhave a working Go development environment, it's easiest to run the following:\n\n```bash\ngo install github.com/google/go-jsonnet/cmd/jsonnet@latest\ngo install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest\ngo install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest\n```\n\nNext, install the dependencies by running the following command in this\ndirectory:\n\n```bash\njb install\n```\n\nYou can then build the Prometheus rules files `node_alerts.yaml` and\n`node_rules.yaml`:\n\n```bash\nmake node_alerts.yaml node_rules.yaml\n```\n\nYou can also build a directory `dashboard_out` with the JSON dashboard files\nfor Grafana:\n\n```bash\nmake dashboards_out\n```\n\nNote that some of the generated dashboards require recording rules specified in\nthe previously generated `node_rules.yaml`.\n\nFor more advanced uses of mixins, see\n<https://github.com/monitoring-mixins/docs>.\n"
  },
  {
    "path": "docs/node-mixin/alerts/alerts.libsonnet",
    "content": "{\n  prometheusAlerts+:: {\n    groups+: [\n      {\n        name: 'node-exporter',\n        rules: [\n          {\n            alert: 'NodeFilesystemSpaceFillingUp',\n            expr: |||\n              (\n                node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < %(fsSpaceFillingUpWarningThreshold)d\n              and\n                predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s}[%(fsSpaceFillingUpPredictionWindow)s], %(nodeWarningWindowHours)s*60*60) < 0\n              and\n                node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0\n              )\n            ||| % $._config,\n            'for': '1h',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Filesystem is predicted to run out of space within the next %(nodeWarningWindowHours)s hours.' % $._config,\n              description: 'Filesystem on {{ $labels.device }}, mounted on {{ $labels.mountpoint }}, at {{ $labels.instance }} has only {{ printf \"%.2f\" $value }}% available space left and is filling up.',\n            },\n          },\n          {\n            alert: 'NodeFilesystemSpaceFillingUp',\n            expr: |||\n              (\n                node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < %(fsSpaceFillingUpCriticalThreshold)d\n              and\n                predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s}[6h], %(nodeCriticalWindowHours)s*60*60) < 0\n              and\n                node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0\n              )\n            ||| % $._config,\n            'for': '1h',\n            labels: {\n              severity: '%(nodeCriticalSeverity)s' % $._config,\n            },\n            annotations: {\n              summary: 'Filesystem is predicted to run out of space within the next %(nodeCriticalWindowHours)s hours.' % $._config,\n              description: 'Filesystem on {{ $labels.device }}, mounted on {{ $labels.mountpoint }}, at {{ $labels.instance }} has only {{ printf \"%.2f\" $value }}% available space left and is filling up fast.',\n            },\n          },\n          {\n            alert: 'NodeFilesystemAlmostOutOfSpace',\n            expr: |||\n              (\n                node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < %(fsSpaceAvailableWarningThreshold)d\n              and\n                node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0\n              )\n            ||| % $._config,\n            'for': '30m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Filesystem has less than %(fsSpaceAvailableWarningThreshold)d%% space left.' % $._config,\n              description: 'Filesystem on {{ $labels.device }}, mounted on {{ $labels.mountpoint }}, at {{ $labels.instance }} has only {{ printf \"%.2f\" $value }}% available space left.',\n            },\n          },\n          {\n            alert: 'NodeFilesystemAlmostOutOfSpace',\n            expr: |||\n              (\n                node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < %(fsSpaceAvailableCriticalThreshold)d\n              and\n                node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0\n              )\n            ||| % $._config,\n            'for': '30m',\n            labels: {\n              severity: '%(nodeCriticalSeverity)s' % $._config,\n            },\n            annotations: {\n              summary: 'Filesystem has less than %(fsSpaceAvailableCriticalThreshold)d%% space left.' % $._config,\n              description: 'Filesystem on {{ $labels.device }}, mounted on {{ $labels.mountpoint }}, at {{ $labels.instance }} has only {{ printf \"%.2f\" $value }}% available space left.',\n            },\n          },\n          {\n            alert: 'NodeFilesystemFilesFillingUp',\n            expr: |||\n              (\n                node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < 40\n              and\n                predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s}[6h], %(nodeWarningWindowHours)s*60*60) < 0\n              and\n                node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0\n              )\n            ||| % $._config,\n            'for': '1h',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Filesystem is predicted to run out of inodes within the next %(nodeWarningWindowHours)s hours.' % $._config,\n              description: 'Filesystem on {{ $labels.device }}, mounted on {{ $labels.mountpoint }}, at {{ $labels.instance }} has only {{ printf \"%.2f\" $value }}% available inodes left and is filling up.',\n            },\n          },\n          {\n            alert: 'NodeFilesystemFilesFillingUp',\n            expr: |||\n              (\n                node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < 20\n              and\n                predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s}[6h], %(nodeCriticalWindowHours)s*60*60) < 0\n              and\n                node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0\n              )\n            ||| % $._config,\n            'for': '1h',\n            labels: {\n              severity: '%(nodeCriticalSeverity)s' % $._config,\n            },\n            annotations: {\n              summary: 'Filesystem is predicted to run out of inodes within the next %(nodeCriticalWindowHours)s hours.' % $._config,\n              description: 'Filesystem on {{ $labels.device }}, mounted on {{ $labels.mountpoint }}, at {{ $labels.instance }} has only {{ printf \"%.2f\" $value }}% available inodes left and is filling up fast.',\n            },\n          },\n          {\n            alert: 'NodeFilesystemAlmostOutOfFiles',\n            expr: |||\n              (\n                node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < 5\n              and\n                node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0\n              )\n            ||| % $._config,\n            'for': '1h',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Filesystem has less than 5% inodes left.',\n              description: 'Filesystem on {{ $labels.device }}, mounted on {{ $labels.mountpoint }}, at {{ $labels.instance }} has only {{ printf \"%.2f\" $value }}% available inodes left.',\n            },\n          },\n          {\n            alert: 'NodeFilesystemAlmostOutOfFiles',\n            expr: |||\n              (\n                node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < 3\n              and\n                node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0\n              )\n            ||| % $._config,\n            'for': '1h',\n            labels: {\n              severity: '%(nodeCriticalSeverity)s' % $._config,\n            },\n            annotations: {\n              summary: 'Filesystem has less than 3% inodes left.',\n              description: 'Filesystem on {{ $labels.device }}, mounted on {{ $labels.mountpoint }}, at {{ $labels.instance }} has only {{ printf \"%.2f\" $value }}% available inodes left.',\n            },\n          },\n          {\n            alert: 'NodeNetworkReceiveErrs',\n            expr: |||\n              rate(node_network_receive_errs_total{%(nodeExporterSelector)s}[2m]) / rate(node_network_receive_packets_total{%(nodeExporterSelector)s}[2m]) > 0.01\n            ||| % $._config,\n            'for': '1h',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Network interface is reporting many receive errors.',\n              description: '{{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf \"%.0f\" $value }} receive errors in the last two minutes.',\n            },\n          },\n          {\n            alert: 'NodeNetworkTransmitErrs',\n            expr: |||\n              rate(node_network_transmit_errs_total{%(nodeExporterSelector)s}[2m]) / rate(node_network_transmit_packets_total{%(nodeExporterSelector)s}[2m]) > 0.01\n            ||| % $._config,\n            'for': '1h',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Network interface is reporting many transmit errors.',\n              description: '{{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf \"%.0f\" $value }} transmit errors in the last two minutes.',\n            },\n          },\n          {\n            alert: 'NodeHighNumberConntrackEntriesUsed',\n            expr: |||\n              (node_nf_conntrack_entries{%(nodeExporterSelector)s} / node_nf_conntrack_entries_limit) > 0.75\n            ||| % $._config,\n            annotations: {\n              summary: 'Number of conntrack are getting close to the limit.',\n              description: '{{ $labels.instance }} {{ $value | humanizePercentage }} of conntrack entries are used.',\n            },\n            labels: {\n              severity: 'warning',\n            },\n          },\n          {\n            alert: 'NodeTextFileCollectorScrapeError',\n            expr: |||\n              node_textfile_scrape_error{%(nodeExporterSelector)s} == 1\n            ||| % $._config,\n            annotations: {\n              summary: 'Node Exporter text file collector failed to scrape.',\n              description: 'Node Exporter text file collector on {{ $labels.instance }} failed to scrape.',\n            },\n            labels: {\n              severity: 'warning',\n            },\n          },\n          {\n            alert: 'NodeClockSkewDetected',\n            expr: |||\n              (\n                node_timex_offset_seconds{%(nodeExporterSelector)s} > 0.05\n              and\n                deriv(node_timex_offset_seconds{%(nodeExporterSelector)s}[5m]) >= 0\n              )\n              or\n              (\n                node_timex_offset_seconds{%(nodeExporterSelector)s} < -0.05\n              and\n                deriv(node_timex_offset_seconds{%(nodeExporterSelector)s}[5m]) <= 0\n              )\n            ||| % $._config,\n            'for': '10m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Clock skew detected.',\n              description: 'Clock at {{ $labels.instance }} is out of sync by more than 0.05s. Ensure NTP is configured correctly on this host.',\n            },\n          },\n          {\n            alert: 'NodeClockNotSynchronising',\n            expr: |||\n              min_over_time(node_timex_sync_status{%(nodeExporterSelector)s}[5m]) == 0\n              and\n              node_timex_maxerror_seconds{%(nodeExporterSelector)s} >= 16\n            ||| % $._config,\n            'for': '10m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Clock not synchronising.',\n              description: 'Clock at {{ $labels.instance }} is not synchronising. Ensure NTP is configured on this host.',\n            },\n          },\n          {\n            alert: 'NodeRAIDDegraded',\n            expr: |||\n              node_md_disks_required{%(nodeExporterSelector)s,%(diskDeviceSelector)s} - ignoring (state) (node_md_disks{state=\"active\",%(nodeExporterSelector)s,%(diskDeviceSelector)s}) > 0\n            ||| % $._config,\n            'for': '15m',\n            labels: {\n              severity: 'critical',\n            },\n            annotations: {\n              summary: 'RAID Array is degraded.',\n              description: \"RAID array '{{ $labels.device }}' at {{ $labels.instance }} is in degraded state due to one or more disks failures. Number of spare drives is insufficient to fix issue automatically.\",\n            },\n          },\n          {\n            alert: 'NodeRAIDDiskFailure',\n            expr: |||\n              node_md_disks{state=\"failed\",%(nodeExporterSelector)s,%(diskDeviceSelector)s} > 0\n            ||| % $._config,\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Failed device in RAID array.',\n              description: \"At least one device in RAID array at {{ $labels.instance }} failed. Array '{{ $labels.device }}' needs attention and possibly a disk swap.\",\n            },\n          },\n          {\n            alert: 'NodeFileDescriptorLimit',\n            expr: |||\n              (\n                node_filefd_allocated{%(nodeExporterSelector)s} * 100 / node_filefd_maximum{%(nodeExporterSelector)s} > 70\n              )\n            ||| % $._config,\n            'for': '15m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Kernel is predicted to exhaust file descriptors limit soon.',\n              description: 'File descriptors limit at {{ $labels.instance }} is currently at {{ printf \"%.2f\" $value }}%.',\n            },\n          },\n          {\n            alert: 'NodeFileDescriptorLimit',\n            expr: |||\n              (\n                node_filefd_allocated{%(nodeExporterSelector)s} * 100 / node_filefd_maximum{%(nodeExporterSelector)s} > 90\n              )\n            ||| % $._config,\n            'for': '15m',\n            labels: {\n              severity: 'critical',\n            },\n            annotations: {\n              summary: 'Kernel is predicted to exhaust file descriptors limit soon.',\n              description: 'File descriptors limit at {{ $labels.instance }} is currently at {{ printf \"%.2f\" $value }}%.',\n            },\n          },\n          {\n            alert: 'NodeCPUHighUsage',\n            expr: |||\n              sum without(mode) (avg without (cpu) (rate(node_cpu_seconds_total{%(nodeExporterSelector)s, mode!~\"idle|iowait\"}[2m]))) * 100 > %(cpuHighUsageThreshold)d\n            ||| % $._config,\n            'for': '15m',\n            labels: {\n              severity: 'info',\n            },\n            annotations: {\n              summary: 'High CPU usage.',\n              description: |||\n                CPU usage at {{ $labels.instance }} has been above %(cpuHighUsageThreshold)d%% for the last 15 minutes, is currently at {{ printf \"%%.2f\" $value }}%%.\n              ||| % $._config,\n            },\n          },\n          {\n            alert: 'NodeSystemSaturation',\n            expr: |||\n              node_load1{%(nodeExporterSelector)s}\n              / count without (cpu, mode) (node_cpu_seconds_total{%(nodeExporterSelector)s, mode=\"idle\"}) > %(systemSaturationPerCoreThreshold)d\n            ||| % $._config,\n            'for': '15m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'System saturated, load per core is very high.',\n              description: |||\n                System load per core at {{ $labels.instance }} has been above %(systemSaturationPerCoreThreshold)d for the last 15 minutes, is currently at {{ printf \"%%.2f\" $value }}.\n                This might indicate this instance resources saturation and can cause it becoming unresponsive.\n              ||| % $._config,\n            },\n          },\n          {\n            alert: 'NodeMemoryMajorPagesFaults',\n            expr: |||\n              rate(node_vmstat_pgmajfault{%(nodeExporterSelector)s}[5m]) > %(memoryMajorPagesFaultsThreshold)d\n            ||| % $._config,\n            'for': '15m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Memory major page faults are occurring at very high rate.',\n              description: |||\n                Memory major pages are occurring at very high rate at {{ $labels.instance }}, %(memoryMajorPagesFaultsThreshold)d major page faults per second for the last 15 minutes, is currently at {{ printf \"%%.2f\" $value }}.\n                Please check that there is enough memory available at this instance.\n              ||| % $._config,\n            },\n          },\n          {\n            alert: 'NodeMemoryHighUtilization',\n            expr: |||\n              100 - (node_memory_MemAvailable_bytes{%(nodeExporterSelector)s} / node_memory_MemTotal_bytes{%(nodeExporterSelector)s} * 100) > %(memoryHighUtilizationThreshold)d\n            ||| % $._config,\n            'for': '15m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Host is running out of memory.',\n              description: |||\n                Memory is filling up at {{ $labels.instance }}, has been above %(memoryHighUtilizationThreshold)d%% for the last 15 minutes, is currently at {{ printf \"%%.2f\" $value }}%%.\n              ||| % $._config,\n            },\n          },\n          {\n            alert: 'NodeDiskIOSaturation',\n            expr: |||\n              rate(node_disk_io_time_weighted_seconds_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s}[5m]) > %(diskIOSaturationThreshold)d\n            ||| % $._config,\n            'for': '30m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Disk IO queue is high.',\n              description: |||\n                Disk IO queue (aqu-sq) is high on {{ $labels.device }} at {{ $labels.instance }}, has been above %(diskIOSaturationThreshold)d for the last 30 minutes, is currently at {{ printf \"%%.2f\" $value }}.\n                This symptom might indicate disk saturation.\n              ||| % $._config,\n            },\n          },\n          {\n            alert: 'NodeSystemdServiceFailed',\n            expr: |||\n              node_systemd_unit_state{%(nodeExporterSelector)s, state=\"failed\"} == 1\n            ||| % $._config,\n            'for': '5m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Systemd service has entered failed state.',\n              description: 'Systemd service {{ $labels.name }} has entered failed state at {{ $labels.instance }}',\n            },\n          },\n          {\n            alert: 'NodeSystemdServiceCrashlooping',\n            expr: |||\n              increase(node_systemd_service_restart_total{%(nodeExporterSelector)s}[5m]) > 2\n            ||| % $._config,\n            'for': '15m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Systemd service keeps restaring, possibly crash looping.',\n              description: 'Systemd service {{ $labels.name }} has being restarted too many times at {{ $labels.instance }} for the last 15 minutes. Please check if service is crash looping.',\n            },\n          },\n          {\n            alert: 'NodeBondingDegraded',\n            expr: |||\n              (node_bonding_slaves{%(nodeExporterSelector)s} - node_bonding_active{%(nodeExporterSelector)s}) != 0\n            ||| % $._config,\n            'for': '5m',\n            labels: {\n              severity: 'warning',\n            },\n            annotations: {\n              summary: 'Bonding interface is degraded.',\n              description: 'Bonding interface {{ $labels.master }} on {{ $labels.instance }} is in degraded state due to one or more slave failures.',\n            },\n          },\n        ],\n      },\n    ],\n  },\n}\n"
  },
  {
    "path": "docs/node-mixin/alerts.jsonnet",
    "content": "std.manifestYamlDoc((import 'mixin.libsonnet').prometheusAlerts)\n"
  },
  {
    "path": "docs/node-mixin/config.libsonnet",
    "content": "{\n  _config+:: {\n    // Selectors are inserted between {} in Prometheus queries.\n\n    // Select the metrics coming from the node exporter. Note that all\n    // the selected metrics are shown stacked on top of each other in\n    // the 'USE Method / Cluster' dashboard. Consider disabling that\n    // dashboard if mixing up all those metrics in the same dashboard\n    // doesn't make sense (e.g. because they are coming from different\n    // clusters).\n    nodeExporterSelector: 'job=\"node\"',\n\n    // Select the fstype for filesystem-related queries. If left\n    // empty, all filesystems are selected. If you have unusual\n    // filesystem you don't want to include in dashboards and\n    // alerting, you can exclude them here, e.g. 'fstype!=\"tmpfs\"'.\n    fsSelector: 'fstype!=\"\"',\n\n    // Select the mountpoint for filesystem-related queries. If left\n    // empty, all mountpoints are selected. For example if you have a\n    // special purpose tmpfs instance that has a fixed size and will\n    // always be 100% full, but you still want alerts and dashboards for\n    // other tmpfs instances, you can exclude those by mountpoint prefix\n    // like so: 'mountpoint!~\"/var/lib/foo.*\"'.\n    fsMountpointSelector: 'mountpoint!=\"\"',\n\n    // Select the device for disk-related queries. If left empty, all\n    // devices are selected. If you have unusual devices you don't\n    // want to include in dashboards and alerting, you can exclude\n    // them here, e.g. 'device!=\"tmpfs\"'.\n    diskDeviceSelector: 'device!=\"\"',\n\n    // Select the devices for physical network related querier. If left\n    // empty the lo device and virtual device (starting with veth) are ignored.\n    // If you have bonded interfaces for example you might want to ignore those\n    // interfaces as well to avoid aggregating bandwith multiple times (once at\n    // the physical layer and on the bond layer). E.g.  // device!~\"lo|veth.+|bond.+\"'.\n    netDeviceSelector: 'device!~\"lo|veth.+\"',\n\n    // Some of the alerts are meant to fire if a critical failure of a\n    // node is imminent (e.g. the disk is about to run full). In a\n    // true “cloud native” setup, failures of a single node should be\n    // tolerated. Hence, even imminent failure of a single node is no\n    // reason to create a paging alert. However, in practice there are\n    // still many situations where operators like to get paged in time\n    // before a node runs out of disk space. nodeCriticalSeverity can\n    // be set to the desired severity for this kind of alerts. This\n    // can even be templated to depend on labels of the node, e.g. you\n    // could make this critical for traditional database masters but\n    // just a warning for K8s nodes.\n    nodeCriticalSeverity: 'critical',\n\n    // CPU utilization (%) on which to trigger the\n    // 'NodeCPUHighUsage' alert.\n    cpuHighUsageThreshold: 90,\n    // Load average 1m (per core) on which to trigger the\n    // 'NodeSystemSaturation' alert.\n    systemSaturationPerCoreThreshold: 2,\n\n    // Some of the alerts use predict_linear() to fire alerts ahead of time to\n    // prevent unrecoverable situations (eg. no more disk space). However, the\n    // node may have automatic processes (cronjobs) in place to prevent that\n    // within a certain time window, this may not align with the default time\n    // window of these alerts. This can cause these alerts to start flapping.\n    // By reducing the time window, the system gets more time to\n    // resolve this before problems occur.\n    nodeWarningWindowHours: '24',\n    nodeCriticalWindowHours: '4',\n\n    // Available disk space (%) thresholds on which to trigger the\n    // 'NodeFilesystemSpaceFillingUp' alerts. These alerts fire if the disk\n    // usage grows in a way that it is predicted to run out in 4h or 1d\n    // and if the provided thresholds have been reached right now.\n    // In some cases you'll want to adjust these, e.g., by default, Kubernetes\n    // runs the image garbage collection when the disk usage reaches 85%\n    // of its available space. In that case, you'll want to reduce the\n    // critical threshold below to something like 14 or 15, otherwise\n    // the alert could fire under normal node usage.\n    // Additionally, the prediction window for the alert can be configured\n    // to account for environments where disk usage can fluctuate within\n    // a short time frame. By extending the prediction window, you can\n    // reduce false positives caused by temporary spikes, providing a\n    // more accurate prediction of disk space issues.\n    fsSpaceFillingUpWarningThreshold: 40,\n    fsSpaceFillingUpCriticalThreshold: 20,\n    fsSpaceFillingUpPredictionWindow: '6h',\n\n    // Available disk space (%) thresholds on which to trigger the\n    // 'NodeFilesystemAlmostOutOfSpace' alerts.\n    fsSpaceAvailableWarningThreshold: 5,\n    fsSpaceAvailableCriticalThreshold: 3,\n\n    // Memory utilization (%) level on which to trigger the\n    // 'NodeMemoryHighUtilization' alert.\n    memoryHighUtilizationThreshold: 90,\n\n    // Threshold for the rate of memory major page faults to trigger\n    // 'NodeMemoryMajorPagesFaults' alert.\n    memoryMajorPagesFaultsThreshold: 500,\n\n    // Disk IO queue level above which to trigger\n    // 'NodeDiskIOSaturation' alert.\n    diskIOSaturationThreshold: 10,\n\n    rateInterval: '5m',\n    // Opt-in for multi-cluster support.\n    showMultiCluster: false,\n    clusterLabel: 'cluster',\n\n    dashboardNamePrefix: 'Node Exporter / ',\n    dashboardTags: ['node-exporter-mixin'],\n  },\n}\n"
  },
  {
    "path": "docs/node-mixin/dashboards/dashboards.libsonnet",
    "content": "(import 'node.libsonnet') +\n(import 'use.libsonnet')\n"
  },
  {
    "path": "docs/node-mixin/dashboards/node.libsonnet",
    "content": "{\n  local nodemixin = import '../lib/prom-mixin.libsonnet',\n  grafanaDashboards+:: {\n    'nodes.json': nodemixin.new(config=$._config, platform='Linux', uid=std.md5('nodes.json')).dashboard,\n    'nodes-darwin.json': nodemixin.new(config=$._config, platform='Darwin', uid=std.md5('nodes-darwin.json')).dashboard,\n    'nodes-aix.json': nodemixin.new(config=$._config, platform='AIX', uid=std.md5('nodes-aix.json')).dashboard,\n  },\n}\n"
  },
  {
    "path": "docs/node-mixin/dashboards/use.libsonnet",
    "content": "local grafana = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet';\nlocal dashboard = grafana.dashboard;\nlocal variable = dashboard.variable;\nlocal row = grafana.panel.row;\nlocal prometheus = grafana.query.prometheus;\n\nlocal timeSeriesPanel = grafana.panel.timeSeries;\nlocal tsOptions = timeSeriesPanel.options;\nlocal tsStandardOptions = timeSeriesPanel.standardOptions;\nlocal tsQueryOptions = timeSeriesPanel.queryOptions;\nlocal tsCustom = timeSeriesPanel.fieldConfig.defaults.custom;\nlocal tsLegend = tsOptions.legend;\n\nlocal c = import '../config.libsonnet';\n\nlocal datasource = variable.datasource.new(\n  'datasource', 'prometheus'\n);\n\nlocal tsCommonPanelOptions =\n  variable.query.withDatasourceFromVariable(datasource)\n  + tsCustom.stacking.withMode('normal')\n  + tsCustom.withFillOpacity(100)\n  + tsCustom.withShowPoints('never')\n  + tsLegend.withShowLegend(false)\n  + tsOptions.tooltip.withMode('multi')\n  + tsOptions.tooltip.withSort('desc');\n\nlocal CPUUtilisation =\n  timeSeriesPanel.new(\n    'CPU Utilisation',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('percentunit');\n\nlocal CPUSaturation =\n  // TODO: Is this a useful panel? At least there should be some explanation how load\n  // average relates to the \"CPU saturation\" in the title.\n  timeSeriesPanel.new(\n    'CPU Saturation (Load1 per CPU)',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('percentunit');\n\nlocal memoryUtilisation =\n  timeSeriesPanel.new(\n    'Memory Utilisation',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('percentunit');\n\nlocal memorySaturation =\n  timeSeriesPanel.new(\n    'Memory Saturation (Major Page Faults)',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('rds');\n\nlocal networkOverrides = tsStandardOptions.withOverrides(\n  [\n    tsStandardOptions.override.byRegexp.new('/Transmit/')\n    + tsStandardOptions.override.byRegexp.withPropertiesFromOptions(\n      tsCustom.withTransform('negative-Y')\n    ),\n  ]\n);\n\nlocal networkUtilisation =\n  timeSeriesPanel.new(\n    'Network Utilisation (Bytes Receive/Transmit)',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('Bps')\n  + networkOverrides;\n\nlocal networkSaturation =\n  timeSeriesPanel.new(\n    'Network Saturation (Drops Receive/Transmit)',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('Bps')\n  + networkOverrides;\n\nlocal diskIOUtilisation =\n  timeSeriesPanel.new(\n    'Disk IO Utilisation',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('percentunit');\n\nlocal diskIOSaturation =\n  timeSeriesPanel.new(\n    'Disk IO Saturation',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('percentunit');\n\nlocal diskSpaceUtilisation =\n  timeSeriesPanel.new(\n    'Disk Space Utilisation',\n  )\n  + tsCommonPanelOptions\n  + tsStandardOptions.withUnit('percentunit');\n\n{\n  _clusterVariable::\n    variable.query.new('cluster')\n    + variable.query.withDatasourceFromVariable(datasource)\n    + variable.query.queryTypes.withLabelValues(\n      $._config.clusterLabel,\n      'node_time_seconds',\n    )\n    + (if $._config.showMultiCluster then variable.query.generalOptions.showOnDashboard.withLabelAndValue() else variable.query.generalOptions.showOnDashboard.withNothing())\n    + variable.query.refresh.onTime()\n    + variable.query.selectionOptions.withIncludeAll(true, '.*')\n    + variable.query.withSort(asc=true),\n\n  grafanaDashboards+:: {\n                         'node-rsrc-use.json':\n                           dashboard.new(\n                             '%sUSE Method / Node' % $._config.dashboardNamePrefix,\n                           )\n                           + dashboard.time.withFrom('now-1h')\n                           + dashboard.withTags($._config.dashboardTags)\n                           + dashboard.withTimezone('utc')\n                           + dashboard.withRefresh('30s')\n                           + dashboard.graphTooltip.withSharedCrosshair()\n                           + dashboard.withUid(std.md5('node-rsrc-use.json'))\n                           + dashboard.withVariables([\n                             datasource,\n                             $._clusterVariable,\n                             variable.query.new('instance')\n                             + variable.query.withDatasourceFromVariable(datasource)\n                             + variable.query.queryTypes.withLabelValues(\n                               'instance',\n                               'node_exporter_build_info{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}' % $._config,\n                             )\n                             + variable.query.refresh.onTime()\n                             + variable.query.withSort(asc=true),\n                           ])\n                           + dashboard.withPanels(\n                             grafana.util.grid.makeGrid([\n                               row.new('CPU')\n                               + row.withPanels([\n                                 CPUUtilisation + tsQueryOptions.withTargets([prometheus.new('$datasource', 'instance:node_cpu_utilisation:rate%(rateInterval)s{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('Utilisation')]),\n                                 CPUSaturation + tsQueryOptions.withTargets([prometheus.new('$datasource', 'instance:node_load1_per_cpu:ratio{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('Saturation')]),\n                               ]),\n                               row.new('Memory')\n                               + row.withPanels([\n                                 memoryUtilisation + tsQueryOptions.withTargets([prometheus.new('$datasource', 'instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('Utilisation')]),\n                                 memorySaturation + tsQueryOptions.withTargets([prometheus.new('$datasource', 'instance:node_vmstat_pgmajfault:rate%(rateInterval)s{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('Major page Faults')]),\n                               ]),\n                               row.new('Network')\n                               + row.withPanels([\n                                 networkUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new('$datasource', 'instance:node_network_receive_bytes_physical:rate%(rateInterval)s{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('Receive'),\n                                   prometheus.new('$datasource', 'instance:node_network_transmit_bytes_physical:rate%(rateInterval)s{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('Transmit'),\n                                 ]),\n                                 networkSaturation + tsQueryOptions.withTargets([\n                                   prometheus.new('$datasource', 'instance:node_network_receive_drop_physical:rate%(rateInterval)s{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('Receive'),\n                                   prometheus.new('$datasource', 'instance:node_network_transmit_drop_physical:rate%(rateInterval)s{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('Transmit'),\n                                 ]),\n                               ]),\n                               row.new('Disk IO')\n                               + row.withPanels([\n                                 diskIOUtilisation + tsQueryOptions.withTargets([prometheus.new('$datasource', 'instance_device:node_disk_io_time_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('{{device}}')]),\n                                 diskIOSaturation + tsQueryOptions.withTargets([prometheus.new('$datasource', 'instance_device:node_disk_io_time_weighted_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} != 0' % $._config) + prometheus.withLegendFormat('{{device}}')]),\n                               ]),\n                             ], panelWidth=12, panelHeight=7)\n                             + grafana.util.grid.makeGrid([\n                               row.new('Disk Space')\n                               + row.withPanels([\n                                 diskSpaceUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sort_desc(1 -\n                                         (\n                                           max without (mountpoint, fstype) (node_filesystem_avail_bytes{%(nodeExporterSelector)s, fstype!=\"\", instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"})\n                                           /\n                                           max without (mountpoint, fstype) (node_filesystem_size_bytes{%(nodeExporterSelector)s, fstype!=\"\", instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"})\n                                         ) != 0\n                                       )\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{device}}'),\n                                 ]),\n                               ]),\n                             ], panelWidth=24, panelHeight=7, startY=34),\n                           ),\n                         'node-cluster-rsrc-use.json':\n                           dashboard.new(\n                             '%sUSE Method / Cluster' % $._config.dashboardNamePrefix,\n                           )\n                           + dashboard.time.withFrom('now-1h')\n                           + dashboard.withTags($._config.dashboardTags)\n                           + dashboard.withTimezone('utc')\n                           + dashboard.withRefresh('30s')\n                           + dashboard.graphTooltip.withSharedCrosshair()\n                           + dashboard.withUid(std.md5('node-cluster-rsrc-use.json'))\n                           + dashboard.withVariables([\n                             datasource,\n                             $._clusterVariable,\n                           ])\n                           + dashboard.withPanels(\n                             grafana.util.grid.makeGrid([\n                               row.new('CPU')\n                               + row.withPanels([\n                                 CPUUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       ((\n                                         instance:node_cpu_utilisation:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}\n                                         *\n                                         instance:node_num_cpu:sum{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}\n                                       ) != 0 )\n                                       / scalar(sum(instance:node_num_cpu:sum{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}))\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }}'),\n                                 ]),\n                                 CPUSaturation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       (\n                                         instance:node_load1_per_cpu:ratio{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}\n                                         / scalar(count(instance:node_load1_per_cpu:ratio{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}))\n                                       )  != 0\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }}'),\n                                 ]),\n                               ]),\n                               row.new('Memory')\n                               + row.withPanels([\n                                 memoryUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       (\n                                         instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}\n                                         / scalar(count(instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}))\n                                       ) != 0\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }}'),\n                                 ]),\n                                 memorySaturation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     'instance:node_vmstat_pgmajfault:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}' % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }}'),\n                                 ]),\n                               ]),\n                               row.new('Network')\n                               + row.withPanels([\n                                 networkUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     'instance:node_network_receive_bytes_excluding_lo:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"} != 0' % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }} Receive'),\n                                   prometheus.new(\n                                     '$datasource',\n                                     'instance:node_network_transmit_bytes_excluding_lo:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"} != 0' % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }} Transmit'),\n                                 ]),\n                                 networkSaturation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     'instance:node_network_receive_drop_excluding_lo:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"} != 0' % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }} Receive'),\n                                   prometheus.new(\n                                     '$datasource',\n                                     'instance:node_network_transmit_drop_excluding_lo:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"} != 0' % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }} Transmit'),\n                                 ]),\n                               ]),\n                               row.new('Disk IO')\n                               + row.withPanels([\n                                 diskIOUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       instance_device:node_disk_io_time_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}\n                                       / scalar(count(instance_device:node_disk_io_time_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}))\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }} {{device}}'),\n                                 ]),\n                                 diskIOSaturation + tsQueryOptions.withTargets([prometheus.new(\n                                   '$datasource',\n                                   |||\n                                     instance_device:node_disk_io_time_weighted_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}\n                                     / scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\"}))\n                                   ||| % $._config\n                                 ) + prometheus.withLegendFormat('{{ instance }} {{device}}')]),\n                               ]),\n                             ], panelWidth=12, panelHeight=7)\n                             + grafana.util.grid.makeGrid([\n                               row.new('Disk Space')\n                               + row.withPanels([\n                                 diskSpaceUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum without (device) (\n                                         max without (fstype, mountpoint) ((\n                                           node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s, %(fsMountpointSelector)s, %(clusterLabel)s=~\"$cluster\"}\n                                           -\n                                           node_filesystem_avail_bytes{%(nodeExporterSelector)s, %(fsSelector)s, %(fsMountpointSelector)s, %(clusterLabel)s=~\"$cluster\"}\n                                         ) != 0)\n                                       )\n                                       / scalar(sum(max without (fstype, mountpoint) (node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s, %(fsMountpointSelector)s, %(clusterLabel)s=~\"$cluster\"})))\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{ instance }}'),\n                                 ]),\n                               ]),\n                             ], panelWidth=24, panelHeight=7, startY=34),\n                           ),\n                       } +\n                       if $._config.showMultiCluster then {\n                         'node-multicluster-rsrc-use.json':\n                           dashboard.new(\n                             '%sUSE Method / Multi-cluster' % $._config.dashboardNamePrefix,\n                           )\n                           + dashboard.time.withFrom('now-1h')\n                           + dashboard.withTags($._config.dashboardTags)\n                           + dashboard.withTimezone('utc')\n                           + dashboard.withRefresh('30s')\n                           + dashboard.graphTooltip.withSharedCrosshair()\n                           + dashboard.withUid(std.md5('node-multicluster-rsrc-use.json'))\n                           + dashboard.withVariables([\n                             datasource,\n                           ])\n                           + dashboard.withPanels(\n                             grafana.util.grid.makeGrid([\n                               row.new('CPU')\n                               + row.withPanels([\n                                 CPUUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum(\n                                         ((\n                                           instance:node_cpu_utilisation:rate%(rateInterval)s{%(nodeExporterSelector)s}\n                                           *\n                                           instance:node_num_cpu:sum{%(nodeExporterSelector)s}\n                                         ) != 0)\n                                         / scalar(sum(instance:node_num_cpu:sum{%(nodeExporterSelector)s}))\n                                       ) by (%(clusterLabel)s)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}}'),\n                                 ]),\n                                 CPUSaturation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum((\n                                           instance:node_load1_per_cpu:ratio{%(nodeExporterSelector)s}\n                                           / scalar(count(instance:node_load1_per_cpu:ratio{%(nodeExporterSelector)s}))\n                                       ) != 0) by (%(clusterLabel)s)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}}'),\n                                 ]),\n                               ]),\n                               row.new('Memory')\n                               + row.withPanels([\n                                 memoryUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum((\n                                           instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s}\n                                           / scalar(count(instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s}))\n                                       ) != 0) by (%(clusterLabel)s)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}}'),\n                                 ]),\n                                 memorySaturation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum((\n                                           instance:node_vmstat_pgmajfault:rate%(rateInterval)s{%(nodeExporterSelector)s}\n                                       ) != 0) by (%(clusterLabel)s)\n                                     |||\n                                     % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}}'),\n                                 ]),\n                               ]),\n                               row.new('Network')\n                               + row.withPanels([\n                                 networkUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum((\n                                           instance:node_network_receive_bytes_excluding_lo:rate%(rateInterval)s{%(nodeExporterSelector)s}\n                                       ) != 0) by (%(clusterLabel)s)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}} Receive'),\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum((\n                                           instance:node_network_transmit_bytes_excluding_lo:rate%(rateInterval)s{%(nodeExporterSelector)s}\n                                       ) != 0) by (%(clusterLabel)s)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}} Transmit'),\n                                 ]),\n                                 networkSaturation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum((\n                                           instance:node_network_receive_drop_excluding_lo:rate%(rateInterval)s{%(nodeExporterSelector)s}\n                                       ) != 0) by (%(clusterLabel)s)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}} Receive'),\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum((\n                                           instance:node_network_transmit_drop_excluding_lo:rate%(rateInterval)s{%(nodeExporterSelector)s}\n                                       ) != 0) by (%(clusterLabel)s)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}} Transmit'),\n                                 ]),\n                               ]),\n                               row.new('Disk IO')\n                               + row.withPanels([\n                                 diskIOUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum((\n                                           instance_device:node_disk_io_time_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s}\n                                           / scalar(count(instance_device:node_disk_io_time_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s}))\n                                       ) != 0) by (%(clusterLabel)s, device)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}} {{device}}'),\n                                 ]),\n                                 diskIOSaturation + tsQueryOptions.withTargets([prometheus.new(\n                                   '$datasource',\n                                   |||\n                                     sum((\n                                       instance_device:node_disk_io_time_weighted_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s}\n                                       / scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate%(rateInterval)s{%(nodeExporterSelector)s}))\n                                     ) != 0) by (%(clusterLabel)s, device)\n                                   ||| % $._config\n                                 ) + prometheus.withLegendFormat('{{%(clusterLabel)s}} {{device}}')]),\n                               ]),\n\n                             ], panelWidth=12, panelHeight=7)\n                             + grafana.util.grid.makeGrid([\n                               row.new('Disk Space')\n                               + row.withPanels([\n                                 diskSpaceUtilisation + tsQueryOptions.withTargets([\n                                   prometheus.new(\n                                     '$datasource',\n                                     |||\n                                       sum (\n                                         sum without (device) (\n                                           max without (fstype, mountpoint, instance, pod) ((\n                                             node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s, %(fsMountpointSelector)s} - node_filesystem_avail_bytes{%(nodeExporterSelector)s, %(fsSelector)s, %(fsMountpointSelector)s}\n                                           ) != 0)\n                                         )\n                                         / scalar(sum(max without (fstype, mountpoint) (node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s, %(fsMountpointSelector)s})))\n                                       ) by (%(clusterLabel)s)\n                                     ||| % $._config\n                                   ) + prometheus.withLegendFormat('{{%(clusterLabel)s}}'),\n                                 ]),\n                               ]),\n                             ], panelWidth=24, panelHeight=7, startY=34),\n                           ),\n                       } else {},\n}\n"
  },
  {
    "path": "docs/node-mixin/dashboards.jsonnet",
    "content": "local dashboards = (import 'mixin.libsonnet').grafanaDashboards;\n\n{\n  [name]: dashboards[name]\n  for name in std.objectFields(dashboards)\n}\n"
  },
  {
    "path": "docs/node-mixin/jsonnetfile.json",
    "content": "{\n  \"version\": 1,\n  \"dependencies\": [\n    {\n      \"source\": {\n        \"git\": {\n          \"remote\": \"https://github.com/grafana/grafonnet.git\",\n          \"subdir\": \"gen/grafonnet-latest\"\n        }\n      },\n      \"version\": \"main\"\n    }\n  ],\n  \"legacyImports\": false\n}\n"
  },
  {
    "path": "docs/node-mixin/lib/prom-mixin.libsonnet",
    "content": "local grafana = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet';\nlocal dashboard = grafana.dashboard;\nlocal row = grafana.panel.row;\nlocal prometheus = grafana.query.prometheus;\nlocal variable = dashboard.variable;\n\nlocal timeSeriesPanel = grafana.panel.timeSeries;\nlocal tsOptions = timeSeriesPanel.options;\nlocal tsStandardOptions = timeSeriesPanel.standardOptions;\nlocal tsQueryOptions = timeSeriesPanel.queryOptions;\nlocal tsCustom = timeSeriesPanel.fieldConfig.defaults.custom;\n\nlocal gaugePanel = grafana.panel.gauge;\nlocal gaugeStep = gaugePanel.standardOptions.threshold.step;\n\nlocal table = grafana.panel.table;\nlocal tableStep = table.standardOptions.threshold.step;\nlocal tableOverride = table.standardOptions.override;\nlocal tableTransformation = table.queryOptions.transformation;\n\n{\n\n  new(config=null, platform=null, uid=null):: {\n\n    local prometheusDatasourceVariable = variable.datasource.new(\n      'datasource', 'prometheus'\n    ),\n\n    local clusterVariablePrototype =\n      variable.query.new('cluster')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + (if config.showMultiCluster then variable.query.generalOptions.showOnDashboard.withLabelAndValue() else variable.query.generalOptions.showOnDashboard.withNothing())\n      + variable.query.refresh.onTime()\n      + variable.query.generalOptions.withLabel('Cluster')\n      + variable.query.selectionOptions.withIncludeAll(true, '.*'),\n\n    local clusterVariable =\n      if platform == 'Darwin' then\n        clusterVariablePrototype\n        + variable.query.queryTypes.withLabelValues(\n          ' %(clusterLabel)s' % config,\n          'node_uname_info{%(nodeExporterSelector)s, sysname=\"Darwin\"}' % config,\n        )\n      else\n        clusterVariablePrototype\n        + variable.query.queryTypes.withLabelValues(\n          '%(clusterLabel)s' % config,\n          'node_uname_info{%(nodeExporterSelector)s, sysname!=\"Darwin\"}' % config,\n        ),\n\n    local instanceVariablePrototype =\n      variable.query.new('instance')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + variable.query.refresh.onTime()\n      + variable.query.generalOptions.withLabel('Instance'),\n\n    local instanceVariable =\n      if platform == 'Darwin' then\n        instanceVariablePrototype\n        + variable.query.queryTypes.withLabelValues(\n          'instance',\n          'node_uname_info{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\", sysname=\"Darwin\"}' % config,\n        )\n      else\n        instanceVariablePrototype\n        + variable.query.queryTypes.withLabelValues(\n          'instance',\n          'node_uname_info{%(nodeExporterSelector)s, %(clusterLabel)s=~\"$cluster\", sysname!=\"Darwin\"}' % config,\n        ),\n\n    local idleCPU =\n      timeSeriesPanel.new('CPU Usage')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + tsStandardOptions.withUnit('percentunit')\n      + tsCustom.stacking.withMode('normal')\n      + tsStandardOptions.withMax(1)\n      + tsStandardOptions.withMin(0)\n      + tsOptions.tooltip.withMode('multi')\n      + tsCustom.withFillOpacity(10)\n      + tsCustom.withShowPoints('never')\n      + tsQueryOptions.withTargets([\n        prometheus.new(\n          '$datasource',\n          |||\n            (\n              (1 - sum without (mode) (rate(node_cpu_seconds_total{%(nodeExporterSelector)s, mode=~\"idle|iowait|steal\", instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}[$__rate_interval])))\n            / ignoring(cpu) group_left\n              count without (cpu, mode) (node_cpu_seconds_total{%(nodeExporterSelector)s, mode=\"idle\", instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"})\n            )\n          ||| % config,\n        )\n        + prometheus.withLegendFormat('{{cpu}}')\n        + prometheus.withIntervalFactor(5),\n      ]),\n\n    local systemLoad =\n      timeSeriesPanel.new('Load Average')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + tsStandardOptions.withUnit('short')\n      + tsStandardOptions.withMin(0)\n      + tsCustom.withFillOpacity(0)\n      + tsCustom.withShowPoints('never')\n      + tsOptions.tooltip.withMode('multi')\n      + tsQueryOptions.withTargets([\n        prometheus.new('$datasource', 'node_load1{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('1m load average'),\n        prometheus.new('$datasource', 'node_load5{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('5m load average'),\n        prometheus.new('$datasource', 'node_load15{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('15m load average'),\n        prometheus.new('$datasource', 'count(node_cpu_seconds_total{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\", mode=\"idle\"})' % config) + prometheus.withLegendFormat('logical cores'),\n      ]),\n\n    local memoryGraphPanelPrototype =\n      timeSeriesPanel.new('Memory Usage')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + tsStandardOptions.withUnit('bytes')\n      + tsStandardOptions.withMin(0)\n      + tsOptions.tooltip.withMode('multi')\n      + tsCustom.withFillOpacity(10)\n      + tsCustom.withShowPoints('never'),\n\n    local memoryGraph =\n      if platform == 'Linux' then\n        memoryGraphPanelPrototype\n        + tsCustom.stacking.withMode('normal')\n        + tsQueryOptions.withTargets([\n          prometheus.new(\n            '$datasource',\n            |||\n              (\n                node_memory_MemTotal_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}\n              -\n                node_memory_MemFree_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}\n              -\n                node_memory_Buffers_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}\n              -\n                node_memory_Cached_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}\n              )\n            ||| % config,\n          ) + prometheus.withLegendFormat('memory used'),\n          prometheus.new('$datasource', 'node_memory_Buffers_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('memory buffers'),\n          prometheus.new('$datasource', 'node_memory_Cached_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('memory cached'),\n          prometheus.new('$datasource', 'node_memory_MemFree_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('memory free'),\n        ])\n      else if platform == 'Darwin' then\n        // not useful to stack\n        memoryGraphPanelPrototype\n        + tsCustom.stacking.withMode('none')\n        + tsQueryOptions.withTargets([\n          prometheus.new('$datasource', 'node_memory_total_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('Physical Memory'),\n          prometheus.new(\n            '$datasource',\n            |||\n              (\n                  node_memory_internal_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} -\n                  node_memory_purgeable_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} +\n                  node_memory_wired_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} +\n                  node_memory_compressed_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}\n              )\n            ||| % config\n          ) + prometheus.withLegendFormat(\n            'Memory Used'\n          ),\n          prometheus.new(\n            '$datasource',\n            |||\n              (\n                  node_memory_internal_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} -\n                  node_memory_purgeable_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}\n              )\n            ||| % config\n          ) + prometheus.withLegendFormat(\n            'App Memory'\n          ),\n          prometheus.new('$datasource', 'node_memory_wired_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('Wired Memory'),\n          prometheus.new('$datasource', 'node_memory_compressed_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('Compressed'),\n        ])\n\n      else if platform == 'AIX' then\n        memoryGraphPanelPrototype\n        + tsCustom.stacking.withMode('none')\n        + tsQueryOptions.withTargets([\n          prometheus.new('$datasource', 'node_memory_total_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}' % config) + prometheus.withLegendFormat('Physical Memory'),\n          prometheus.new(\n            '$datasource',\n            |||\n              (\n                  node_memory_total_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"} -\n                  node_memory_available_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}\n              )\n            ||| % config\n          ) + prometheus.withLegendFormat('Memory Used'),\n        ]),\n\n\n    // NOTE: avg() is used to circumvent a label change caused by a node_exporter rollout.\n    local memoryGaugePanelPrototype =\n      gaugePanel.new('Memory Usage')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + gaugePanel.standardOptions.thresholds.withSteps([\n        gaugeStep.withColor('rgba(50, 172, 45, 0.97)'),\n        gaugeStep.withColor('rgba(237, 129, 40, 0.89)') + gaugeStep.withValue(80),\n        gaugeStep.withColor('rgba(245, 54, 54, 0.9)') + gaugeStep.withValue(90),\n      ])\n      + gaugePanel.standardOptions.withMax(100)\n      + gaugePanel.standardOptions.withMin(0)\n      + gaugePanel.standardOptions.withUnit('percent'),\n\n    local memoryGauge =\n      if platform == 'Linux' then\n        memoryGaugePanelPrototype\n        + gaugePanel.queryOptions.withTargets([\n          prometheus.new(\n            '$datasource',\n            |||\n              100 -\n              (\n                avg(node_memory_MemAvailable_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}) /\n                avg(node_memory_MemTotal_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"})\n              * 100\n              )\n            ||| % config,\n          ),\n        ])\n\n      else if platform == 'Darwin' then\n        memoryGaugePanelPrototype\n        + gaugePanel.queryOptions.withTargets([\n          prometheus.new(\n            '$datasource',\n            |||\n              (\n                  (\n                    avg(node_memory_internal_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}) -\n                    avg(node_memory_purgeable_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}) +\n                    avg(node_memory_wired_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}) +\n                    avg(node_memory_compressed_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"})\n                  ) /\n                  avg(node_memory_total_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"})\n              )\n              *\n              100\n            ||| % config\n          ),\n        ])\n\n      else if platform == 'AIX' then\n        memoryGaugePanelPrototype\n        + gaugePanel.queryOptions.withTargets([\n          prometheus.new(\n            '$datasource',\n            |||\n              100 -\n              (\n                avg(node_memory_available_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"}) /\n                avg(node_memory_total_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\"})\n                * 100\n              )\n            ||| % config\n          ),\n        ]),\n\n\n    local diskIO =\n      timeSeriesPanel.new('Disk I/O')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + tsStandardOptions.withMin(0)\n      + tsCustom.withFillOpacity(0)\n      + tsCustom.withShowPoints('never')\n      + tsOptions.tooltip.withMode('multi')\n      + tsQueryOptions.withTargets([\n        // TODO: Does it make sense to have those three in the same panel?\n        prometheus.new('$datasource', 'rate(node_disk_read_bytes_total{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\", %(diskDeviceSelector)s}[$__rate_interval])' % config)\n        + prometheus.withLegendFormat('{{device}} read')\n        + prometheus.withIntervalFactor(1),\n        prometheus.new('$datasource', 'rate(node_disk_written_bytes_total{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\", %(diskDeviceSelector)s}[$__rate_interval])' % config)\n        + prometheus.withLegendFormat('{{device}} written')\n        + prometheus.withIntervalFactor(1),\n        prometheus.new('$datasource', 'rate(node_disk_io_time_seconds_total{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\", %(diskDeviceSelector)s}[$__rate_interval])' % config)\n        + prometheus.withLegendFormat('{{device}} io time')\n        + prometheus.withIntervalFactor(1),\n      ])\n      + tsStandardOptions.withOverrides(\n        [\n          tsStandardOptions.override.byRegexp.new('/ read| written/')\n          + tsStandardOptions.override.byRegexp.withPropertiesFromOptions(\n            tsStandardOptions.withUnit('Bps')\n          ),\n          tsStandardOptions.override.byRegexp.new('/ io time/')\n          + tsStandardOptions.override.byRegexp.withPropertiesFromOptions(tsStandardOptions.withUnit('percentunit')),\n        ]\n      ),\n\n    local diskSpaceUsage =\n      table.new('Disk Space Usage')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + table.standardOptions.withUnit('decbytes')\n      + table.standardOptions.thresholds.withSteps(\n        [\n          tableStep.withColor('green'),\n          tableStep.withColor('yellow') + gaugeStep.withValue(0.8),\n          tableStep.withColor('red') + gaugeStep.withValue(0.9),\n        ]\n      )\n      + table.queryOptions.withTargets([\n        prometheus.new(\n          '$datasource',\n          |||\n            max by (mountpoint) (node_filesystem_size_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\", %(fsSelector)s, %(fsMountpointSelector)s})\n          ||| % config\n        )\n        + prometheus.withLegendFormat('')\n        + prometheus.withInstant()\n        + prometheus.withFormat('table'),\n        prometheus.new(\n          '$datasource',\n          |||\n            max by (mountpoint) (node_filesystem_avail_bytes{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\", %(fsSelector)s, %(fsMountpointSelector)s})\n          ||| % config\n        )\n        + prometheus.withLegendFormat('')\n        + prometheus.withInstant()\n        + prometheus.withFormat('table'),\n      ])\n      + table.standardOptions.withOverrides([\n        tableOverride.byName.new('Mounted on')\n        + tableOverride.byName.withProperty('custom.width', 260),\n        tableOverride.byName.new('Size')\n        + tableOverride.byName.withProperty('custom.width', 93),\n        tableOverride.byName.new('Used')\n        + tableOverride.byName.withProperty('custom.width', 72),\n        tableOverride.byName.new('Available')\n        + tableOverride.byName.withProperty('custom.width', 88),\n        tableOverride.byName.new('Used, %')\n        + tableOverride.byName.withProperty('unit', 'percentunit')\n        + tableOverride.byName.withPropertiesFromOptions(\n          table.fieldConfig.defaults.custom.withCellOptions(\n            { type: 'gauge' },\n          )\n        )\n        + tableOverride.byName.withProperty('max', 1)\n        + tableOverride.byName.withProperty('min', 0),\n      ])\n      + table.queryOptions.withTransformations([\n        tableTransformation.withId('groupBy')\n        + tableTransformation.withOptions(\n          {\n            fields: {\n              'Value #A': {\n                aggregations: [\n                  'lastNotNull',\n                ],\n                operation: 'aggregate',\n              },\n              'Value #B': {\n                aggregations: [\n                  'lastNotNull',\n                ],\n                operation: 'aggregate',\n              },\n              mountpoint: {\n                aggregations: [],\n                operation: 'groupby',\n              },\n            },\n          }\n        ),\n        tableTransformation.withId('merge'),\n        tableTransformation.withId('calculateField')\n        + tableTransformation.withOptions(\n          {\n            alias: 'Used',\n            binary: {\n              left: 'Value #A (lastNotNull)',\n              operator: '-',\n              reducer: 'sum',\n              right: 'Value #B (lastNotNull)',\n            },\n            mode: 'binary',\n            reduce: {\n              reducer: 'sum',\n            },\n          }\n        ),\n        tableTransformation.withId('calculateField')\n        + tableTransformation.withOptions(\n          {\n            alias: 'Used, %',\n            binary: {\n              left: 'Used',\n              operator: '/',\n              reducer: 'sum',\n              right: 'Value #A (lastNotNull)',\n            },\n            mode: 'binary',\n            reduce: {\n              reducer: 'sum',\n            },\n          }\n        ),\n        tableTransformation.withId('organize')\n        + tableTransformation.withOptions(\n          {\n            excludeByName: {},\n            indexByName: {},\n            renameByName: {\n              'Value #A (lastNotNull)': 'Size',\n              'Value #B (lastNotNull)': 'Available',\n              mountpoint: 'Mounted on',\n            },\n          }\n        ),\n        tableTransformation.withId('sortBy')\n        + tableTransformation.withOptions(\n          {\n            fields: {},\n            sort: [\n              {\n                field: 'Mounted on',\n              },\n            ],\n          }\n        ),\n\n      ]),\n\n    local networkReceived =\n      timeSeriesPanel.new('Network Received')\n      + timeSeriesPanel.panelOptions.withDescription('Network received (bits/s)')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + tsStandardOptions.withUnit('bps')\n      + tsStandardOptions.withMin(0)\n      + tsCustom.withFillOpacity(0)\n      + tsCustom.withShowPoints('never')\n      + tsOptions.tooltip.withMode('multi')\n      + tsQueryOptions.withTargets([\n        prometheus.new('$datasource', 'rate(node_network_receive_bytes_total{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\", device!=\"lo\"}[$__rate_interval]) * 8' % config)\n        + prometheus.withLegendFormat('{{device}}')\n        + prometheus.withIntervalFactor(1),\n      ]),\n\n    local networkTransmitted =\n      timeSeriesPanel.new('Network Transmitted')\n      + timeSeriesPanel.panelOptions.withDescription('Network transmitted (bits/s)')\n      + variable.query.withDatasourceFromVariable(prometheusDatasourceVariable)\n      + tsStandardOptions.withUnit('bps')\n      + tsStandardOptions.withMin(0)\n      + tsCustom.withFillOpacity(0)\n      + tsOptions.tooltip.withMode('multi')\n      + tsQueryOptions.withTargets([\n        prometheus.new('$datasource', 'rate(node_network_transmit_bytes_total{%(nodeExporterSelector)s, instance=\"$instance\", %(clusterLabel)s=~\"$cluster\", device!=\"lo\"}[$__rate_interval]) * 8' % config)\n        + prometheus.withLegendFormat('{{device}}')\n        + prometheus.withIntervalFactor(1),\n      ]),\n\n    local cpuRow =\n      row.new('CPU')\n      + row.withPanels([\n        idleCPU,\n        systemLoad,\n      ]),\n\n    local memoryRow = [\n      row.new('Memory') + row.gridPos.withY(8),\n      memoryGraph + row.gridPos.withX(0) + row.gridPos.withY(9) + row.gridPos.withH(7) + row.gridPos.withW(18),\n      memoryGauge + row.gridPos.withX(18) + row.gridPos.withY(9) + row.gridPos.withH(7) + row.gridPos.withW(6),\n    ],\n\n    local diskRow =\n      row.new('Disk')\n      + row.withPanels([\n        diskIO,\n        diskSpaceUsage,\n      ]),\n\n    local networkRow =\n      row.new('Network')\n      + row.withPanels([\n        networkReceived,\n        networkTransmitted,\n      ]),\n\n    local panels =\n      grafana.util.grid.makeGrid([\n        cpuRow,\n      ], panelWidth=12, panelHeight=7)\n      + memoryRow\n      + grafana.util.grid.makeGrid([\n        diskRow,\n        networkRow,\n      ], panelWidth=12, panelHeight=7, startY=18),\n\n    local variables =\n      [\n        prometheusDatasourceVariable,\n        clusterVariable,\n        instanceVariable,\n      ],\n\n    dashboard: if platform == 'Linux' then\n      dashboard.new(\n        '%sNodes' % config.dashboardNamePrefix,\n      )\n      + dashboard.time.withFrom('now-1h')\n      + dashboard.withTags(config.dashboardTags)\n      + dashboard.withTimezone('utc')\n      + dashboard.withRefresh('30s')\n      + dashboard.withUid(std.md5(uid))\n      + dashboard.graphTooltip.withSharedCrosshair()\n      + dashboard.withVariables(variables)\n      + dashboard.withPanels(panels)\n    else if platform == 'Darwin' then\n      dashboard.new(\n        '%sMacOS' % config.dashboardNamePrefix,\n      )\n      + dashboard.time.withFrom('now-1h')\n      + dashboard.withTags(config.dashboardTags)\n      + dashboard.withTimezone('utc')\n      + dashboard.withRefresh('30s')\n      + dashboard.withUid(std.md5(uid))\n      + dashboard.graphTooltip.withSharedCrosshair()\n      + dashboard.withVariables(variables)\n      + dashboard.withPanels(panels)\n    else if platform == 'AIX' then\n      dashboard.new(\n        '%sAIX' % config.dashboardNamePrefix,\n      )\n      + dashboard.time.withFrom('now-1h')\n      + dashboard.withTags(config.dashboardTags)\n      + dashboard.withTimezone('utc')\n      + dashboard.withRefresh('30s')\n      + dashboard.withUid(std.md5(uid))\n      + dashboard.graphTooltip.withSharedCrosshair()\n      + dashboard.withVariables(variables)\n      + dashboard.withPanels(panels),\n\n  },\n}\n"
  },
  {
    "path": "docs/node-mixin/mixin.libsonnet",
    "content": "(import 'config.libsonnet') +\n(import 'alerts/alerts.libsonnet') +\n(import 'dashboards/dashboards.libsonnet') +\n(import 'rules/rules.libsonnet')\n"
  },
  {
    "path": "docs/node-mixin/rules/rules.libsonnet",
    "content": "{\n  prometheusRules+:: {\n    groups+: [\n      {\n        name: 'node-exporter.rules',\n        rules: [\n          {\n            // This rule gives the number of CPUs per node.\n            record: 'instance:node_num_cpu:sum',\n            expr: |||\n              count without (cpu, mode) (\n                node_cpu_seconds_total{%(nodeExporterSelector)s,mode=\"idle\"}\n              )\n            ||| % $._config,\n          },\n          {\n            // CPU utilisation is % CPU without {idle,iowait,steal}.\n            record: 'instance:node_cpu_utilisation:rate%(rateInterval)s' % $._config,\n            expr: |||\n              1 - avg without (cpu) (\n                sum without (mode) (rate(node_cpu_seconds_total{%(nodeExporterSelector)s, mode=~\"idle|iowait|steal\"}[%(rateInterval)s]))\n              )\n            ||| % $._config,\n          },\n          {\n            // This is CPU saturation: 1min avg run queue length / number of CPUs.\n            // Can go over 1.\n            // TODO: There are situation where a run queue >1/core is just normal and fine.\n            //       We need to clarify how to read this metric and if its usage is helpful at all.\n            record: 'instance:node_load1_per_cpu:ratio',\n            expr: |||\n              (\n                node_load1{%(nodeExporterSelector)s}\n              /\n                instance:node_num_cpu:sum{%(nodeExporterSelector)s}\n              )\n            ||| % $._config,\n          },\n          {\n            // Memory utilisation (ratio of used memory per instance).\n            record: 'instance:node_memory_utilisation:ratio',\n            expr: |||\n              1 - (\n                (\n                  node_memory_MemAvailable_bytes{%(nodeExporterSelector)s}\n                  or\n                  (\n                    node_memory_Buffers_bytes{%(nodeExporterSelector)s}\n                    +\n                    node_memory_Cached_bytes{%(nodeExporterSelector)s}\n                    +\n                    node_memory_MemFree_bytes{%(nodeExporterSelector)s}\n                    +\n                    node_memory_Slab_bytes{%(nodeExporterSelector)s}\n                  )\n                )\n              /\n                node_memory_MemTotal_bytes{%(nodeExporterSelector)s}\n              )\n            ||| % $._config,\n          },\n          {\n            record: 'instance:node_vmstat_pgmajfault:rate%(rateInterval)s' % $._config,\n            expr: |||\n              rate(node_vmstat_pgmajfault{%(nodeExporterSelector)s}[%(rateInterval)s])\n            ||| % $._config,\n          },\n          {\n            // Disk utilisation (seconds spent, 1 second rate).\n            record: 'instance_device:node_disk_io_time_seconds:rate%(rateInterval)s' % $._config,\n            expr: |||\n              rate(node_disk_io_time_seconds_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s}[%(rateInterval)s])\n            ||| % $._config,\n          },\n          {\n            // Disk saturation (weighted seconds spent, 1 second rate).\n            record: 'instance_device:node_disk_io_time_weighted_seconds:rate%(rateInterval)s' % $._config,\n            expr: |||\n              rate(node_disk_io_time_weighted_seconds_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s}[%(rateInterval)s])\n            ||| % $._config,\n          },\n          {\n            record: 'instance:node_network_receive_bytes_excluding_lo:rate%(rateInterval)s' % $._config,\n            expr: |||\n              sum without (device) (\n                rate(node_network_receive_bytes_total{%(nodeExporterSelector)s, device!=\"lo\"}[%(rateInterval)s])\n              )\n            ||| % $._config,\n          },\n          {\n            record: 'instance:node_network_transmit_bytes_excluding_lo:rate%(rateInterval)s' % $._config,\n            expr: |||\n              sum without (device) (\n                rate(node_network_transmit_bytes_total{%(nodeExporterSelector)s, device!=\"lo\"}[%(rateInterval)s])\n              )\n            ||| % $._config,\n          },\n          // TODO: Find out if those drops ever happen on modern switched networks.\n          {\n            record: 'instance:node_network_receive_drop_excluding_lo:rate%(rateInterval)s' % $._config,\n            expr: |||\n              sum without (device) (\n                rate(node_network_receive_drop_total{%(nodeExporterSelector)s, device!=\"lo\"}[%(rateInterval)s])\n              )\n            ||| % $._config,\n          },\n          {\n            record: 'instance:node_network_transmit_drop_excluding_lo:rate%(rateInterval)s' % $._config,\n            expr: |||\n              sum without (device) (\n                rate(node_network_transmit_drop_total{%(nodeExporterSelector)s, device!=\"lo\"}[%(rateInterval)s])\n              )\n            ||| % $._config,\n          },\n          {\n            record: 'instance:node_network_receive_bytes_physical:rate%(rateInterval)s' % $._config,\n            expr: |||\n              sum without (device) (\n                rate(node_network_receive_bytes_total{%(nodeExporterSelector)s, %(netDeviceSelector)s}[%(rateInterval)s])\n              )\n            ||| % $._config,\n          },\n          {\n            record: 'instance:node_network_transmit_bytes_physical:rate%(rateInterval)s' % $._config,\n            expr: |||\n              sum without (device) (\n                rate(node_network_transmit_bytes_total{%(nodeExporterSelector)s, %(netDeviceSelector)s}[%(rateInterval)s])\n              )\n            ||| % $._config,\n          },\n          // TODO: Find out if those drops ever happen on modern switched networks.\n          {\n            record: 'instance:node_network_receive_drop_physical:rate%(rateInterval)s' % $._config,\n            expr: |||\n              sum without (device) (\n                rate(node_network_receive_drop_total{%(nodeExporterSelector)s, %(netDeviceSelector)s}[%(rateInterval)s])\n              )\n            ||| % $._config,\n          },\n          {\n            record: 'instance:node_network_transmit_drop_physical:rate%(rateInterval)s' % $._config,\n            expr: |||\n              sum without (device) (\n                rate(node_network_transmit_drop_total{%(nodeExporterSelector)s, %(netDeviceSelector)s}[%(rateInterval)s])\n              )\n            ||| % $._config,\n          },\n        ],\n      },\n    ],\n  },\n}\n"
  },
  {
    "path": "docs/node-mixin/rules.jsonnet",
    "content": "std.manifestYamlDoc((import 'mixin.libsonnet').prometheusRules)\n"
  },
  {
    "path": "end-to-end-test.sh",
    "content": "#!/usr/bin/env bash\n\nset -euf -o pipefail\n\n# Allow setting GOHOSTOS for debugging purposes.\nGOHOSTOS=${GOHOSTOS:-$(go env GOHOSTOS)}\n\n# Allow setting arch for debugging purposes.\narch=${arch:-$(uname -m)}\n\nmaybe_flag_search_scope() {\n  local collector=$1\n  os_aux_os=\"\"\n  if [[ $GOHOSTOS =~ ^(freebsd|openbsd|netbsd|solaris|dragonfly)$ ]]; then\n    os_aux_os=\" ${collector}_bsd.go\"\n  fi\n  echo \"${collector}_common.go ${collector}.go ${collector}_${GOHOSTOS}.go ${collector}_${GOHOSTOS}_${arch}.go${os_aux_os}\"\n}\n\nsupported_collectors() {\n  local collectors=$1\n  local supported=\"\"\n  for collector in ${collectors}; do\n    for filename in $(maybe_flag_search_scope \"${collector}\"); do\n      file=\"collector/${filename}\"\n      if ./tools/tools match ${file} > /dev/null 2>&1; then\n        if grep -h -E -o -- \"registerCollector\\(\" ${file} > /dev/null 2>&1; then\n          supported=\"${supported} ${collector}\"\n        fi\n        break\n      fi\n    done\n  done\n  echo \"${supported}\" | tr ' ' '\\n' | sort | uniq\n}\n\nenabled_collectors=$(cat << COLLECTORS\n  arp\n  bcache\n  bcachefs\n  bonding\n  btrfs\n  buddyinfo\n  cgroups\n  conntrack\n  cpu\n  cpufreq\n  cpu_vulnerabilities\n  diskstats\n  dmi\n  drbd\n  edac\n  entropy\n  fibrechannel\n  filefd\n  hwmon\n  infiniband\n  interrupts\n  ipvs\n  ksmd\n  lnstat\n  loadavg\n  mdadm\n  meminfo\n  meminfo_numa\n  mountstats\n  netdev\n  netstat\n  nfs\n  nfsd\n  pcidevice\n  pressure\n  processes\n  qdisc\n  rapl\n  schedstat\n  slabinfo\n  sockstat\n  softirqs\n  stat\n  sysctl\n  textfile\n  thermal_zone\n  udp_queues\n  vmstat\n  watchdog\n  wifi\n  xfrm\n  xfs\n  zfs\n  zoneinfo\nCOLLECTORS\n)\nsupported_enabled_collectors=$(supported_collectors \"${enabled_collectors}\")\n\ndisabled_collectors=$(cat << COLLECTORS\n  selinux\n  filesystem\n  timex\n  uname\nCOLLECTORS\n)\nsupported_disabled_collectors=$(supported_collectors \"${disabled_collectors}\")\n\ncd \"$(dirname $0)\"\n\nport=\"$((10000 + (RANDOM % 10000)))\"\ntmpdir=$(mktemp -d /tmp/node_exporter_e2e_test.XXXXXX)\n\nskip_re=\"^(go_|node_exporter_build_info|node_scrape_collector_duration_seconds|process_|node_textfile_mtime_seconds|node_time_(zone|seconds)|node_network_(receive|transmit)_(bytes|packets)_total)\"\n\ncase \"${arch}\" in\n  aarch64|ppc64le) fixture_metrics='collector/fixtures/e2e-64k-page-output.txt' ;;\n  *) fixture_metrics='collector/fixtures/e2e-output.txt' ;;\nesac\n\n# Only test CPU info collection on x86_64.\ncase \"${arch}\" in\n  x86_64)\n    cpu_info_collector='--collector.cpu.info'\n    cpu_info_bugs='^(cpu_meltdown|spectre_.*|mds)$'\n    cpu_info_flags='^(aes|avx.?|constant_tsc)$'\n    ;;\n  *)\n    cpu_info_collector='--no-collector.cpu.info'\n    cpu_info_bugs=''\n    cpu_info_flags=''\n    ;;\nesac\n\nextra_flags=\"\"; keep=0; update=0; verbose=0\nwhile getopts 'e:hkuv' opt\ndo\n  case \"$opt\" in\n    e)\n      extra_flags=\"${OPTARG}\"\n      ;;\n    k)\n      keep=1\n      ;;\n    u)\n      update=1\n      ;;\n    v)\n      verbose=1\n      set -x\n      ;;\n    *)\n      echo \"Usage: $0 [-k] [-u] [-v]\"\n      echo \"  -k: keep temporary files and leave node_exporter running\"\n      echo \"  -u: update fixture_metrics\"\n      echo \"  -v: verbose output\"\n      exit 1\n      ;;\n  esac\ndone\n\nif [ ! -x ./node_exporter ]\nthen\n    echo './node_exporter not found. Consider running `go build` first.' >&2\n    exit 1\nfi\n\ncollector_flags=$(cat << FLAGS\n  ${extra_flags}\n  ${cpu_info_collector}\n  --collector.arp.device-exclude=nope\n  --collector.bcache.priorityStats\n  --collector.cpu.info.bugs-include=${cpu_info_bugs}\n  --collector.cpu.info.flags-include=${cpu_info_flags}\n  --collector.hwmon.chip-include=(applesmc|coretemp|hwmon4|nct6779)\n  --collector.netclass.ignore-invalid-speed\n  --collector.netclass.ignored-devices=(dmz|int)\n  --collector.netdev.device-include=lo\n  --collector.qdisc.device-include=(wlan0|eth0)\n  --collector.qdisc.fixtures=collector/fixtures/qdisc/\n  --collector.stat.softirq\n  --collector.sysctl.include-info=kernel.seccomp.actions_avail\n  --collector.sysctl.include=fs.file-nr\n  --collector.sysctl.include=fs.file-nr:total,current,max\n  --collector.sysctl.include=kernel.threads-max\n  --collector.textfile.directory=collector/fixtures/textfile/two_metric_files/\n  --collector.wifi.fixtures=collector/fixtures/wifi\n  --no-collector.arp.netlink\nFLAGS\n)\n\n# Handle supported --[no-]collector.<name> flags. These are not hardcoded.\n_filtered_collector_flags=\"\"\nfor flag in ${collector_flags}; do\n  collector=$(echo \"${flag}\" | cut -d\".\" -f2)\n  # If the flag is associated with an enabled-by-default collector, include it.\n  enabled_by_default=0\n  for filename in $(maybe_flag_search_scope \"${collector}\") ; do\n      file=\"collector/${filename}\"\n      if grep -h -E -o -- \"registerCollector\\(.*, defaultEnabled\" ${file} > /dev/null 2>&1; then\n        _filtered_collector_flags=\"${_filtered_collector_flags} ${flag}\"\n        enabled_by_default=1\n        break\n      fi\n  done\n  if [ ${enabled_by_default} -eq 1 ]; then\n    continue\n  fi\n  # If the flag is associated with an enabled-list collector, include it.\n  if echo \"${supported_enabled_collectors} ${supported_disabled_collectors}\" | grep -q -w \"${collector}\"; then\n    _filtered_collector_flags=\"${_filtered_collector_flags} ${flag}\"\n  fi\ndone\n\n# Handle supported --[no-]collector.<name>.<collector> flags. These are hardcoded and matched by the expression below.\nfiltered_collector_flags=\"\"\n# Check flags of all supported collectors further down their sub-collectors (beyond the 2nd \".\").\nfor flag in ${_filtered_collector_flags}; do\n  # Iterate through all possible files where the flag may be defined.\n  flag_collector=\"$(echo \"${flag}\" | cut -d\".\" -f2)\"\n  for filename in $(maybe_flag_search_scope \"${flag_collector}\") ; do\n    file=\"collector/${filename}\"\n    # Move to next iteration if the current file is not included under the build context.\n    if ! ./tools/tools match \"$file\" > /dev/null 2>&1; then\n     continue\n    fi\n    # Flag has the format: --[no-]collector.<name>.<collector>.\n    if [ -n \"$(echo ${flag} | cut -d\".\" -f3)\" ]; then\n      # Check if the flag is used in the file.\n      trimmed_flag=$(echo \"${flag}\" | tr -d \"\\\"' \" | cut -d\"=\" -f1 | cut -c 3-)\n      if [[ $trimmed_flag =~ ^no- ]]; then\n        trimmed_flag=$(echo $trimmed_flag | cut -c 4-)\n      fi\n      if grep -h -E -o -- \"kingpin.Flag\\(\\\"${trimmed_flag}\" ${file} > /dev/null 2>&1; then\n        filtered_collector_flags=\"${filtered_collector_flags} ${flag}\"\n      else\n       continue\n      fi\n    # Flag has the format: --[no-]collector.<name>.\n    else\n      # Flag is supported by the host.\n      filtered_collector_flags=\"${filtered_collector_flags} ${flag}\"\n    fi\n  done\ndone\n\n# Check for ignored flags.\nignored_flags=\"\"\nfor flag in ${collector_flags}; do\n  flag=$(echo \"${flag}\" | tr -d \" \")\n  if ! echo \"${filtered_collector_flags}\" | grep -q -F -- \"${flag}\" > /dev/null 2>&1; then\n    ignored_flags=\"${ignored_flags} ${flag}\"\n  fi\ndone\n\necho \"ENABLED COLLECTORS=======\"\necho \"${supported_enabled_collectors:1}\" | tr ' ' '\\n' | sort\necho \"=========================\"\n\necho \"DISABLED COLLECTORS======\"\necho \"${supported_disabled_collectors:1}\" | tr ' ' '\\n' | sort\necho \"=========================\"\n\necho \"IGNORED FLAGS============\"\necho \"${ignored_flags:1}\"| tr ' ' '\\n' | sort | uniq\necho \"=========================\"\n\n./node_exporter \\\n  --path.rootfs=\"collector/fixtures\" \\\n  --path.procfs=\"collector/fixtures/proc\" \\\n  --path.sysfs=\"collector/fixtures/sys\" \\\n  --path.udev.data=\"collector/fixtures/udev/data\" \\\n  $(for c in ${supported_enabled_collectors}; do echo --collector.${c}  ; done) \\\n  $(for c in ${supported_disabled_collectors}; do echo --no-collector.${c}  ; done) \\\n  ${filtered_collector_flags} \\\n  --web.listen-address \"127.0.0.1:${port}\" \\\n  --log.level=\"debug\" > \"${tmpdir}/node_exporter.log\" 2>&1 &\n\necho $! > \"${tmpdir}/node_exporter.pid\"\n\ngenerated_metrics=\"${tmpdir}/e2e-output.txt\"\nfor os in freebsd openbsd netbsd solaris dragonfly darwin; do\n  if [ \"${GOHOSTOS}\" = \"${os}\" ]; then\n    generated_metrics=\"${tmpdir}/e2e-output-${GOHOSTOS}.txt\"\n    fixture_metrics=\"${fixture_metrics::-4}-${GOHOSTOS}.txt\"\n  fi\ndone\n\nfinish() {\n  if [ $? -ne 0 -o ${verbose} -ne 0 ]\n  then\n    cat << EOF >&2\nLOG =====================\n$(cat \"${tmpdir}/node_exporter.log\")\n=========================\nEOF\n  fi\n\n  if [ ${update} -ne 0 ]\n  then\n    cp \"${generated_metrics}\" \"${fixture_metrics}\"\n  fi\n\n  if [ ${keep} -eq 0 ]\n  then\n    kill -9 \"$(cat ${tmpdir}/node_exporter.pid)\"\n    # This silences the \"Killed\" message\n    set +e\n    wait \"$(cat ${tmpdir}/node_exporter.pid)\" > /dev/null 2>&1\n    rm -rf \"${tmpdir}\"\n  fi\n}\n\ntrap finish EXIT\n\nget() {\n  if command -v curl > /dev/null 2>&1\n  then\n    curl -s -f \"$@\"\n  elif command -v wget > /dev/null 2>&1\n  then\n    wget -O - \"$@\"\n  else\n    echo \"Neither curl nor wget found\"\n    exit 1\n  fi\n}\n\nsleep 1\n\nget \"127.0.0.1:${port}/metrics\" | grep --text -E -v \"${skip_re}\" > \"${generated_metrics}\"\n\n# The following ignore-list is only applicable to the VMs used to run E2E tests on platforms for which containerized environments are not available.\n# However, owing to this, there are some non-deterministic metrics that end up generating samples, unlike their containerized counterparts, for e.g., node_network_receive_bytes_total. \nnon_deterministic_metrics=$(cat << METRICS\n  node_boot_time_seconds\n  node_cpu_frequency_hertz\n  node_cpu_frequency_max_hertz\n  node_cpu_seconds_total\n  node_disk_io_time_seconds_total\n  node_disk_read_bytes_total\n  node_disk_read_sectors_total\n  node_disk_read_time_seconds_total\n  node_disk_reads_completed_total\n  node_disk_write_time_seconds_total\n  node_disk_writes_completed_total\n  node_disk_written_bytes_total\n  node_disk_written_sectors_total\n  node_exec_context_switches_total\n  node_exec_device_interrupts_total\n  node_exec_forks_total\n  node_exec_software_interrupts_total\n  node_exec_system_calls_total\n  node_exec_traps_total\n  node_interrupts_total\n  node_load1\n  node_load15\n  node_load5\n  node_memory_active_bytes\n  node_memory_buffer_bytes\n  node_memory_cache_bytes\n  node_memory_compressed_bytes\n  node_memory_free_bytes\n  node_memory_inactive_bytes\n  node_memory_internal_bytes\n  node_memory_laundry_bytes\n  node_memory_purgeable_bytes\n  node_memory_size_bytes\n  node_memory_swapped_in_bytes_total\n  node_memory_swapped_out_bytes_total\n  node_memory_wired_bytes\n  node_netstat_tcp_receive_packets_total\n  node_netstat_tcp_transmit_packets_total\n  node_network_receive_bytes_total\n  node_network_receive_multicast_total\n  node_network_transmit_multicast_total\n  node_zfs_abdstats_linear_count_total\n  node_zfs_abdstats_linear_data_bytes\n  node_zfs_abdstats_scatter_chunk_waste_bytes\n  node_zfs_abdstats_scatter_count_total\n  node_zfs_abdstats_scatter_data_bytes\n  node_zfs_abdstats_struct_bytes\n  node_zfs_arcstats_anon_bytes\n  node_zfs_arcstats_c_bytes\n  node_zfs_arcstats_c_max_bytes\n  node_zfs_arcstats_data_bytes\n  node_zfs_arcstats_demand_data_hits_total\n  node_zfs_arcstats_demand_data_misses_total\n  node_zfs_arcstats_demand_metadata_hits_total\n  node_zfs_arcstats_demand_metadata_misses_total\n  node_zfs_arcstats_hdr_bytes\n  node_zfs_arcstats_hits_total\n  node_zfs_arcstats_meta_bytes\n  node_zfs_arcstats_mfu_bytes\n  node_zfs_arcstats_mfu_ghost_hits_total\n  node_zfs_arcstats_misses_total\n  node_zfs_arcstats_mru_bytes\n  node_zfs_arcstats_mru_ghost_bytes\n  node_zfs_arcstats_other_bytes\n  node_zfs_arcstats_pd_bytes\n  node_zfs_arcstats_size_bytes\n  node_zfs_zfetchstats_hits_total\n  node_zfs_zfetchstats_misses_total\nMETRICS\n)\n\n# Remove non-deterministic metrics from the generated metrics file (as we run their workflows in VMs).\nfor os in freebsd openbsd netbsd solaris dragonfly darwin; do\n  if [ \"${GOHOSTOS}\" = \"${os}\" ]; then\n    for metric in ${non_deterministic_metrics}; do\n      sed -i \"/${metric}/d\" \"${generated_metrics}\"\n    done\n  fi\ndone\n\ndiff -u \\\n  \"${fixture_metrics}\" \\\n  \"${generated_metrics}\"\n"
  },
  {
    "path": "example-rules.yml",
    "content": "groups:\n  - name: example-node-exporter-rules\n    rules:\n      # The count of CPUs per node, useful for getting CPU time as a percent of total.\n      - record: instance:node_cpus:count\n        expr: count(node_cpu_seconds_total{mode=\"idle\"}) without (cpu,mode)\n\n      # CPU in use by CPU.\n      - record: instance_cpu:node_cpu_seconds_not_idle:rate5m\n        expr: sum(rate(node_cpu_seconds_total{mode!=\"idle\"}[5m])) without (mode)\n\n      # CPU in use by mode.\n      - record: instance_mode:node_cpu_seconds:rate5m\n        expr: sum(rate(node_cpu_seconds_total[5m])) without (cpu)\n\n      # CPU in use ratio.\n      - record: instance:node_cpu_utilization:ratio\n        expr: sum(instance_mode:node_cpu_seconds:rate5m{mode!=\"idle\"}) without (mode) / instance:node_cpus:count\n"
  },
  {
    "path": "examples/init.d/node_exporter",
    "content": "#!/bin/bash\n\nRETVAL=0\nPROG=\"node_exporter\"\nEXEC=\"/etc/node_exporter/node_exporter\"\nLOCKFILE=\"/var/lock/subsys/$PROG\"\nOPTIONS=\"--web.listen-address=:9100\"\n\n# Source function library.\nif [ -f /etc/rc.d/init.d/functions ]; then\n  . /etc/rc.d/init.d/functions\nelse\n  echo \"/etc/rc.d/init.d/functions does not exist\"\n  exit 0\nfi\n\nstart() {\n  if [ -f $LOCKFILE ]\n  then\n    echo \"$PROG is already running!\"\n  else\n    echo -n \"Starting $PROG: \"\n    nohup $EXEC $OPTIONS >/dev/null 2>&1 &\n    RETVAL=$?\n    [ $RETVAL -eq 0 ] && touch $LOCKFILE && success || failure\n    echo\n    return $RETVAL\n  fi\n}\n\nstop() {\n  echo -n \"Stopping $PROG: \"\n  killproc $EXEC\n  RETVAL=$?\n  [ $RETVAL -eq 0 ] && rm -r $LOCKFILE && success || failure\n  echo\n}\n\nrestart ()\n{\n  stop\n  sleep 1\n  start\n}\n\ncase \"$1\" in\n  start)\n    start\n    ;;\n  stop)\n    stop\n    ;;\n  status)\n    status $PROG\n    ;;\n  restart)\n    restart\n    ;;\n  *)\n    echo \"Usage: $0 {start|stop|restart|status}\"\n    exit 1\nesac\nexit $RETVAL\n"
  },
  {
    "path": "examples/launchctl/README.md",
    "content": "# MacOS LaunchDaemon\n\nIf you're installing through a package manager, you probably don't need to deal\nwith this file.\n\nThe `plist` file should be put in `/Library/LaunchDaemons/` (user defined daemons), and the binary installed at\n`/usr/local/bin/node_exporter`.\n\nEx. install globally by\n\n    sudo cp -n node_exporter /usr/local/bin/\n    sudo cp -n examples/launchctl/io.prometheus.node_exporter.plist /Library/LaunchDaemons/\n    sudo launchctl bootstrap system/ /Library/LaunchDaemons/io.prometheus.node_exporter.plist\n\n    # Optionally configure by dropping CLI arguments in a file\n    echo -- '--web.listen-address=:9101' | sudo tee /usr/local/etc/node_exporter.args\n\n    # Check it's running\n    sudo launchctl list | grep node_exporter\n\n    # See full process state\n    sudo launchctl print system/io.prometheus.node_exporter\n\n    # View logs\n    sudo tail /tmp/node_exporter.log\n"
  },
  {
    "path": "examples/launchctl/io.prometheus.node_exporter.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n  <key>Label</key>\n  <string>io.prometheus.node_exporter</string>\n  <key>ProgramArguments</key>\n  <array>\n    <string>sh</string>\n    <string>-c</string>\n    <string>/usr/local/bin/node_exporter $(&lt; /usr/local/etc/node_exporter.args)</string>\n  </array>\n  <key>UserName</key>\n  <string>nobody</string>\n  <key>GroupName</key>\n  <string>nobody</string>\n  <key>RunAtLoad</key>\n  <true/>\n  <key>KeepAlive</key>\n  <false/>\n  <key>WorkingDirectory</key>\n  <string>/usr/local</string>\n  <key>StandardErrorPath</key>\n  <string>/tmp/node_exporter.log</string>\n  <key>StandardOutPath</key>\n  <string>/tmp/node_exporter.log</string>\n  <key>HardResourceLimits</key>\n  <dict>\n    <key>NumberOfFiles</key>\n    <integer>4096</integer>\n  </dict>\n  <key>SoftResourceLimits</key>\n  <dict>\n    <key>NumberOfFiles</key>\n    <integer>4096</integer>\n  </dict>\n</dict>\n</plist>\n"
  },
  {
    "path": "examples/openbsd-rc.d/node_exporter",
    "content": "#!/bin/ksh\n# Shawn Craver, 2019-04-02\n\n\ndaemon=\"/usr/local/bin/node_exporter\"\n\n. /etc/rc.d/rc.subr\n\nrc_bg=YES\n\nrc_cmd $1\n\n"
  },
  {
    "path": "examples/openwrt-init.d/node_exporter",
    "content": "#!/bin/sh /etc/rc.common\n\nSTART=99\n\nUSE_PROCD=1\nPROG=\"/usr/bin/node_exporter\"\nOPTIONS=\"--web.listen-address=:9100\"\n\nstart_service() {\n\tprocd_open_instance\n\tprocd_set_param command \"$PROG\" \"${OPTIONS}\"\n\tprocd_close_instance\n}\n"
  },
  {
    "path": "examples/systemd/README.md",
    "content": "# Systemd Unit\n\nIf you are using distribution packages or the copr repository, you don't need to deal with these files!\n\nThe unit files (`*.service` and `*.socket`) in this directory are to be put into `/etc/systemd/system`.\nIt needs a user named `node_exporter`, whose shell should be `/sbin/nologin` and should not have any special privileges.\nIt needs a sysconfig file in `/etc/sysconfig/node_exporter`.\nIt needs a directory named `/var/lib/node_exporter/textfile_collector`, whose owner should be `node_exporter`:`node_exporter`.\nA sample file can be found in `sysconfig.node_exporter`.\n"
  },
  {
    "path": "examples/systemd/node_exporter.service",
    "content": "[Unit]\nDescription=Node Exporter\nRequires=node_exporter.socket\n\n[Service]\nUser=node_exporter\n# Fallback when environment file does not exist\nEnvironment=OPTIONS=\nEnvironmentFile=-/etc/sysconfig/node_exporter\nExecStart=/usr/sbin/node_exporter --web.systemd-socket $OPTIONS\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "examples/systemd/node_exporter.socket",
    "content": "[Unit]\nDescription=Node Exporter\n\n[Socket]\nListenStream=9100\n\n[Install]\nWantedBy=sockets.target\n"
  },
  {
    "path": "examples/systemd/sysconfig.node_exporter",
    "content": "OPTIONS=\"--collector.textfile.directory /var/lib/node_exporter/textfile_collector\"\n"
  },
  {
    "path": "go.mod",
    "content": "module github.com/prometheus/node_exporter\n\ngo 1.25.0\n\nrequire (\n\tgithub.com/alecthomas/kingpin/v2 v2.4.0\n\tgithub.com/beevik/ntp v1.5.0\n\tgithub.com/coreos/go-systemd/v22 v22.7.0\n\tgithub.com/dennwc/btrfs v0.0.0-20241002142654-12ae127e0bf6\n\tgithub.com/ema/qdisc v1.0.0\n\tgithub.com/godbus/dbus/v5 v5.2.2\n\tgithub.com/hashicorp/go-envparse v0.1.0\n\tgithub.com/hodgesds/perf-utils v0.7.0\n\tgithub.com/illumos/go-kstat v0.0.0-20210513183136-173c9b0a9973\n\tgithub.com/jsimonetti/rtnetlink/v2 v2.2.0\n\tgithub.com/lufia/iostat v1.2.1\n\tgithub.com/mattn/go-xmlrpc v0.0.3\n\tgithub.com/mdlayher/ethtool v0.5.1\n\tgithub.com/mdlayher/netlink v1.9.0\n\tgithub.com/mdlayher/wifi v0.7.2\n\tgithub.com/opencontainers/selinux v1.13.1\n\tgithub.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55\n\tgithub.com/prometheus-community/go-runit v0.1.0\n\tgithub.com/prometheus/client_golang v1.23.2\n\tgithub.com/prometheus/client_model v0.6.2\n\tgithub.com/prometheus/common v0.67.5\n\tgithub.com/prometheus/exporter-toolkit v0.15.1\n\tgithub.com/prometheus/procfs v0.20.1\n\tgithub.com/safchain/ethtool v0.7.0\n\tgolang.org/x/sys v0.41.0\n\thowett.net/plist v1.0.1\n)\n\nrequire (\n\tcyphar.com/go-pathrs v0.2.2 // indirect\n\tgithub.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect\n\tgithub.com/beorn7/perks v1.0.1 // indirect\n\tgithub.com/cespare/xxhash/v2 v2.3.0 // indirect\n\tgithub.com/cyphar/filepath-securejoin v0.6.1 // indirect\n\tgithub.com/dennwc/ioctl v1.0.0 // indirect\n\tgithub.com/golang-jwt/jwt/v5 v5.3.0 // indirect\n\tgithub.com/google/go-cmp v0.7.0 // indirect\n\tgithub.com/google/uuid v1.6.0 // indirect\n\tgithub.com/jpillora/backoff v1.0.0 // indirect\n\tgithub.com/kylelemons/godebug v1.1.0 // indirect\n\tgithub.com/mdlayher/genetlink v1.3.2 // indirect\n\tgithub.com/mdlayher/socket v0.5.1 // indirect\n\tgithub.com/mdlayher/vsock v1.2.1 // indirect\n\tgithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect\n\tgithub.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect\n\tgithub.com/siebenmann/go-kstat v0.0.0-20210513183136-173c9b0a9973 // indirect\n\tgithub.com/xhit/go-str2duration/v2 v2.1.0 // indirect\n\tgo.uber.org/atomic v1.7.0 // indirect\n\tgo.uber.org/multierr v1.6.0 // indirect\n\tgo.yaml.in/yaml/v2 v2.4.3 // indirect\n\tgolang.org/x/crypto v0.48.0 // indirect\n\tgolang.org/x/net v0.50.0 // indirect\n\tgolang.org/x/oauth2 v0.34.0 // indirect\n\tgolang.org/x/sync v0.19.0 // indirect\n\tgolang.org/x/text v0.34.0 // indirect\n\tgolang.org/x/time v0.14.0 // indirect\n\tgoogle.golang.org/protobuf v1.36.11 // indirect\n)\n"
  },
  {
    "path": "go.sum",
    "content": "cyphar.com/go-pathrs v0.2.2 h1:y9w7hxbkr3zEL78Fjzeg4HEhs2xNy+fbwHiHGJJY2Xo=\ncyphar.com/go-pathrs v0.2.2/go.mod h1:y8f1EMG7r+hCuFf/rXsKqMJrJAUoADZGNh5/vZPKcGc=\ngithub.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY=\ngithub.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE=\ngithub.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0=\ngithub.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs=\ngithub.com/beevik/ntp v1.5.0 h1:y+uj/JjNwlY2JahivxYvtmv4ehfi3h74fAuABB9ZSM4=\ngithub.com/beevik/ntp v1.5.0/go.mod h1:mJEhBrwT76w9D+IfOEGvuzyuudiW9E52U2BaTrMOYow=\ngithub.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=\ngithub.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=\ngithub.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=\ngithub.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/cilium/ebpf v0.20.0 h1:atwWj9d3NffHyPZzVlx3hmw1on5CLe9eljR8VuHTwhM=\ngithub.com/cilium/ebpf v0.20.0/go.mod h1:pzLjFymM+uZPLk/IXZUL63xdx5VXEo+enTzxkZXdycw=\ngithub.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=\ngithub.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w=\ngithub.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE=\ngithub.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/dennwc/btrfs v0.0.0-20241002142654-12ae127e0bf6 h1:fV+JlCY0cCJh3l0jfE7iB3ZmrdfJSgfcjdrCQhPokGg=\ngithub.com/dennwc/btrfs v0.0.0-20241002142654-12ae127e0bf6/go.mod h1:MYsOV9Dgsec3FFSOjywi0QK5r6TeBbdWxdrMGtiYXHA=\ngithub.com/dennwc/ioctl v1.0.0 h1:DsWAAjIxRqNcLn9x6mwfuf2pet3iB7aK90K4tF16rLg=\ngithub.com/dennwc/ioctl v1.0.0/go.mod h1:ellh2YB5ldny99SBU/VX7Nq0xiZbHphf1DrtHxxjMk0=\ngithub.com/ema/qdisc v1.0.0 h1:EHLG08FVRbWLg8uRICa3xzC9Zm0m7HyMHfXobWFnXYg=\ngithub.com/ema/qdisc v1.0.0/go.mod h1:FhIc0fLYi7f+lK5maMsesDqwYojIOh3VfRs8EVd5YJQ=\ngithub.com/godbus/dbus/v5 v5.2.2 h1:TUR3TgtSVDmjiXOgAAyaZbYmIeP3DPkld3jgKGV8mXQ=\ngithub.com/godbus/dbus/v5 v5.2.2/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=\ngithub.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=\ngithub.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=\ngithub.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=\ngithub.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=\ngithub.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=\ngithub.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdmPSDFPY=\ngithub.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc=\ngithub.com/hodgesds/perf-utils v0.7.0 h1:7KlHGMuig4FRH5fNw68PV6xLmgTe7jKs9hgAcEAbioU=\ngithub.com/hodgesds/perf-utils v0.7.0/go.mod h1:LAklqfDadNKpkxoAJNHpD5tkY0rkZEVdnCEWN5k4QJY=\ngithub.com/illumos/go-kstat v0.0.0-20210513183136-173c9b0a9973 h1:hk4LPqXIY/c9XzRbe7dA6qQxaT6Axcbny0L/G5a4owQ=\ngithub.com/illumos/go-kstat v0.0.0-20210513183136-173c9b0a9973/go.mod h1:PoK3ejP3LJkGTzKqRlpvCIFas3ncU02v8zzWDW+g0FY=\ngithub.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=\ngithub.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=\ngithub.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=\ngithub.com/jsimonetti/rtnetlink/v2 v2.2.0 h1:/KfZ310gOAFrXXol5VwnFEt+ucldD/0dsSRZwpHCP9w=\ngithub.com/jsimonetti/rtnetlink/v2 v2.2.0/go.mod h1:lbjDHxC+5RJ08lzPeA90Ls2pEoId3F08MoEMlhfHxeI=\ngithub.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=\ngithub.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=\ngithub.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=\ngithub.com/lufia/iostat v1.2.1 h1:tnCdZBIglgxD47RyD55kfWQcJMGzO+1QBziSQfesf2k=\ngithub.com/lufia/iostat v1.2.1/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg=\ngithub.com/mattn/go-xmlrpc v0.0.3 h1:Y6WEMLEsqs3RviBrAa1/7qmbGB7DVD3brZIbqMbQdGY=\ngithub.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA=\ngithub.com/mdlayher/ethtool v0.5.1 h1:U4GThY6WgNJUJsMrUzBmoOTdQHFWxFPTHTeNnn3GCvU=\ngithub.com/mdlayher/ethtool v0.5.1/go.mod h1:Pz39PaAy96Ea1SrCvEO/pPEAeULvRJjO6zspuEMhJy4=\ngithub.com/mdlayher/genetlink v1.3.2 h1:KdrNKe+CTu+IbZnm/GVUMXSqBBLqcGpRDa0xkQy56gw=\ngithub.com/mdlayher/genetlink v1.3.2/go.mod h1:tcC3pkCrPUGIKKsCsp0B3AdaaKuHtaxoJRz3cc+528o=\ngithub.com/mdlayher/netlink v1.9.0 h1:G8+GLq2x3v4D4MVIqDdNUhTUC7TKiCy/6MDkmItfKco=\ngithub.com/mdlayher/netlink v1.9.0/go.mod h1:YBnl5BXsCoRuwBjKKlZ+aYmEoq0r12FDA/3JC+94KDg=\ngithub.com/mdlayher/socket v0.5.1 h1:VZaqt6RkGkt2OE9l3GcC6nZkqD3xKeQLyfleW/uBcos=\ngithub.com/mdlayher/socket v0.5.1/go.mod h1:TjPLHI1UgwEv5J1B5q0zTZq12A/6H7nKmtTanQE37IQ=\ngithub.com/mdlayher/vsock v1.2.1 h1:pC1mTJTvjo1r9n9fbm7S1j04rCgCzhCOS5DY0zqHlnQ=\ngithub.com/mdlayher/vsock v1.2.1/go.mod h1:NRfCibel++DgeMD8z/hP+PPTjlNJsdPOmxcnENvE+SE=\ngithub.com/mdlayher/wifi v0.7.2 h1:5yBq4nTm2HIYarKpJHrHU8q2BuxlX/BEfPa8kVKeOYU=\ngithub.com/mdlayher/wifi v0.7.2/go.mod h1:zJM6S0QpUxpUgf915rgAQHE4/e1YzRRkhK3M26NPakI=\ngithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=\ngithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=\ngithub.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=\ngithub.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=\ngithub.com/opencontainers/selinux v1.13.1 h1:A8nNeceYngH9Ow++M+VVEwJVpdFmrlxsN22F+ISDCJE=\ngithub.com/opencontainers/selinux v1.13.1/go.mod h1:S10WXZ/osk2kWOYKy1x2f/eXF5ZHJoUs8UU/2caNRbg=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=\ngithub.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=\ngithub.com/prometheus-community/go-runit v0.1.0 h1:uTWEj/Fn2RoLdfg/etSqwzgYNOYPrARx1BHUN052tGA=\ngithub.com/prometheus-community/go-runit v0.1.0/go.mod h1:AvJ9Jo3gAFu2lbM4+qfjdpq30FfiLDJZKbQ015u08IQ=\ngithub.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=\ngithub.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=\ngithub.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=\ngithub.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=\ngithub.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4=\ngithub.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw=\ngithub.com/prometheus/exporter-toolkit v0.15.1 h1:XrGGr/qWl8Gd+pqJqTkNLww9eG8vR/CoRk0FubOKfLE=\ngithub.com/prometheus/exporter-toolkit v0.15.1/go.mod h1:P/NR9qFRGbCFgpklyhix9F6v6fFr/VQB/CVsrMDGKo4=\ngithub.com/prometheus/procfs v0.20.1 h1:XwbrGOIplXW/AU3YhIhLODXMJYyC1isLFfYCsTEycfc=\ngithub.com/prometheus/procfs v0.20.1/go.mod h1:o9EMBZGRyvDrSPH1RqdxhojkuXstoe4UlK79eF5TGGo=\ngithub.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=\ngithub.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=\ngithub.com/safchain/ethtool v0.7.0 h1:rlJzfDetsVvT61uz8x1YIcFn12akMfuPulHtZjtb7Is=\ngithub.com/safchain/ethtool v0.7.0/go.mod h1:MenQKEjXdfkjD3mp2QdCk8B/hwvkrlOTm/FD4gTpFxQ=\ngithub.com/siebenmann/go-kstat v0.0.0-20210513183136-173c9b0a9973 h1:GfSdC6wKfTGcgCS7BtzF5694Amne1pGCSTY252WhlEY=\ngithub.com/siebenmann/go-kstat v0.0.0-20210513183136-173c9b0a9973/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=\ngithub.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=\ngithub.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=\ngithub.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=\ngithub.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=\ngithub.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=\ngithub.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=\ngithub.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=\ngo.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=\ngo.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=\ngo.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=\ngo.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=\ngo.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=\ngo.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0=\ngo.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8=\ngolang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=\ngolang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos=\ngolang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60=\ngolang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM=\ngolang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw=\ngolang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=\ngolang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=\ngolang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=\ngolang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20211031064116-611d5d643895/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=\ngolang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=\ngolang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=\ngolang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=\ngolang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=\ngolang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=\ngoogle.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=\ngoogle.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\nhowett.net/plist v1.0.1 h1:37GdZ8tP09Q35o9ych3ehygcsL+HqKSwzctveSlarvM=\nhowett.net/plist v1.0.1/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=\n"
  },
  {
    "path": "node_exporter.go",
    "content": "// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net/http\"\n\t_ \"net/http/pprof\"\n\t\"os\"\n\t\"os/user\"\n\t\"runtime\"\n\t\"slices\"\n\t\"sort\"\n\n\t\"github.com/prometheus/common/promslog\"\n\t\"github.com/prometheus/common/promslog/flag\"\n\n\t\"github.com/alecthomas/kingpin/v2\"\n\t\"github.com/prometheus/client_golang/prometheus\"\n\tpromcollectors \"github.com/prometheus/client_golang/prometheus/collectors\"\n\tversioncollector \"github.com/prometheus/client_golang/prometheus/collectors/version\"\n\t\"github.com/prometheus/client_golang/prometheus/promhttp\"\n\t\"github.com/prometheus/common/version\"\n\t\"github.com/prometheus/exporter-toolkit/web\"\n\t\"github.com/prometheus/exporter-toolkit/web/kingpinflag\"\n\n\t\"github.com/prometheus/node_exporter/collector\"\n)\n\n// handler wraps an unfiltered http.Handler but uses a filtered handler,\n// created on the fly, if filtering is requested. Create instances with\n// newHandler.\ntype handler struct {\n\tunfilteredHandler http.Handler\n\t// enabledCollectors list is used for logging and filtering\n\tenabledCollectors []string\n\t// exporterMetricsRegistry is a separate registry for the metrics about\n\t// the exporter itself.\n\texporterMetricsRegistry *prometheus.Registry\n\tincludeExporterMetrics  bool\n\tmaxRequests             int\n\tlogger                  *slog.Logger\n}\n\nfunc newHandler(includeExporterMetrics bool, maxRequests int, logger *slog.Logger) *handler {\n\th := &handler{\n\t\texporterMetricsRegistry: prometheus.NewRegistry(),\n\t\tincludeExporterMetrics:  includeExporterMetrics,\n\t\tmaxRequests:             maxRequests,\n\t\tlogger:                  logger,\n\t}\n\tif h.includeExporterMetrics {\n\t\th.exporterMetricsRegistry.MustRegister(\n\t\t\tpromcollectors.NewProcessCollector(promcollectors.ProcessCollectorOpts{}),\n\t\t\tpromcollectors.NewGoCollector(),\n\t\t)\n\t}\n\tif innerHandler, err := h.innerHandler(); err != nil {\n\t\tpanic(fmt.Sprintf(\"Couldn't create metrics handler: %s\", err))\n\t} else {\n\t\th.unfilteredHandler = innerHandler\n\t}\n\treturn h\n}\n\n// ServeHTTP implements http.Handler.\nfunc (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tcollects := r.URL.Query()[\"collect[]\"]\n\th.logger.Debug(\"collect query:\", \"collects\", collects)\n\n\texcludes := r.URL.Query()[\"exclude[]\"]\n\th.logger.Debug(\"exclude query:\", \"excludes\", excludes)\n\n\tif len(collects) == 0 && len(excludes) == 0 {\n\t\t// No filters, use the prepared unfiltered handler.\n\t\th.unfilteredHandler.ServeHTTP(w, r)\n\t\treturn\n\t}\n\n\tif len(collects) > 0 && len(excludes) > 0 {\n\t\th.logger.Debug(\"rejecting combined collect and exclude queries\")\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\tw.Write([]byte(\"Combined collect and exclude queries are not allowed.\"))\n\t\treturn\n\t}\n\n\tfilters := &collects\n\tif len(excludes) > 0 {\n\t\t// In exclude mode, filtered collectors = enabled - excludeed.\n\t\tf := []string{}\n\t\tfor _, c := range h.enabledCollectors {\n\t\t\tif (slices.Index(excludes, c)) == -1 {\n\t\t\t\tf = append(f, c)\n\t\t\t}\n\t\t}\n\t\tfilters = &f\n\t}\n\n\t// To serve filtered metrics, we create a filtering handler on the fly.\n\tfilteredHandler, err := h.innerHandler(*filters...)\n\tif err != nil {\n\t\th.logger.Warn(\"Couldn't create filtered metrics handler:\", \"err\", err)\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\tfmt.Fprintf(w, \"Couldn't create filtered metrics handler: %s\", err)\n\t\treturn\n\t}\n\tfilteredHandler.ServeHTTP(w, r)\n}\n\n// innerHandler is used to create both the one unfiltered http.Handler to be\n// wrapped by the outer handler and also the filtered handlers created on the\n// fly. The former is accomplished by calling innerHandler without any arguments\n// (in which case it will log all the collectors enabled via command-line\n// flags).\nfunc (h *handler) innerHandler(filters ...string) (http.Handler, error) {\n\tnc, err := collector.NewNodeCollector(h.logger, filters...)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"couldn't create collector: %s\", err)\n\t}\n\n\t// Only log the creation of an unfiltered handler, which should happen\n\t// only once upon startup.\n\tif len(filters) == 0 {\n\t\th.logger.Info(\"Enabled collectors\")\n\t\tfor n := range nc.Collectors {\n\t\t\th.enabledCollectors = append(h.enabledCollectors, n)\n\t\t}\n\t\tsort.Strings(h.enabledCollectors)\n\t\tfor _, c := range h.enabledCollectors {\n\t\t\th.logger.Info(c)\n\t\t}\n\t}\n\n\tr := prometheus.NewRegistry()\n\tr.MustRegister(versioncollector.NewCollector(\"node_exporter\"))\n\tif err := r.Register(nc); err != nil {\n\t\treturn nil, fmt.Errorf(\"couldn't register node collector: %s\", err)\n\t}\n\n\tvar handler http.Handler\n\tif h.includeExporterMetrics {\n\t\thandler = promhttp.HandlerFor(\n\t\t\tprometheus.Gatherers{h.exporterMetricsRegistry, r},\n\t\t\tpromhttp.HandlerOpts{\n\t\t\t\tErrorLog:            slog.NewLogLogger(h.logger.Handler(), slog.LevelError),\n\t\t\t\tErrorHandling:       promhttp.ContinueOnError,\n\t\t\t\tMaxRequestsInFlight: h.maxRequests,\n\t\t\t\tRegistry:            h.exporterMetricsRegistry,\n\t\t\t},\n\t\t)\n\t\t// Note that we have to use h.exporterMetricsRegistry here to\n\t\t// use the same promhttp metrics for all expositions.\n\t\thandler = promhttp.InstrumentMetricHandler(\n\t\t\th.exporterMetricsRegistry, handler,\n\t\t)\n\t} else {\n\t\thandler = promhttp.HandlerFor(\n\t\t\tr,\n\t\t\tpromhttp.HandlerOpts{\n\t\t\t\tErrorLog:            slog.NewLogLogger(h.logger.Handler(), slog.LevelError),\n\t\t\t\tErrorHandling:       promhttp.ContinueOnError,\n\t\t\t\tMaxRequestsInFlight: h.maxRequests,\n\t\t\t},\n\t\t)\n\t}\n\n\treturn handler, nil\n}\n\nfunc main() {\n\tvar (\n\t\tmetricsPath = kingpin.Flag(\n\t\t\t\"web.telemetry-path\",\n\t\t\t\"Path under which to expose metrics.\",\n\t\t).Default(\"/metrics\").String()\n\t\tdisableExporterMetrics = kingpin.Flag(\n\t\t\t\"web.disable-exporter-metrics\",\n\t\t\t\"Exclude metrics about the exporter itself (promhttp_*, process_*, go_*).\",\n\t\t).Bool()\n\t\tmaxRequests = kingpin.Flag(\n\t\t\t\"web.max-requests\",\n\t\t\t\"Maximum number of parallel scrape requests. Use 0 to disable.\",\n\t\t).Default(\"40\").Int()\n\t\tdisableDefaultCollectors = kingpin.Flag(\n\t\t\t\"collector.disable-defaults\",\n\t\t\t\"Set all collectors to disabled by default.\",\n\t\t).Default(\"false\").Bool()\n\t\tmaxProcs = kingpin.Flag(\n\t\t\t\"runtime.gomaxprocs\", \"The target number of CPUs Go will run on (GOMAXPROCS)\",\n\t\t).Envar(\"GOMAXPROCS\").Default(\"1\").Int()\n\t\ttoolkitFlags = kingpinflag.AddFlags(kingpin.CommandLine, \":9100\")\n\t)\n\n\tpromslogConfig := &promslog.Config{}\n\tflag.AddFlags(kingpin.CommandLine, promslogConfig)\n\tkingpin.Version(version.Print(\"node_exporter\"))\n\tkingpin.CommandLine.UsageWriter(os.Stdout)\n\tkingpin.HelpFlag.Short('h')\n\tkingpin.Parse()\n\tlogger := promslog.New(promslogConfig)\n\n\tif *disableDefaultCollectors {\n\t\tcollector.DisableDefaultCollectors()\n\t}\n\tlogger.Info(\"Starting node_exporter\", \"version\", version.Info())\n\tlogger.Info(\"Build context\", \"build_context\", version.BuildContext())\n\tif user, err := user.Current(); err == nil && user.Uid == \"0\" {\n\t\tlogger.Warn(\"Node Exporter is running as root user. This exporter is designed to run as unprivileged user, root is not required.\")\n\t}\n\truntime.GOMAXPROCS(*maxProcs)\n\tlogger.Debug(\"Go MAXPROCS\", \"procs\", runtime.GOMAXPROCS(0))\n\n\thttp.Handle(*metricsPath, newHandler(!*disableExporterMetrics, *maxRequests, logger))\n\tif *metricsPath != \"/\" {\n\t\tlandingConfig := web.LandingConfig{\n\t\t\tName:        \"Node Exporter\",\n\t\t\tDescription: \"Prometheus Node Exporter\",\n\t\t\tVersion:     version.Info(),\n\t\t\tLinks: []web.LandingLinks{\n\t\t\t\t{\n\t\t\t\t\tAddress: *metricsPath,\n\t\t\t\t\tText:    \"Metrics\",\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t\tlandingPage, err := web.NewLandingPage(landingConfig)\n\t\tif err != nil {\n\t\t\tlogger.Error(err.Error())\n\t\t\tos.Exit(1)\n\t\t}\n\t\thttp.Handle(\"/\", landingPage)\n\t}\n\n\tserver := &http.Server{}\n\tif err := web.ListenAndServe(server, toolkitFlags, logger); err != nil {\n\t\tlogger.Error(err.Error())\n\t\tos.Exit(1)\n\t}\n}\n"
  },
  {
    "path": "node_exporter_test.go",
    "content": "// Copyright 2017 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/prometheus/procfs\"\n)\n\nvar (\n\tbinary = filepath.Join(os.Getenv(\"GOPATH\"), \"bin/node_exporter\")\n)\n\nconst (\n\taddress = \"localhost:19100\"\n)\n\nfunc TestFileDescriptorLeak(t *testing.T) {\n\tif _, err := os.Stat(binary); err != nil {\n\t\tt.Skipf(\"node_exporter binary not available, try to run `make build` first: %s\", err)\n\t}\n\tfs, err := procfs.NewDefaultFS()\n\tif err != nil {\n\t\tt.Skipf(\"proc filesystem is not available, but currently required to read number of open file descriptors: %s\", err)\n\t}\n\tif _, err := fs.Stat(); err != nil {\n\t\tt.Errorf(\"unable to read process stats: %s\", err)\n\t}\n\n\texporter := exec.Command(binary, \"--web.listen-address\", address)\n\ttest := func(pid int) error {\n\t\tif err := queryExporter(address); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tproc, err := procfs.NewProc(pid)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfdsBefore, err := proc.FileDescriptors()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor range 5 {\n\t\t\tif err := queryExporter(address); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\tfdsAfter, err := proc.FileDescriptors()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif want, have := len(fdsBefore), len(fdsAfter); want != have {\n\t\t\treturn fmt.Errorf(\"want %d open file descriptors after metrics scrape, have %d\", want, have)\n\t\t}\n\t\treturn nil\n\t}\n\n\tif err := runCommandAndTests(exporter, address, test); err != nil {\n\t\tt.Error(err)\n\t}\n}\n\nfunc TestHandlingOfDuplicatedMetrics(t *testing.T) {\n\tif _, err := os.Stat(binary); err != nil {\n\t\tt.Skipf(\"node_exporter binary not available, try to run `make build` first: %s\", err)\n\t}\n\n\tdir, err := os.MkdirTemp(\"\", \"node-exporter\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer os.RemoveAll(dir)\n\n\tcontent := []byte(\"dummy_metric 1\\n\")\n\tif err := os.WriteFile(filepath.Join(dir, \"a.prom\"), content, 0600); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tif err := os.WriteFile(filepath.Join(dir, \"b.prom\"), content, 0600); err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\texporter := exec.Command(binary, \"--web.listen-address\", address, \"--collector.textfile.directory\", dir)\n\ttest := func(_ int) error {\n\t\treturn queryExporter(address)\n\t}\n\n\tif err := runCommandAndTests(exporter, address, test); err != nil {\n\t\tt.Error(err)\n\t}\n}\n\nfunc queryExporter(address string) error {\n\tresp, err := http.Get(fmt.Sprintf(\"http://%s/metrics\", address))\n\tif err != nil {\n\t\treturn err\n\t}\n\tb, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := resp.Body.Close(); err != nil {\n\t\treturn err\n\t}\n\tif want, have := http.StatusOK, resp.StatusCode; want != have {\n\t\treturn fmt.Errorf(\"want /metrics status code %d, have %d. Body:\\n%s\", want, have, b)\n\t}\n\treturn nil\n}\n\nfunc runCommandAndTests(cmd *exec.Cmd, address string, fn func(pid int) error) error {\n\tif err := cmd.Start(); err != nil {\n\t\treturn fmt.Errorf(\"failed to start command: %s\", err)\n\t}\n\ttime.Sleep(50 * time.Millisecond)\n\tfor i := range 10 {\n\t\tif err := queryExporter(address); err == nil {\n\t\t\tbreak\n\t\t}\n\t\ttime.Sleep(500 * time.Millisecond)\n\t\tif cmd.Process == nil || i == 9 {\n\t\t\treturn fmt.Errorf(\"can't start command\")\n\t\t}\n\t}\n\n\terrc := make(chan error)\n\tgo func(pid int) {\n\t\terrc <- fn(pid)\n\t}(cmd.Process.Pid)\n\n\terr := <-errc\n\tif cmd.Process != nil {\n\t\tcmd.Process.Kill()\n\t}\n\treturn err\n}\n"
  },
  {
    "path": "staticcheck.conf",
    "content": "checks = [\"all\", \"ST1003\"]\n"
  },
  {
    "path": "test_image.sh",
    "content": "#!/bin/bash\nset -exo pipefail\n\ndocker_image=$1\nport=$2\n\ncontainer_id=''\n\nwait_start() {\n    for in in {1..10}; do\n        if  /usr/bin/curl -s -m 5 -f \"http://localhost:${port}/metrics\" > /dev/null; then\n            docker_cleanup\n            exit 0\n        else\n            sleep 1\n        fi\n    done\n\n    exit 1\n}\n\ndocker_start() {\n    container_id=$(docker run -d -p \"${port}\":\"${port}\" \"${docker_image}\")\n}\n\ndocker_cleanup() {\n    docker kill \"${container_id}\"\n}\n\nif [[ \"$#\" -ne 2 ]] ; then\n    echo \"Usage: $0 quay.io/prometheus/node-exporter:v0.13.0 9100\" >&2\n    exit 1\nfi\n\ndocker_start\nwait_start\n"
  },
  {
    "path": "text_collector_examples/README.md",
    "content": "# Text collector example scripts\n\nThe scripts have been moved to\nhttps://github.com/prometheus-community/node-exporter-textfile-collector-scripts\n"
  },
  {
    "path": "tls_config_noAuth.bad.yml",
    "content": ""
  },
  {
    "path": "tools/main.go",
    "content": "// Copyright 2024 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"go/build\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n)\n\nfunc main() {\n\tprintHelpAndDie := func() {\n\t\tfmt.Println(`\nUsage: tools [command]`)\n\t\tos.Exit(1)\n\t}\n\tif len(os.Args) < 2 {\n\t\tprintHelpAndDie()\n\t}\n\n\t// Sub-commands.\n\tmatchCmd := flag.NewFlagSet(\"match\", flag.ExitOnError)\n\tswitch os.Args[1] {\n\tcase \"match\":\n\t\terr := matchCmd.Parse(os.Args[2:])\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Error parsing flags:\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tif matchCmd.NArg() != 1 {\n\t\t\tfmt.Println(\"Usage: match [file]\")\n\t\t\tos.Exit(1)\n\t\t}\n\t\tfile := matchCmd.Arg(0)\n\n\t\t// For debugging purposes, allow overriding these.\n\t\tgoos, found := os.LookupEnv(\"GOHOSTOS\")\n\t\tif !found {\n\t\t\tgoos = runtime.GOOS\n\t\t}\n\t\tgoarch, found := os.LookupEnv(\"GOARCH\")\n\t\tif !found {\n\t\t\tgoarch = runtime.GOARCH\n\t\t}\n\t\tctx := build.Context{\n\t\t\tGOOS:   goos,\n\t\t\tGOARCH: goarch,\n\t\t}\n\t\tabs, err := filepath.Abs(file)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tmatch, err := ctx.MatchFile(filepath.Dir(abs), filepath.Base(abs))\n\t\tif err != nil {\n\t\t\tfmt.Println(\"Error:\", err)\n\t\t\tos.Exit(1)\n\t\t}\n\t\tif match {\n\t\t\tos.Exit(0)\n\t\t}\n\t\tos.Exit(1)\n\tdefault:\n\t\tprintHelpAndDie()\n\t}\n}\n"
  },
  {
    "path": "ttar",
    "content": "#!/usr/bin/env bash\n\n# Purpose: plain text tar format\n# Limitations: - only suitable for text files, directories, and symlinks\n#              - stores only filename, content, and mode\n#              - not designed for untrusted input\n#\n# Note: must work with bash version 3.2 (macOS)\n\n# Copyright 2017 Roger Luethi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nset -o errexit -o nounset\n\n# Sanitize environment (for instance, standard sorting of glob matches)\nexport LC_ALL=C\n\npath=\"\"\nCMD=\"\"\nARG_STRING=\"$*\"\n\n#------------------------------------------------------------------------------\n# Not all sed implementations can work on null bytes. In order to make ttar\n# work out of the box on macOS, use Python as a stream editor.\n\nUSE_PYTHON=0\n\nPYTHON_CREATE_FILTER=$(cat << 'PCF'\n#!/usr/bin/env python\n\nimport re\nimport sys\n\nfor line in sys.stdin:\n    line = re.sub(r'EOF', r'\\EOF', line)\n    line = re.sub(r'NULLBYTE', r'\\NULLBYTE', line)\n    line = re.sub('\\x00', r'NULLBYTE', line)\n    sys.stdout.write(line)\nPCF\n)\n\nPYTHON_EXTRACT_FILTER=$(cat << 'PEF'\n#!/usr/bin/env python\n\nimport re\nimport sys\n\nfor line in sys.stdin:\n    line = re.sub(r'(?<!\\\\)NULLBYTE', '\\x00', line)\n    line = re.sub(r'\\\\NULLBYTE', 'NULLBYTE', line)\n    line = re.sub(r'([^\\\\])EOF', r'\\1', line)\n    line = re.sub(r'\\\\EOF', 'EOF', line)\n    sys.stdout.write(line)\nPEF\n)\n\nfunction test_environment {\n    if [[ \"$(echo \"a\" | sed 's/a/\\x0/' | wc -c)\" -ne 2 ]]; then\n        echo \"WARNING sed unable to handle null bytes, using Python (slow).\"\n        if ! which python >/dev/null; then\n            echo \"ERROR Python not found. Aborting.\"\n            exit 2\n        fi\n        USE_PYTHON=1\n    fi\n}\n\n#------------------------------------------------------------------------------\n\nfunction usage {\n    bname=$(basename \"$0\")\n    cat << USAGE\nUsage:   $bname [-C <DIR>] -c -f <ARCHIVE> <FILE...> (create archive)\n         $bname            -t -f <ARCHIVE>           (list archive contents)\n         $bname [-C <DIR>] -x -f <ARCHIVE>           (extract archive)\n\nOptions:\n         -C <DIR>                                    (change directory)\n         -v                                          (verbose)\n\nExample: Change to sysfs directory, create ttar file from fixtures directory\n         $bname -C sysfs -c -f sysfs/fixtures.ttar fixtures/\nUSAGE\nexit \"$1\"\n}\n\nfunction vecho {\n    if [ \"${VERBOSE:-}\" == \"yes\" ]; then\n        echo >&7 \"$@\"\n    fi\n}\n\nfunction set_cmd {\n    if [ -n \"$CMD\" ]; then\n        echo \"ERROR: more than one command given\"\n        echo\n        usage 2\n    fi\n    CMD=$1\n}\n\nunset VERBOSE\n\nwhile getopts :cf:htxvC: opt; do\n    case $opt in\n        c)\n            set_cmd \"create\"\n            ;;\n        f)\n            ARCHIVE=$OPTARG\n            ;;\n        h)\n            usage 0\n            ;;\n        t)\n            set_cmd \"list\"\n            ;;\n        x)\n            set_cmd \"extract\"\n            ;;\n        v)\n            VERBOSE=yes\n            exec 7>&1\n            ;;\n        C)\n            CDIR=$OPTARG\n            ;;\n        *)\n            echo >&2 \"ERROR: invalid option -$OPTARG\"\n            echo\n            usage 1\n            ;;\n    esac\ndone\n\n# Remove processed options from arguments\nshift $(( OPTIND - 1 ));\n\nif [ \"${CMD:-}\" == \"\" ]; then\n    echo >&2 \"ERROR: no command given\"\n    echo\n    usage 1\nelif [ \"${ARCHIVE:-}\" == \"\" ]; then\n    echo >&2 \"ERROR: no archive name given\"\n    echo\n    usage 1\nfi\n\nfunction list {\n    local path=\"\"\n    local size=0\n    local line_no=0\n    local ttar_file=$1\n    if [ -n \"${2:-}\" ]; then\n        echo >&2 \"ERROR: too many arguments.\"\n        echo\n        usage 1\n    fi\n    if [ ! -e \"$ttar_file\" ]; then\n        echo >&2 \"ERROR: file not found ($ttar_file)\"\n        echo\n        usage 1\n    fi\n    while read -r line; do\n        line_no=$(( line_no + 1 ))\n        if [ $size -gt 0 ]; then\n            size=$(( size - 1 ))\n            continue\n        fi\n        if [[ $line =~ ^Path:\\ (.*)$ ]]; then\n            path=${BASH_REMATCH[1]}\n        elif [[ $line =~ ^Lines:\\ (.*)$ ]]; then\n            size=${BASH_REMATCH[1]}\n            echo \"$path\"\n        elif [[ $line =~ ^Directory:\\ (.*)$ ]]; then\n            path=${BASH_REMATCH[1]}\n            echo \"$path/\"\n        elif [[ $line =~ ^SymlinkTo:\\ (.*)$ ]]; then\n            echo  \"$path -> ${BASH_REMATCH[1]}\"\n        fi\n    done < \"$ttar_file\"\n}\n\nfunction extract {\n    local path=\"\"\n    local size=0\n    local line_no=0\n    local ttar_file=$1\n    if [ -n \"${2:-}\" ]; then\n        echo >&2 \"ERROR: too many arguments.\"\n        echo\n        usage 1\n    fi\n    if [ ! -e \"$ttar_file\" ]; then\n        echo >&2 \"ERROR: file not found ($ttar_file)\"\n        echo\n        usage 1\n    fi\n    while IFS= read -r line; do\n        line_no=$(( line_no + 1 ))\n        local eof_without_newline\n        if [ \"$size\" -gt 0 ]; then\n            if [[ \"$line\" =~ [^\\\\]EOF ]]; then\n                # An EOF not preceded by a backslash indicates that the line\n                # does not end with a newline\n                eof_without_newline=1\n            else\n                eof_without_newline=0\n            fi\n            # Replace NULLBYTE with null byte if at beginning of line\n            # Replace NULLBYTE with null byte unless preceded by backslash\n            # Remove one backslash in front of NULLBYTE (if any)\n            # Remove EOF unless preceded by backslash\n            # Remove one backslash in front of EOF\n            if [ $USE_PYTHON -eq 1 ]; then\n                echo -n \"$line\" | python -c \"$PYTHON_EXTRACT_FILTER\" >> \"$path\"\n            else\n                # The repeated pattern makes up for sed's lack of negative\n                # lookbehind assertions (for consecutive null bytes).\n                echo -n \"$line\" | \\\n                    sed -e 's/^NULLBYTE/\\x0/g;\n                            s/\\([^\\\\]\\)NULLBYTE/\\1\\x0/g;\n                            s/\\([^\\\\]\\)NULLBYTE/\\1\\x0/g;\n                            s/\\\\NULLBYTE/NULLBYTE/g;\n                            s/\\([^\\\\]\\)EOF/\\1/g;\n                            s/\\\\EOF/EOF/g;\n                    ' >> \"$path\"\n            fi\n            if [[ \"$eof_without_newline\" -eq 0 ]]; then\n                echo >> \"$path\"\n            fi\n            size=$(( size - 1 ))\n            continue\n        fi\n        if [[ $line =~ ^Path:\\ (.*)$ ]]; then\n            path=${BASH_REMATCH[1]}\n            if [ -e \"$path\" ] || [ -L \"$path\" ]; then\n                rm \"$path\"\n            fi\n        elif [[ $line =~ ^Lines:\\ (.*)$ ]]; then\n            size=${BASH_REMATCH[1]}\n            # Create file even if it is zero-length.\n            touch \"$path\"\n            vecho \"    $path\"\n        elif [[ $line =~ ^Mode:\\ (.*)$ ]]; then\n            mode=${BASH_REMATCH[1]}\n            chmod \"$mode\" \"$path\"\n            vecho \"$mode\"\n        elif [[ $line =~ ^Directory:\\ (.*)$ ]]; then\n            path=${BASH_REMATCH[1]}\n            mkdir -p \"$path\"\n            vecho \"    $path/\"\n        elif [[ $line =~ ^SymlinkTo:\\ (.*)$ ]]; then\n            ln -s \"${BASH_REMATCH[1]}\" \"$path\"\n            vecho \"    $path -> ${BASH_REMATCH[1]}\"\n        elif [[ $line =~ ^# ]]; then\n            # Ignore comments between files\n            continue\n        else\n            echo >&2 \"ERROR: Unknown keyword on line $line_no: $line\"\n            exit 1\n        fi\n    done < \"$ttar_file\"\n}\n\nfunction div {\n    echo \"# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\" \\\n         \"- - - - - -\"\n}\n\nfunction get_mode {\n    local mfile=$1\n    if [ -z \"${STAT_OPTION:-}\" ]; then\n        if stat -c '%a' \"$mfile\" >/dev/null 2>&1; then\n            # GNU stat\n            STAT_OPTION='-c'\n            STAT_FORMAT='%a'\n        else\n            # BSD stat\n            STAT_OPTION='-f'\n            # Octal output, user/group/other (omit file type, sticky bit)\n            STAT_FORMAT='%OLp'\n        fi\n    fi\n    stat \"${STAT_OPTION}\" \"${STAT_FORMAT}\" \"$mfile\"\n}\n\nfunction _create {\n    shopt -s nullglob\n    local mode\n    local eof_without_newline\n    while (( \"$#\" )); do\n        file=$1\n        if [ -L \"$file\" ]; then\n            echo \"Path: $file\"\n            symlinkTo=$(readlink \"$file\")\n            echo \"SymlinkTo: $symlinkTo\"\n            vecho \"    $file -> $symlinkTo\"\n            div\n        elif [ -d \"$file\" ]; then\n            # Strip trailing slash (if there is one)\n            file=${file%/}\n            echo \"Directory: $file\"\n            mode=$(get_mode \"$file\")\n            echo \"Mode: $mode\"\n            vecho \"$mode $file/\"\n            div\n            # Find all files and dirs, including hidden/dot files\n            for x in \"$file/\"{*,.[^.]*}; do\n                _create \"$x\"\n            done\n        elif [ -f \"$file\" ]; then\n            echo \"Path: $file\"\n            lines=$(wc -l \"$file\"|awk '{print $1}')\n            eof_without_newline=0\n            if [[ \"$(wc -c \"$file\"|awk '{print $1}')\" -gt 0 ]] && \\\n                    [[ \"$(tail -c 1 \"$file\" | wc -l)\" -eq 0 ]]; then\n                eof_without_newline=1\n                lines=$((lines+1))\n            fi\n            echo \"Lines: $lines\"\n            # Add backslash in front of EOF\n            # Add backslash in front of NULLBYTE\n            # Replace null byte with NULLBYTE\n            if [ $USE_PYTHON -eq 1 ]; then\n                < \"$file\" python -c \"$PYTHON_CREATE_FILTER\"\n            else\n                < \"$file\" \\\n                    sed 's/EOF/\\\\EOF/g;\n                         s/NULLBYTE/\\\\NULLBYTE/g;\n                         s/\\x0/NULLBYTE/g;\n                    '\n            fi\n            if [[ \"$eof_without_newline\" -eq 1 ]]; then\n                # Finish line with EOF to indicate that the original line did\n                # not end with a linefeed\n                echo \"EOF\"\n            fi\n            mode=$(get_mode \"$file\")\n            echo \"Mode: $mode\"\n            vecho \"$mode $file\"\n            div\n        else\n            echo >&2 \"ERROR: file not found ($file in $(pwd))\"\n            exit 2\n        fi\n        shift\n    done\n}\n\nfunction create {\n    ttar_file=$1\n    shift\n    if [ -z \"${1:-}\" ]; then\n        echo >&2 \"ERROR: missing arguments.\"\n        echo\n        usage 1\n    fi\n    if [ -e \"$ttar_file\" ]; then\n        rm \"$ttar_file\"\n    fi\n    exec > \"$ttar_file\"\n    echo \"# Archive created by ttar $ARG_STRING\"\n    _create \"$@\"\n}\n\ntest_environment\n\nif [ -n \"${CDIR:-}\" ]; then\n    if [[ \"$ARCHIVE\" != /* ]]; then\n        # Relative path: preserve the archive's location before changing\n        # directory\n        ARCHIVE=\"$(pwd)/$ARCHIVE\"\n    fi\n    cd \"$CDIR\"\nfi\n\n\"$CMD\" \"$ARCHIVE\" \"$@\"\n"
  }
]