- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Determining amount of installed memory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 02:11 AM
07-15-2004 02:11 AM
Determining amount of installed memory
does anybody know how to find out the amount of installed memory on a HP-UX box via command line?
I would like to obtain this information from a large number of servers ranging from R-Class to IA-64 Superdome with 11.00, 11.11 and 11.23.
On 95% of these systems, the following one-liner does the job:
echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm | grep "Total Configured Memory" | uniq
The remaining 5% are my problem. I did not find out why this one-liner does not work there. There aren't any differences to the machines on which this script is working (e.g. L-Class with UX11.0 vs. L-Class with same OS).
Therefore i would like to know if there might be another way to get this info.
Thanks in advance,
Karsten
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 02:15 AM
07-15-2004 02:15 AM
Re: Determining amount of installed memory
This little script should do the job:
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 02:17 AM
07-15-2004 02:17 AM
Re: Determining amount of installed memory
Instead try grep -i physical /var/adm/syslog/syslog.log
echo "memory_installed_in_machine/D"|adb -k /stand/vmunix /dev/kmem.
The value is in bufpages. A bufpage is 4096k
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 02:46 AM
07-15-2004 02:46 AM
Re: Determining amount of installed memory
Would this work?
# dmesg|grep Phys
Physical: 4194304 Kbytes, lockable: 3790920 Kbytes, available: 3593184 Kbytes
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 02:55 AM
07-15-2004 02:55 AM
Re: Determining amount of installed memory
# echo "selclass qualifier memory;info;wait;infolog" | cstm | grep 'Total Configured'
# echo 'memory_installed_in_machine/D' | adb -k /stand/vmunix /dev/mem | perl -nle'/(\d+)/&&print$1*4,"k"'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 04:06 AM
07-15-2004 04:06 AM
Re: Determining amount of installed memory
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 05:12 AM
07-15-2004 05:12 AM
Re: Determining amount of installed memory
# hpmem
HP-UX pc0003 B.11.11 U 9000/800 2504392627 unlimited-user license
CPU Count: 6
CPU Speed: 750 MHz
CPU HW Support: 64-bit
Kernel Support: 64-bit
RAM Size: 10080 MB
bufpages: 806 MB
maxuprc: 800
maxvgs: 128
maxfiles: 2048
max_thread_proc: 256
nfile: 189100
nflock: 1200
nproc: 2560
ninode: 16384
shmmax: 1073741824
shmmni: 256
dbc_max_pct: 8
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2004 06:29 PM
07-15-2004 06:29 PM
Re: Determining amount of installed memory
OR
grep Physical /var/adm/syslog/syslog.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2004 07:21 AM
07-17-2004 07:21 AM
Re: Determining amount of installed memory
I will summarize what i've found out so far using the above suggestions:
All approaches using adb work nice, but this niceness is limited to machines with PA processors, because the adb syntax has changed in the IA-64 release (UX 11.23). I've tested all of them on an Itanium2 Superdome Partition, but the scripts returned an error complaining about the "/D" in the string being piped to adb, and the adb itself didn't accept the "-k" option (deprecated option according to the man page). The tests on three selected PA machines (R390, L2000 and RP8400) were successful.
To twang: the perl phrase does not seem to produce any output. I'm not really a perl expert, so i could not verify this :-)
To Geoff: i will test your script if i'm back in office next week, but i fear that it also will only work properly on PA systems.
The dmesg and syslog can possibly contain information of the physical memory, but this cannot be guaranteed, because dmesg is a ring buffer, as stated correctly by Jeff, and on our systems, the syslog file will be processed by logrotate regularly, so grepping after a "memory" string might fail.
Greetings,
Karsten
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2004 09:00 PM
09-15-2004 09:00 PM
Re: Determining amount of installed memory
Found using adb -o option in Itanium systems for backword compatibility works.