mirror of
https://gitee.com/openharmony/hiviewdfx_hiview
synced 2024-11-23 09:09:49 +00:00
告警清理
Signed-off-by: wenlong_12 <wenlong12@huawei.com>
This commit is contained in:
parent
6f46e6a95d
commit
8678dbc572
@ -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 "";
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user