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