on 2013-12-04 10:46 Neil Laubenthal wrote
On Dec 4, 2013, at 12:41 PM, list boy <i.am.list....@gmail.com> wrote:
Anyone know if there's a way (via the console/Terminal) to track swap file 
size, over time?

i used to have this shell script assigned to a keyboard shortcut:

#!/bin/bash
ls -l /var/vm/swapfile* | awk '{ foo+= $5 } END { printf "swap is %2.1f MB", foo/1024^3 }' | growlnotify

you can get growlnotify from here:

<http://growl.info/downloads>

you could re-purpose this to send output to a log file


You can ls /private/var/vm of course…but I don’t think the actual size of the 
swap files in there goes down unless you reboot in which case they get deleted.

they do go down, but not exactly proportion to memory you free up, and not immediately


I thought I understood this stuff…but Activity Monitor shows 8.11 GB of VM 
currently while I only have a 67MB and a 1GB actual swap file. Where does the 
over almost 7GB of VM reside?

most of that VM is probably mapped to files on disk (other than the swap files) or to memory shared with other processes (whether on disk or in RAM)

i believe it's also possible to allocate memory but never reference it and thus have it exist as an address that is neither in RAM nor on disk


_______________________________________________
MacOSX-talk mailing list
MacOSX-talk@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-talk

Reply via email to