Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,31 @@ save_counter_snapshot() {
save_cmd_all_ns "ifconfig -a" "ifconfig.counters_$idx"
}

###############################################################################
# save the debug dump output
###############################################################################
save_dump_state_all_ns() {
MODULES="$(dump state -s | sed '1d;2d' | awk '{print $1}')"
local UVDUMP="unified_view_dump"
echo "DEBUG DUMP: Modules Available to Generate Debug Dump Output"
echo $MODULES
$MKDIR $V -p $LOGDIR/$UVDUMP

for addr in $MODULES;
do
save_cmd "dump state $addr all --key-map" "$UVDUMP/$addr"
if [[ ( "$NUM_ASICS" > 1 ) ]] ; then
for (( i=0; i<$NUM_ASICS; i++ ))
do
local cmd="dump state $addr all --key-map --namespace asic$i"
local file="$UVDUMP/$addr.asic$i"
save_cmd "$cmd" "$file"
done
fi
done
}


###############################################################################
# Main generate_dump routine
# Globals:
Expand Down Expand Up @@ -1126,7 +1151,8 @@ main() {
save_nat_info
save_bfd_info
save_redis_info

save_dump_state_all_ns

save_cmd "docker ps -a" "docker.ps"
save_cmd "docker top pmon" "docker.pmon"

Expand Down