diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-10-22 19:02:08 +0100 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-10-22 19:02:08 +0100 |
commit | bad868701677e57e05e76e1810bfeb842fa67337 (patch) | |
tree | 3466c62b0b95e1bd86176233d43fc17c4522e0e6 /modules | |
parent | eaaaf898346d365369afc698bb5b2b3a62ca3ae2 (diff) |
Changed ram units (module)
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/ram | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/ram b/modules/ram index d4a0a36..9e80998 100755 --- a/modules/ram +++ b/modules/ram @@ -6,11 +6,11 @@ PREFIX=' ' get_ram() { - TOTAL_RAM=$(free -m | awk {'print $2'} | head -n 2 | tail -1) - FREE_RAM=$(free -m | awk {'print $3'} | head -n 2 | tail -1) + TOTAL_RAM=$(free -mh | awk {'print $2'} | head -n 2 | tail -1) + USED_RAM=$(free -mh | awk {'print $3'} | head -n 2 | tail -1) MB="MB" - echo "$PREFIX$FREE_RAM/$TOTAL_RAM$MB" + echo "$PREFIX$USED_RAM/$TOTAL_RAM" } get_ram |