1824470 Members
3303 Online
109671 Solutions
New Discussion юеВ

how to find memory usage

 
VINU
Frequent Advisor

how to find memory usage

hello friends,
how to find out the memory usage in hp-ux, so that i can add more physical memory if the usage is high.

thanks & regards
vinu
16 REPLIES 16
Bruno Ganino
Honored Contributor

Re: how to find memory usage

Try sar command.
Bruno
Torino (Turin) +2H
eran maor
Honored Contributor

Re: how to find memory usage

Hi

you can you the command top to see the usage of the memory .

also you can check online with glance to see what is the status in realtime , but the best way is to check for a piored of time the memory usage with MWA and perfview .

also i belive that there isnt too much memory , at my home i have 1 g.b and thinking again of buying again more .

also you can check some tip of imporving your memory usage like dbc_max_pct ( from 50 default to 15 )

eran maor
love computers
RAC_1
Honored Contributor

Re: how to find memory usage

As told by Eran, having the default values for buffer cache(dbc_max_pct and dbc_min_pct) will leave less memory for users.

Check with glance -m. It will give detailed status on memory.

You can also check free mem available with vmstat also.

Anil
There is no substitute to HARDWORK
KapilRaj
Honored Contributor

Re: how to find memory usage

vmstat (?)

Kaps
Nothing is impossible
VINU
Frequent Advisor

Re: how to find memory usage

the top and sar outputs only show virtual memory statistics,how we can relate this to usage of physical memory present in the system.
RAC_1
Honored Contributor

Re: how to find memory usage

Did you do glance -m (do U have glance installed? A evaluation copy is on first cd for 60 days)

This will give detailed information.

Anil
There is no substitute to HARDWORK
Mel Burslan
Honored Contributor

Re: how to find memory usage

if you have the licence for glance plus pak on this server, run glance in the terminal mode (not in motif/X) and when the first screen appears, look at the top activity indicators. 3rd one from the top, shows you the actual memory utilization. To dwelve deeper into the memory usage, you can press "m" and see the detailed stats for memory usage.

But as almost everyone else before me has suggested, do not leave your dbc_max_pct and dbc_min_pct kernel parms as default as these will decive you into a false sense of high memory utilization.

HTH
________________________________
UNIX because I majored in cryptology...
VINU
Frequent Advisor

Re: how to find memory usage

i don't have glance,perfview etc.
regds
vinu
RAC_1
Honored Contributor

Re: how to find memory usage

grep -i physical /var/adm/syslog/syslog.log --To get RAM on your system.

kmtune -lq dbc_max_pct -lq dbc_min_pct -- To get buffer cache set on your machine. The values are percentage of RAM on your machine.

vmstat 3 5--To get free mem available to suers. The values are in pages. (bufpage = 4096k)

echo free_mem/D|adb -k /stand/vmunix /dev/kmem -- Again to get free mem. (In pages)


You can also get tools like shminfo and kmeminfo to get details on getting memory details about shared mem and kernel memory.

Anil
There is no substitute to HARDWORK
VINU
Frequent Advisor

Re: how to find memory usage

hello anil and other friends,
the 'echo free_mem/D|adb -k /stand/vmunix /dev/kmem' command is not working,the output is given below

uboz096:/ > echo free_mem/D|adb -k /stand/vmunix /dev/kmem
symbol not found
uboz096:/ >

the 'vmstat 3 5 'shows virtual memory available to user,is there any way to find out the total usage of memory like how much memory is used by each applications and how much is free without utilities like glance or perfview.

thanks in advance
vinu
Ng Tommy
New Member

Re: how to find memory usage

Try this which works for me:
echo freemem/D|adb -k /stand/vmunix /dev/mem
and my output return as:
freemem:
freemem: 570764
This 570764 is the number of free pages; it's 4 pages to a MB. So what I use this calculation format: (570764/1024) * 4 and got 2229MB free.

Let me know whether this help?!
Muthukumar_5
Honored Contributor

Re: how to find memory usage

hai vinu,

We can find the filesystem's usage and free with bdf command. It will give the statistics of files. File and directory memory usage can be known with du command. It will give the amount of memory usage.

We can collect the process oriented memory usage with ps -aexl where SZ parameter will give memory usage details. You can further use top command (SIZE parameter) will give the memory details. process related memory usage can be get with pstat_* commands

IF you have vsar, then it will also used to get the memory details as free and usage in MBs.
Easy to suggest when don't know about the problem!
TommyT
Valued Contributor

Re: how to find memory usage

Hi

To find out how much memory you have.

For 11.00 & 11.11
echo 'phys_mem_pages/D'|adb -k /stand/vmunix /dev/kmem | tail -1 | awk '{print $2/256}'

For 10.20
echo 'physmem/D'|adb -k /stand/vmunix /dev/kmem | tail -1 | awk '{print $2/256}'
tompa
Jdamian
Respected Contributor

Re: how to find memory usage

You can use kmeminfo:

/usr/contrib/Q4/bin/kmeminfo
VINU
Frequent Advisor

Re: how to find memory usage

Thanks for ur responses.

I want to know how to interpret memory statistics from the outputs of vmstat,top commands.

Sample vmstat,top outputs are given below.


------------------------------
From the below vmstat output, I would like to know how the available memory can be calculated from it.

suboz030:/ > vmstat
procs memory page faults cpu
r b w avm free re at pi po fr de sr in sy cs us sy id
0 1 0 9103 30214 60 25 0 0 54 0 0 147 742 40 4 4 92
suboz030:/ >
--------------------------

In the below 'top' output it has given some values for real,virtual,free memory.I would like to know how this is related to physical memory or how these values are varying.

System: suboz030 Sat Jul 17 10:14:15 2004
Load averages: 0.05, 0.15, 0.19
80 processes: 74 sleeping, 6 running
Cpu states:
LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0.05 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%

Memory: 51844K (30424K) real, 57416K (37076K) virtual, 121996K free Page# 1/6

TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
rroot 28 root 152 20 0K 0K run 12:44 1.08 1.08 vxfsd


Regards

Vinu
steven Burgess_2
Honored Contributor

Re: how to find memory usage

Hello

man vmstat
man top

Should give you the answers

Regards

Steve
take your time and think things through