Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProcLockColPriority = iota ProcLockColType ProcLockColExclusive ProcLockColPID ProcLockColInode ProcLockColByteStart ProcLockColByteEnd )
View Source
const ( ProcStateRunning = 'R' ProcStateSleeping = 'S' ProcStateWaiting = 'D' ProcStateZombie = 'Z' ProcStateStopped = 'T' ProcStateTraceStopped = 't' ProcStatePaging = 'W' ProcStateLegacyDead = 'X' ProcStateDead = 'x' ProcStateWakekill = 'K' ProcStateWaking = 'W' ProcStateParked = 'P' )
View Source
const FmtProcCmdlineFile = "/proc/%d/cmdline"
View Source
const FmtProcCwdFile = "/proc/%d/cwd"
View Source
const FmtProcEnvFile = "/proc/%d/environ"
View Source
const FmtProcLocks = "%d: %s %s %s %d %x:%x:%d"
View Source
const FmtProcPidStat = "%d %s %c %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d"
position 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
View Source
const FmtProcStatFile = "/proc/%d/stat"
View Source
const (
ProcLock = "/proc/locks"
)
Variables ¶
View Source
var (
ErrPermissionDenied = errors.New("cannot read /proc/locks")
)
View Source
var FileLocks = fileLocksType{ // contains filtered or unexported fields }
View Source
var TestData_CheckInode_Processes = map[uint64][]Process{ 810: []Process{ { Pid: 5623, OriginalName: "slack", State: 'S', Cwd: "/proc/lol/fd", PPid: 2770, UserTime: 1, KernelTime: 286, Nice: 20, Cmdline: []string{"/usr/lib/slack/slack"}, Env: []string{ "slack", "", "", "\n", }, }, }, 1088: []Process{ { Pid: 5705, OriginalName: "chrome", State: 'S', Cwd: "/proc/5715/fdinfo", PPid: 5680, UserTime: 0, KernelTime: 2, Nice: 20, Cmdline: []string{ "/opt/google/chrome/chrome --type=zygote --enable-crash-reporter=4d5673fa-4274-4096-a4f8-0c3f692622fa,", "", }, Env: []string{ "", "", "", "", "", "\n", }, }, }, 23600664: []Process{ { Pid: 8819, OriginalName: "code", State: 'S', Cwd: "/proc/notthere", PPid: 1, UserTime: 1, KernelTime: 578, Nice: 20, Cmdline: []string{"/usr/share/code/code .", ""}, Env: []string{ "", "", "", "", "", "\n", }, }, }, }
View Source
var Testdata_Lock = []Lock{ Lock{ Priority: 41, ByteRange: false, Exclusive: true, PID: 5623, DevMajor: 0x00, DevMinor: 0x17, Inode: 810, }, Lock{ Priority: 42, ByteRange: true, Exclusive: false, PID: 5705, DevMajor: 0x00, DevMinor: 0x17, Inode: 1088, }, Lock{ Priority: 61, ByteRange: false, Exclusive: true, PID: 8819, DevMajor: 0xfd, DevMinor: 0x01, Inode: 23600664, }, }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.