Re: Check Memory Usage, program like 'free' in Linux

看板FB_questions作者時間14年前 (2011/11/04 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/10 (看更多)
Jon Schipp <jonschipp@gmail.com> writes: > On Thu, Nov 3, 2011 at 9:25 AM, Rares Aioanei <bsdlisten@gmail.com> wrote: > >> On 11/03/2011 03:18 PM, Jon Schipp wrote: >> >>> Is there a program to check physical memory usage in FreeBSD(using 8.2 >>> RELEASE)? >>> In vain of 'free' in Linux. >>> >>> I know you can check the values with sysctl, I was just checking if anyone >>> has a "cleaner" option. >>> I was always curious. >>> >>> Thanks >>> Jon >>> ______________________________**_________________ >>> freebsd-questions@freebsd.org mailing list >>> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<http://lists.freebsd.org/mailman/listinfo/freebsd-questions> >>> To unsubscribe, send any mail to "freebsd-questions-** >>> unsubscribe@freebsd.org <freebsd-questions-unsubscribe@freebsd.org>" >>> >>> top? >> > > Crap, I forgot mention that it needs to be non-interactive, it will be for > e-mail alerts. > > So that rules out top as for as I know. No, you could script it out of top(1), but I'm going to guess that you're trying to be warned when the system is close to running out of memory. That is silly -- you paid for the memory; why would you *want* it to sit around doing nothing? Also note that the definition of "free" is somewhat complicated. Maybe if you described the actual problem you want to solve, we could suggest a more appropriate answer. A literal answer to your question might be: top -d 1|grep '^Mem:'|cut -d ',' -f 6 assuming the format of the line of top doesn't change. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1EijRcsZ (FB_questions)
討論串 (同標題文章)
文章代碼(AID): #1EijRcsZ (FB_questions)