Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/procfs
/ functions
Functions
751 in github.com/prometheus/procfs
⨍
Functions
751
◇
Types & classes
267
↓ 163 callers
Method
PInt64
PInt64 interprets the underlying value as an int64 and returns a pointer to that value.
internal/util/valueparser.go:41
↓ 151 callers
Method
Path
Path is a helper function to get configfs path.
iscsi/iscsi.go:67
↓ 126 callers
Function
newPInt64
(i int64)
vm_test.go:24
↓ 122 callers
Method
PUInt64
PUInt64 interprets the underlying value as an uint64 and returns a pointer to that value.
internal/util/valueparser.go:71
↓ 102 callers
Method
Name
()
sysfs/pci_device.go:102
↓ 102 callers
Function
newuint64
(i uint64)
crypto_test.go:143
↓ 65 callers
Function
getProcFixtures
(t *testing.T)
fs_test.go:33
↓ 61 callers
Function
SysReadFile
SysReadFile is here implemented as a noop for builds that do not support the read syscall. For example Windows, or Linux on Google App Engine.
internal/util/sysreadfile_compat.go:24
↓ 59 callers
Function
NewFS
NewFS returns a new FS mounted under the given mountPoint. It will error if the mount point can't be read.
sysfs/fs.go:39
↓ 55 callers
Method
Err
Err returns the last error, if any, encountered by the ValueParser.
internal/util/valueparser.go:89
↓ 46 callers
Method
Proc
Proc returns a process for the given pid.
proc.go:97
↓ 46 callers
Method
readValue
readValues reads a number of numerical values into an uint64 slice. Non-existing files are ignored.
bcache/get.go:201
↓ 44 callers
Function
ReadFileNoStat
ReadFileNoStat uses io.ReadAll to read contents of entire file. This is similar to os.ReadFile but without the call to os.Stat, because many files in
internal/util/readfile.go:26
↓ 34 callers
Function
NewFS
NewFS returns a new proc FS mounted under the given proc mountPoint. It will error if the mount point directory can't be read or is a file.
fs.go:44
↓ 31 callers
Method
path
(pa ...string)
proc.go:306
↓ 28 callers
Method
Stat
Stat returns information about current cpu/process statistics. See: https://www.kernel.org/doc/Documentation/filesystems/proc.txt
stat.go:168
↓ 26 callers
Function
NewValueParser
NewValueParser creates a ValueParser using the input string.
internal/util/valueparser.go:32
↓ 23 callers
Function
setFSCacheFields
(fields []string, setFields ...*uint64)
fscache.go:245
↓ 20 callers
Function
ReadUintFromFile
ReadUintFromFile reads a file and attempts to parse a uint64 from it.
internal/util/parse.go:84
↓ 19 callers
Method
readValue
readValues reads a number of numerical values into an uint64 slice.
btrfs/get.go:108
↓ 16 callers
Function
parseUint
(s string)
proc_limits.go:152
↓ 14 callers
Function
makeUint64
(v uint64)
sysfs/system_cpu_test.go:26
↓ 13 callers
Function
NewFS
NewFS returns a new FS mounted under the given mountPoint. It will error if the mount point can't be read.
internal/fs/fs.go:42
↓ 12 callers
Function
newint64
(i int64)
crypto_test.go:139
↓ 11 callers
Function
parseHumanReadableBytes
(s string)
bcachefs/get.go:175
↓ 10 callers
Function
readDRMCardField
(card, field string)
sysfs/class_drm.go:24
↓ 9 callers
Function
NewFS
NewFS returns a new blockdevice fs using the given mountPoints for proc and sys. It will error if either of these mount points can't be read.
blockdevice/stats.go:237
↓ 8 callers
Method
GetByName
GetByName returns the SASPhy with the provided name.
sysfs/class_sas_phy.go:163
↓ 8 callers
Method
NewStatus
NewStatus returns the current status information of the process.
proc_status.go:102
↓ 8 callers
Function
intp
(i int)
net_sockstat_test.go:213
↓ 8 callers
Function
parseWritebackRateDebug
ParseWritebackRateDebug parses lines from the writeback_rate_debug file.
bcache/get.go:250
↓ 8 callers
Method
setSubDir
(pathElements ...string)
bcache/get.go:194
↓ 7 callers
Method
Int
Int interprets the underlying value as an int and returns that value.
internal/util/valueparser.go:37
↓ 7 callers
Function
canIgnoreError
canIgnoreError returns true if the error is non-fatal and can be ignored. Some kernels and some devices don't expose specific attributes or return err
sysfs/net_class.go:124
↓ 7 callers
Function
firstNonEmptyLine
firstNonEmptyLine advances the scanner to the first non-empty line and returns the contents of that line.
cpuinfo.go:510
↓ 7 callers
Function
intToU64
intToU64 convert int to uint64 and return it pointer.
net_udp_test.go:183
↓ 7 callers
Function
testProcStatm
(pid int)
proc_statm_test.go:124
↓ 6 callers
Method
GetByPhy
GetByPhy finds the SASHost that contains the provided PHY name.
sysfs/class_sas_host.go:101
↓ 6 callers
Function
NewFS
NewFS returns a new FS mounted under the given mountPoint. It will error if the mount point can't be read.
selinuxfs/fs.go:39
↓ 6 callers
Function
ParseUint64s
ParseUint64s parses a slice of strings into a slice of uint64s.
internal/util/parse.go:39
↓ 6 callers
Method
String
()
net_unix.go:224
↓ 6 callers
Function
dehumanize
Dehumanize converts a human-readable byte slice into a uint64.
bcache/get.go:119
↓ 6 callers
Function
openIfExists
(path string)
bcachefs/get.go:585
↓ 6 callers
Function
parseMountInfo
Reads each line of the mountinfo file, and returns a list of formatted MountInfo structs.
mountinfo.go:56
↓ 6 callers
Function
testProcStat
(pid int)
proc_stat_test.go:176
↓ 5 callers
Method
SASPortClass
SASPortClass parses ports in /sys/class/sas_port. A SAS port in this context is a collection of SAS PHYs operating together. For example, it's commo
sysfs/class_sas_port.go:52
↓ 5 callers
Method
SysBlockDevices
SysBlockDevices lists the device names from /sys/block/<dev>.
blockdevice/stats.go:309
↓ 5 callers
Function
parseIPPort
(s string)
ipvs.go:209
↓ 5 callers
Function
parseLinkrate
parseLinkRate turns the kernel's SAS linkrate values into floats. The kernel returns values like "12.0 Gbit". Valid speeds are currently 1.5, 3.0, 6.
sysfs/class_sas_phy.go:153
↓ 5 callers
Function
parseProcSchedstat
(contents string)
schedstat.go:98
↓ 5 callers
Function
readMountInfo
readMountInfo reads a full mountinfo file (no 1 MiB cap, unlike util.ReadFileNoStat).
mountinfo.go:164
↓ 4 callers
Method
GetByPort
GetByPort finds the SASHost that contains the provided SAS Port name.
sysfs/class_sas_host.go:111
↓ 4 callers
Method
NVMeClass
NVMeClass returns info for all NVMe devices read from /sys/class/nvme.
sysfs/class_nvme.go:61
↓ 4 callers
Method
NetClassByIface
NetClassByIface returns info for a single net interfaces (iface).
sysfs/net_class.go:87
↓ 4 callers
Method
NetClassDevices
NetClassDevices scans /sys/class/net for devices and returns them as a list of names.
sysfs/net_class.go:67
↓ 4 callers
Function
ParseStats
ParseStats parses a Stats from an input io.Reader, using the format found in /proc/fs/xfs/stat.
xfs/parse.go:27
↓ 4 callers
Method
SASDeviceClass
SASDeviceClass parses devices in /sys/class/sas_device.
sysfs/class_sas_device.go:75
↓ 4 callers
Method
SASHostClass
SASHostClass parses host[0-9]+ devices in /sys/class/sas_host. This generally only exists so that it can pull in SAS Port and SAS PHY entries. The sa
sysfs/class_sas_host.go:49
↓ 4 callers
Method
Schedstat
Schedstat returns task scheduling information for the process.
proc.go:332
↓ 4 callers
Method
fileDescriptors
()
proc.go:291
↓ 4 callers
Function
parseHexUint32s
(ss []string)
net_softnet.go:143
↓ 4 callers
Function
parseMountStats
parseMountStats parses a /proc/[pid]/mountstats file and returns a slice of Mount structures containing detailed information about each mount. If avai
mountstats.go:274
↓ 4 callers
Function
parsePSIStats
parsePSIStats parses the specified file for pressure stall information.
proc_psi.go:71
↓ 3 callers
Method
AllThreads
AllThreads returns a list of all currently available threads for PID.
thread.go:38
↓ 3 callers
Method
CPUs
CPUs returns a slice of all CPUs in `/sys/devices/system/cpu`.
sysfs/system_cpu.go:75
↓ 3 callers
Function
GetRaplZones
GetRaplZones returns a slice of RaplZones. When RAPL files are not present, returns nil with error. - https://www.kernel.org/doc/Documentation/power/p
sysfs/class_powercap.go:39
↓ 3 callers
Method
NVMeSubsystemClass
NVMeSubsystemClass returns info for all NVMe subsystems read from sys/class/nvme-subsystem.
sysfs/class_nvme_subsystem.go:72
↓ 3 callers
Method
PSIStatsForResource
PSIStatsForResource reads pressure stall information for the specified resource from /proc/pressure/<resource>. At time of writing this can be either
proc_psi.go:61
↓ 3 callers
Function
dehumanizeSigned
(str string)
bcache/get.go:176
↓ 3 callers
Function
newNetTCP
newNetTCP creates a new NetTCP{,6} from the contents of the given file.
net_tcp.go:59
↓ 3 callers
Function
newNetTCPSummary
(file string)
net_tcp.go:65
↓ 3 callers
Function
newNetUDP
newNetUDP creates a new NetUDP{,6} from the contents of the given file.
net_udp.go:51
↓ 3 callers
Function
newNetUDPSummary
(file string)
net_udp.go:57
↓ 3 callers
Function
parseBuddyInfo
(r io.Reader)
buddyinfo.go:45
↓ 3 callers
Function
parseCPUInfoARM
(info []byte)
cpuinfo.go:190
↓ 3 callers
Function
parseCPURange
(data []byte)
sysfs/system_cpu.go:412
↓ 3 callers
Function
parseConntrackStat
Reads the contents of a conntrack statistics file and parses a slice of ConntrackStatEntries.
net_conntrackstat.go:68
↓ 3 callers
Function
parseNetIPSocketLine
parseNetIPSocketLine parses a single line, represented by a list of fields.
net_ip_socket.go:163
↓ 3 callers
Function
parsePciDeviceLocation
(loc string)
sysfs/pci_device.go:135
↓ 3 callers
Function
parsePriorityStats
ParsePriorityStats parses lines from the priority_stats file.
bcache/get.go:221
↓ 3 callers
Method
parseSASDeviceClass
sasDeviceClasses reads all of the SAS devices from a specific set of /sys/class/sas*/ entries. The sas_device, sas_end_device, and sas_expander class
sysfs/class_sas_device.go:52
↓ 3 callers
Method
readAllocationStats
readAllocationStats reads Btrfs allocation data for the current path.
btrfs/get.go:136
↓ 3 callers
Method
readFile
readFile reads a file relative to the path of the reader. Non-existing files are ignored.
btrfs/get.go:99
↓ 3 callers
Function
readSockstat
readSockstat opens and parses a NetSockstat from the input file.
net_sockstat.go:61
↓ 3 callers
Function
readSysfsFile
(path string)
bcachefs/get.go:469
↓ 2 callers
Method
AerCountersByIface
AerCounters returns info for a single net interfaces (iface).
sysfs/net_class_aer.go:77
↓ 2 callers
Method
AllProcs
AllProcs returns a list of all currently available processes.
proc.go:105
↓ 2 callers
Method
Crypto
Crypto parses an crypto-file (/proc/crypto) and returns a slice of structs containing the relevant info. More information available here: https://ker
crypto.go:56
↓ 2 callers
Method
DMMultipathDevices
DMMultipathDevices discovers DM-multipath devices by scanning sys/block/dm-* and filtering on dm/uuid prefix "mpath-". It returns a slice of DMMultip
blockdevice/dm_multipath.go:57
↓ 2 callers
Method
EcnByIface
EcnByIface returns info for a single net interfaces (iface).
sysfs/net_class_ecn.go:123
↓ 2 callers
Method
FileDescriptorsInfo
FileDescriptorsInfo retrieves information about all file descriptors of the process.
proc.go:312
↓ 2 callers
Method
GetByEndDevice
GetByEndDevice finds the SASPort that contains the provided SAS end device name.
sysfs/class_sas_port.go:126
↓ 2 callers
Method
GetByExpander
GetByExpander finds the SASPort that contains the provided SAS expander name.
sysfs/class_sas_port.go:116
↓ 2 callers
Method
IsComplete
IsComplete returns true if ARP entry is marked with complete flag.
arp.go:115
↓ 2 callers
Method
Limits
Limits returns the current soft limits of the process.
proc_limits.go:89
↓ 2 callers
Method
NetDev
NetDev returns kernel/system statistics read from /proc/net/dev.
net_dev.go:51
↓ 2 callers
Method
NetDevSNMP6
Returns kernel/system statistics read from interface files within the /proc/net/dev_snmp6/ directory.
net_dev_snmp6.go:34
↓ 2 callers
Method
NetSoftnetStat
NetSoftnetStat reads data from /proc/net/softnet_stat.
net_softnet.go:59
↓ 2 callers
Function
NewFS
NewFS returns a new Btrfs filesystem using the given sys fs mount point. It will error if the mount point can't be read.
btrfs/get.go:44
↓ 2 callers
Function
NewFS
NewFS returns a new Bcache using the given sys fs mount point. It will error if the mount point can't be read.
bcache/get.go:42
next →
1–100 of 751, ranked by callers