Last active
December 20, 2015 22:29
-
-
Save larsvegas/6205421 to your computer and use it in GitHub Desktop.
aws ec2 runs out of disk space due to open file descriptors on deleted files like at http://serverfault.com/questions/454194/disk-space-keeps-filling-up-on-ec2-instance-with-no-apperent-files-directories. Kill it.
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
#!/bin/sh | |
sudo lsof | grep deleted | awk '{print $2}' | grep -v 1 | xargs sudo kill -USR1 |
@zeisss thanks, i rewrote it with the help of @janpieper ...
using kill -USR1 seems like to work fine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the loop could be replaced with
xargs
;)