Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/procfs
/ functions
Functions
791 in github.com/prometheus/procfs
⨍
Functions
791
◇
Types & classes
274
↓ 2 callers
Function
SysReadFile
SysReadFile is a simplified os.ReadFile that invokes syscall.Read directly. https://github.com/prometheus/node_exporter/pull/728/files Note that this
internal/parsers/sysreadfile.go:30
↓ 2 callers
Function
SysReadUintFromFile
SysReadUintFromFile reads a file using SysReadFile and attempts to parse a uint64 from it.
internal/parsers/sysreadfile.go:53
↓ 2 callers
Method
SysctlInts
(sysctl string)
proc_sys.go:36
↓ 2 callers
Method
SysctlStrings
(sysctl string)
proc_sys.go:27
↓ 2 callers
Function
assertNilPInt64
assertNilPInt64 checks that a *int64 field is nil.
sysfs/class_power_meter_test.go:178
↓ 2 callers
Function
assertPInt64
assertPInt64 checks that a *int64 field is non-nil and holds the expected value.
sysfs/class_power_meter_test.go:166
↓ 2 callers
Function
binSearch
(elem uint16, elemSlice *[]uint16)
sysfs/system_cpu.go:159
↓ 2 callers
Function
evalComponentDevices
(deviceFields []string)
mdstat.go:328
↓ 2 callers
Method
int64
int64 interprets the underlying value as an int64 and returns that value. TODO: export if/when necessary.
internal/parsers/valueparser.go:52
↓ 2 callers
Function
intToU64
intToU64 convert int to uint64 and return it pointer.
net_udp_test.go:183
↓ 2 callers
Function
isPathEnable
isPathEnable checks if the file "enable" contain enable message.
iscsi/get.go:61
↓ 2 callers
Method
listFiles
listFiles returns a list of files for a directory of the reader.
btrfs/get.go:121
↓ 2 callers
Function
newNetDev
newNetDev creates a new NetDev from the contents of the given file.
net_dev.go:61
↓ 2 callers
Function
newNetDevSNMP6
newNetDevSNMP6 creates a new NetDevSNMP6 from the contents of the given directory.
net_dev_snmp6.go:45
↓ 2 callers
Function
newNetIPSocket
(file string)
net_ip_socket.go:76
↓ 2 callers
Function
newNetIPSocketSummary
newNetIPSocketSummary creates a new NetIPSocket{,6} from the contents of the given file.
net_ip_socket.go:104
↓ 2 callers
Function
newPInt64
(i int64)
vm_test.go:24
↓ 2 callers
Function
newuint64
(i uint64)
crypto_test.go:143
↓ 2 callers
Function
parseAddresses
parseAddresses parses the start-end address.
proc_maps.go:93
↓ 2 callers
Function
parseAerCounters
parseAerCounters scans predefined files in /sys/class/net/<iface>/device directory and gets their contents.
sysfs/net_class_aer.go:116
↓ 2 callers
Method
parseCapabilities
(capabilities []string)
net_protocols.go:148
↓ 2 callers
Function
parseCgroupString
parseCgroupString parses each line of the /proc/[pid]/cgroup file Line format is hierarchyID:[controller1,controller2]:path.
proc_cgroup.go:49
↓ 2 callers
Function
parseCgroupSummaryString
parseCgroupSummary parses each line of the /proc/cgroup file Line format is `subsys_name hierarchy num_cgroups enabled`.
proc_cgroups.go:43
↓ 2 callers
Function
parseCounterFile
(path string)
bcachefs/get.go:327
↓ 2 callers
Function
parseDevice
parseDevice parses the device token of a line and converts it to a dev_t (mkdev) like structure.
proc_maps.go:63
↓ 2 callers
Method
parseLine
(line string)
proc_smaps.go:115
↓ 2 callers
Method
parseLine
parseLine parses a single line from the /proc/net/dev file. Header lines must be filtered prior to calling this method.
net_dev.go:89
↓ 2 callers
Method
parseLine
(rawLine string)
net_protocols.go:98
↓ 2 callers
Function
parseLoad
Parse /proc loadavg and return 1m, 5m and 15m.
loadavg.go:43
↓ 2 callers
Function
parseMDStat
parseMDStat parses data from mdstat file (/proc/mdstat) and returns a slice of structs containing the relevant info.
mdstat.go:103
↓ 2 callers
Function
parseMonDirName
parseMonDirName splits a mon_data directory name into resource and domain id. The name is "mon_<resource>_<id>", for example "mon_L3_00". The resource
resctrlfs/mon_data.go:99
↓ 2 callers
Function
parseNFNetLinkQueueLine
parseNFNetLinkQueueLine parses each line of the /proc/net/netfilter/nfnetlink_queue file.
nfnetlink_queue.go:74
↓ 2 callers
Function
parseNetClassIface
parseNetClassIface scans predefined files in /sys/class/net/<iface> directory and gets their contents.
sysfs/net_class.go:231
↓ 2 callers
Function
parseNetRoute
(r io.Reader)
net_route.go:65
↓ 2 callers
Function
parseNetwork
(v []uint64)
nfs/parse.go:80
↓ 2 callers
Function
parsePSIStats
parsePSIStats parses the specified file for pressure stall information.
proc_psi.go:71
↓ 2 callers
Method
parsePciDevice
Parse one PCI device Refer to https://docs.kernel.org/PCI/sysfs-pci.html
sysfs/pci_device.go:185
↓ 2 callers
Function
parsePciDeviceLocation
(loc string)
sysfs/pci_device.go:148
↓ 2 callers
Function
parsePriorityStats
ParsePriorityStats parses lines from the priority_stats file.
bcache/get.go:221
↓ 2 callers
Function
parseProcNetstat
parseProcNetstat parses the metrics from proc/<pid>/net/netstat file and returns a ProcNetstat structure.
proc_netstat.go:199
↓ 2 callers
Function
parsePseudoFloat
ParsePseudoFloat parses the peculiar format produced by bcache's bch_hprint.
bcache/get.go:92
↓ 2 callers
Function
parseRate
Parse rate (example: "100 Gb/sec (4X EDR)") and return it as bytes/second.
sysfs/class_infiniband.go:253
↓ 2 callers
Function
parseSockstat
parseSockstat reads the contents of a sockstat file and parses a NetSockstat.
net_sockstat.go:79
↓ 2 callers
Function
parseSwapString
(swapString string)
swaps.go:61
↓ 2 callers
Function
parseTainted
parseTainted builds a KernelTainted from the raw taint bitmask value.
kernel_tainted.go:84
↓ 2 callers
Function
parseV2Stats
(v []uint64)
nfs/parse.go:119
↓ 2 callers
Function
parseV3Stats
(v []uint64)
nfs/parse.go:147
↓ 2 callers
Function
parseWritebackRateDebug
ParseWritebackRateDebug parses lines from the writeback_rate_debug file.
bcache/get.go:250
↓ 2 callers
Method
procSMapsRollupManual
Read /proc/pid/smaps and do the roll-up in Go code.
proc_smaps.go:90
↓ 2 callers
Method
readFile
readFile reads a file relative to the path of the reader. Non-existing files are ignored.
btrfs/get.go:99
↓ 2 callers
Function
readNetUNIX
readNetUNIX reads data in /proc/net/unix format from the specified file.
net_unix.go:77
↓ 2 callers
Method
stats
stats retrieves bcache runtime statistics for each bcache and priorityStats flag controls if we need to read priority_stats.
bcache/get.go:67
↓ 2 callers
Function
testNetUNIX
(t *testing.T, testInode bool, got *NetUNIX)
net_unix_test.go:56
↓ 2 callers
Function
validateNetDevSNMP6
(have NetDevSNMP6)
net_dev_snmp6_test.go:53
↓ 1 callers
Method
AerCounters
AerCounters returns AER counters for all net interfaces (iface) read from /sys/class/net/<iface>/device.
sysfs/net_class_aer.go:94
↓ 1 callers
Method
AerCountersByIface
AerCounters returns info for a single net interfaces (iface).
sysfs/net_class_aer.go:77
↓ 1 callers
Method
BuddyInfo
BuddyInfo reads the buddyinfo statistics from the specified `proc` filesystem.
buddyinfo.go:35
↓ 1 callers
Method
CPUInfo
CPUInfo returns information about current system CPUs. See https://www.kernel.org/doc/Documentation/filesystems/proc.txt
cpuinfo.go:67
↓ 1 callers
Method
CPUTime
CPUTime returns the total CPU user and system time in seconds.
proc_stat.go:233
↓ 1 callers
Method
CPUVulnerabilities
CPUVulnerabilities retrieves a map of vulnerability names to their mitigations.
sysfs/vulnerability.go:50
↓ 1 callers
Method
ClassCoolingDeviceStats
()
sysfs/class_cooling_device.go:36
↓ 1 callers
Method
ClassDRMCardAMDGPUStats
ClassDRMCardAMDGPUStats returns DRM card metrics for all amdgpu cards.
sysfs/class_drm_amdgpu.go:68
↓ 1 callers
Method
ClassThermalZoneStats
ClassThermalZoneStats returns Thermal Zone metrics for all zones.
sysfs/class_thermal.go:44
↓ 1 callers
Method
ClockSources
ClockSources returns clocksource information including current and available clocksources read from '/sys/devices/system/clocksource'.
sysfs/clocksource.go:34
↓ 1 callers
Method
CmdLine
CmdLine returns the command line of the kernel.
cmdline.go:23
↓ 1 callers
Method
CmdLine
CmdLine returns the command line of a process.
proc.go:130
↓ 1 callers
Method
Comm
Comm returns the command name of a process.
proc.go:165
↓ 1 callers
Method
Cwd
Cwd returns the absolute path to the current working directory of the process.
proc.go:185
↓ 1 callers
Method
DMIClass
DMIClass returns Desktop Management Interface (DMI) information read from /sys/class/dmi.
sysfs/class_dmi.go:54
↓ 1 callers
Method
DRMCardClass
DRMCardClass returns infos for all DRM devices read from sys/class/drm.
sysfs/class_drm_card.go:53
↓ 1 callers
Method
DataBytes
DataBytes returns the process of data + stack size in bytes.
proc_statm.go:115
↓ 1 callers
Method
EcnByIface
EcnByIface returns info for a single net interfaces (iface).
sysfs/net_class_ecn.go:123
↓ 1 callers
Method
EcnDevices
EcnDevices returns EcnIface for all net interfaces (iface) read from /sys/class/net/<iface>/ecn.
sysfs/net_class_ecn.go:150
↓ 1 callers
Method
Environ
Environ reads process environments from `/proc/<pid>/environ`.
proc_environ.go:23
↓ 1 callers
Method
Executable
Executable returns the absolute path of the executable command of a process.
proc.go:175
↓ 1 callers
Method
FDInfo
FDInfo constructor. On kernels older than 3.8, InotifyInfos will always be empty.
proc_fdinfo.go:51
↓ 1 callers
Method
FibreChannelClass
FibreChannelClass parses everything in /sys/class/fc_host.
sysfs/class_fibrechannel.go:65
↓ 1 callers
Method
FileDescriptorTargets
FileDescriptorTargets returns the targets of all file descriptors of a process. If a file descriptor is not a symlink to a file (like a socket), that
proc.go:225
↓ 1 callers
Method
FileDescriptors
FileDescriptors returns the currently open file descriptors of a process.
proc.go:205
↓ 1 callers
Method
FileDescriptorsLen
FileDescriptorsLen returns the number of currently open file descriptors of a process.
proc.go:245
↓ 1 callers
Method
Fscacheinfo
Fscacheinfo returns information about current fscache statistics. See https://www.kernel.org/doc/Documentation/filesystems/caching/fscache.txt
fscache.go:231
↓ 1 callers
Method
GatherARPEntries
GatherARPEntries retrieves all the ARP entries, parse the relevant columns, and then return a slice of ARPEntry's.
arp.go:55
↓ 1 callers
Method
GetByEndDevice
GetByEndDevice finds the SASPort that contains the provided SAS end device name.
sysfs/class_sas_port.go:126
↓ 1 callers
Method
GetByExpander
GetByExpander finds the SASPort that contains the provided SAS expander name.
sysfs/class_sas_port.go:116
↓ 1 callers
Method
GetEnergyMicrojoules
GetEnergyMicrojoules returns the current microjoule value from the zone energy counter https://www.kernel.org/doc/Documentation/power/powercap/powerca
sysfs/class_powercap.go:92
↓ 1 callers
Method
GetFileioUdev
GetFileioUdev is getting the actual info to build up the FILEIO data and match with the enable target.
iscsi/get.go:135
↓ 1 callers
Method
GetIblockUdev
GetIblockUdev is getting the actual info to build up the IBLOCK data and match with the enable target.
iscsi/get.go:157
↓ 1 callers
Method
GetMounts
GetMounts retrieves mountinfo information from `/proc/self/mountinfo`.
mountinfo.go:192
↓ 1 callers
Method
GetProcMounts
GetProcMounts retrieves mountinfo information from a processes' `/proc/<pid>/mountinfo`.
mountinfo.go:201
↓ 1 callers
Method
GetRBDMatch
GetRBDMatch is getting the actual info to build up the RBD data and match with the enable target.
iscsi/get.go:179
↓ 1 callers
Method
GetRDMCPPath
GetRDMCPPath is getting the actual info to build up RDMCP data.
iscsi/get.go:222
↓ 1 callers
Function
GetStats
GetStats collects all Btrfs statistics from sysfs.
btrfs/get.go:81
↓ 1 callers
Function
GetStats
GetStats collects from sysfs files data tied to one bcache ID.
bcache/get.go:376
↓ 1 callers
Function
GetStats
GetStats collects all Bcachefs statistics from sysfs.
bcachefs/get.go:79
↓ 1 callers
Function
GetStats
GetStats is the main iscsi status information func for building the path and prepare info for enable iscsi.
iscsi/get.go:30
↓ 1 callers
Method
IO
IO creates a new ProcIO instance from a given Proc instance.
proc_io.go:43
↓ 1 callers
Method
IPVSBackendStatus
IPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem.
ipvs.go:126
↓ 1 callers
Method
IPVSStats
IPVSStats reads the IPVS statistics from the specified `proc` filesystem.
ipvs.go:68
↓ 1 callers
Method
ISCSIStats
ISCSIStats getting iscsi runtime information.
iscsi/iscsi.go:72
↓ 1 callers
Method
InotifyWatchLen
InotifyWatchLen returns the total number of inotify watches.
proc_fdinfo.go:132
← previous
next →
101–200 of 791, ranked by callers