Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux command to check memory usage in percentage

$ free -t | awk 'NR == 2 {printf("Current Memory Utilization is : %.2f%"), $3/$2*100}'
or
$ free -t | awk 'FNR == 2 {printf("Current Memory Utilization is : %.2f%"), $3/$2*100}'

Current Memory Utilization is : 20.42%
Source by www.2daygeek.com #
 
PREVIOUS NEXT
Tagged: #linux #command #check #memory #usage #percentage
ADD COMMENT
Topic
Name
7+5 =