235 lines
5.4 KiB
Groff
235 lines
5.4 KiB
Groff
.TH "kysdk.Resource" 3 "Thu Sep 21 2023" "My Project" \" -*- nroff -*-
|
||
.ad l
|
||
.nh
|
||
.SH NAME
|
||
kysdk.Resource \- 获取当前系统资源占用信息类 主要用来获取系统中物理内存总大小、物理内存使用率、物理内存使用大小、实际可用的物理内存大小、实际空闲的物理内存大小、 所有应用申请的虚拟内存总量、系统中Swap分区总大小、Swap分区使用率、Swap分区使用量、Swap分区空闲大小、CPU瞬时使用率、 操作系统开机时长
|
||
|
||
.SH SYNOPSIS
|
||
.br
|
||
.PP
|
||
.PP
|
||
Inherits \fBkysdk\&.Base\fP\&.
|
||
.SS "Public Member Functions"
|
||
|
||
.in +1c
|
||
.ti -1c
|
||
.RI "def \fB__init__\fP (self)"
|
||
.br
|
||
.ti -1c
|
||
.RI "def \fBgetMemTotalKiB\fP (self)"
|
||
.br
|
||
.RI "获取系统中物理内存总大小 "
|
||
.ti -1c
|
||
.RI "def \fBgetMemUsagePercent\fP (self)"
|
||
.br
|
||
.RI "获取物理内存使用率 "
|
||
.ti -1c
|
||
.RI "def \fBgetMemUsageKiB\fP (self)"
|
||
.br
|
||
.RI "获取物理内存使用大小,注意Buffer/Cache被计算为已使用内存 "
|
||
.ti -1c
|
||
.RI "def \fBgetMemAvailableKiB\fP (self)"
|
||
.br
|
||
.RI "获取实际可用的物理内存大小,该数值约等于Free + Buffer + Cache "
|
||
.ti -1c
|
||
.RI "def \fBgetMemFreeKiB\fP (self)"
|
||
.br
|
||
.RI "获取实际空闲的物理内存大小,注意Buffer/Cache被计算为已使用内存 "
|
||
.ti -1c
|
||
.RI "def \fBgetMemVirtAllocKiB\fP (self)"
|
||
.br
|
||
.RI "获取所有应用申请的虚拟内存总量 "
|
||
.ti -1c
|
||
.RI "def \fBgetMemSwapTotalKiB\fP (self)"
|
||
.br
|
||
.RI "获取系统中Swap分区总大小 "
|
||
.ti -1c
|
||
.RI "def \fBgetMemSwapUsagePercent\fP (self)"
|
||
.br
|
||
.RI "获取Swap分区使用率 "
|
||
.ti -1c
|
||
.RI "def \fBgetMemSwapUsageKiB\fP (self)"
|
||
.br
|
||
.RI "获取Swap分区使用量 "
|
||
.ti -1c
|
||
.RI "def \fBgetMemSwapFreeKiB\fP (self)"
|
||
.br
|
||
.RI "获取Swap分区空闲大小 "
|
||
.ti -1c
|
||
.RI "def \fBgetCpuCurrentUsage\fP (self)"
|
||
.br
|
||
.RI "获取CPU瞬时使用率 "
|
||
.ti -1c
|
||
.RI "def \fBgetUpTime\fP (self)"
|
||
.br
|
||
.RI "获取操作系统开机时长 "
|
||
.in -1c
|
||
.SS "Additional Inherited Members"
|
||
.SH "Detailed Description"
|
||
.PP
|
||
获取当前系统资源占用信息类 主要用来获取系统中物理内存总大小、物理内存使用率、物理内存使用大小、实际可用的物理内存大小、实际空闲的物理内存大小、 所有应用申请的虚拟内存总量、系统中Swap分区总大小、Swap分区使用率、Swap分区使用量、Swap分区空闲大小、CPU瞬时使用率、 操作系统开机时长
|
||
|
||
|
||
.SH "Member Function Documentation"
|
||
.PP
|
||
.SS "def kysdk\&.Resource\&.getCpuCurrentUsage ( self)"
|
||
|
||
.PP
|
||
获取CPU瞬时使用率
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
CPU瞬时使用率,该值 < 1\&.00
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemAvailableKiB ( self)"
|
||
|
||
.PP
|
||
获取实际可用的物理内存大小,该数值约等于Free + Buffer + Cache
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
可用物理内存大小,KiB为单位
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemFreeKiB ( self)"
|
||
|
||
.PP
|
||
获取实际空闲的物理内存大小,注意Buffer/Cache被计算为已使用内存
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
空闲的物理内存大小,KiB为单位
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemSwapFreeKiB ( self)"
|
||
|
||
.PP
|
||
获取Swap分区空闲大小
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
Swap分区空闲大小,KiB为单位
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemSwapTotalKiB ( self)"
|
||
|
||
.PP
|
||
获取系统中Swap分区总大小
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
Swap分区大小,KiB为单位
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemSwapUsageKiB ( self)"
|
||
|
||
.PP
|
||
获取Swap分区使用量
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
Swap分区使用量,KiB为单位
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemSwapUsagePercent ( self)"
|
||
|
||
.PP
|
||
获取Swap分区使用率
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
Swap分区使用率
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemTotalKiB ( self)"
|
||
|
||
.PP
|
||
获取系统中物理内存总大小
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
物理内存大小,KiB为单位
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemUsageKiB ( self)"
|
||
|
||
.PP
|
||
获取物理内存使用大小,注意Buffer/Cache被计算为已使用内存
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
物理内存使用大小,KiB为单位
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemUsagePercent ( self)"
|
||
|
||
.PP
|
||
获取物理内存使用率
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
物理内存使用率
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getMemVirtAllocKiB ( self)"
|
||
|
||
.PP
|
||
获取所有应用申请的虚拟内存总量
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
虚拟内存总申请量,KiB为单位
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
.SS "def kysdk\&.Resource\&.getUpTime ( self)"
|
||
|
||
.PP
|
||
获取操作系统开机时长
|
||
.PP
|
||
\fBReturns\fP
|
||
.RS 4
|
||
开机时长
|
||
.RE
|
||
.PP
|
||
|
||
.PP
|
||
References kysdk\&.SessionBase\&.interface, and kysdk\&.Base\&.interface\&.
|
||
|
||
.SH "Author"
|
||
.PP
|
||
Generated automatically by Doxygen for kysdk.py from the source code\&.
|