wujimin commented on a change in pull request #987: [SCB-1017]add os cpu net 
info in the metrics with linux os
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/987#discussion_r232486639
 
 

 ##########
 File path: 
foundations/foundation-metrics/src/main/java/org/apache/servicecomb/foundation/metrics/MetricsBootstrap.java
 ##########
 @@ -41,13 +47,37 @@
 
   private ScheduledExecutorService executorService;
 
+  //cpu
+  private ScheduledExecutorService cpuExcutorService;
+
+  //network
+  private ScheduledExecutorService netExcutorService;
+
+  private CpuNode cpuNode;
+
+  private final Map<String, NetNode> netNodeMap = new HashMap<>();
+
   public void start(CompositeRegistry globalRegistry, EventBus eventBus) {
     this.globalRegistry = globalRegistry;
     this.eventBus = eventBus;
+    cpuNode = CpuNode.getINSTANCE();
     this.executorService = Executors.newScheduledThreadPool(1,
         new ThreadFactoryBuilder()
             .setNameFormat("spectator-poller-%d")
             .build());
+    if (!System.getProperty("os.name").toLowerCase().startsWith("win")) {
 
 Review comment:
   try org.apache.commons.lang3.SystemUtils#IS_OS_LINUX

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to