提交 612b6c84 编写于 作者: M Minglei Jin

[TD-4805]<fix>: fix startup os config display

上级 25686cc5
...@@ -253,6 +253,8 @@ static int32_t dnodeInitStorage() { ...@@ -253,6 +253,8 @@ static int32_t dnodeInitStorage() {
dnodeCheckDataDirOpenned(tsDnodeDir); dnodeCheckDataDirOpenned(tsDnodeDir);
taosGetDisk();
taosPrintDiskInfo();
dInfo("dnode storage is initialized at %s", tsDnodeDir); dInfo("dnode storage is initialized at %s", tsDnodeDir);
return 0; return 0;
} }
......
...@@ -36,6 +36,7 @@ bool taosGetCpuUsage(float *sysCpuUsage, float *procCpuUsage) ; ...@@ -36,6 +36,7 @@ bool taosGetCpuUsage(float *sysCpuUsage, float *procCpuUsage) ;
bool taosGetProcMemory(float *memoryUsedMB) ; bool taosGetProcMemory(float *memoryUsedMB) ;
bool taosGetSysMemory(float *memoryUsedMB); bool taosGetSysMemory(float *memoryUsedMB);
void taosPrintOsInfo(); void taosPrintOsInfo();
void taosPrintDiskInfo();
int taosSystem(const char * cmd) ; int taosSystem(const char * cmd) ;
void taosKillSystem(); void taosKillSystem();
bool taosGetSystemUid(char *uid); bool taosGetSystemUid(char *uid);
......
...@@ -137,9 +137,6 @@ void taosPrintOsInfo() { ...@@ -137,9 +137,6 @@ void taosPrintOsInfo() {
// uInfo(" os openMax: %" PRId64, tsOpenMax); // uInfo(" os openMax: %" PRId64, tsOpenMax);
// uInfo(" os streamMax: %" PRId64, tsStreamMax); // uInfo(" os streamMax: %" PRId64, tsStreamMax);
uInfo(" os numOfCores: %d", tsNumOfCores); uInfo(" os numOfCores: %d", tsNumOfCores);
uInfo(" os totalDisk: %f(GB)", tsTotalDataDirGB);
uInfo(" os usedDisk: %f(GB)", tsUsedDataDirGB);
uInfo(" os availDisk: %f(GB)", tsAvailDataDirGB);
uInfo(" os totalMemory: %d(MB)", tsTotalMemoryMB); uInfo(" os totalMemory: %d(MB)", tsTotalMemoryMB);
struct utsname buf; struct utsname buf;
...@@ -155,6 +152,14 @@ void taosPrintOsInfo() { ...@@ -155,6 +152,14 @@ void taosPrintOsInfo() {
uInfo("=================================="); uInfo("==================================");
} }
void taosPrintDiskInfo() {
uInfo("==================================");
uInfo(" os totalDisk: %f(GB)", tsTotalDataDirGB);
uInfo(" os usedDisk: %f(GB)", tsUsedDataDirGB);
uInfo(" os availDisk: %f(GB)", tsAvailDataDirGB);
uInfo("==================================");
}
void taosKillSystem() { void taosKillSystem() {
uError("function taosKillSystem, exit!"); uError("function taosKillSystem, exit!");
exit(0); exit(0);
......
...@@ -506,9 +506,6 @@ void taosPrintOsInfo() { ...@@ -506,9 +506,6 @@ void taosPrintOsInfo() {
uInfo(" os openMax: %" PRId64, tsOpenMax); uInfo(" os openMax: %" PRId64, tsOpenMax);
uInfo(" os streamMax: %" PRId64, tsStreamMax); uInfo(" os streamMax: %" PRId64, tsStreamMax);
uInfo(" os numOfCores: %d", tsNumOfCores); uInfo(" os numOfCores: %d", tsNumOfCores);
uInfo(" os totalDisk: %f(GB)", tsTotalDataDirGB);
uInfo(" os usedDisk: %f(GB)", tsUsedDataDirGB);
uInfo(" os availDisk: %f(GB)", tsAvailDataDirGB);
uInfo(" os totalMemory: %d(MB)", tsTotalMemoryMB); uInfo(" os totalMemory: %d(MB)", tsTotalMemoryMB);
struct utsname buf; struct utsname buf;
...@@ -523,6 +520,14 @@ void taosPrintOsInfo() { ...@@ -523,6 +520,14 @@ void taosPrintOsInfo() {
uInfo(" os machine: %s", buf.machine); uInfo(" os machine: %s", buf.machine);
} }
void taosPrintDiskInfo() {
uInfo("==================================");
uInfo(" os totalDisk: %f(GB)", tsTotalDataDirGB);
uInfo(" os usedDisk: %f(GB)", tsUsedDataDirGB);
uInfo(" os availDisk: %f(GB)", tsAvailDataDirGB);
uInfo("==================================");
}
void taosKillSystem() { void taosKillSystem() {
// SIGINT // SIGINT
uInfo("taosd will shut down soon"); uInfo("taosd will shut down soon");
......
...@@ -205,10 +205,15 @@ void taosGetSystemInfo() { ...@@ -205,10 +205,15 @@ void taosGetSystemInfo() {
void taosPrintOsInfo() { void taosPrintOsInfo() {
uInfo(" os numOfCores: %d", tsNumOfCores); uInfo(" os numOfCores: %d", tsNumOfCores);
uInfo(" os totalMemory: %d(MB)", tsTotalMemoryMB);
uInfo("==================================");
}
void taosPrintDiskInfo() {
uInfo("==================================");
uInfo(" os totalDisk: %f(GB)", tsTotalDataDirGB); uInfo(" os totalDisk: %f(GB)", tsTotalDataDirGB);
uInfo(" os usedDisk: %f(GB)", tsUsedDataDirGB); uInfo(" os usedDisk: %f(GB)", tsUsedDataDirGB);
uInfo(" os availDisk: %f(GB)", tsAvailDataDirGB); uInfo(" os availDisk: %f(GB)", tsAvailDataDirGB);
uInfo(" os totalMemory: %d(MB)", tsTotalMemoryMB);
uInfo("=================================="); uInfo("==================================");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册