Skip to content

Commit

Permalink
improve log dumper
Browse files Browse the repository at this point in the history
get more networking information usefult to troubleshoot network issues.
  • Loading branch information
aojea committed Jan 7, 2025
1 parent 77256f8 commit 5b08cef
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkg/dump/dumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,19 @@ func (n *logDumperNode) dump(ctx context.Context) []error {
if err := n.shellToFile(ctx, "sudo iptables -t filter --list-rules", filepath.Join(n.dir, "iptables-filter.log")); err != nil {
errors = append(errors, err)
}
if err := n.shellToFile(ctx, "ip route", filepath.Join(n.dir, "ip-routes.log")); err != nil {
if err := n.shellToFile(ctx, "sudo nft list ruleset", filepath.Join(n.dir, "nftables-ruleset.log")); err != nil {
errors = append(errors, err)
}
if err := n.shellToFile(ctx, "ip route show table all", filepath.Join(n.dir, "ip-routes.log")); err != nil {
errors = append(errors, err)
}
if err := n.shellToFile(ctx, "ip rule list", filepath.Join(n.dir, "ip-rules.log")); err != nil {
errors = append(errors, err)
}
if err := n.shellToFile(ctx, "ip -s link", filepath.Join(n.dir, "ip-link.log")); err != nil {
errors = append(errors, err)
}
if err := n.shellToFile(ctx, "ss -s", filepath.Join(n.dir, "netstat.log")); err != nil {
errors = append(errors, err)
}

Expand Down

0 comments on commit 5b08cef

Please sign in to comment.