ソースを参照

Added cached memory varible

Will cause no error if "cached:" doesn't exist
UltimateByte 10 年 前
コミット
c47626a82d
1 ファイル変更2 行追加1 行削除
  1. 2 1
      lgsm/functions/info_distro.sh

+ 2 - 1
lgsm/functions/info_distro.sh

@@ -63,6 +63,7 @@ fi
 physmemtotal=$(free ${humanreadable} | awk '/Mem:/ {print $2}')
 physmemused=$(free ${humanreadable} | awk '/Mem:/ {print $3}')
 physmemfree=$(free ${humanreadable} | awk '/Mem:/ {print $4}')
+pysmemcached=$(free ${humanreadable} | awk '/cache:/ {print $4}')
 swaptotal=$(free ${humanreadable} | awk '/Swap:/ {print $2}')
 swapused=$(free ${humanreadable} | awk '/Swap:/ {print $3}')
 swapfree=$(free ${humanreadable} | awk '/Swap:/ {print $4}')
@@ -111,4 +112,4 @@ if [ -d "${backupdir}" ]; then
 	# size of most recent backup.
 	lastbackupsize=$(du -h "${lastbackup}" | awk '{print $1}')
 
-fi
+fi