Merge pull request #6568 from taosdata/fix/TD-4805
[TD-4805]<fix>: fix startup os config display
This commit is contained in:
commit
325f5bc249
|
@ -253,6 +253,8 @@ static int32_t dnodeInitStorage() {
|
|||
|
||||
dnodeCheckDataDirOpenned(tsDnodeDir);
|
||||
|
||||
taosGetDisk();
|
||||
taosPrintDiskInfo();
|
||||
dInfo("dnode storage is initialized at %s", tsDnodeDir);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ bool taosGetCpuUsage(float *sysCpuUsage, float *procCpuUsage) ;
|
|||
bool taosGetProcMemory(float *memoryUsedMB) ;
|
||||
bool taosGetSysMemory(float *memoryUsedMB);
|
||||
void taosPrintOsInfo();
|
||||
void taosPrintDiskInfo();
|
||||
int taosSystem(const char * cmd) ;
|
||||
void taosKillSystem();
|
||||
bool taosGetSystemUid(char *uid);
|
||||
|
|
|
@ -137,9 +137,6 @@ void taosPrintOsInfo() {
|
|||
// uInfo(" os openMax: %" PRId64, tsOpenMax);
|
||||
// uInfo(" os streamMax: %" PRId64, tsStreamMax);
|
||||
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);
|
||||
|
||||
struct utsname buf;
|
||||
|
@ -155,6 +152,14 @@ void taosPrintOsInfo() {
|
|||
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() {
|
||||
uError("function taosKillSystem, exit!");
|
||||
exit(0);
|
||||
|
|
|
@ -506,9 +506,6 @@ void taosPrintOsInfo() {
|
|||
uInfo(" os openMax: %" PRId64, tsOpenMax);
|
||||
uInfo(" os streamMax: %" PRId64, tsStreamMax);
|
||||
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);
|
||||
|
||||
struct utsname buf;
|
||||
|
@ -523,6 +520,14 @@ void taosPrintOsInfo() {
|
|||
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() {
|
||||
// SIGINT
|
||||
uInfo("taosd will shut down soon");
|
||||
|
|
|
@ -205,10 +205,15 @@ void taosGetSystemInfo() {
|
|||
|
||||
void taosPrintOsInfo() {
|
||||
uInfo(" os numOfCores: %d", tsNumOfCores);
|
||||
uInfo(" os totalMemory: %d(MB)", tsTotalMemoryMB);
|
||||
uInfo("==================================");
|
||||
}
|
||||
|
||||
void taosPrintDiskInfo() {
|
||||
uInfo("==================================");
|
||||
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("==================================");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue