pavva94 / snake-os

Automatically exported from code.google.com/p/snake-os
0 stars 1 forks source link

Physical RAM - Useful information (improvement) #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The S.O. always use most available free memory to cache file to optimize disk 
access, so the status.cgi displays correct informations of used RAM, but 
they´ll  confuse users about use of resources by programs.

Please, change code as sugested below:

From:
<TR><TH>Physical RAM:</TH><TD><%= $(free | grep Mem | awk '{print "Total: 
"$2"KB - Free: "$4"KB"}')%></TD></TR>

To:
<TR><TH>Physical RAM:</TH><TD><%= $(cat /proc/meminfo | tr '\n' ' ' | awk 
'{print "Total: "$2"KB - Free: "$5"KB - Buffers: "$8"KB - Cached: 
"$11"KB"}')%></TD></TR>

Sample result:
Total: 30444KB - Free: 1340KB - Buffers: 448KB - Cached: 17372KB

Original issue reported on code.google.com by meguer...@gmail.com on 15 Aug 2010 at 10:15

GoogleCodeExporter commented 8 years ago
I compiled a version with this and other changes.

http://code.google.com/p/snake-os/issues/detail?id=94

Enjoy

Original comment by meguer...@gmail.com on 29 Nov 2010 at 1:30