system

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright 2019-2020 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(c *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