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

[BUG]get_loadavg.py中报错 #560

Closed
andrewzrant opened this issue Oct 30, 2023 · 2 comments
Closed

[BUG]get_loadavg.py中报错 #560

andrewzrant opened this issue Oct 30, 2023 · 2 comments

Comments

@andrewzrant
Copy link

Describe the bug
myrq.h:23:30: error: use of undeclared identifier 'UCLAMP_BUCKETS'; did you mean 'UCLAMP_CNT'?
struct uclamp_bucket bucket[UCLAMP_BUCKETS];
^~~~~~~~~~~~~~
UCLAMP_CNT
include/linux/sched.h:277:2: note: 'UCLAMP_CNT' declared here

Desktop (please complete the following information):

  • OS: centos7 linux5.4.54.
@andrewzrant andrewzrant added the bug Something isn't working label Oct 30, 2023
@helight helight added the help wanted Extra attention is needed label Nov 2, 2023
@helight
Copy link
Member

helight commented Nov 10, 2023

eBPF_Supermarket/CPU_Subsystem/BCC_sar/src/cpu_loadavg/get_loadavg.py

@zhangzihengya
Copy link
Contributor

Describe the bug myrq.h:23:30: error: use of undeclared identifier 'UCLAMP_BUCKETS'; did you mean 'UCLAMP_CNT'? struct uclamp_bucket bucket[UCLAMP_BUCKETS]; ^~~~~~~~~~~~~~ UCLAMP_CNT include/linux/sched.h:277:2: note: 'UCLAMP_CNT' declared here

Desktop (please complete the following information):

  • OS: centos7 linux5.4.54.

我这边在5.4.0-132-generic的内核版本上执行 sudo python3 ./get_loadavg.py 没有出现这样的报错,可以成果运行,如果可以的话,请你给我提供更多运行的细节。
或者如果仍然提示UCLAMP_BUCKETS没有被定义的话,你可以试着参照eBPF_Supermarket/CPU_Subsystem/bpftrace_application/runqlen_se.c中:
struct uclamp_rq {
unsigned int value;
struct uclamp_bucket bucket[5];
};
将UCLAMP_BUCKETS定义为5试着看可以运行不?
还有就是请确定你已经成功配置bcc环境

@helight helight removed bug Something isn't working help wanted Extra attention is needed labels Dec 9, 2023
@helight helight closed this as completed Dec 9, 2023
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

No branches or pull requests

3 participants