mirror of
https://github.com/pstadler/metrics.sh.git
synced 2025-11-06 20:33:04 -05:00
first commit
This commit is contained in:
2
metrics/cpu.sh
Normal file
2
metrics/cpu.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo $(ps aux | awk {'sum+=$3;print sum'} | tail -n 1)
|
||||
2
metrics/memory.sh
Normal file
2
metrics/memory.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo $(free | awk '/buffers\/cache/{print $4/($3+$4) * 100.0;}')
|
||||
2
metrics/swap.sh
Normal file
2
metrics/swap.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo $(free | awk '/Swap/{print $3/$2 * 100.0;}')
|
||||
Reference in New Issue
Block a user