Operating System - HP-UX
1751922 Members
4640 Online
108783 Solutions
New Discussion юеВ

which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

Hi

I am using HP-UX 11.00.

1)Swapinfo report:

root@ad121991.emdna.emdiesels.com:/root > swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8388608 144184 8244424 2% 0 - 1 /dev/vg00/lvol2
reserve - 932556 -932556
memory 3160504 2943308 217196 93%

Total = 3160504K (almost 3GB)


2)Print_manifest report:

root@ad121991.emdna.emdiesels.com:/root > print_manifest | grep -i memory
Main Memory: 4094 MB

Total = 4192256K (almost 4GB)


3)top report:

Memory: 314760K (174924K) real, 1266496K (507568K) virtual, 497968K free Page#
1/25

Total = 2079224k (almost 2GB).


Which one is correct.


Pls explain the difference between three commands.

9 REPLIES 9
Pete Randall
Outstanding Contributor
Solution

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

The print_manifest figure is correct if you are referring to the actual physical memory in the machine. I use this little script (which should give the same answer as print_manifest):

HPUX=/stand/vmunix
MAJORREV=$(uname -r | cut -f2 -d .)
if [ $MAJORREV -ge "11.0" ]
then
MYSYMBOL="phys_mem_pages"
else
MYSYMBOL="physmem"
fi

MYMEM=$(echo "${MYSYMBOL}/D" \
| adb $HPUX /dev/kmem \
| grep "${MYSYMBOL}: *." \
| awk '{printf "%.0f MB\n",$2/256}')
echo $MYMEM


Pete

Pete
Patrick Wallek
Honored Contributor

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

1) The memory line has very little to do with the actual available RAM in your system. The memory line here reports the memory used for 'pseudo-swap' which is enabled when the swapmem_on kernel parameter is set to 1 (enabled).

2) This is the total available physical RAM in your system.

3) Check the man page. I've never quite understood how top interprets information.

>>Which one is correct.

Well, which is correct for what? They are all "correct" in that they report different things.
senthil_kumar_1
Super Advisor

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

Hi

Pls explain me each report in detail.
Patrick Wallek
Honored Contributor

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

Please read the man pages. That is what they are there for!

# man swapinfo

# man print_manifest

# man top
Sunny123_1
Esteemed Contributor

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

Hi

The print_manifest and glance commands are perfect to find the original memory

Regards
Sunny
Don Morris_1
Honored Contributor

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

Pete -- besides the obligatory caution not to depend on kernel global names (grin) -- your script really should use `getconf _SC_PAGE_SIZE` somewhere, at least on v3 and higher. Otherwise, you're going to be badly off when the base_pagesize tunable is greater than 4.
nightwich
Valued Contributor

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

Hi Kumar

This are 3 different utility's ..

I already put the same question to my self !! ..

The answer is that any utility have they one purpose.

To check the realm memory you can use print_manifest | grep -i memory or glance.

To tuning memory, the best tools are kminfo, swpinfo and glance

If you have any doubt please reply !!

Best regards
Jeeshan
Honored Contributor

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

swapinfo command only shows the 75% of your memory utilization.

amongst your above commands, print_manifest is the most exact output.
a warrior never quits
Suraj K Sankari
Honored Contributor

Re: which command is used to find the original physical that "swapinfo" or "print_manifest" or "top"

>>Which one is correct.
All 3 are correct
swapinfo :- is useful to see the swap memory
print_manifest :- is showing your physical memory
and top :- is showing your virtual memory, free memory etc.

See this belo thread

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1087669

for more information on these
see the man pages of them

Suraj