#!/usr/local/bin/bash clear if [ "$1" == "" ]; then echo Usage: PROC [string] echo "sleeping ..." sleep 10 fi export vardf=`df|grep proc` if [ "$vardf" == "" ]; then mount_linprocfs linprocfs /proc fi echo -------------------------------------- echo ---- netstat for $1 echo -------------------------------------- netstat -n | grep $1 echo -------------------------------------- echo ---- ps aux for $1 echo -------------------------------------- ps aux | grep $1 echo -------------------------------------- echo ---- checking `pwd` for large files echo -------------------------------------- find . -size +20480 -print echo -------------------------------------- echo ---- PROC DUMP FOR $1 echo -------------------------------------- cd /proc find `top -b | grep $1 | awk '{print $1}'` | egrep "(status|cmdline|maps|status)" | xargs cat find `top -b | grep $1 | awk '{print $1}'` | xargs ls -la echo -------------------------------------- echo ---- lsof of $1 echo -------------------------------------- lsof | grep $1 | awk '{print $9}' | DUPE