Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
recon
erl_crashdump_analyzer.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File erl_crashdump_analyzer.sh of Package recon
#!/bin/sh DUMP=$1 echo -n "analyzing $DUMP, generated on: " sed -n '2p' $DUMP echo ### SLOGAN ### grep -m 1 '^Slogan:' $DUMP ### MEMORY ### echo echo "Memory:" echo "===" sed -n '/^=memory$/,/^=/p' $DUMP | grep -Ev '^(=|total:)' | while read k v; do echo " $k $(($v / (1024 * 1024))) Mb" done echo " ---" echo " total: $(($(sed -n '/^=memory$/,/^=/s/^total: //p' $DUMP) / (1024 * 1024))) Mb" ### PROCESS MESSAGE QUEUES LENGTHS ### echo echo "Different message queue lengths (5 largest different):" echo "===" sed -n 's/^Message queue length: //p' $DUMP | sort -nr | uniq -c | head -5 ### ERROR LOGGER QUEUE LENGTH ### echo echo "Error logger queue length:" echo "===" sed -n '/^Name: error_logger$/,/^=/s/^Message queue length: //p' $DUMP ### PORT/FILE DESCRIPTOR INFO ### echo echo "File descriptors open:" echo "===" echo -n " UDP: " grep -c '^Port controls linked-in driver: udp_inet' $DUMP echo -n " TCP: " grep -c '^Port controls linked-in driver: tcp_inet' $DUMP echo -n " Files: " grep '^Port controls linked-in driver:' $DUMP | grep -Evc '(udp|tcp)_inet' echo " ---" echo -n " Total: " grep -c '^Port controls linked-in driver:' $DUMP ### NUMBER OF PROCESSES ### echo echo "Number of processes:" echo "===" grep -c '=proc:' $DUMP ### PROC HEAPS+STACK ### echo echo "Processes Heap+Stack memory sizes (words) used in the VM (5 largest different):" echo "===" sed -n 's/Stack+heap: //p' $DUMP | sort -nr | uniq -c | head -5 ### PROC OLDHEAP ### echo echo "Processes OldHeap memory sizes (words) used in the VM (5 largest different):" echo "===" sed -n 's/^OldHeap: //p' $DUMP | sort -nr | uniq -c | head -5 ### PROC STATES ### echo "Process States when crashing (sum):" echo "===" sed -n 's/State: //p' $DUMP | sort | uniq -c
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor