xtcpstater

package
v0.0.0-...-2036b99 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPSStats

func GetPSStats(pid string, psPath string, testing bool, testfile string) (pcpu string, pmem string, rss string, sz string)

GetPSStats runs "/bin/ps --no-headers -o pcpu,pmem,rss,sz -p $PID" to grap - PCPU % - PMEM % - RSS ( Resident set size. This is the non-swapped physical memory used by the process) - SZ ( Size in RAM pages of the process image)

func GetSystemCtlStatus

func GetSystemCtlStatus(systemctlPath string, testing bool, testfile string) (pid string, tasks string)

GetSystemCtlStatus runs "systemctl status xtcp.service" and returns pid, tasks, memory (in MBs) When called with test=true it reads from a file "./fake_systemctl_status"

func ParseGetSystemCtlStatus

func ParseGetSystemCtlStatus(lines []string) (pid string, tasks string)

ParseGetSystemCtlStatus parses the output of "systemctl status xtcp.service"

func XTCPStater

func XTCPStater(cliFlags cliflags.CliFlags) bool

XTCPStater sets up Prometheus metrics and emits statsd metrics This function polls at *cliFlags.XTCPStaterFrequencySeconds

Types

This section is empty.

Jump to

Keyboard shortcuts

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