Operating System - HP-UX
1846992 Members
3388 Online
110257 Solutions
New Discussion

Equivalent meminfo in HPUX 11i

 
SOLVED
Go to solution
Dinesh S Devan
Occasional Advisor

Equivalent meminfo in HPUX 11i

Could you please advise with which command meminfo in HPUX 11.00 has been replaced in HPUX 11.11 (v1.0)

Rgds
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor

Re: Equivalent meminfo in HPUX 11i

Hi,

# grep Physical /var/adm/syslog/syslog.log
# dmesg | grep Physical

# echo "selclass qualifier memory;info;wait;infolog" | cstm > /tmp/meminfo
# more /tmp/meminfo

# echo 'memory_installed_in_machine/D' | adb -k /stand/vmunix /dev/mem

Hope this helps,
Robert-Jan
Devender Khatana
Honored Contributor
Solution

Re: Equivalent meminfo in HPUX 11i

Hi,

The steps posted earlier are correct & I do not remember any meminfo command in HpUx11.00.

It could be some script installed on your servers possibally was it ?

HTH,
Devender
Impossible itself mentions "I m possible"
Mahesh Kumar Malik
Honored Contributor

Re: Equivalent meminfo in HPUX 11i

Hi Nabeela

You can use following:
#cstm
cstm>map
cstm>ml

Regards
Mahesh
Dinesh S Devan
Occasional Advisor

Re: Equivalent meminfo in HPUX 11i

Hi,

It was a script that was named as meminfo.
I copied same script from HPUX 11.00 into HPUX 11.11 in /usr/bin.

it works fine
Paul Clayton
Frequent Advisor

Re: Equivalent meminfo in HPUX 11i

#!/bin/sh
#
# Find the physical memory on HP-UX
#
OSTYPE="`uname -r | awk -F. '{ print $2 }'a`"
BITS="`file /stand/vmunix | awk '{ print $2 }'`"


# HP-UX 10x
if [ "$OSTYPE" = "10" ]
then
MEM="`echo physmem/D | adb -k /stand/vmunix /dev/kmem | sed '1d'|awk ' {print $2}'`"
elif [ "$OSTYPE" = "11" ]
then
# HP-UX 11.x systems running on 32 bit architecture:
if [ "$BITS" = "ELF-64" ]
then
# HP-UX 11.x systems running on 64 bit architecture:
MEM="`echo phys_mem_pages/D | adb64 -k /stand/vmunix /dev/mem | sed '1d'|awk ' {print $2}'`"
else
MEM="`echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem | sed '1d'|awk ' {print $2}'`"
fi
fi
Here is a shell script we use call "physmem"


# Now calculate actual memory size. If memory is null or zero, then drop out
if [ "$MEM" = "" -o "$MEM" = "0" ]
then
MEM="0 Mbytes"
else
#MEM=`expr $MEM \/ 1024 \/ 1024 \* 4096`
MEM="`bc <scale=2
${MEM}*4096/1024/1024
EOF`"

fi
echo ${MEM} Mbytes
Peter Nikitka
Honored Contributor

Re: Equivalent meminfo in HPUX 11i

Hi,

there is a commonly user perl-script called 'memconf' for Solaris. The (today) most recent version v1.61 was reported to run under HPUX, too.

See
http://www.4schmidts.com/unix.html

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Geoff Wild
Honored Contributor

Re: Equivalent meminfo in HPUX 11i

Actually - it is a c program called memdetail - not meminfo.

Here's the c source - so you can re-compile on 11i

Output like:

# memdetail
Memory Stat total used avail %used
physical 768.0 710.9 57.1 93%
active virtual 632.5 428.8 203.7 68%
active real 298.8 182.6 116.2 61%
memory swap 554.4 314.0 240.5 57%
device swap 1024.0 437.6 586.4 43%



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.