Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Comments

Add alias for bcc tools to run in docker container#1278

Merged
pothos merged 2 commits intoflatcar-archive:mainfrom
aniruddha2000:aniruddha/add-alias-sysstat-bcc-tools
Sep 21, 2021
Merged

Add alias for bcc tools to run in docker container#1278
pothos merged 2 commits intoflatcar-archive:mainfrom
aniruddha2000:aniruddha/add-alias-sysstat-bcc-tools

Conversation

@aniruddha2000
Copy link
Contributor

Add alias for bcc tools to run in docker container

Added alias for bcc tool packages tcpretrans tcpconnect tcpaccept biolatency ext4slower ext4dist to run necessary debug tools

Testing done

  • emerge-amd64-usr app-shells/bash
  • Run those alias in the image.

@aniruddha2000
Copy link
Contributor Author

Still getting error for the alias iovisor-ext4dist

cannot attach kprobe, probe entry may not exist
Traceback (most recent call last):
  File "/usr/share/bcc/tools/ext4dist", line 205, in <module>
    b.attach_kprobe(event="ext4_file_write_iter", fn_name="trace_entry")
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 834, in attach_kprobe
    (fn_name, event))
Exception: Failed to attach BPF program trace_entry to kprobe ext4_file_write_iter

for alias iovisor-ext4slower

cannot attach kprobe, probe entry may not exist
Traceback (most recent call last):
  File "/usr/share/bcc/tools/ext4slower", line 318, in <module>
    b.attach_kprobe(event="ext4_file_write_iter", fn_name="trace_write_entry")
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 834, in attach_kprobe
    (fn_name, event))
Exception: Failed to attach BPF program trace_write_entry to kprobe ext4_file_write_iter

@aniruddha2000
Copy link
Contributor Author

@pothos would you like to build an image and test it :)

@pothos
Copy link
Contributor

pothos commented Sep 16, 2021

Thanks!
I started a build to verify that the alias gets set as expected (will paste the image url for build 3597 here). For testing it's enough to run the lines on a shell in the current Stable or Alpha image. I would exclude non-working commands until we get them working.

@aniruddha2000
Copy link
Contributor Author

@pothos then after your build if those commands are also not working then would you like me to remove those aliases?

@pothos
Copy link
Contributor

pothos commented Sep 20, 2021

In general setting up the alias works well, but not for the root user which has no .bashrc file. I think it's ok to add one but for now using only core should also be good.

Yes, please remove the two aliases that don't work.

@aniruddha2000
Copy link
Contributor Author

In general do we have any specific implementation of the root .bashrc or if we are going for that then we have to implement our own from scratch?

@pothos pothos merged commit 6466f1c into flatcar-archive:main Sep 21, 2021
@pothos
Copy link
Contributor

pothos commented Sep 21, 2021

Thanks, there is nothing set up for the root bashrc but I see no problem in adding it (edit: I mean, using the same as for the regular user)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants