count++;\r
\r
}\r
+\r
+ close(sock);\r
}\r
}\r
\r
+ freeifaddrs(ifap);\r
+\r
return total / count;\r
#else\r
#error "Not Support this architecture"\r
\r
pthread_create(&cpuUsageThread.t, NULL, daemonCpuUsage, NULL);\r
pthread_create(&networkUsageThread.t, NULL, daemonNetworkUsage, NULL);\r
- pthread_create(&diskUsageThread.t, NULL, daemonDiskUsage, NULL);\r
+ // pthread_create(&diskUsageThread.t, NULL, daemonDiskUsage, NULL);\r
}\r
\r
void stopResourceService()\r
\r
pthread_detach(cpuUsageThread.t);\r
pthread_detach(networkUsageThread.t);\r
- pthread_detach(diskUsageThread.t);\r
+ // pthread_detach(diskUsageThread.t);\r
\r
printf("stopResourceService end\n");\r
}\r