Created
August 16, 2019 17:35
-
-
Save evandrocoan/92695e693c65d8552fbe5b1f68743165 to your computer and use it in GitHub Desktop.
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
```sh | |
#!/bin/bash | |
val1=`vmstat -f 1 | cut -d 'f' -f1 | tr -d " \t\n\r"` | |
while true | |
do | |
val2=`vmstat -f 1 | cut -d 'f' -f1 | tr -d " \t\n\r"` | |
result=$(($val2 - $val1)) | |
echo $result new forks | |
val1=$val2 | |
sleep 1 | |
done | |
exit 0 | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment