|
@@ -92,6 +92,8 @@ namespace MIVA
|
|
|
|
|
|
this->m_recorder = recorder::CreateNew();
|
|
|
this->m_Cleaner = Cleaner::CreateNew();
|
|
|
+ this->m_monitor = monitor::CreateNew();
|
|
|
+
|
|
|
// 查询基础配置
|
|
|
SqlWriter sqlSelectConfig("SELECT account,outType,outPath,outEnable,ClearType,recordMax,validTime FROM MIVA_DB.`MivaConfig`");
|
|
|
sqlSelectConfig << sqlRet;
|
|
@@ -204,12 +206,13 @@ namespace MIVA
|
|
|
void UserApp::Destroy()
|
|
|
{
|
|
|
InfoL << "System exited successfully!";
|
|
|
- this->m_timer0 = NULL;
|
|
|
- this->m_timer1 = NULL;
|
|
|
- this->m_timer2 = NULL;
|
|
|
- this->m_udpClient = NULL;
|
|
|
- this->m_tcpClient = NULL;
|
|
|
- this->m_Infer = NULL;
|
|
|
+ this->m_timer0 = nullptr;
|
|
|
+ this->m_timer1 = nullptr;
|
|
|
+ this->m_timer2 = nullptr;
|
|
|
+ this->m_udpClient = nullptr;
|
|
|
+ this->m_tcpClient = nullptr;
|
|
|
+ this->m_Infer = nullptr;
|
|
|
+ this->m_monitor = nullptr;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -550,6 +553,10 @@ namespace MIVA
|
|
|
{
|
|
|
vector<vector<string>> sqlRet;
|
|
|
vector<DataSource>::iterator iter;
|
|
|
+ char ctime[80];
|
|
|
+ getDataTime(ctime);
|
|
|
+ SqlWriter sqlUpdate_DeviceState("UPDATE MIVA_DB.DeviceState SET CpuUsage='?',GpuUsage='?',MemoryUsage='?',Temp='?',FdUsage='?',updateTime='?'");
|
|
|
+ sqlUpdate_DeviceState << this->m_monitor->getCpuUsage() << this->m_monitor->getGpuUsage() << this->m_monitor->getMemoryUsage() << this->m_monitor->getTemp() << this->m_monitor->getFdUsage() << ctime << sqlRet;
|
|
|
|
|
|
SqlWriter sqlSelectConfig("SELECT account,outType,outPath,outEnable,ClearType,recordMax,validTime FROM MIVA_DB.`MivaConfig`");
|
|
|
sqlSelectConfig << sqlRet;
|