Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refine cpu load usage info #15

Merged
merged 1 commit into from
Apr 8, 2020
Merged

refine cpu load usage info #15

merged 1 commit into from
Apr 8, 2020

Conversation

crazycs520
Copy link
Collaborator

Signed-off-by: crazycs520 crazycs520@gmail.com

Before

select * from `CLUSTER_LOAD` where device_type='cpu'
+------+-------------------+-------------+-------------+------------+-------------+
| TYPE | INSTANCE          | DEVICE_TYPE | DEVICE_NAME | NAME       | VALUE       |
+------+-------------------+-------------+-------------+------------+-------------+
| tidb | 172.16.5.40:4009  | cpu         | cpu         | load1      | 0.51        |
| tidb | 172.16.5.40:4009  | cpu         | cpu         | load5      | 0.57        |
| tidb | 172.16.5.40:4009  | cpu         | cpu         | load15     | 1.00        |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | user       | 1792917.64  |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | system     | 487548.58   |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | idle       | 21709484.36 |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | nice       | 1592.56     |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | iowait     | 37874.43    |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | irq        | 0.00        |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | softirq    | 142449.47   |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | steal      | 0.00        |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | guest      | 0.00        |
| tidb | 172.16.5.40:4009  | cpu         | cpu0        | guest_nice | 0.00        |
| tidb | 172.16.5.40:4009  | cpu         | cpu1        | user       | 1687041.46  |
| tidb | 172.16.5.40:4009  | cpu         | cpu1        | system     | 453702.71   |
| tidb | 172.16.5.40:4009  | cpu         | cpu1        | idle       | 21911525.64 |
...

This PR:

select * from `CLUSTER_LOAD` where device_type='cpu'
+------+-----------------+-------------+-------------+------------+--------------+
| TYPE | INSTANCE        | DEVICE_TYPE | DEVICE_NAME | NAME       | VALUE        |
+------+-----------------+-------------+-------------+------------+--------------+
| tidb | 127.0.0.1:4000  | cpu         | cpu         | load1      | 1.87         |
| tidb | 127.0.0.1:4000  | cpu         | cpu         | load5      | 3.30         |
| tidb | 127.0.0.1:4000  | cpu         | cpu         | load15     | 3.50         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | user       | 0.03         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | system     | 0.03         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | idle       | 0.94         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | nice       | 0.00         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | iowait     | 0.00         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | irq        | 0.00         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | softirq    | 0.00         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | steal      | 0.00         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | guest      | 0.00         |
| tidb | 127.0.0.1:4000  | cpu         | usage       | guest_nice | 0.00         |

Signed-off-by: crazycs520 <crazycs520@gmail.com>
Copy link
Contributor

@lonng lonng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@reafans reafans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants