Documentation ¶
Index ¶
- Variables
- func CpuNum() int
- func Ext(ext string) (ret map[string]uint64, err error)
- func KernelAllocateFiles() (ret uint64, err error)
- func KernelHostname() (string, error)
- func KernelMaxFiles() (uint64, error)
- func KernelMaxProc() (uint64, error)
- func ListMountPoint() ([][3]string, error)
- func ListenPorts() []int64
- func MHz() (mhz string, err error)
- func ReadProcStatus(path string) (name_state [2]string, err error)
- func SocketStatSummary() (m map[string]uint64)
- func SystemDate() (string, error)
- func SystemUptime() (arr [3]int64, err error)
- type CpuSnapshoot
- type DeviceUsageStruct
- type DiskStats
- type Loadavg
- type Meminfo
- type NetIf
- type Proc
Constants ¶
This section is empty.
Variables ¶
View Source
var FSTYPE_IGNORE = map[string]bool{ "cgroup": true, "debugfs": true, "devtmpfs": true, "rpc_pipefs": true, "rootfs": true, }
View Source
var Multi uint64 = 1024
Functions ¶
func KernelAllocateFiles ¶
func KernelHostname ¶
func KernelMaxFiles ¶
func KernelMaxProc ¶
func ListMountPoint ¶
func ListenPorts ¶
func ListenPorts() []int64
func ReadProcStatus ¶
func SocketStatSummary ¶
func SystemDate ¶
func SystemUptime ¶
Types ¶
type CpuSnapshoot ¶
type CpuSnapshoot struct { User uint64 // time spent in user mode Nice uint64 // time spent in user mode with low priority (nice) System uint64 // time spent in system mode Idle uint64 // time spent in the idle task Iowait uint64 // time spent waiting for I/O to complete (since Linux 2.5.41) Irq uint64 // time spent servicing interrupts (since 2.6.0-test4) SoftIrq uint64 // time spent servicing softirqs (since 2.6.0-test4) Steal uint64 // time spent in other OSes when running in a virtualized environment Guest uint64 // time spent running a virtual CPU for guest operating systems under the control of the Linux kernel. Total uint64 // total of all time fields Switches uint64 // context switches }
func CpuSnapShoot ¶
func CpuSnapShoot() (*CpuSnapshoot, error)
type DeviceUsageStruct ¶
type DeviceUsageStruct struct { FsSpec string FsFile string FsVfstype string BlocksAll uint64 BlocksUsed uint64 BlocksFree uint64 BlocksUsedPercent float64 BlocksFreePercent float64 InodesAll uint64 InodesUsed uint64 InodesFree uint64 InodesUsedPercent float64 InodesFreePercent float64 }
func BuildDeviceUsage ¶
func BuildDeviceUsage(arr [3]string) (*DeviceUsageStruct, error)
type DiskStats ¶
type DiskStats struct { Major int Minor int Device string ReadRequests uint64 // Total number of reads completed successfully. ReadMerged uint64 // Adjacent read requests merged in a single req. ReadSectors uint64 // Total number of sectors read successfully. MsecRead uint64 // Total number of ms spent by all reads. WriteRequests uint64 // total number of writes completed successfully. WriteMerged uint64 // Adjacent write requests merged in a single req. WriteSectors uint64 // total number of sectors written successfully. MsecWrite uint64 // Total number of ms spent by all writes. IosInProgress uint64 // Number of actual I/O requests currently in flight. MsecTotal uint64 // Amount of time during which ios_in_progress >= 1. MsecWeightedTotal uint64 // Measure of recent I/O completion time and backlog. }
func ListDiskStats ¶
type Meminfo ¶
type NetIf ¶
type NetIf struct { Iface string InBytes int64 InPackages int64 InErrors int64 InDropped int64 InFifoErrs int64 InFrameErrs int64 InCompressed int64 InMulticast int64 OutBytes int64 OutPackages int64 OutErrors int64 OutDropped int64 OutFifoErrs int64 OutCollisions int64 OutCarrierErrs int64 OutCompressed int64 TotalBytes int64 TotalPackages int64 TotalErrors int64 TotalDropped int64 }
Click to show internal directories.
Click to hide internal directories.