proc

package
v0.0.0-...-fa37e54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootTime

func BootTime() (int64, error)

BootTime returns timestamps when machine was started

func CPUTick

func CPUTick() (t int64)

CPUTick returns the total number of Jiffies

func ClockTicks

func ClockTicks() int64

ClockTicks returns ticks per clock cycle

func CmdFromPID

func CmdFromPID(pid int) string

CmdFromPID returns cmd which initiated the process

func GetRAMMemoryInfo

func GetRAMMemoryInfo() (total int64, free int64, available int64)

GetRAMMemoryInfo returns memory information of RAM

func NumberCPUCores

func NumberCPUCores() (n int)

NumberCPUCores returns number of CPU cores

func TimeOfDay

func TimeOfDay() int64

TimeOfDay returns current time-stamp

func UIDFromPID

func UIDFromPID(pid int) (uid int)

UIDFromPID returns user id (UID) for a given process id (PID)

Types

type PIDInfo

type PIDInfo struct {
	PID       int
	Command   string
	UsedTime  int64
	StartTime int64
	UpTime    int64
}

PIDInfo is a collection of properties for a process

func InfoFromPid

func InfoFromPid(pid int) PIDInfo

InfoFromPid returns used time (int) and command (string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL