common

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CloudfuseStats    = "cloudfuse_stats"
	FileCacheMon      = "file_cache_monitor"
	CpuProfiler       = "cpu_profiler"
	MemoryProfiler    = "memory_profiler"
	CpuMemoryProfiler = "cpu_mem_profiler"
	NetworkProfiler   = "network_profiler"

	CfuseMon = "cfusemon"

	OutputFileName      = "monitor"
	OutputFileExtension = "json"
	OutputFileCount     = 10
	OutputFileSizeinMB  = 10
)
View Source
const CfuseMonitorVersion = "1.0.0-preview.1"

Variables

View Source
var (
	Pid             string
	CfsPollInterval int
	ProcMonInterval int

	NoCfsMon       bool
	NoCpuProf      bool
	NoMemProf      bool
	NoNetProf      bool
	NoFileCacheMon bool

	TempCachePath string
	MaxCacheSize  float64
	OutputPath    string

	CheckVersion bool
)
View Source
var DefaultLogFile string
View Source
var DefaultWorkDir string

Functions

func CheckProcessStatus

func CheckProcessStatus(pid string) error

check whether cloudfuse process is running for the given pid

func GetDefaultWorkDir added in v1.1.0

func GetDefaultWorkDir() string

func MonitorPid

func MonitorPid()

check cloudfuse pid status at every second

Types

type CacheEvent

type CacheEvent struct {
	CacheEvent      string            `json:"cacheEvent"`
	Path            string            `json:"path"`
	IsDir           bool              `json:"isDir"`
	CacheSize       int64             `json:"cacheSize"`
	CacheConsumed   string            `json:"cacheConsumed"`
	CacheFilesCnt   int64             `json:"cacheFilesCount"`
	EvictedFilesCnt int64             `json:"evictedFilesCount"`
	Value           map[string]string `json:"value"`
}

type CpuMemStat

type CpuMemStat struct {
	CpuUsage string
	MemUsage string
}

Jump to

Keyboard shortcuts

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