[ZBX-9593] vm.memory.size[] parameters should be described thoroughly for each platform Created: 2015 May 27  Updated: 2024 Apr 10  Resolved: 2017 Dec 26

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D)
Affects Version/s: 2.4.5
Fix Version/s: 4.0 (plan)

Type: Documentation task Priority: Minor
Reporter: Aleksandrs Saveljevs Assignee: Martins Valkovskis
Resolution: Fixed Votes: 0
Labels: memory
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team A
Sprint: Sprint 17, Sprint 18, Sprint 21, Sprint 23
Story Points: 0.25

 Description   

We have a page at https://www.zabbix.com/documentation/2.4/manual/appendix/items/vm.memory.size_params that lists available parameters for vm.memory.size[] key.

However, some descriptions are very platform-specific. For instance, the following is correct on BSD systems only, even though "available" is supported on every platform:

used - active + wired memory
available - inactive + cached + free memory

This page should probably be improved so that it describes the platforms on which a particular parameter is supported and it should describe the meaning of a particular parameter on a particular platform.



 Comments   
Comment by Valdis Kauķis (Inactive) [ 2017 Dec 12 ]

A survey of memory statistics retrieval, depending on platform:

Platform Key function "total" "available" "used"
Win32 GlobalMemoryStatusEx(&ms_ex) ms_ex.ullTotalPhys "free" "total"-"free"
Solaris sysconf(..) _SC_PHYS_PAGES "free" "total"-"free"
OSX sysctl(,,&memsize,);
host_statistics(,,&vm,)
HW_MEMSIZE "inactive"+"free" "active"+"wired"
Tru64 vmstat -s inactive+active+wired "free" "total"-"free"
OpenBSD sysctl(,,&uvm,) uvm.npages "inactive"+"free"+"cached" "active"+"wired"
NetBSD sysctl(,,&uvm,) uvm.npages "inactive"+"execpages"+"filepages"+"free" "total"-"free"
FreeBSD sysctlbyname() hw.physmem "inactive"+"cached"+"free" "active"+"wired"+"cached"
Linux<3.14 sysinfo(&info) info.totalram "free"+"buffers" "total"-"free"
Linux 3.14+ sysinfo(&info) info.totalram /proc/meminfo, "Cached:"+"MemAvailable:" "total"-"free"
HP UX pstat_getstatic() pst.physical_memory "free" "total"-"free"
AIX perfstat_memory_total(,&m,) m.real_total "free"+"cached" m.real_inuse

Please note that in two cases the value cannot be calculated from other metrics:
"available" on Linux 3.14+ and "used" on AIX.

On all platforms, "pavailable" is calculated as "available"/"total"*100
and "pused" is calculated as "used"/"total"*100 .
Besides these 5 metrics available everywhere, on some platforms the following metrics can also be calculated:

Win32

"free" = ms_ex.ullAvailPhys

Solaris

"free" = _SC_AVPHYS_PAGES

Mac OS X

"active" = vm.active_count
"inactive" = vm.inactive_count
"wired" = vm.wire_count
"free" = vm.free_count

Tru64

"free" = free

OpenBSD

"active" = uvm.active
"inactive" = uvm.inactive
"wired" = uvm.wired
"free" = uvm.free
"buffers" = VM_NKMEMPAGES
"cached" = uvm.vnodepages + uvm.vtextpages
"shared" = vm.t_vmshr + vm.t_rmshr

NetBSD

"active" = uvm.active
"inactive" = uvm.inactive
"wired" = uvm.wired
"anon" = uvm.anonpages
"exec" = uvm.execpages
"file" = uvm.filepages
"free" = uvm.free
"buffers" = VM_NKMEMPAGES
"cached" = uvm.execpages + uvm.filepages
"shared" = vm.t_vmshr + vm.t_rmshr

FreeBSD

"active" = "vm.stats.vm.v_active_count"
"inactive" = "vm.stats.vm.v_inactive_count"
"wired" = vm.stats.vm.v_wire_count
"cached" = vm.stats.vm.v_cache_count
"free" = vm.stats.vm.v_free_count
"buffers" = vfs.bufspace
"shared" = vm.t_vmshr + vm.t_rmshr

Linux

"free" = info.freeram
"buffers" = info.bufferram
"cached" = /proc/meminfo, "Cached:"
"shared" = info.sharedram

HP UX

"free" = pdy.psd_free
"active" = pdy.psd_arm

AIX

"pinned" = m.real_pinned
"free" = m.real_free
"cached" = m.numperm

Comment by Valdis Kauķis (Inactive) [ 2017 Dec 12 ]

The above comment should be edited/transplanted by professionals into the Zabbix public documentation.

Generated at Fri Apr 26 23:29:48 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.