Created
March 18, 2013 18:43
-
-
Save fields/5189677 to your computer and use it in GitHub Desktop.
script for checking ulimits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return-limits(){ | |
for process in $@; do | |
process_pids=`ps -C $process -o pid --no-headers | cut -d " " -f 2` | |
if [ -z $@ ]; then | |
echo "[no $process running]" | |
else | |
for pid in $process_pids; do | |
echo "[$process #$pid -- limits]" | |
cat /proc/$pid/limits | |
done | |
fi | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment