package process
import "github.com/shirou/gopsutil/v4/process"
SPDX-License-Identifier: BSD-3-Clause
Index ¶
- Constants
- Variables
- func EnableBootTimeCache(enable bool)
- func PidExists(pid int32) (bool, error)
- func PidExistsWithContext(ctx context.Context, pid int32) (bool, error)
- func Pids() ([]int32, error)
- func PidsWithContext(ctx context.Context) ([]int32, error)
- type AuMask
- type AuTidAddr
- type Au_session
- type AuditinfoAddr
- type Eproc
- type ExternProc
- type IOCountersStat
- type Itimerval
- type KinfoProc
- type Label
- type MemoryInfoExStat
- type MemoryInfoStat
- type MemoryMapsStat
- type NumCtxSwitchesStat
- type OpenFilesStat
- type PageFaultsStat
- type Pgrp
- type Posix_cred
- type Proc
- type ProcTaskInfo
- type Process
- func NewProcess(pid int32) (*Process, error)
- func NewProcessWithContext(ctx context.Context, pid int32) (*Process, error)
- func Processes() ([]*Process, error)
- func ProcessesWithContext(ctx context.Context) ([]*Process, error)
- func (p *Process) Background() (bool, error)
- func (p *Process) BackgroundWithContext(ctx context.Context) (bool, error)
- func (p *Process) CPUAffinity() ([]int32, error)
- func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error)
- func (p *Process) CPUPercent() (float64, error)
- func (p *Process) CPUPercentWithContext(ctx context.Context) (float64, error)
- func (p *Process) Children() ([]*Process, error)
- func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error)
- func (p *Process) Cmdline() (string, error)
- func (p *Process) CmdlineSlice() ([]string, error)
- func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error)
- func (p *Process) CmdlineWithContext(ctx context.Context) (string, error)
- func (p *Process) Connections() ([]net.ConnectionStat, error)
- func (p *Process) ConnectionsMax(maxConn int) ([]net.ConnectionStat, error)
- func (p *Process) ConnectionsMaxWithContext(ctx context.Context, maxConn int) ([]net.ConnectionStat, error)
- func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error)
- func (p *Process) CreateTime() (int64, error)
- func (p *Process) CreateTimeWithContext(ctx context.Context) (int64, error)
- func (p *Process) Cwd() (string, error)
- func (p *Process) CwdWithContext(_ context.Context) (string, error)
- func (p *Process) Environ() ([]string, error)
- func (p *Process) EnvironWithContext(_ context.Context) ([]string, error)
- func (p *Process) Exe() (string, error)
- func (p *Process) ExeWithContext(_ context.Context) (string, error)
- func (p *Process) Foreground() (bool, error)
- func (p *Process) ForegroundWithContext(ctx context.Context) (bool, error)
- func (p *Process) Gids() ([]uint32, error)
- func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error)
- func (p *Process) Groups() ([]uint32, error)
- func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error)
- func (p *Process) IOCounters() (*IOCountersStat, error)
- func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error)
- func (p *Process) IOnice() (int32, error)
- func (p *Process) IOniceWithContext(_ context.Context) (int32, error)
- func (p *Process) IsRunning() (bool, error)
- func (p *Process) IsRunningWithContext(ctx context.Context) (bool, error)
- func (p *Process) Kill() error
- func (p *Process) KillWithContext(ctx context.Context) error
- func (p *Process) MemoryInfo() (*MemoryInfoStat, error)
- func (p *Process) MemoryInfoEx() (*MemoryInfoExStat, error)
- func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error)
- func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error)
- func (p *Process) MemoryMaps(grouped bool) (*[]MemoryMapsStat, error)
- func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error)
- func (p *Process) MemoryPercent() (float32, error)
- func (p *Process) MemoryPercentWithContext(ctx context.Context) (float32, error)
- func (p *Process) Name() (string, error)
- func (p *Process) NameWithContext(ctx context.Context) (string, error)
- func (p *Process) Nice() (int32, error)
- func (p *Process) NiceWithContext(_ context.Context) (int32, error)
- func (p *Process) NumCtxSwitches() (*NumCtxSwitchesStat, error)
- func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error)
- func (p *Process) NumFDs() (int32, error)
- func (p *Process) NumFDsWithContext(_ context.Context) (int32, error)
- func (p *Process) NumThreads() (int32, error)
- func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error)
- func (p *Process) OpenFiles() ([]OpenFilesStat, error)
- func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error)
- func (p *Process) PageFaults() (*PageFaultsStat, error)
- func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error)
- func (p *Process) Parent() (*Process, error)
- func (p *Process) ParentWithContext(ctx context.Context) (*Process, error)
- func (p *Process) Percent(interval time.Duration) (float64, error)
- func (p *Process) PercentWithContext(ctx context.Context, interval time.Duration) (float64, error)
- func (p *Process) Ppid() (int32, error)
- func (p *Process) PpidWithContext(_ context.Context) (int32, error)
- func (p *Process) Resume() error
- func (p *Process) ResumeWithContext(ctx context.Context) error
- func (p *Process) Rlimit() ([]RlimitStat, error)
- func (p *Process) RlimitUsage(gatherUsed bool) ([]RlimitStat, error)
- func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error)
- func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error)
- func (p *Process) SendSignal(sig Signal) error
- func (p *Process) SendSignalWithContext(_ context.Context, sig syscall.Signal) error
- func (p *Process) Status() ([]string, error)
- func (p *Process) StatusWithContext(ctx context.Context) ([]string, error)
- func (p Process) String() string
- func (p *Process) Suspend() error
- func (p *Process) SuspendWithContext(ctx context.Context) error
- func (p *Process) Terminal() (string, error)
- func (p *Process) TerminalWithContext(_ context.Context) (string, error)
- func (p *Process) Terminate() error
- func (p *Process) TerminateWithContext(ctx context.Context) error
- func (p *Process) Tgid() (int32, error)
- func (p *Process) TgidWithContext(_ context.Context) (int32, error)
- func (p *Process) Threads() (map[int32]*cpu.TimesStat, error)
- func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error)
- func (p *Process) Times() (*cpu.TimesStat, error)
- func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error)
- func (p *Process) Uids() ([]uint32, error)
- func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error)
- func (p *Process) Username() (string, error)
- func (p *Process) UsernameWithContext(ctx context.Context) (string, error)
- type Rlimit
- type RlimitStat
- type Rusage
- type Session
- type Sigacts
- type Signal
- type SignalInfoStat
- type Timespec
- type Timeval
- type UGid_t
- type UcredQueue
- type Upcred
- type UserStruct
- type Uucred
- type Vmspace
- type Vnode
Constants ¶
const ( // Running marks a task a running or runnable (on the run queue) Running = "running" // Blocked marks a task waiting on a short, uninterruptible operation (usually I/O) Blocked = "blocked" // Idle marks a task sleeping for more than about 20 seconds Idle = "idle" // Lock marks a task waiting to acquire a lock Lock = "lock" // Sleep marks task waiting for short, interruptible operation Sleep = "sleep" // Stop marks a stopped process Stop = "stop" // Wait marks an idle interrupt thread (or paging in pre 2.6.xx Linux) Wait = "wait" // Zombie marks a defunct process, terminated but not reaped by its parent Zombie = "zombie" // Solaris states. See https://github.com/collectd/collectd/blob/1da3305c10c8ff9a63081284cf3d4bb0f6daffd8/src/processes.c#L2115 Daemon = "daemon" Detached = "detached" System = "system" Orphan = "orphan" UnknownState = "" )
Process status
const ( RLIMIT_CPU int32 = 0 RLIMIT_FSIZE int32 = 1 RLIMIT_DATA int32 = 2 RLIMIT_STACK int32 = 3 RLIMIT_CORE int32 = 4 RLIMIT_RSS int32 = 5 RLIMIT_NPROC int32 = 6 RLIMIT_NOFILE int32 = 7 RLIMIT_MEMLOCK int32 = 8 RLIMIT_AS int32 = 9 RLIMIT_LOCKS int32 = 10 RLIMIT_SIGPENDING int32 = 11 RLIMIT_MSGQUEUE int32 = 12 RLIMIT_NICE int32 = 13 RLIMIT_RTPRIO int32 = 14 RLIMIT_RTTIME int32 = 15 )
Resource limit constants are from /usr/include/x86_64-linux-gnu/bits/resource.h from libc6-dev package in Ubuntu 16.10
const ( CTLKern = 1 // "high kernel": proc, limits KernProc = 14 // struct: process entries KernProcPID = 1 // by process id KernProcProc = 8 // only return procs KernProcAll = 0 // everything KernProcPathname = 12 // path to executable )
copied from sys/sysctl.h
Variables ¶
var ( ErrorNoChildren = errors.New("process does not have children") // Deprecated: ErrorNoChildren is never returned by process.Children(), check its returned []*Process slice length instead ErrorProcessNotRunning = errors.New("process does not exist") ErrorNotPermitted = errors.New("operation not permitted") )
Functions ¶
func EnableBootTimeCache ¶
func EnableBootTimeCache(enable bool)
EnableBootTimeCache change cache behavior of BootTime. If true, cache BootTime value. Default is false.
func PidExists ¶
func PidExistsWithContext ¶
func Pids ¶
Pids returns a slice of process ID list which are running now.
func PidsWithContext ¶
Types ¶
type AuMask ¶
type AuTidAddr ¶
type Au_session ¶
type Au_session struct { Aia_p *AuditinfoAddr Mask AuMask }
type AuditinfoAddr ¶
type Eproc ¶
type Eproc struct { Paddr *uint64 Sess *Session Pcred Upcred Ucred Uucred Pad_cgo_0 [4]byte Vm Vmspace Ppid int32 Pgid int32 Jobc int16 Pad_cgo_1 [2]byte Tdev int32 Tpgid int32 Pad_cgo_2 [4]byte Tsess *Session Wmesg [8]int8 Xsize int32 Xrssize int16 Xccount int16 Xswrss int16 Pad_cgo_3 [2]byte Flag int32 Login [12]int8 Spare [4]int32 Pad_cgo_4 [4]byte }
type ExternProc ¶
type ExternProc struct { P_un [16]byte P_vmspace uint64 P_sigacts uint64 Pad_cgo_0 [3]byte P_flag int32 P_stat int8 P_pid int32 P_oppid int32 P_dupfd int32 Pad_cgo_1 [4]byte User_stack uint64 Exit_thread uint64 P_debugger int32 Sigwait int32 P_estcpu uint32 P_cpticks int32 P_pctcpu uint32 Pad_cgo_2 [4]byte P_wchan uint64 P_wmesg uint64 P_swtime uint32 P_slptime uint32 P_realtimer Itimerval P_rtime Timeval P_uticks uint64 P_sticks uint64 P_iticks uint64 P_traceflag int32 Pad_cgo_3 [4]byte P_tracep uint64 P_siglist int32 Pad_cgo_4 [4]byte P_textvp uint64 P_holdcnt int32 P_sigmask uint32 P_sigignore uint32 P_sigcatch uint32 P_priority uint8 P_usrpri uint8 P_nice int8 P_comm [17]int8 Pad_cgo_5 [4]byte P_pgrp uint64 P_addr uint64 P_xstat uint16 P_acflag uint16 Pad_cgo_6 [4]byte P_ru uint64 }
type IOCountersStat ¶
type IOCountersStat struct { // ReadCount is a number of read I/O operations such as syscalls. ReadCount uint64 `json:"readCount"` // WriteCount is a number of read I/O operations such as syscalls. WriteCount uint64 `json:"writeCount"` // ReadBytes is a number of all I/O read in bytes. This includes disk I/O on Linux and Windows. ReadBytes uint64 `json:"readBytes"` // WriteBytes is a number of all I/O write in bytes. This includes disk I/O on Linux and Windows. WriteBytes uint64 `json:"writeBytes"` // DiskReadBytes is a number of disk I/O write in bytes. Currently only Linux has this value. DiskReadBytes uint64 `json:"diskReadBytes"` // DiskWriteBytes is a number of disk I/O read in bytes. Currently only Linux has this value. DiskWriteBytes uint64 `json:"diskWriteBytes"` }
func (IOCountersStat) String ¶
func (i IOCountersStat) String() string
type Itimerval ¶
type KinfoProc ¶
type KinfoProc struct { Proc ExternProc Eproc Eproc }
type Label ¶
type Label struct{}
type MemoryInfoExStat ¶
type MemoryInfoExStat struct{}
type MemoryInfoStat ¶
type MemoryInfoStat struct { RSS uint64 `json:"rss"` // bytes VMS uint64 `json:"vms"` // bytes HWM uint64 `json:"hwm"` // bytes Data uint64 `json:"data"` // bytes Stack uint64 `json:"stack"` // bytes Locked uint64 `json:"locked"` // bytes Swap uint64 `json:"swap"` // bytes }
func (MemoryInfoStat) String ¶
func (m MemoryInfoStat) String() string
type MemoryMapsStat ¶
type MemoryMapsStat struct{}
type NumCtxSwitchesStat ¶
type NumCtxSwitchesStat struct { Voluntary int64 `json:"voluntary"` Involuntary int64 `json:"involuntary"` }
func (NumCtxSwitchesStat) String ¶
func (p NumCtxSwitchesStat) String() string
type OpenFilesStat ¶
func (OpenFilesStat) String ¶
func (o OpenFilesStat) String() string
type PageFaultsStat ¶
type PageFaultsStat struct { MinorFaults uint64 `json:"minorFaults"` MajorFaults uint64 `json:"majorFaults"` ChildMinorFaults uint64 `json:"childMinorFaults"` ChildMajorFaults uint64 `json:"childMajorFaults"` }
type Pgrp ¶
type Pgrp struct{}
type Posix_cred ¶
type Posix_cred struct { UID uint32 Ruid uint32 Svuid uint32 Ngroups int16 Pad_cgo_0 [2]byte Groups [16]uint32 Rgid uint32 Svgid uint32 Gmuid uint32 Flags int32 }
type Proc ¶
type Proc struct{}
type ProcTaskInfo ¶
type ProcTaskInfo struct { Virtual_size uint64 Resident_size uint64 Total_user uint64 Total_system uint64 Threads_user uint64 Threads_system uint64 Policy int32 Faults int32 Pageins int32 Cow_faults int32 Messages_sent int32 Messages_received int32 Syscalls_mach int32 Syscalls_unix int32 Csw int32 Threadnum int32 Numrunning int32 Priority int32 }
type Process ¶
type Process struct { Pid int32 `json:"pid"` // contains filtered or unexported fields }
func NewProcess ¶
NewProcess creates a new Process instance, it only stores the pid and checks that the process exists. Other method on Process can be used to get more information about the process. An error will be returned if the process does not exist.
func NewProcessWithContext ¶
func Processes ¶
Processes returns a slice of pointers to Process structs for all currently running processes.
func ProcessesWithContext ¶
func (*Process) Background ¶
Background returns true if the process is in background, false otherwise.
func (*Process) BackgroundWithContext ¶
func (*Process) CPUAffinity ¶
CPUAffinity returns CPU affinity of the process.
func (*Process) CPUAffinityWithContext ¶
func (*Process) CPUPercent ¶
CPUPercent returns how many percent of the CPU time this process uses
func (*Process) CPUPercentWithContext ¶
func (*Process) Children ¶
Children returns the children of the process represented as a slice of pointers to Process type.
func (*Process) ChildrenWithContext ¶
func (*Process) Cmdline ¶
Cmdline returns the command line arguments of the process as a string with each argument separated by 0x20 ascii character.
func (*Process) CmdlineSlice ¶
CmdlineSlice returns the command line arguments of the process as a slice with each element being an argument.
On Windows, this assumes the command line is encoded according to the convention accepted by golang.org/x/sys/windows.CmdlineToArgv (the most common convention). If this is not suitable, you should instead use Process.Cmdline and parse the command line according to your specific requirements.
func (*Process) CmdlineSliceWithContext ¶
func (*Process) CmdlineWithContext ¶
func (*Process) Connections ¶
func (p *Process) Connections() ([]net.ConnectionStat, error)
Connections returns a slice of net.ConnectionStat used by the process. This returns all kind of the connection. This means TCP, UDP or UNIX.
func (*Process) ConnectionsMax ¶
func (p *Process) ConnectionsMax(maxConn int) ([]net.ConnectionStat, error)
ConnectionsMax returns a slice of net.ConnectionStat used by the process at most `max`.
func (*Process) ConnectionsMaxWithContext ¶
func (p *Process) ConnectionsMaxWithContext(ctx context.Context, maxConn int) ([]net.ConnectionStat, error)
func (*Process) ConnectionsWithContext ¶
func (*Process) CreateTime ¶
CreateTime returns created time of the process in milliseconds since the epoch, in UTC.
func (*Process) CreateTimeWithContext ¶
func (*Process) Cwd ¶
Cwd returns current working directory of the process.
func (*Process) CwdWithContext ¶
CwdWithContext retrieves the Current Working Directory for the given process. It uses the proc_pidinfo from libproc and will only work for processes the EUID can access. Otherwise "operation not permitted" will be returned as the error. Note: This might also work for other *BSD OSs.
func (*Process) Environ ¶
Environ returns the environment variables of the process.
func (*Process) EnvironWithContext ¶
func (*Process) Exe ¶
Exe returns executable path of the process.
func (*Process) ExeWithContext ¶
func (*Process) Foreground ¶
Foreground returns true if the process is in foreground, false otherwise.
func (*Process) ForegroundWithContext ¶
func (*Process) Gids ¶
Gids returns group ids of the process as a slice of the int
func (*Process) GidsWithContext ¶
func (*Process) Groups ¶
Groups returns all group IDs(include supplementary groups) of the process as a slice of the int
func (*Process) GroupsWithContext ¶
func (*Process) IOCounters ¶
func (p *Process) IOCounters() (*IOCountersStat, error)
IOCounters returns IO Counters.
func (*Process) IOCountersWithContext ¶
func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error)
func (*Process) IOnice ¶
IOnice returns process I/O nice value (priority).
func (*Process) IOniceWithContext ¶
func (*Process) IsRunning ¶
IsRunning returns whether the process is still running or not.
func (*Process) IsRunningWithContext ¶
func (*Process) Kill ¶
Kill sends SIGKILL to the process.
func (*Process) KillWithContext ¶
func (*Process) MemoryInfo ¶
func (p *Process) MemoryInfo() (*MemoryInfoStat, error)
MemoryInfo returns generic process memory information, such as RSS and VMS.
func (*Process) MemoryInfoEx ¶
func (p *Process) MemoryInfoEx() (*MemoryInfoExStat, error)
MemoryInfoEx returns platform-specific process memory information.
func (*Process) MemoryInfoExWithContext ¶
func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error)
func (*Process) MemoryInfoWithContext ¶
func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error)
func (*Process) MemoryMaps ¶
func (p *Process) MemoryMaps(grouped bool) (*[]MemoryMapsStat, error)
MemoryMaps get memory maps from /proc/(pid)/smaps
func (*Process) MemoryMapsWithContext ¶
func (*Process) MemoryPercent ¶
MemoryPercent returns how many percent of the total RAM this process uses
func (*Process) MemoryPercentWithContext ¶
func (*Process) Name ¶
Name returns name of the process.
func (*Process) NameWithContext ¶
func (*Process) Nice ¶
Nice returns a nice value (priority).
func (*Process) NiceWithContext ¶
func (*Process) NumCtxSwitches ¶
func (p *Process) NumCtxSwitches() (*NumCtxSwitchesStat, error)
NumCtxSwitches returns the number of the context switches of the process.
func (*Process) NumCtxSwitchesWithContext ¶
func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error)
func (*Process) NumFDs ¶
NumFDs returns the number of File Descriptors used by the process.
func (*Process) NumFDsWithContext ¶
func (*Process) NumThreads ¶
NumThreads returns the number of threads used by the process.
func (*Process) NumThreadsWithContext ¶
func (*Process) OpenFiles ¶
func (p *Process) OpenFiles() ([]OpenFilesStat, error)
OpenFiles returns a slice of OpenFilesStat opend by the process. OpenFilesStat includes a file path and file descriptor.
func (*Process) OpenFilesWithContext ¶
func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error)
func (*Process) PageFaults ¶
func (p *Process) PageFaults() (*PageFaultsStat, error)
PageFaults returns the process's page fault counters.
func (*Process) PageFaultsWithContext ¶
func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error)
func (*Process) Parent ¶
Parent returns parent Process of the process.
func (*Process) ParentWithContext ¶
ParentWithContext returns parent Process of the process.
func (*Process) Percent ¶
If interval is 0, return difference from last call(non-blocking). If interval > 0, wait interval sec and return difference between start and end.
func (*Process) PercentWithContext ¶
func (*Process) Ppid ¶
Ppid returns Parent Process ID of the process.
func (*Process) PpidWithContext ¶
func (*Process) Resume ¶
Resume sends SIGCONT to the process.
func (*Process) ResumeWithContext ¶
func (*Process) Rlimit ¶
func (p *Process) Rlimit() ([]RlimitStat, error)
Rlimit returns Resource Limits.
func (*Process) RlimitUsage ¶
func (p *Process) RlimitUsage(gatherUsed bool) ([]RlimitStat, error)
RlimitUsage returns Resource Limits. If gatherUsed is true, the currently used value will be gathered and added to the resulting RlimitStat.
func (*Process) RlimitUsageWithContext ¶
func (*Process) RlimitWithContext ¶
func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error)
func (*Process) SendSignal ¶
SendSignal sends a unix.Signal to the process.
func (*Process) SendSignalWithContext ¶
func (*Process) Status ¶
Status returns the process status. Return value could be one of these. R: Running S: Sleep T: Stop I: Idle Z: Zombie W: Wait L: Lock The character is same within all supported platforms.
func (*Process) StatusWithContext ¶
func (Process) String ¶
func (*Process) Suspend ¶
Suspend sends SIGSTOP to the process.
func (*Process) SuspendWithContext ¶
func (*Process) Terminal ¶
Terminal returns a terminal which is associated with the process.
func (*Process) TerminalWithContext ¶
func (*Process) Terminate ¶
Terminate sends SIGTERM to the process.
func (*Process) TerminateWithContext ¶
func (*Process) Tgid ¶
Tgid returns thread group id of the process.
func (*Process) TgidWithContext ¶
func (*Process) Threads ¶
func (*Process) ThreadsWithContext ¶
func (*Process) Times ¶
Times returns CPU times of the process.
func (*Process) TimesWithContext ¶
func (*Process) Uids ¶
Uids returns user ids of the process as a slice of the int
func (*Process) UidsWithContext ¶
func (*Process) Username ¶
Username returns a username of the process.
func (*Process) UsernameWithContext ¶
type Rlimit ¶
type RlimitStat ¶
type RlimitStat struct { Resource int32 `json:"resource"` Soft uint64 `json:"soft"` Hard uint64 `json:"hard"` Used uint64 `json:"used"` }
func (RlimitStat) String ¶
func (r RlimitStat) String() string
type Rusage ¶
type Rusage struct { Utime Timeval Stime Timeval Maxrss int64 Ixrss int64 Idrss int64 Isrss int64 Minflt int64 Majflt int64 Nswap int64 Inblock int64 Oublock int64 Msgsnd int64 Msgrcv int64 Nsignals int64 Nvcsw int64 Nivcsw int64 }
type Session ¶
type Session struct{}
type Sigacts ¶
type Sigacts struct{}
type Signal ¶
type SignalInfoStat ¶
type SignalInfoStat struct { PendingProcess uint64 `json:"pending_process"` PendingThread uint64 `json:"pending_thread"` Blocked uint64 `json:"blocked"` Ignored uint64 `json:"ignored"` Caught uint64 `json:"caught"` }
type Timespec ¶
type Timeval ¶
type UGid_t ¶
type UGid_t uint32
type UcredQueue ¶
type UcredQueue struct { Next *ucred Prev **ucred }
type Upcred ¶
type Upcred struct { Pc_lock [72]int8 Pc_ucred *ucred P_ruid uint32 P_svuid uint32 P_rgid uint32 P_svgid uint32 P_refcnt int32 Pad_cgo_0 [4]byte }
type UserStruct ¶
type UserStruct struct{}
type Uucred ¶
type Vmspace ¶
type Vmspace struct { Dummy int32 Pad_cgo_0 [4]byte Dummy2 *int8 Dummy3 [5]int32 Pad_cgo_1 [4]byte Dummy4 [3]*int8 }
type Vnode ¶
type Vnode struct{}
Source Files ¶
process.go process_bsd.go process_darwin.go process_darwin_amd64.go process_posix.go
- Version
- v4.25.3 (latest)
- Published
- Mar 31, 2025
- Platform
- darwin/amd64
- Imports
- 22 packages
- Last checked
- 1 week ago –
Tools for package owners.