-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
capture in GB. Add monthly/gnuplot info
- Loading branch information
1 parent
8eb5217
commit 89faf9f
Showing
4 changed files
with
75 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# The mountpoint to be checked. In the form of a directory, not device | ||
DISK=/partition/to/check | ||
# This is where disk usage will be stored over time. | ||
LOG=/var/log/usageovertimeV2.csv | ||
|
||
LOG=/var/log/usageovertime.csv | ||
MONTHLYLOG=/var/log/usageovertime.monthly.dat |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
#################### | ||
# plotdiskusageGB.sh | ||
#################### | ||
# | ||
# Written by: Joseph Walters | ||
# https://github.com/JoeWalters/DUOT | ||
# | ||
#################### | ||
# | ||
# Output disk usage to a file (to be used monthly) | ||
# | ||
#################### | ||
|
||
MYSELF="$(realpath "$0")" | ||
MYDIR="${MYSELF%/*}" | ||
|
||
source $MYDIR/DUOT.conf | ||
|
||
#Output current disk usage to file | ||
echo "$(date +%Y-%m) $(df -BG | grep common | awk '{print $3}' | sed -e 's/G//g')" >> $MONTHLYLOG | ||
|
||
exit 0 |