modify log info.

This commit is contained in:
pandx 2024-11-05 15:50:22 +08:00
parent fc5e135c14
commit a531859d09

View File

@ -349,8 +349,8 @@ bool InsufficientFreeMemory() {
std::string strMemFree = GetFileContent("/proc/meminfo", 2);
sscanf(strMemFree.c_str(), "%s%ld", name1, &mem_free);
mem_free = mem_free / 1024;
zlog_warn(zct, "free memory: %ld MB", mem_free);
if (mem_free < 80) {
zlog_warn(zct, "free memory: %ld MB", mem_free);
return true;
} else {
return false;