Created
June 10, 2013 03:20
-
-
Save nad2000/5746324 to your computer and use it in GitHub Desktop.
applications of sed and awk to analyze inodes
This file contains 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
# total storage size held by processes: | |
lsof /data | grep postgres | grep deleted | awk '{ SUM += $7} END {print SUM}' | |
# processes that hold inodes: | |
lsof /data -u postgres | grep "(deleted)" | tr -s ' ' | cut -d ' ' -f2 | sort -u | xargs ps -u -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment