diskKit

package
v3.0.910 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskUsageStats

type DiskUsageStats struct {
	Path string `json:"path" yaml:"path"`

	Free        uint64  `json:"free" yaml:"free"`
	Used        uint64  `json:"used" yaml:"used"`
	Total       uint64  `json:"total" yaml:"total"`
	UsedPercent float64 `json:"usedPercent" yaml:"usedPercent"`
}

DiskUsageStats

Total = Used + Free

func GetDiskUsageStats

func GetDiskUsageStats() (*DiskUsageStats, error)

func GetDiskUsageStatsByPath

func GetDiskUsageStatsByPath(path string) (*DiskUsageStats, error)

GetDiskUsageStatsByPath

PS: (1) Mac(Linux),查看磁盘空间的命令: df -h

golang 获取cpu 内存 硬盘 使用率 信息 进程信息

https://blog.csdn.net/whatday/article/details/109620192

Jump to

Keyboard shortcuts

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