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

[OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Orac… #424

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

assassinfym
Copy link
Contributor

@assassinfym assassinfym commented Nov 8, 2022

Under the Oracle Linux based on the arm architecture, there is a problem in collecting cpu cores and interrupt, and it will display&nbsp

image

After analyzing the source code, it is found that it is a script for collecting cpu, and there are some compatibility problems

Original collection script

LANG=C lscpu | awk -F: '/Model name/ {print $2}';awk '/processor/{core++} END{print core}' /proc/cpuinfo;uptime | sed 's/,/ /g' | awk '{for(i=NF-2;i<=NF;i++)print $i }' | xargs;vmstat 1 1 | awk 'NR==3{print $11}';vmstat 1 1 | awk 'NR==3{print $12}';vmstat 1 1 | awk 'NR==3{print $15}'

Where LANG=C lscpu | awk -F: '/Model name/ {print $2}'; , because Oracle Linux will have two nodes, the Model Name and BIOS Model Name, so there are two lines of records when getting info
image

I changed it to

LANG=C lscpu | awk -F: '$1=="Model name" {print $2}';awk '/processor/{core++} END{print core}' /proc/cpuinfo;uptime | sed 's/,/ /g' | awk '{for(i=NF-2;i<=NF;i++)print $i }' | xargs;vmstat 1 1 | awk 'NR==3{print $11}';vmstat 1 1 | awk 'NR==3{print $12}';vmstat 1 1 | awk 'NR==3{print $15}'

The script that gets info LANG=C lscpu | awk -F: '$1=="Model name" {print $2}';
image

@tomsun28 tomsun28 self-requested a review November 8, 2022 05:50
@tomsun28 tomsun28 changed the base branch from master to dev November 8, 2022 16:07
Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!👍👍 Test pass.
2022-11-09 00 12 20

@tomsun28 tomsun28 merged commit 9ddaf21 into apache:dev Nov 8, 2022
tomsun28 added a commit that referenced this pull request Nov 13, 2022
* WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

* [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

* [manager] elasticsearch support ssl as an option

* [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

* [collector]fix pmd problem

* [manager] support opengauss database monitor (#422)

* [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

* [manager,collector] update mid nacos monitor

* [warehose] Add unit test MetricsDataControllerTest.java (#426)

* [manager] add unit test manager/service/NoticeConfigServiceTest.java (#427)

* [docs] update readme add sponsor eoapi(#429)

* [docs] update readme add sponsor eoapi(#430)

* Update README.md

update the sponsor list

* Update README.md

* [home] add sponsor card layout (#431)

* [hertzbeat] update cloudNative kubernetes monitor
tomsun28 added a commit that referenced this pull request Jan 16, 2024
* WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

* [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

* [manager] elasticsearch support ssl as an option

* [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

* [collector]fix pmd problem

* [manager] support opengauss database monitor (#422)

* [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

* [manager,collector] update mid nacos monitor

* [warehose] Add unit test MetricsDataControllerTest.java (#426)

* [manager] add unit test manager/service/NoticeConfigServiceTest.java (#427)

* [docs] update readme add sponsor eoapi(#429)

* [docs] update readme add sponsor eoapi(#430)

* Update README.md

update the sponsor list

* Update README.md

* [home] add sponsor card layout (#431)

* [hertzbeat] update cloudNative kubernetes monitor
tomsun28 added a commit that referenced this pull request Mar 9, 2024
* WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

* [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

* [manager] elasticsearch support ssl as an option

* [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

* [collector]fix pmd problem

* [manager] support opengauss database monitor (#422)

* [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

* [manager,collector] update mid nacos monitor

* [warehose] Add unit test MetricsDataControllerTest.java (#426)

* [manager] add unit test manager/service/NoticeConfigServiceTest.java (#427)

* [docs] update readme add sponsor eoapi(#429)

* [docs] update readme add sponsor eoapi(#430)

* Update README.md

update the sponsor list

* Update README.md

* [home] add sponsor card layout (#431)

* [hertzbeat] update cloudNative kubernetes monitor
tomsun28 added a commit that referenced this pull request Mar 9, 2024
* WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

* [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

* [manager] elasticsearch support ssl as an option

* [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

* [collector]fix pmd problem

* [manager] support opengauss database monitor (#422)

* [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

* [manager,collector] update mid nacos monitor

* [warehose] Add unit test MetricsDataControllerTest.java (#426)

* [manager] add unit test manager/service/NoticeConfigServiceTest.java (#427)

* [docs] update readme add sponsor eoapi(#429)

* [docs] update readme add sponsor eoapi(#430)

* Update README.md

update the sponsor list

* Update README.md

* [home] add sponsor card layout (#431)

* [hertzbeat] update cloudNative kubernetes monitor
tomsun28 added a commit that referenced this pull request Mar 10, 2024
  WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

  [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

  [manager] elasticsearch support ssl as an option

  [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

  [collector]fix pmd problem

  [manager] support opengauss database monitor (#422)

  [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

  [manager,collector] update mid nacos monitor

  [warehose] Add unit test MetricsDataControllerTest.java (#426)

  [manager] add unit test manager service NoticeConfigServiceTest.java (#427)

  [docs] update readme add sponsor eoapi(#429)

  [docs] update readme add sponsor eoapi(#430)

  Update README.md

update the sponsor list

  Update README.md

  [home] add sponsor card layout (#431)

  [hertzbeat] update cloudNative kubernetes monitor
tomsun28 added a commit that referenced this pull request Mar 10, 2024
  WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

  [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

  [manager] elasticsearch support ssl as an option

  [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

  [collector]fix pmd problem

  [manager] support opengauss database monitor (#422)

  [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

  [manager,collector] update mid nacos monitor

  [warehose] Add unit test MetricsDataControllerTest.java (#426)

  [manager] add unit test manager service NoticeConfigServiceTest.java (#427)

  [docs] update readme add sponsor eoapi(#429)

  [docs] update readme add sponsor eoapi(#430)

  Update README.md

update the sponsor list

  Update README.md

  [home] add sponsor card layout (#431)

  [hertzbeat] update cloudNative kubernetes monitor
tomsun28 added a commit that referenced this pull request Mar 11, 2024
  WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

  [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

  [manager] elasticsearch support ssl as an option

  [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

  [collector]fix pmd problem

  [manager] support opengauss database monitor (#422)

  [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

  [manager,collector] update mid nacos monitor

  [warehose] Add unit test MetricsDataControllerTest.java (#426)

  [manager] add unit test manager service NoticeConfigServiceTest.java (#427)

  [docs] update readme add sponsor eoapi(#429)

  [docs] update readme add sponsor eoapi(#430)

  Update README.md

update the sponsor list

  Update README.md

  [home] add sponsor card layout (#431)

  [hertzbeat] update cloudNative kubernetes monitor
tomsun28 added a commit that referenced this pull request Mar 11, 2024
  WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

  [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

  [manager] elasticsearch support ssl as an option

  [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

  [collector]fix pmd problem

  [manager] support opengauss database monitor (#422)

  [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

  [manager,collector] update mid nacos monitor

  [warehose] Add unit test MetricsDataControllerTest.java (#426)

  [manager] add unit test manager service NoticeConfigServiceTest.java (#427)

  [docs] update readme add sponsor eoapi(#429)

  [docs] update readme add sponsor eoapi(#430)

  Update README.md

update the sponsor list

  Update README.md

  [home] add sponsor card layout (#431)

  [hertzbeat] update cloudNative kubernetes monitor
tomsun28 added a commit that referenced this pull request Mar 11, 2024
  WIP:feature support k8s monitor, http monitor nacos, service&http_micro monitor msa (#421)

  [collector] bugfix: Solve imprecise cyclicJob execution interval problem.
1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged.
2.now support second level job interval.

  [manager] elasticsearch support ssl as an option

  [monitor]
1.K8sClient monitor k8s
2.http monitor nacos
3.service&http_micro monitor msa

  [collector]fix pmd problem

  [manager] support opengauss database monitor (#422)

  [OS Monitor]bugfix:Fix cpu cores and interrupt acquisition under Oracle Linux (#424)

  [manager,collector] update mid nacos monitor

  [warehose] Add unit test MetricsDataControllerTest.java (#426)

  [manager] add unit test manager service NoticeConfigServiceTest.java (#427)

  [docs] update readme add sponsor eoapi(#429)

  [docs] update readme add sponsor eoapi(#430)

  Update README.md

update the sponsor list

  Update README.md

  [home] add sponsor card layout (#431)

  [hertzbeat] update cloudNative kubernetes monitor
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.

There are problems in collecting cpu cores and interrupts under Oracle Linux based on arm architecture
2 participants