Created
October 20, 2016 20:55
-
-
Save ericdcobb/f1fae8c6392f149eb125ac693a59592e to your computer and use it in GitHub Desktop.
Continuously Count open files for a supplied process, OSX
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/bash | |
echo "Counting files open by PID $1" | |
echo "Press [CTRL-C] to stop..." | |
while : | |
do | |
lsof -p $1 | wc -l | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment