/* * @Description: * @Version: 1.0 * @Autor: lishengyin * @Date: 2022-01-10 15:01:15 * @LastEditors: lishengyin * @LastEditTime: 2022-01-11 11:12:08 */ #pragma once #include #include #include #include #include #include #include #include #include #include #include "Util/logger.h" #include "Util/NoticeCenter.h" #include "Poller/EventPoller.h" #include "Player/PlayerProxy.h" #include "Rtmp/RtmpPusher.h" #include "Common/config.h" #include "Pusher/MediaPusher.h" #include "Extension/Frame.h" #include "Util/SqlPool.h" #include "Network/TcpClient.h" #include "Poller/Timer.h" using namespace toolkit; using namespace std; namespace MIVA { class monitor { private: FILE *file = nullptr; public: monitor(); ~monitor(); /** * @description: 创建实例 * @param {*} * @return {*} */ static std::shared_ptr CreateNew(); /** * @description: 释放资源 * @param {*} * @return {*} */ void Destory(); /** * @description: 获取内存使用情况 * @param {*} * @return {*} */ int32_t getMemoryUsage(); /** * @description: 获取Cpu使用情况 * TODO * @param {*} * @return {*} */ int32_t getCpuUsage(); /** * @description: 获取温度 * TODO * @param {*} * @return {*} */ int32_t getTemp(); /** * @description: 获取Gpu使用情况 * TODO * @param {*} * @return {*} */ int32_t getGpuUsage(); /** * @description: 获取文件句柄使用情况 * @param {*} * @return {*} */ int32_t getFdUsage(); }; } // namespace MIVA