diff --git a/common/common_func.cpp b/common/common_func.cpp index ffcd0a2..1fd6422 100644 --- a/common/common_func.cpp +++ b/common/common_func.cpp @@ -986,10 +986,20 @@ void GetSysStatusCMT(int& cpu_use,int& mem_use,int& disk_remain,int& cpu_temp) } char hardTotal[32]; char hardFree[32]; + char rateHardUse[32]; char chRes[100]; memset(chRes, 0, 100); - getDiskInfo(hardTotal, hardFree); + + char hardName[32]; + char hardUse[32]; + const char *getEmmcInfo = "df -h | grep /opt"; + system_custom(getEmmcInfo, chRes); + sscanf(chRes, "%s%s%s%s%s", hardName, hardTotal, hardUse, hardFree, rateHardUse); + + std::string strhardTotal(hardTotal); std::string strhardFree(hardFree); + std::string strrateHardUse(rateHardUse); + char key[128] = {0}; memset(key, 0, sizeof(key)); sprintf(key, "/sys/class/thermal/thermal_zone0/temp");