system

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2019 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSystemInfo

func GetSystemInfo() (res schema.Response)

func GetSystemInfoRouter

func GetSystemInfoRouter(context *gin.Context)

Types

type Info

type Info struct {
	Username         string         `json:"username"`            // 当前用户名
	Host             host.InfoStat  `json:"host"`                // 操作系统信息
	Avg              load.AvgStat   `json:"avg"`                 // 负载信息
	Arch             string         `json:"arch"`                // 系统架构, 32/64位
	CPU              []cpu.InfoStat `json:"cpu"`                 // CPU信息
	RAMAvailable     uint64         `json:"ram_available"`       // 系统内存是否可供程序使用
	RAMTotal         uint64         `json:"ram_total"`           // 总内存大小
	RAMFree          uint64         `json:"ram_free"`            // 目前可用内存
	RAMUsedBy        uint64         `json:"ram_used_by"`         // 程序占用的内存
	RAMUsedByPercent float64        `json:"ram_used_by_percent"` // 程序占用的内存百分比
	UploadUsageStat  disk.UsageStat `json:"upload_usage_stat"`   // 上传目录的使用量统计
	Time             string         `json:"time"`                // 系统当前时间
	Timezone         string         `json:"timezone"`            // 当前服务器所在的时区
}

Jump to

Keyboard shortcuts

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