All Projects → prometheus → Procfs

prometheus / Procfs

Licence: apache-2.0
procfs provides functions to retrieve system, kernel and process metrics from the pseudo-filesystem proc.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Procfs

Ksdumper
Dumping processes using the power of kernel space !
Stars: ✭ 454 (+9.66%)
Mutual labels:  kernel, process
Pplkiller
Protected Processes Light Killer
Stars: ✭ 453 (+9.42%)
Mutual labels:  kernel, process
Version Checker
Kubernetes utility for exposing image versions in use, compared to latest available upstream, as metrics.
Stars: ✭ 371 (-10.39%)
Mutual labels:  prometheus
Victoriametrics
VictoriaMetrics: fast, cost-effective monitoring solution and time series database
Stars: ✭ 5,558 (+1242.51%)
Mutual labels:  prometheus
Bpfd
Framework for running BPF programs with rules on Linux as a daemon. Container aware.
Stars: ✭ 396 (-4.35%)
Mutual labels:  kernel
Elks
Embeddable Linux Kernel Subset
Stars: ✭ 376 (-9.18%)
Mutual labels:  kernel
Kubernetes App
A set of dashboards and panels for kubernetes.
Stars: ✭ 398 (-3.86%)
Mutual labels:  prometheus
Client ruby
Prometheus instrumentation library for Ruby applications
Stars: ✭ 369 (-10.87%)
Mutual labels:  prometheus
Aquila
AquilaOS: UNIX-like Operating System
Stars: ✭ 413 (-0.24%)
Mutual labels:  kernel
Nupdate
A comfortable update solution for .NET-applications.
Stars: ✭ 394 (-4.83%)
Mutual labels:  process
Elasticsearch Prometheus Exporter
Prometheus exporter plugin for Elasticsearch
Stars: ✭ 409 (-1.21%)
Mutual labels:  prometheus
Cortex
A horizontally scalable, highly available, multi-tenant, long term Prometheus.
Stars: ✭ 4,491 (+984.78%)
Mutual labels:  prometheus
Dogvscat
Sample Docker Swarm cluster stack of tools
Stars: ✭ 377 (-8.94%)
Mutual labels:  prometheus
Linux Kernel Exploits
linux-kernel-exploits Linux平台提权漏洞集合
Stars: ✭ 4,203 (+915.22%)
Mutual labels:  kernel
Keepalive
Fighting against force-stop kill process on Android with binder ioctl / Android高级保活
Stars: ✭ 376 (-9.18%)
Mutual labels:  process
Docs
Prometheus documentation: content and static site generator
Stars: ✭ 411 (-0.72%)
Mutual labels:  prometheus
Trinity
Trinity Exploit - Emulator Escape
Stars: ✭ 371 (-10.39%)
Mutual labels:  kernel
Prometheus For Developers
Practical introduction to Prometheus for developers.
Stars: ✭ 382 (-7.73%)
Mutual labels:  prometheus
Kernel Exploits
Various kernel exploits
Stars: ✭ 397 (-4.11%)
Mutual labels:  kernel
Phantomuserland
Phantom: Persistent Operating System
Stars: ✭ 412 (-0.48%)
Mutual labels:  kernel

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.

GoDoc Build Status 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 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 fixtures.ttar.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].