lagagain commented on code in PR #12107:
URL: https://github.com/apache/skywalking/pull/12107#discussion_r1566523362


##########
oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json:
##########
@@ -339,7 +339,7 @@
             "showUnit": true
           },
           "expressions": [
-            "avg(meter_vm_memory_swap_percentage)/100"

Review Comment:
   This Card uses "%" unit. (line: 350)
   And the value is already * 100 at the 
[formula/rule](https://github.com/apache/skywalking/blob/c551a9ddb68bc34f44f00fe0dc5b5cb4959e0d19/oap-server/server-starter/src/main/resources/otel-rules/vm.yaml#L62).
   
       exp: 100 - ((node_memory_SwapFree_bytes * 100) / 
node_memory_SwapTotal_bytes)
   
   See an example result:
   
![圖片](https://github.com/apache/skywalking/assets/26619182/6e6bc9a4-2d7d-4820-b1d8-adf9bc6c34cb)
   
   `node_memory_SwapTotal_bytes` is `3930.996`.
   `node_memory_SwapFree_bytes` is `3848.723`
   
       100 - (3848.723 * 100) / 3930.996 = 2.092930138
   
   But the card display `0.02%`.
   
   Expect is `2%`: 
   
![圖片](https://github.com/apache/skywalking/assets/26619182/d5d0b184-4cd3-469b-bdd3-fb5a4fc85a5b)
   
   Compare [CPU 
Usage](https://github.com/apache/skywalking/blob/c551a9ddb68bc34f44f00fe0dc5b5cb4959e0d19/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json#L400).
   
   It also [* 100 at 
rule](https://github.com/apache/skywalking/blob/c551a9ddb68bc34f44f00fe0dc5b5cb4959e0d19/oap-server/server-starter/src/main/resources/otel-rules/vm.yaml#L38),
 and display "%" unit.
   
   
![圖片](https://github.com/apache/skywalking/assets/26619182/4bdbce26-045c-4f2d-9008-680ce739fc05)
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to