aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-09-30 23:16:03 +0300
committerDylan Araps <dylan.araps@gmail.com>2019-09-30 23:16:03 +0300
commit120e8a876040c13d44686dc4dee1ace0bdd45100 (patch)
tree787af4859ab6b09ddccadf9211ec53561210097b
parentd706ec7a01c72544a24cb2f17e6d5601fb11bb9d (diff)
downloadpfetch-120e8a876040c13d44686dc4dee1ace0bdd45100.tar.gz
docs: update
-rwxr-xr-xpfetch9
1 files changed, 9 insertions, 0 deletions
diff --git a/pfetch b/pfetch
index a58a506..8648124 100755
--- a/pfetch
+++ b/pfetch
@@ -644,6 +644,15 @@ get_memory() {
SunOS)
hw_pagesize=$(pagesize)
+ # 'kstat' outputs memory in the following format:
+ # unix:0:system_pages:pagestotal 1046397
+ # unix:0:system_pages:pagesfree 885018
+ #
+ # This simply uses the first "element" (white-space
+ # separated) as the key and the second element as the
+ # value.
+ #
+ # A variable is then assigned based on the key.
while read -r key val; do
case $key in
*total) pages_full=$val ;;