Files: 23f9743fb4337640544f9e1d43e9560f54b7b4f0 / index.sh
275 bytesRaw
1 | |
2 | |
3 | over () { |
4 | return $(free | head -n 2 | tail -n 1 | awk ' { print(($4+$7)/$2) <= 0.3 }') |
5 | } |
6 | |
7 | KILL () { |
8 | echo KILL ALL BROWSERS! |
9 | pkill chromium |
10 | pkill firefox |
11 | pkill electron |
12 | } |
13 | |
14 | while true; do |
15 | echo date |
16 | free |
17 | over && echo "SAFE" || KILL |
18 | sleep 1 |
19 | done |
20 | |
21 | |
22 |
Built with git-ssb-web