accounting

package
v0.0.0-...-2081a44 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const COMMLEN = C.ACCT_COMM

Variables

Functions

func Comm

func Comm(b *C.char) string

func Comp2Int

func Comp2Int(c C.comp_t) int64

func Tick

func Tick() int64

Types

type Acct

type Acct struct {
	Comm     string        `json:"comm,omitempty"`
	Utime    time.Duration `json:"utime"`
	Stime    time.Duration `json:"stime"`
	Etime    time.Duration `json:"etime"`
	Btime    time.Time     `json:"btime"`
	Uid      string        `json:"uid,omitempty"`
	Gid      string        `json:"gid,omitempty"`
	Mem      int64         `json:"mem"`
	Io       int64         `json:"io"`
	Flags    Status        `json:"flags"`
	ExitCode uint32        `json:"exitcode"`
	Pid      uint32        `json:"pid"`
	Ppid     uint32        `json:"ppid"`
}

func MakeAcct

func MakeAcct(buf []byte, tick int64) (dest Acct)

func (*Acct) Marshal

func (a *Acct) Marshal() string

func (*Acct) Properties

func (a *Acct) Properties() (m map[string]string)

type Status

type Status uint8
const (
	Fork   Status = C.AFORK
	Su     Status = C.ASU
	Compat Status = C.ACOMPAT
	Core   Status = C.ACORE
	Xsig   Status = C.AXSIG
)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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