Documentation ¶
Index ¶
- Constants
- Variables
- func GetCpuTime() (*cpu.TimesStat, error)
- func GetDateTime() (localTime string, utcTime string, unixTime int64)
- func GetEnv(key string, dfault string, combineWith ...string) string
- func HashRawConfig(config *beat.Config) (error, string)
- func IsInDocker() bool
- func Md5(str string) string
- type CPULimit
Constants ¶
View Source
const (
MaxCheckTimes = 10
)
Variables ¶
View Source
var ClockTicks = 100 // default value
Functions ¶
func GetCpuTime ¶
copy from github.com/shirou/gopsutil@v3.21.8+incompatible/process/process_linux.go
func GetDateTime ¶
GetDateTime: 获取系统当前时间
func GetEnv ¶
GetEnv retrieves the environment variable key. If it does not exist it returns the default. github.com/shirou/gopsutil@v3.21.8+incompatible/internal/common/common.go
func HashRawConfig ¶
HashRawConfig: 获取配置hash值
func IsInDocker ¶
func IsInDocker() bool
当且仅当 /.dockerenv 的前提下 文件存在且 cgroup 权限为 ro 或者 /proc/1/sched 进程号不为 1
Types ¶
type CPULimit ¶
type CPULimit struct {
// contains filtered or unexported fields
}
func (*CPULimit) GetCheckInterval ¶
GetCheckInterval: get cpu check interval
func (*CPULimit) GetCpuTimes ¶
Click to show internal directories.
Click to hide internal directories.