win

package
v0.0.0-...-5893fcd Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DiskType = map[int]string{
	0: "未知磁盘",
	1: "未知的磁盘类型",
	2: "路径无效",
	3: "可移动磁盘",
	4: "固定磁盘",
	5: "网络磁盘",
	6: "光驱",
	7: "内存映射盘",
}

DiskType 磁盘类型枚举

Functions

func GETSystemPowerStatus

func GETSystemPowerStatus()

func GETTickCount

func GETTickCount()

GETTickCount 用于获取自windows启动以来经历的时间长度(毫秒)

func GetBaseBoardID

func GetBaseBoardID() string

GetBaseBoardID 获取主板ID

func GetCPUUse

func GetCPUUse() int

GetCPUUse 获取cpu使用率

func GetComputerName

func GetComputerName() string

GetComputerName 获取计算机名称

func GetCpuId

func GetCpuId() string

GetCpuId 获取cpu的 CpuId

func GetCpuName

func GetCpuName() string

GetCpuName 获取cup的 CpuName

func GetCpuVendorId

func GetCpuVendorId() string

GetCpuVendorId 获取cpu的VendorId

func GetCpuVendorId1

func GetCpuVendorId1() string

func GetCpuVendorId2

func GetCpuVendorId2() string

func GetEnvironment

func GetEnvironment(input string) string

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

func GetNetIOFromCMD() (networks []*entity.NetWorkIO)

GetNetIOFromCMD 采集网络带宽 通过netstat -e 命令进行采集

func GetProcessList

func GetProcessList(pg int) (pBaseInfo []*entity.ProcessBaseInfo)

func GetSystemInfo

func GetSystemInfo()

GetSystemInfo 取得与底层硬件平台有关的信息

func GetTcpConnCount

func GetTcpConnCount() int

GetTcpConnCount 获取有效连接数 通过 netstat -an|find "ESTABLISHED" /c 命令

func GetWindowsPIDInfo

func GetWindowsPIDInfo() (count int, pidList []string)

GetWindowsPIDInfo 获取windows pid

func RunMetrics

func RunMetrics() string

RunMetrics 获取屏幕尺寸

func RunNetstatE

func RunNetstatE() (input int64, output int64)

RunNetstatE 执行 netstat -e 返回接收字节和发送字节

func WindowsGetDiskCount

func WindowsGetDiskCount() int

WindowsGetDiskCount 返回磁盘数量

func WindowsGetDiskInfo

func WindowsGetDiskInfo() (datas []*entity.DiskInfo)

WindowsGetDiskInfo 返回磁盘整体信息结构数据

func WindowsGetDiskNameList

func WindowsGetDiskNameList() []string

WindowsGetDiskNameList 返回磁盘名列表

func WindowsGetDiskType

func WindowsGetDiskType(diskName string) string

WindowsGetDiskType 更具磁盘名获取磁盘类型

func WindowsGetDiskUse

func WindowsGetDiskUse(diskName string) (diskUse *entity.DiskUseInfo)

WindowsGetDiskUse 更具磁盘名获取磁盘使用信息

func WindowsGetMemoryInfo

func WindowsGetMemoryInfo() *entity.MemInfo

WindowsGetMemoryInfo 获取 内存大小

func WindowsGetMemoryTotal

func WindowsGetMemoryTotal() string

WindowsGetMemoryTotal 获取系统内存的大小

func WindowsGetOsInfo

func WindowsGetOsInfo() string

WindowsGetOsInfo 获取 windows系统型号

func WindowsGetUserDefaultLangID

func WindowsGetUserDefaultLangID()

WindowsGetUserDefaultLangID 为当前用户取得默认语言ID

Types

This section is empty.

Jump to

Keyboard shortcuts

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