script for $vm_stat

[email protected]
Newsgroups perl.macosx
Organization http://groups.google.com
Message-ID <eddd3589-ff2e-49e8-8cfd-75666debbba0@d23g2000yqc.googlegroups.com>
Hi!
Help!  me  a script for vm_stat

$ vm_stat
Mach Virtual Memory Statistics: (page size of 4096 bytes)
Pages free:                   248491.
Pages active:                 345632.
Pages inactive:               306207.
Pages wired down:             146885.
"Translation faults":      598998500.
Pages copy-on-write:        42312589.
Pages zero filled:         293975670.
Pages reactivated:             64106.
Pageins:                      243273.
Pageouts:                      84934.
Object cache: 15930737 hits of 16092223 lookups (98% hit rate)

Like this:
$perl script.pl
Pages free:248491 Pages active: 345632 Pages inactive: 306207 Pages
wired down:146885 "Translation faults": 598998500 Pages copy-on-write:
42312589 Pages zero filled: 64106 Pages reactivated:64106 Pageins:
243273 Pageouts: 84934 Object cache:15930737

I would like to use it in cacti graph:
href="http://content.screencast.com/users/tamias/folders/Jing/media/
7c7f2893-b6e9-4018-864c-f0fe63ce0aca/00000210.png
It is built using 4 script, but it is expensive.
Need a single script, and that he had issued all the values at once.

Thank you in advance!

[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.