From 120e8a876040c13d44686dc4dee1ace0bdd45100 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Sep 2019 23:16:03 +0300 Subject: [PATCH] docs: update --- pfetch | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ;;