site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Thunderbird 1.5.0.4 (Macintosh/20060530) total used free shared buffers cached Swap: 2000084 0 2000084 Cheers, Graham. [*]which would probably explain why I didn't do that before. :-) -- Graham Lee UNIX Systems Manager, Oxford Physics Practical Course http://iamleeg.blogspot.com/ _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On 9/6/06 01:17, Jordan K. Hubbard wrote: You might look at the source code for top(1) - it grubs through a lot of this information. Thanks Jordan, I actually did use top (and vm_stat) to work out how to get the vm statistics and report on the real memory usage. At the time I couldn't see what I wanted for swap usage, but I'll look again now that I've read more (the virtual memory chapter in "Mach 3 Kernel Principles" by Loepere/OSF is helping quite a lot). To me, it looks like there's no way to produce output equivalent to the analogous program on Linux[*], which (abridged) produces this: because their VMM uses static files/partitions of fixed size and then just works until they're full (or you swapon(2) another), whereas the Darwin VMM is dynamically growing (and, if the moon is in the third house and a two-headed calf has been born, plus some nonsense about low water marks and filesizes, shrinking) its usage on the filesystem, so in principle there's no "total" swap availability, modulo hard drive space... ...which leads me to answer a question from my original post; is there a way to get xnu to start swapping on a new partition? The answer seems to be to use /sbin/dynamic_pager (from system_cmds), however there's still no way to report on what external paging files are currently in use nor to disable one (so if you do go load-balancing your swapspace across multiple disks, you'd better remember not to forcibly unmount any of them). That would potentially be useful <sfx:reads some more, cracks open Xcode>. This email sent to site_archiver@lists.apple.com