Skip to content

Instantly share code, notes, and snippets.

@evandrocoan
Created August 16, 2019 17:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evandrocoan/92695e693c65d8552fbe5b1f68743165 to your computer and use it in GitHub Desktop.
Save evandrocoan/92695e693c65d8552fbe5b1f68743165 to your computer and use it in GitHub Desktop.
```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