Project

General

Profile

Todo #14011

Updated by Jim Pingle over 1 year ago

FreeBSD reports memory usage broken down differently than it did in the past. The code handling the memory graphs and usage counts (Dashboard system info widget, RRD Graphs/Status > Monitoring, etc) needs to be updated to match the current methods. 

 For example, the RRD data file and data collection script use the following values: 

 <pre><code class="shell"> 
 MEM=`/sbin/sysctl -qn vm.stats.vm.v_page_count vm.stats.vm.v_active_count vm.stats.vm.v_inactive_count vm.stats.vm.v_free_count vm.stats.vm.v_cache_count vm.stats.vm.v_wire_count |    /usr/bin/awk '{getline active;getline inactive;getline free;getline cache;getline wire;printf ((active/$0) * 100)":"((inactive/$0) * 100)":"((free/$0) * 100)":"((cache/$0) * 100)":"(wire/$0 * 100)}'` 
 </code></pre> 

 Which queries this list of OIDs: 

 <pre> 
 vm.stats.vm.v_active_count 
 vm.stats.vm.v_cache_count 
 vm.stats.vm.v_free_count 
 vm.stats.vm.v_inactive_count 
 vm.stats.vm.v_page_count 
 vm.stats.vm.v_wire_count 
 </pre> 

 However on current versions the cache is always 0 since it's now a dummy value, and there are new values for laundry and user wired count that may be interesting to graph. 

 <pre> 
 vm.stats.vm.v_active_count: Active pages 
 vm.stats.vm.v_cache_count: Dummy for compatibility 
 vm.stats.vm.v_free_count: Free pages 
 vm.stats.vm.v_inactive_count: Inactive pages 
 vm.stats.vm.v_laundry_count: Pages eligible for laundering 
 vm.stats.vm.v_page_count: Total number of pages in system 
 vm.stats.vm.v_user_wire_count: User-wired virtual memory 
 vm.stats.vm.v_wire_count: Wired pages 
 </pre> 

 So we need to check around the system and make sure that anything performing memory calculations is doing so properly. For example, dropping any references to @vm.stats.vm.v_cache_count@ and if it's appropriate, including the laundry count in calculations. 

 This should also include upgrade code to adjust existing memory RRD data files to include the new fields in question, and updating the Status_Monitoring frontend graphs to display the new values. 

Back