Documentation ¶
Index ¶
- Variables
- func GETSystemPowerStatus()
- func GETTickCount()
- func GetBaseBoardID() string
- func GetCPUUse() int
- func GetComputerName() string
- func GetCpuId() string
- func GetCpuName() string
- func GetCpuVendorId() string
- func GetCpuVendorId1() string
- func GetCpuVendorId2() string
- func GetEnvironment(input string) string
- func GetNetIOFromCMD() (networks []*entity.NetWorkIO)
- func GetProcessList(pg int) (pBaseInfo []*entity.ProcessBaseInfo)
- func GetSystemInfo()
- func GetTcpConnCount() int
- func GetWindowsPIDInfo() (count int, pidList []string)
- func RunMetrics() string
- func RunNetstatE() (input int64, output int64)
- func WindowsGetDiskCount() int
- func WindowsGetDiskInfo() (datas []*entity.DiskInfo)
- func WindowsGetDiskNameList() []string
- func WindowsGetDiskType(diskName string) string
- func WindowsGetDiskUse(diskName string) (diskUse *entity.DiskUseInfo)
- func WindowsGetMemoryInfo() *entity.MemInfo
- func WindowsGetMemoryTotal() string
- func WindowsGetOsInfo() string
- func WindowsGetUserDefaultLangID()
Constants ¶
This section is empty.
Variables ¶
var DiskType = map[int]string{
0: "未知磁盘",
1: "未知的磁盘类型",
2: "路径无效",
3: "可移动磁盘",
4: "固定磁盘",
5: "网络磁盘",
6: "光驱",
7: "内存映射盘",
}
DiskType 磁盘类型枚举
Functions ¶
func GETSystemPowerStatus ¶
func GETSystemPowerStatus()
func GetCpuVendorId1 ¶
func GetCpuVendorId1() string
func GetCpuVendorId2 ¶
func GetCpuVendorId2() string
func GetEnvironment ¶
GetEnvironment 获取计算机环境变量
%WINDIR% {系统目录- C:\WINDOWS} %SYSTEMROOT% {系统目录- C:\WINDOWS} %SYSTEMDRIVE% {系统根目录- C:} %HOMEDRIVE% {当前用户根目录- C:} %USERPROFILE% {当前用户目录- C:\Documents and Settings\wy} %HOMEPATH% {当前用户路径- \Documents and Settings\wy} %TMP% {当前用户临时文件夹- C:\DOCUME~1\wy\LOCALS~1\Temp} %TEMP% {当前用户临时文件夹- C:\DOCUME~1\wy\LOCALS~1\Temp} %APPDATA% {当前用户数据文件夹- C:\Documents and Settings\wy\Application Data} %PROGRAMFILES% {程序默认安装目录- C:\Program Files} %COMMONPROGRAMFILES% {文件通用目录- C:\Program Files\Common Files} %USERNAME% {当前用户名- wy} %ALLUSERSPROFILE% {所有用户文件目录- C:\Documents and Settings\All Users} %OS% {操作系统名- Windows_NT} %COMPUTERNAME% {计算机名- IBM-B63851E95C9} %NUMBER_OF_PROCESSORS% {处理器个数- 1} %PROCESSOR_ARCHITECTURE% {处理器芯片架构 - x86} %PROCESSOR_LEVEL% {处理器型号- 6} %PROCESSOR_REVISION% {处理器修订号- 0905} %USERDOMAIN% {包含用户帐号的域- IBM-B63851E95C9} %COMSPEC% {C:\WINDOWS\system32\cmd.exe}
%PATHEXT% {执行文件类型 -.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.pyo;.pyc;.py;.pyw} %PATH% {搜索路径}
func GetNetIOFromCMD ¶
GetNetIOFromCMD 采集网络带宽 通过netstat -e 命令进行采集
func GetProcessList ¶
func GetProcessList(pg int) (pBaseInfo []*entity.ProcessBaseInfo)
func GetTcpConnCount ¶
func GetTcpConnCount() int
GetTcpConnCount 获取有效连接数 通过 netstat -an|find "ESTABLISHED" /c 命令
func GetWindowsPIDInfo ¶
GetWindowsPIDInfo 获取windows pid
func RunNetstatE ¶
RunNetstatE 执行 netstat -e 返回接收字节和发送字节
func WindowsGetDiskInfo ¶
WindowsGetDiskInfo 返回磁盘整体信息结构数据
func WindowsGetDiskType ¶
WindowsGetDiskType 更具磁盘名获取磁盘类型
func WindowsGetDiskUse ¶
func WindowsGetDiskUse(diskName string) (diskUse *entity.DiskUseInfo)
WindowsGetDiskUse 更具磁盘名获取磁盘使用信息
func WindowsGetMemoryInfo ¶
WindowsGetMemoryInfo 获取 内存大小
func WindowsGetUserDefaultLangID ¶
func WindowsGetUserDefaultLangID()
WindowsGetUserDefaultLangID 为当前用户取得默认语言ID
Types ¶
This section is empty.