The goal of this page is to show the usage of helpful tools for diagnosing Linux systems. Diagnosing systems means more than running diagnostic tests; we’re also concerned with first failure data capture, error log analysis, preventative testing, and system inventory gathering.

  • Check the ISP ip from a command

    wget -q -O – checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//’

  • Watch the % of segments that had to be re-transmitted over the entire uptime of a Linux server. So a significantly higher percentage on a server means some serious networking issues.

    echo $(netstat -s | grep ‘segments retransmited’ | awk ‘{print $1}’) $(netstat -s | grep ‘segments send out’ | awk ‘{print $1}’) | awk ‘{print $1/$2*100}’

  • Use strace to trace the full application PID set by sending the output to a file.

ps auxw | grep <PROCESS_NAME> | egrep -v ‘SKIP_REGEX1|SKIP_REGEX2’ | awk ‘{print”-p ” $2}’ | xargs strace 2>&1 | tee /tmp/strace.out