uptime unit

This commit is contained in:
dmchen 2024-02-22 02:00:33 +00:00
parent 46ee4cd00f
commit ee84e2d75e
2 changed files with 4 additions and 2 deletions

View File

@ -76,7 +76,8 @@ typedef struct {
} SMonBasicInfo;
typedef struct {
float uptime; // day
//float uptime; // day
int64_t uptime; // second
int8_t has_mnode;
int8_t has_qnode;
int8_t has_snode;

View File

@ -33,7 +33,8 @@ static void dmGetMonitorBasicInfoBasic(SDnode *pDnode, SMonBasicInfo *pInfo) {
}
static void dmGetMonitorDnodeInfo(SDnode *pDnode, SMonDnodeInfo *pInfo) {
pInfo->uptime = (taosGetTimestampMs() - pDnode->data.rebootTime) / (86400000.0f);
//pInfo->uptime = (taosGetTimestampMs() - pDnode->data.rebootTime) / (86400000.0f);
pInfo->uptime = taosGetTimestampMs() - pDnode->data.rebootTime;
pInfo->has_mnode = pDnode->wrappers[MNODE].required;
pInfo->has_qnode = pDnode->wrappers[QNODE].required;
pInfo->has_snode = pDnode->wrappers[SNODE].required;