debian-forge-composer/vendor/github.com/prometheus/procfs
dependabot[bot] 623e761c45 build(deps): bump the go-deps group with 5 updates
Bumps the go-deps group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.49.7` | `1.49.13` |
| [github.com/labstack/echo/v4](https://github.com/labstack/echo) | `4.11.3` | `4.11.4` |
| [github.com/openshift-online/ocm-sdk-go](https://github.com/openshift-online/ocm-sdk-go) | `0.1.388` | `0.1.390` |
| [github.com/osbuild/images](https://github.com/osbuild/images) | `0.26.0` | `0.28.0` |
| [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) | `1.17.0` | `1.18.0` |


Updates `github.com/aws/aws-sdk-go` from 1.49.7 to 1.49.13
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.49.7...v1.49.13)

Updates `github.com/labstack/echo/v4` from 4.11.3 to 4.11.4
- [Release notes](https://github.com/labstack/echo/releases)
- [Changelog](https://github.com/labstack/echo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/labstack/echo/compare/v4.11.3...v4.11.4)

Updates `github.com/openshift-online/ocm-sdk-go` from 0.1.388 to 0.1.390
- [Release notes](https://github.com/openshift-online/ocm-sdk-go/releases)
- [Changelog](https://github.com/openshift-online/ocm-sdk-go/blob/main/CHANGES.md)
- [Commits](https://github.com/openshift-online/ocm-sdk-go/compare/v0.1.388...v0.1.390)

Updates `github.com/osbuild/images` from 0.26.0 to 0.28.0
- [Release notes](https://github.com/osbuild/images/releases)
- [Commits](https://github.com/osbuild/images/compare/v0.26.0...v0.28.0)

Updates `github.com/prometheus/client_golang` from 1.17.0 to 1.18.0
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/labstack/echo/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/openshift-online/ocm-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/osbuild/images
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 11:43:07 +01:00
..
internal deps: update osbuild/images to 246b718310ea 2023-07-21 12:05:00 +02:00
.gitignore build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
.golangci.yml build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
arp.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
buddyinfo.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
cmdline.go go: update most dependencies to the latest version 2021-09-05 12:50:02 +01:00
CODE_OF_CONDUCT.md build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
CONTRIBUTING.md build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
cpuinfo.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
cpuinfo_armx.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
cpuinfo_loong64.go deps: update osbuild/images to 246b718310ea 2023-07-21 12:05:00 +02:00
cpuinfo_mipsx.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
cpuinfo_others.go deps: update osbuild/images to 246b718310ea 2023-07-21 12:05:00 +02:00
cpuinfo_ppcx.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
cpuinfo_riscvx.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
cpuinfo_s390x.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
cpuinfo_x86.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
crypto.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
doc.go deps: update osbuild/images to 246b718310ea 2023-07-21 12:05:00 +02:00
fs.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
fs_statfs_notype.go build(deps): bump the go-deps group with 5 updates 2024-01-02 11:43:07 +01:00
fs_statfs_type.go build(deps): bump the go-deps group with 5 updates 2024-01-02 11:43:07 +01:00
fscache.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
ipvs.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
kernel_random.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
LICENSE worker: add metrics 2021-07-23 21:54:28 +02:00
loadavg.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
MAINTAINERS.md worker: add metrics 2021-07-23 21:54:28 +02:00
Makefile build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
Makefile.common build(deps): bump the go-deps group with 5 updates 2024-01-02 11:43:07 +01:00
mdstat.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
meminfo.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
mountinfo.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
mountstats.go build(deps): bump the go-deps group with 5 updates 2024-01-02 11:43:07 +01:00
net_conntrackstat.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
net_dev.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
net_ip_socket.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
net_protocols.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
net_route.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
net_sockstat.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
net_softnet.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
net_tcp.go worker: add metrics 2021-07-23 21:54:28 +02:00
net_udp.go worker: add metrics 2021-07-23 21:54:28 +02:00
net_unix.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
net_wireless.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
net_xfrm.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
netstat.go deps: update osbuild/images to 246b718310ea 2023-07-21 12:05:00 +02:00
NOTICE worker: add metrics 2021-07-23 21:54:28 +02:00
proc.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_cgroup.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_cgroups.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_environ.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
proc_fdinfo.go build(deps): bump the go-deps group with 5 updates 2024-01-02 11:43:07 +01:00
proc_interrupts.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_io.go worker: add metrics 2021-07-23 21:54:28 +02:00
proc_limits.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_maps.go build(deps): bump the go-deps group with 5 updates 2024-01-02 11:43:07 +01:00
proc_netstat.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_ns.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_psi.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_smaps.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_snmp.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_snmp6.go deps: update osbuild/images to 246b718310ea 2023-07-21 12:05:00 +02:00
proc_stat.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
proc_status.go build(deps): bump the go-deps group with 5 updates 2024-01-02 11:43:07 +01:00
proc_sys.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
README.md build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
schedstat.go build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
SECURITY.md build(deps): bump github.com/prometheus/client_golang 2022-08-30 15:22:18 +02:00
slab.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
softirqs.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
stat.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
swaps.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
thread.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
ttar worker: add metrics 2021-07-23 21:54:28 +02:00
vm.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00
zoneinfo.go build(deps): bump the go-deps group with 7 updates 2023-10-12 15:22:57 +02:00

procfs

This package provides functions to retrieve system, kernel, and process metrics from the pseudo-filesystems /proc and /sys.

WARNING: This package is a work in progress. Its API may still break in backwards-incompatible ways without warnings. Use it at your own risk.

Go Reference CircleCI Go Report Card

Usage

The procfs library is organized by packages based on whether the gathered data is coming from /proc, /sys, or both. Each package contains an FS type which represents the path to either /proc, /sys, or both. For example, cpu statistics are gathered from /proc/stat and are available via the root procfs package. First, the proc filesystem mount point is initialized, and then the stat information is read.

fs, err := procfs.NewFS("/proc")
stats, err := fs.Stat()

Some sub-packages such as blockdevice, require access to both the proc and sys filesystems.

    fs, err := blockdevice.NewFS("/proc", "/sys")
    stats, err := fs.ProcDiskstats()

Package Organization

The packages in this project are organized according to (1) whether the data comes from the /proc or /sys filesystem and (2) the type of information being retrieved. For example, most process information can be gathered from the functions in the root procfs package. Information about block devices such as disk drives is available in the blockdevices sub-package.

Building and Testing

The procfs library is intended to be built as part of another application, so there are no distributable binaries.
However, most of the API includes unit tests which can be run with make test.

Updating Test Fixtures

The procfs library includes a set of test fixtures which include many example files from the /proc and /sys filesystems. These fixtures are included as a ttar file which is extracted automatically during testing. To add/update the test fixtures, first ensure the fixtures directory is up to date by removing the existing directory and then extracting the ttar file using make fixtures/.unpacked or just make test.

rm -rf testdata/fixtures
make test

Next, make the required changes to the extracted files in the fixtures directory. When the changes are complete, run make update_fixtures to create a new fixtures.ttar file based on the updated fixtures directory. And finally, verify the changes using git diff testdata/fixtures.ttar.