package process
import "github.com/shirou/gopsutil/process"
Index ¶
- func PidExists(pid int32) (bool, error)
- type IOCountersStat
- type MemoryInfoStat
- type NumCtxSwitchesStat
- type OpenFilesStat
- type Process
- func (p *Process) MemoryPercent() (float32, error)
- func (p *Process) Percent(interval time.Duration) (float64, error)
- func (p Process) String() string
- type RlimitStat
Functions ¶
func PidExists ¶
Types ¶
type IOCountersStat ¶
type IOCountersStat struct { ReadCount uint64 `json:"readCount"` WriteCount uint64 `json:"writeCount"` ReadBytes uint64 `json:"readBytes"` WriteBytes uint64 `json:"writeBytes"` }
func (IOCountersStat) String ¶
func (i IOCountersStat) String() string
type MemoryInfoStat ¶
type MemoryInfoStat struct { RSS uint64 `json:"rss"` // bytes VMS uint64 `json:"vms"` // bytes Swap uint64 `json:"swap"` // bytes }
func (MemoryInfoStat) String ¶
func (m MemoryInfoStat) String() string
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 Process ¶
type Process struct { Pid int32 `json:"pid"` // contains filtered or unexported fields }
func (*Process) MemoryPercent ¶
MemoryPercent returns how many percent of the total RAM this process uses
func (*Process) Percent ¶
If interval is 0, return difference from last call(non-blocking). If interval > 0, wait interval sec and return diffrence between start and end.
func (Process) String ¶
type RlimitStat ¶
type RlimitStat struct { Resource int32 `json:"resource"` Soft int32 `json:"soft"` Hard int32 `json:"hard"` }
func (RlimitStat) String ¶
func (r RlimitStat) String() string
Source Files ¶
- Version
- v2.0.0+incompatible
- Published
- Apr 7, 2016
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 13 hours ago –
Tools for package owners.