Thread View: muc.lists.netbsd.tech.userlevel
3 messages
3 total messages
Started by Emmanuel Dreyfus
Fri, 16 Oct 2026 15:25
systat vm free units
Author: Emmanuel Dreyfus
Date: Fri, 16 Oct 2026 15:25
Date: Fri, 16 Oct 2026 15:25
40 lines
3384 bytes
3384 bytes
Hello systat(1) called with the vm argument shows some VM statistics, including free memory. Here is the output: Anon 2681436 33% zero Exec 202860 2% wired 88688 File 1402936 17% inact 247712 Meta 146893 % bufs 13519 (kB) real swaponly free Active 3950772 3071716 The man page says: Below this are statistics on memory utilization. The first row of the table reports memory usage only among active pro- cesses, that is processes that have run in the previous twenty seconds. The second row reports on memory usage of all processes. The first column reports on the number of physical pages claimed by processes. The second column reports the number of pages of memory and swap. The third column gives the number of pages of free memory and swap. That does not fit the display very well, it seems systat was updated and the documentation was left behind. I assume 3071716 is the unued memory, but it cannot be in pages: hw.physmem64 = 8503410688 hw.pagesize = 4096 3071716 pages of 4096 bytes would not fit in 8503410688 bytes. Most likely the numbers are in kB. Did I miss something or this man page needs an update? -- Emmanuel Dreyfus manu@netbsd.org -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: systat vm free units
Author: Taylor R Campbell
Date: Fri, 16 Oct 2026 18:36
Date: Fri, 16 Oct 2026 18:36
53 lines
4004 bytes
4004 bytes
> Date: Fri, 16 Oct 2026 15:25:14 +0000 > From: Emmanuel Dreyfus <manu@netbsd.org> > > Hello > > systat(1) called with the vm argument shows some VM statistics, > including free memory. Here is the output: > > Anon 2681436 33% zero > Exec 202860 2% wired 88688 > File 1402936 17% inact 247712 > Meta 146893 % bufs 13519 > (kB) real swaponly free > Active 3950772 3071716 Isn't this saying all the numbers (other than those marked with %) are in kilobytes? > The man page says: > Below this are statistics on memory utilization. The first > row of the table reports memory usage only among active pro- > cesses, that is processes that have run in the previous > twenty seconds. The second row reports on memory usage of > all processes. The first column reports on the number of > physical pages claimed by processes. The second column > reports the number of pages of memory and swap. The third > column gives the number of pages of free memory and swap. > > That does not fit the display very well, it seems systat was > updated and the documentation was left behind. I assume > 3071716 is the unued memory, but it cannot be in pages: > hw.physmem64 = 8503410688 > hw.pagesize = 4096 > > 3071716 pages of 4096 bytes would not fit in 8503410688 bytes. > Most likely the numbers are in kB. > > Did I miss something or this man page needs an update? The npage ma text and the current code came from a patch by Greg Woods in 2007 (applied in 2018), submitted in PR bin/36542: better "systat vm" output <https://gnats.NetBSD.org/36542>. It looks to me like the man page should say `kilobytes', not `pages'. If I'm reading the right part of the code (after 30sec of skimming), it appears to be converting internal numbers of pages to display numbers of kilobytes: https://nxr.NetBSD.org/xref/src/usr.bin/systat/vmstat.c?r=1.93#499 -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: systat vm free units
Author: Emmanuel Dreyfus
Date: Fri, 16 Oct 2026 18:49
Date: Fri, 16 Oct 2026 18:49
13 lines
2488 bytes
2488 bytes
On Fri, Oct 16, 2026 at 06:36:01PM +0000, Taylor R Campbell wrote: > Isn't this saying all the numbers (other than those marked with %) are > in kilobytes? That is perfectly right! -- Emmanuel Dreyfus manu@netbsd.org -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads