Ai
5 Star 50 Fork 10

xrkmonitor/plugin_linux_base

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
disk.h 1.95 KB
一键复制 编辑 原始数据 按行查看 历史
xrkmonitor 提交于 2021-01-13 21:20 +08:00 . up
/*** xrkmonitor license ***
Copyright (c) 2019 by rockdeng
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
字符云监控(xrkmonitor) 开源版 (c) 2019 by rockdeng
当前版本:v1.0
使用授权协议: apache license 2.0
云版本主页:http://xrkmonitor.com
云版本为开源版提供永久免费告警通道支持,告警通道支持短信、邮件、
微信等多种方式,欢迎使用
内置监控插件 linux_base 功能:
使用监控系统 api 实现 linux 基础信息监控上报, 包括 cpu/内存/磁盘/网络
****/
#ifndef __MTREPORT_DISK_H__
#define __MTREPORT_DISK_H__ 1
#include <iostream>
typedef struct {
int32_t iDevMajorNum;
int32_t iDevSubNum;
char szDevName[32];
uint32_t dwReadTimes;
uint32_t dwMergeReadTimes;
uint32_t dwReadSectors;
uint32_t dwReadTimeMs;
uint32_t dwWriteTimes;
uint32_t dwMergeWriteTimes;
uint32_t dwWriteSectors;
uint32_t dwWriteTimeMs;
int32_t iIOWaitCount;
uint32_t dwIOTimeMs;
uint32_t dwIOTotalTimeMs;
}TDiskStatInfo;
int ReadDiskStatInfo(TDiskStatInfo *pInfo, int iMaxDiskStatCount);
inline int InitReadDiskStatInfo(TDiskStatInfo *pInfo, int iMaxDiskStatCount) {
return ReadDiskStatInfo(pInfo, iMaxDiskStatCount);
}
int GetDiskInfo(uint64_t & qwTotalSpace, uint64_t & qwTotalUse, uint32_t &maxUsePer);
typedef struct {
uint64_t qwSizeK;
uint64_t qwUsed;
uint64_t qwRemain;
std::string strMount;
}TDiskInfo;
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/xrkmonitorcom/plugin_linux_base.git
git@gitee.com:xrkmonitorcom/plugin_linux_base.git
xrkmonitorcom
plugin_linux_base
plugin_linux_base
master

搜索帮助