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

feat: add sysdump as subcommand #572

Merged
merged 9 commits into from
Jul 15, 2024
Merged

Conversation

linglilongyi
Copy link
Contributor

@linglilongyi linglilongyi commented Jul 1, 2024

Background

To dump up the system network config for debugger.

Checklist

Full Changelogs

  • feat: new subcommand sysdump

try to generate a file sysdump.tar.gz at the working dir contain five six file:

  • interfaces.txt # based on netlink
  • rounting.txt # based on gopsutil
  • sysctl.txt # walk through the file in /proc/sys/net"
  • nftbales.txt # if nft list ruleset is executable.
  • iptables.txt # if iptables-save is executable.
  • ip6tables.txt # if ip6tables-save is executable.

Issue Reference

keep opend #524

Test Result

https://pastebin.com/6EAL0EV3

Copy link
Member

@jschwinger233 jschwinger233 left a comment

Choose a reason for hiding this comment

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

Well done! Just left some minor comments, should be easy to handle.

cmd/sysdump.go Outdated Show resolved Hide resolved
cmd/sysdump.go Outdated Show resolved Hide resolved
cmd/sysdump.go Outdated Show resolved Hide resolved
cmd/sysdump.go Outdated Show resolved Hide resolved
cmd/sysdump.go Outdated Show resolved Hide resolved
Copy link
Member

@jschwinger233 jschwinger233 left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Contributor

@dae-prow dae-prow bot left a comment

Choose a reason for hiding this comment

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

🧪 Since the PR has been fully tested, please consider merging it.

@mzz2017 mzz2017 merged commit 867a247 into daeuniverse:main Jul 15, 2024
26 checks passed
@linglilongyi linglilongyi deleted the sysdump-test branch July 19, 2024 07:38
mnixry pushed a commit to mnixry/dae that referenced this pull request Sep 18, 2024
@dae-prow dae-prow bot mentioned this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants