告警清理

Signed-off-by: wenlong_12 <wenlong12@huawei.com>
This commit is contained in:
wenlong_12 2024-01-04 10:50:11 +08:00
parent 6f46e6a95d
commit 8678dbc572
4 changed files with 11 additions and 9 deletions

View File

@ -452,7 +452,7 @@ CollectResult<std::string> MemoryCollectorImpl::CollectRawSmaps(int32_t pid)
static std::string GetNewestSnapshotPath(const std::string& path)
{
std::string latestFilePath;
time_t newestFileTime;
time_t newestFileTime = 0;
DIR *dir = opendir(path.c_str());
if (dir == nullptr) {
return "";

View File

@ -80,12 +80,12 @@ struct ProcessIoStats {
};
struct SysIoStats {
double rcharRate;
double wcharRate;
double syscrRate;
double syscwRate;
double readBytesRate;
double writeBytesRate;
double rcharRate = 0.0;
double wcharRate = 0.0;
double syscrRate = 0.0;
double syscwRate = 0.0;
double readBytesRate = 0.0;
double writeBytesRate = 0.0;
};
struct ProcessIoStatsInfo {

View File

@ -247,9 +247,9 @@ int BBoxDevice::Close()
int BBoxDevice::Open()
{
fd_ = open("/dev/sysevent", O_RDONLY, O_NONBLOCK, 0);
fd_ = open("/dev/sysevent", O_RDONLY | O_NONBLOCK, 0);
if (fd_ < 0) {
fd_ = open("/dev/bbox", O_RDONLY, O_NONBLOCK, 0);
fd_ = open("/dev/bbox", O_RDONLY | O_NONBLOCK, 0);
} else {
hasBbox_ = true;
}

View File

@ -17,7 +17,9 @@
#include "logger.h"
#include "usage_event_report_service.h"
namespace {
DEFINE_LOG_TAG("HiView-UsageReportMain");
}
int main(int argc __UNUSED, char* argv[] __UNUSED)
{