
![]() |
perkiset
Probably a stupid question, but other than "top" is there a quick and easy way to see how much usable RAM (not swap) is left on a box? I am trying to tune some caching systems and would like to monitor the cache and free mem for a few days...
nop_90
you mean like this
![]() :/proc$ cat meminfo MemTotal: 1555656 kB MemFree: 718176 kB Buffers: 27056 kB Cached: 379328 kB SwapCached: 0 kB Active: 462252 kB Inactive: 292772 kB HighTotal: 655040 kB HighFree: 1144 kB LowTotal: 900616 kB LowFree: 717032 kB SwapTotal: 4915880 kB SwapFree: 4915880 kB Dirty: 64 kB Writeback: 0 kB AnonPages: 348676 kB Mapped: 95268 kB Slab: 50088 kB SReclaimable: 35920 kB SUnreclaim: 14168 kB PageTables: 2924 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 5693708 kB Committed_AS: 1120400 kB VmallocTotal: 114680 kB VmallocUsed: 15956 kB VmallocChunk: 97120 kB nop_90
lots of cool shit in there
/proc$ cat stat cpu 20823 111 2260 208161 9617 494 180 0 cpu0 13793 5 1572 97490 7317 494 177 0 cpu1 7029 106 688 110671 2299 0 3 0 intr 595492 302441 1813 0 2 0 0 0 0 34 7884 0 0 1693 0 20531 3040 112825 0 117301 381 18535 0 2 9010 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ctxt 1822064 btime 1190267920 processes 7013 procs_running 1 procs_blocked 1 nop_90
i forgot about that thanx for reminding me
perkiset
Hey nop - that looks delightful, but where would the meminfo file or stream live? Can't find it on my unix or
linuxboxesnop_90
![]() maybe it some strange linuxsystem, i do not know if unix have this.they do not have a /proc directory all that stuff live in /proc search on G for "/proc" freebsd have this directory etc. woops forgot to mention if my faulty memory serves me correct be careful when playing with those files in that directory, especially if u root. i can not remember the exact details, or maybe it another directory ![]() but you could use it to modify memory. thedarkness
/proc/meminfo doesn't exist in freebsd (whch
macos is based on)Maybe try "sysctl -a" or "pstat" to get you started.......? HTH, td perkiset
@Nop - found it in RedHat 9 - probably elsewhere as well, but that's a start thanks. As it turns out, the place I need to monitor is that system, so that's a plus for now anyhoo...
@TD - sysctl is there - cripes what a list (sysctl -A) - what is pstat? Can't find that one... thedarkness
BSD specific I believe perk
ratthing
Late to the party (what else is new?). Also check out "free" and "vmstat" ("vm_stat" on OS X).
What someone else said about /proc...be careful in there as root, you can hork up your system pretty easily. =RT= perkiset
$<parse> = shell_exec('free');
![]() Like it RT ratthing
I live to serve!
![]() |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads