kubernetes/vendor/github.com/prometheus/procfs
Davanum Srinivas aa4159c2d2
Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2
prometheus/common v0.66.1 -> v0.67.5:
- Breaking: TextParser must now use NewTextParser() constructor
- Float/gauge histograms support in expfmt
- Fixed panic in tlsRoundTripper when CA file missing
- https://github.com/prometheus/common/compare/v0.66.1...v0.67.5

prometheus/procfs v0.16.1 -> v0.19.2:
- New: process shared memory, netfilter queue, hung_task metrics
- Enhanced meminfo (zswap, hugetlb fields)
- MD raid component devices exposed
- Fixed ZswappedBytes calculation
- https://github.com/prometheus/procfs/compare/v0.16.1...v0.19.2

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-02-03 21:25:04 -05:00
..
internal Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
.gitignore Bump prometheus/client_golang to v1.13.0 2022-08-26 05:40:17 +02:00
.golangci.yml Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
arp.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
buddyinfo.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cmdline.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
CODE_OF_CONDUCT.md Bump prometheus/client_golang to v1.13.0 2022-08-26 05:40:17 +02:00
CONTRIBUTING.md Bump prometheus/client_golang to v1.13.0 2022-08-26 05:40:17 +02:00
cpuinfo.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cpuinfo_armx.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cpuinfo_loong64.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cpuinfo_mipsx.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cpuinfo_others.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cpuinfo_ppcx.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cpuinfo_riscvx.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cpuinfo_s390x.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
cpuinfo_x86.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
crypto.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
doc.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
fs.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
fs_statfs_notype.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
fs_statfs_type.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
fscache.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
ipvs.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
kernel_hung.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
kernel_random.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
LICENSE
loadavg.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
MAINTAINERS.md Bump prometheus/common to v0.55.0 2024-06-27 09:34:23 -04:00
Makefile Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
Makefile.common Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
mdstat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
meminfo.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
mountinfo.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
mountstats.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_conntrackstat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_dev.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_dev_snmp6.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_ip_socket.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_protocols.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_route.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_sockstat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_softnet.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_tcp.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_tls_stat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_udp.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_unix.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_wireless.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
net_xfrm.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
netstat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
nfnetlink_queue.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
NOTICE
proc.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_cgroup.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_cgroups.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_environ.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_fdinfo.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_interrupts.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_io.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_limits.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_maps.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_netstat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_ns.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_psi.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_smaps.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_snmp.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_snmp6.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_stat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_statm.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_status.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
proc_sys.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
README.md Bump cadvisor to 0.53 2025-08-28 09:20:21 +02:00
schedstat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
SECURITY.md Bump prometheus/client_golang to v1.13.0 2022-08-26 05:40:17 +02:00
slab.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
softirqs.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
stat.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
swaps.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
thread.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
ttar
vm.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05:00
zoneinfo.go Bump prometheus/common to v0.67.5 and prometheus/procfs to v0.19.2 2026-02-03 21:25:04 -05: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 testdata/fixtures directory is up to date by removing the existing directory and then extracting the ttar file using make testdata/fixtures/.unpacked or just make test.

rm -rf testdata/fixtures
make test

Next, make the required changes to the extracted files in the testdata/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.