I need to check memory usage & availability before I could run a program if there is enough memory is left or not, so how could i achieve this? Which command output i should rely on? I have diplayed outputs of SAR, VMstat and PRstat commands below, But how could i check memory usage according to total mem?
Output of SAR command for Free & Swap Mem.
For example i have tried this directingSAR output to a file, however i can't compare it to total memory. How could i proceed? should i use "prtconf | grep -i mem" output to compare the value below?
Output of VMSTAT for Memoru Usage Status of Virtual Machine
Output of PRSTAT command which give process status based on users.
In the output of vmstat the free memory is in KB, the sar output is in pages.
The above shows 81/82GB of free ram.
You're running Solaris x86, so you have a pagesize of 4K:
EDIT: Corrected, see jlliagre's post below. The above output shows 24GB of free RAM.
Use /usr/sbin/prtconf|fgrep Memory to check the total installed RAM.
You might also want to check echo "::memstat" | mdb -k.
ZFS tends to use free memory on the system (if not limited), but it will free it as soon as some process requires it.
I did not know this command before but it really looks good to me.
I could run it as root user and it gave me an output like the following, however i may not be allowed to use root user permission to run such commands in production. What is the difference between free list and cache list? shall i consider the %Tot column for "Free" page sum?
You have plenty of RAM available (62%), the freelist is unused RAM and contains nothing of interest while the cachelist, despite also being unused RAM contains data from previously accessed files. If these files are read again, the data will be picked from that memory saving I/Os.
Well, I suppose the output of sar/vmstat and mdb are not sampled at the same time (or they are from different systems).
I'd expect the freelist (mdb) and free (vmstat) to be almost equal ...,
or I'm missing something?
I can't check actual memory usage in the Redhat 5.5...
The used memory is 14214 Mb of Total 15919 by Free -m command.
I sum the RSS value on PS aux command result and the value is 5428.66Mb.
Yes It's quite different actual usage memory and RSS value.
So I added Shared memory value... (5 Replies)
Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Hello Everyone,
I'm looking for a efficient script that monitors the memory usage on AIX and send email alerts when it reaches certain point.
Q) need to get alerts, when the memory usage exceed 90% on AIX?
or
Q) Need to get alerts when available free Memory is 1G or 10% etc
Any idea... (3 Replies)
hello,
I have purchased VPS from one webhosting company. VPS comes with Virtuozzo power panel. It has 512MB gurranted RAM and dynamic RAM 2048 MB.
I have hosted single domain with 50MB database and wordpress installation.
But I am getting resource alerts. It goes sometime in yellow... (8 Replies)
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Hi,
I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP.
I want the oids for above tasks.
can you please tell me that
Thank you (2 Replies)
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Hi all,
I tried to output memory usage information while the process is
executing at a particular time. I found out some people
suggesting calling the ioctl. I followed it and wrote a test example:
#include <unistd.h>
#include <stdlib.h>
#include <iostream.h>
#include <fcntl.h>
#include... (2 Replies)
how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries
through a c program or java program
i want to store that data into database so i can show it graphically
thanks in advance (2 Replies)