Project

General

Profile

Actions

Todo #14011

closed

Update memory graphs to account for changes in memory reporting

Added by Jim Pingle over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Operating System
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.05
Release Notes:
Default

Description

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:

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)}'`

Which queries this list of OIDs:

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

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.

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

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.


Files

Actions

Also available in: Atom PDF