Re: showing total/free memory
Chris Pressey wrote: Well, I'm not sure if it works on 5.x, but you could try /usr/ports/sysutils/muse Should be easier to parse than the other options. -Chris Works fine under 5.1 - thanx Chris. However the output is a little confusing, /var/run/dmesg.boot shows this: real memory = 134217728 (128 MB) however muse shows this: Active: 42393600 Bytes Inactive:2424832 Bytes Wired: 37715968 Bytes Reserved: 499712 Bytes Cache: 0 Bytes Buffer: 23166976 Bytes Total: 127639552 Bytes Free: 43548672 Bytes where the total works out to 121.7M. What might be the reason for this discrepancy? Dave ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
On Fri, Jan 30, 2004 at 08:11:26AM +1100, Rowdy wrote: Chris Pressey wrote: Well, I'm not sure if it works on 5.x, but you could try /usr/ports/sysutils/muse Should be easier to parse than the other options. -Chris You could always output the results of dmesg at boot-time to a file - adding something like this: dmesg /var/log/dmesg.boot to /usr/local/etc/rc.local. -- Jez Hancock - System Administrator / PHP Developer http://munk.nu/ http://jez.hancock-family.com/ - Another FreeBSD Diary http://ipfwstats.sf.net/- ipfw peruser traffic logging ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
On Thu, 29 Jan 2004 21:29:07 + Jez Hancock [EMAIL PROTECTED] wrote: On Fri, Jan 30, 2004 at 08:11:26AM +1100, Rowdy wrote: Chris Pressey wrote: Well, I'm not sure if it works on 5.x, but you could try /usr/ports/sysutils/muse Should be easier to parse than the other options. -Chris You could always output the results of dmesg at boot-time to a file - adding something like this: dmesg /var/log/dmesg.boot to /usr/local/etc/rc.local. This already happens, to /var/run/dmesg.boot Not sure how to account for the discrepancy - presumably it's not counting memory that can't be used under FreeBSD (possibly the 'wired' memory, for the kernel, and some other stuff.) If you really need the real total memory on the machine (as opposed to what's available to the operating system,) you should probably parse /var/run/dmesg.boot (which isn't difficult - just grep for 'real memory' and take the fourth field with e.g. awk '{ print $4 }'.) -Chris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
Jez Hancock wrote: You could always output the results of dmesg at boot-time to a file - adding something like this: dmesg /var/log/dmesg.boot to /usr/local/etc/rc.local. Don't need to ... a default FreeBSD 5.1 installation already writes it to /var/run/dmesg.boot :-) Dave ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
On Fri, Jan 30, 2004 at 08:40:16AM +1100, Rowdy wrote: Jez Hancock wrote: You could always output the results of dmesg at boot-time to a file - adding something like this: dmesg /var/log/dmesg.boot to /usr/local/etc/rc.local. Don't need to ... a default FreeBSD 5.1 installation already writes it to /var/run/dmesg.boot :-) Not too well apparently :grin: Just a suggestion :P -- Jez Hancock - System Administrator / PHP Developer http://munk.nu/ http://jez.hancock-family.com/ - Another FreeBSD Diary http://ipfwstats.sf.net/- ipfw peruser traffic logging ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
showing total/free memory
Greetings, What is the best/easiest way on FreeBSD 5.1 to show the total and free amount of memory (at any given moment in time)? I am setting up MRTG and at the moment I am parsing /var/run/dmesg.boot and the output from `top -b -d 1` to get total and free memory respectively, but I hope there is an easier way. tia Dave ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
On Thu, Jan 29, 2004 at 08:03:46AM +1100, Rowdy wrote: I am setting up MRTG and at the moment I am parsing /var/run/dmesg.boot and the output from `top -b -d 1` to get total and free memory respectively, but I hope there is an easier way. Try vmstat instead. -- Matthew Hunt [EMAIL PROTECTED] * Clearly there are more things in the http://www.pobox.com/~mph/ * heavens than anyone anticipated. -enp ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
Matthew Hunt wrote: On Thu, Jan 29, 2004 at 08:03:46AM +1100, Rowdy wrote: I am setting up MRTG and at the moment I am parsing /var/run/dmesg.boot and the output from `top -b -d 1` to get total and free memory respectively, but I hope there is an easier way. Try vmstat instead. Thought of that. According to the man page, vmstat shows, for memory: avm active virtual pages fre size of the free list Does the size of the free list correspond to actual free memory? I wasn't sure whether that was the case or not. Also, it's a case of parsing the output from top or parsing the output from vmstat - I had hoped there would be a simple command that would show memory state :) Dave ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
On Thu, 29 Jan 2004 08:26:00 +1100 Rowdy [EMAIL PROTECTED] wrote: Matthew Hunt wrote: On Thu, Jan 29, 2004 at 08:03:46AM +1100, Rowdy wrote: I am setting up MRTG and at the moment I am parsing /var/run/dmesg.boot and the output from `top -b -d 1` to get total and free memory respectively, but I hope there is an easier way. Try vmstat instead. Thought of that. According to the man page, vmstat shows, for memory: avm active virtual pages fre size of the free list Does the size of the free list correspond to actual free memory? I wasn't sure whether that was the case or not. Also, it's a case of parsing the output from top or parsing the output from vmstat - I had hoped there would be a simple command that would show memory state :) Dave Well, I'm not sure if it works on 5.x, but you could try /usr/ports/sysutils/muse Should be easier to parse than the other options. -Chris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
On Wednesday 28 January 2004 03:58 pm, Chris Pressey wrote: On Thu, 29 Jan 2004 08:26:00 +1100 Rowdy [EMAIL PROTECTED] wrote: Matthew Hunt wrote: On Thu, Jan 29, 2004 at 08:03:46AM +1100, Rowdy wrote: I am setting up MRTG and at the moment I am parsing /var/run/dmesg.boot and the output from `top -b -d 1` to get total and free memory respectively, but I hope there is an easier way. Try vmstat instead. Thought of that. According to the man page, vmstat shows, for memory: avm active virtual pages fre size of the free list Does the size of the free list correspond to actual free memory? I wasn't sure whether that was the case or not. Also, it's a case of parsing the output from top or parsing the output from vmstat - I had hoped there would be a simple command that would show memory state :) Dave Well, I'm not sure if it works on 5.x, but you could try /usr/ports/sysutils/muse Should be easier to parse than the other options. -Chris ...how nice. Thanks. Andrew Gould ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: showing total/free memory
Chris Pressey wrote: Well, I'm not sure if it works on 5.x, but you could try /usr/ports/sysutils/muse Should be easier to parse than the other options. -Chris That sounds just the ticket, thanx :) It is listed in the current ports tree, and so presumably does work under 5.x. Dave ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]