You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/09/01 01:57:52 UTC

[GitHub] [skywalking] liyanyan-dev opened a new issue #5417: one bug when query instance_jvm_cpu metric

liyanyan-dev opened a new issue #5417:
URL: https://github.com/apache/skywalking/issues/5417


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [ √] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
   
   ___
   ### Bug
   - Which version of SkyWalking, OS and JRE?
      skywalking 8.1.0  jdk1.8
   
   - Which company or project?
   
   - What happened?
   When I query instance_jvm_cpu metric  , the web side shows that the CPU utilization rate is 0, and the actual CPU  rate of the service process is 5-10%; I checked the code of the agent side and found that theCPU rate is * 100, but all the data stored in ES is less than 1; however, the query interface uses long type for this field, and all the data is converted to 0
    
   ![image](https://user-images.githubusercontent.com/54348450/91786093-6e893c00-ec39-11ea-95a7-1ad1f871f7a0.png)
   ![image](https://user-images.githubusercontent.com/54348450/91786136-8234a280-ec39-11ea-9954-3e2f14b924ce.png)
   
   
   
   ___
   ### Requirement or improvement
   - Please describe your requirements or improvement suggestions.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] liyanyan-dev commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
liyanyan-dev commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684160213


   > there should be some bug, let me check
   
   thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] xbkaishui commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
xbkaishui commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684186240


   the bug is in the MetricsQuery*DAO , it read the value as long, but the actually value is double like 0.8842238771569793 for example, code as below
   
   ```
   
    // Label is null, because in readMetricsValues, no label parameter.
           IntValues intValues = metricsValues.getValues();
           for (String id : ids) {
               KVInt kvInt = new KVInt();
               kvInt.setId(id);
               kvInt.setValue(0);
               if (idMap.containsKey(id)) {
                   Map<String, Object> source = idMap.get(id);
                   kvInt.setValue(((Number) source.getOrDefault(valueColumnName, 0)).longValue());
               } else {
                   kvInt.setValue(ValueColumnMetadata.INSTANCE.getDefaultValue(condition.getName()));
               }
               intValues.addKVInt(kvInt);
           }
   
   ```
   
   @wu-sheng , Can I submit a pr and fix this ? 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684348066


   Less than 1% usage would be expected as 0. If you want this away, we need to change JVM handler, make the <= 1 to 1 always.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684343249


   This is the expected case. If you notice the query protocol, it is an int/long.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] xbkaishui commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
xbkaishui commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684454413


   ok, that make sense. will change that


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] liyanyan-dev removed a comment on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
liyanyan-dev removed a comment on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684160213


   > there should be some bug, let me check
   
   thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684162019


   The top command shows one core CPU usage. So it could be 800% even 1600%.
   The reason we did this, is better for alarm threshold setting. Anyway, @xbkaishui this is the tips for you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] xbkaishui commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
xbkaishui commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684162321


   Thanks, let me check the logic


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] xbkaishui commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
xbkaishui commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684159279


   there should be some bug, let me check 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng commented on issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684161079


   I am not sure whether this is a bug. In SkyWalking, we consider max CPU usage to 100%, so we divide CPU core number.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking] wu-sheng closed issue #5417: one bug when query instance_jvm_cpu metric

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #5417:
URL: https://github.com/apache/skywalking/issues/5417


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org