1834532 Members
3304 Online
110069 Solutions
New Discussion

Re: Notice memory ...

 
SOLVED
Go to solution
Manuales
Super Advisor

Notice memory ...

Hi ...
i need to do an alert about memory ...
i'm using top command

when i run top command appears the following about memory parameter:

Memory: 50664K (31172K) real, 116264K (93372K) virtual, 319704K free Page# 1/6

how do i must understand this one?
i mean .. what could be the alert?

what is the difference among real, virtual and free memory, please let me know ..

how do i know totally memory of the system?

I was very late for accesing to that server with telnet command, i thought there were problems with networking, but now i'm loged in that server, could it be the memory use?
Please let me know.
7 REPLIES 7
Raj D.
Honored Contributor
Solution

Re: Notice memory ...

Manual,

Real is your Physical memory , Virtual is the your virtual memory/swap area,

You can check physical memory usage with glance and virtual with vmstat or swapinfo as well,

Glance with Advisor only mode gives more granularity, and can be run throguh script.


Check out this link also:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1035476

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Notice memory ...

Manuales,

Check this good document to see memory usage,

http://www.chapelhill.homeip.net/horton/copies/MemoryUsage-HPUX.htm

Enjoy Have fun!,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Manuales
Super Advisor

Re: Notice memory ...



thanks my dear Raj :0) that link is interesting :0)

and .. what is the meaning of the value that is into "()" and out of it?

50664K (31172K) real,
116264K (93372K) virtual,
319704K free Page# 1/6

what is the meaning of free?


for example:
=====================================

System: Sat Apr 7 20:29:35 2007
Load averages: 0.00, 0.00, 0.01
155 processes: 147 sleeping, 8 running
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.00 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
1 0.00 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
2 0.00 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
3 0.00 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.00 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%

Memory: 382600K (48340K) real, 461400K (53668K) virtual, 1465500K free Page# 1/11

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
2 ? 34 root 152 20 0K 0K run 10:56 1.14 1.14 vxfsd
0 pts/tb 21145 root 158 20 572K 236K sleep 0:00 1.10 0.29 sh
1 ? 2166 root 152 20 2952K 2660K run 1:23 0.22 0.21 rep_server
1 ? 2261 root 152 20 1920K 2020K run 1:02 0.22 0.21 agdbserver
3 ? 1315 root -16 20 10384K 9832K run 34:40 0.18 0.18 midaemon
3 ? 388 root 154 20 32K 128K sleep 23:50 0.16 0.16 syncer
3 ? 1361 root 152 20 1500K 3068K run 0:14 0.14 0.14 opcctla
1 ? 2262 root 152 20 2832K 1948K run 1:45 0.12 0.12 alarmgen
2 ? 3 root 128 20 0K 0K sleep 11:57 0.07 0.07 statdaemon
2 ? 12102 p09adm 154 20 23456K 9236K sleep 1:13 0.07 0.07 dw.sapP09_D03
3 pts/tb 10772 root 154 20 192K 328K sleep 0:00 0.05 0.05 telnetd
2 pts/tb 11359 MONITOR 158 20 204K 228K sleep 0:00 0.05 0.05 ksh
0 ? 12151 p09adm 155 20 24368K 10688K sleep 6:21 0.05 0.05 dw.sapP09_D03
3 ? 12125 p09adm 155 20 25936K 14932K sleep 8:53 0.05 0.05 dw.sapP09_D03
root@torpa3p # 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 0 0 13291 366426 30 6 0 0 8 0 0 1023 919 65 1 1 99
root@torpa3p # swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 7864320 0 7864320 0% 0 - 1 /dev/vg00/lvol2
reserve - 2203864 -2203864
memory 1954900 427320 1527580 22%

thanks !!

Raj D.
Honored Contributor

Re: Notice memory ...

Manual,

Top is showing the real and virtual memory being used, amount in parenthesis is of real and virtual memory in use currently on the system by all processes . It is belongs to the recent processes that are running.


cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Notice memory ...

Also top is good for cpu usage details , and is very confusing , Its better to use glance instead.

Also you can use this command to see top memory usage,

# ps -elf|awk '{print $10, $3, $4, $15, 16}'|sort -nr|more

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Notice memory ...

Manuals,

As per the man page of top it says the memory data is based on the user processes ,

-------------------
Memory Data
Reports virtual and real memory used by user processes (with the amount of memory considered "active" in parentheses) and
the amount of free memory.
-------------------



One more, good one to see top memory usage using ps:

UNIX95=1 ps -e -o vsz,pid,ppid,args | sort -rn | head -20


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "