Browse Source

Added more info about storage

Made more details available on storage.  such as filesystem total
storage used and available.
pull/408/head
Daniel Gibbs 10 years ago
parent
commit
c4e05125eb
  1. 9
      functions/fn_details
  2. 6
      functions/fn_details_distro

9
functions/fn_details

@ -2,7 +2,7 @@
# LGSM fn_details function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
# Version: 190414
# Version: 270515
# Description: Displays server infomation.
@ -41,9 +41,12 @@ rm -f .fn_details_performance
fn_details_disk(){
echo -e ""
echo -e "\e[93mDisk Usage\e[0m"
echo -e "\e[93mStorage\e[0m"
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
echo -e "\e[34mDisk available:\t\e[0m${availspace}" >> .fn_details_disk
echo -e "\e[34mFilesystem:\t\e[0m${filesystem}" >> .fn_details_disk
echo -e "\e[34mTotal:\t\e[0m${totalspace}" >> .fn_details_disk
echo -e "\e[34mUsed:\t\e[0m${usedspace}" >> .fn_details_disk
echo -e "\e[34mAvailable:\t\e[0m${availspace}" >> .fn_details_disk
echo -e "\e[34mServerfiles:\t\e[0m${serverfilesdu}" >> .fn_details_disk
if [ -d "${backupdir}" ]; then
echo -e "\e[34mBackups:\t\e[0m${backupdirdu}" >> .fn_details_disk

6
functions/fn_details_distro

@ -2,7 +2,7 @@
# LGSM fn_details_distro function
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
# Version: 140215
# Version: 270515
# Description: Variables providing useful info on the Operating System such as disk and performace info.
# Used for fn_details, fn_debug and fn_email.
@ -64,7 +64,11 @@ days=$(( uptime/60/60/24 ))
# Disk usage
# available space on the partition.
filesystem=$(df -hP ${rootdir} | grep -v "Filesystem" | awk '{print $1}')
totalspace=$(df -hP ${rootdir} | grep -v "Filesystem" | awk '{print $2}')
usedspace=$(df -hP ${rootdir} | grep -v "Filesystem" | awk '{print $3}')
availspace=$(df -hP ${rootdir} | grep -v "Filesystem" | awk '{print $4}')
# used space in serverfiles dir.
serverfilesdu=$(du -sh ${serverfiles} | awk '{print $1}')
if [ -z ${serverfilesdu} ]; then

Loading…
Cancel
Save