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:

`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%`:

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.

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