Changed ram units (module)

This commit is contained in:
Manuel Palenzuela 2019-10-22 19:02:08 +01:00
parent eaaaf89834
commit bad8687016

View file

@ -6,11 +6,11 @@ PREFIX=' '
get_ram() get_ram()
{ {
TOTAL_RAM=$(free -m | awk {'print $2'} | head -n 2 | tail -1) TOTAL_RAM=$(free -mh | awk {'print $2'} | head -n 2 | tail -1)
FREE_RAM=$(free -m | awk {'print $3'} | head -n 2 | tail -1) USED_RAM=$(free -mh | awk {'print $3'} | head -n 2 | tail -1)
MB="MB" MB="MB"
echo "$PREFIX$FREE_RAM/$TOTAL_RAM$MB" echo "$PREFIX$USED_RAM/$TOTAL_RAM"
} }
get_ram get_ram