Back to

Package syscall

Latest Go to latest

The latest major version is .

Published: Sep 8, 2020 | License: Apache-2.0 | Module:


Package syscall provides functionalities that grpc uses to get low-level operating system stats/info.


func CPUTimeDiff

func CPUTimeDiff(first *Rusage, latest *Rusage) (float64, float64)

CPUTimeDiff returns the differences of user CPU time and system CPU time used between two Rusage structs.

func GetCPUTime

func GetCPUTime() int64

GetCPUTime returns the how much CPU time has passed since the start of this process.

func GetTCPUserTimeout

func GetTCPUserTimeout(conn net.Conn) (opt int, err error)

GetTCPUserTimeout gets the TCP user timeout on a connection's socket

func SetTCPUserTimeout

func SetTCPUserTimeout(conn net.Conn, timeout time.Duration) error

SetTCPUserTimeout sets the TCP user timeout on a connection's socket

type Rusage

type Rusage syscall.Rusage

Rusage is an alias for syscall.Rusage under linux environment.

func GetRusage

func GetRusage() (rusage *Rusage)

GetRusage returns the resource usage of current process.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier