- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problem determining how much RAM my system has.
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
11-17-2003 02:37 AM
11-17-2003 02:37 AM
Ux 11.11.
I'd like to determine how much RAM my system has
Which device may I use : /dev/mem or /dev/kmem :
echo "phys_mem_pages/D" | adb -k /stand/vmunix /dev/kmem | tail -1 | awk '{print $2}'
I have 4 VPar running the same OS level but on 2, the command with /dev/mem doesn't work.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2003 02:39 AM
11-17-2003 02:39 AM
Re: Problem determining how much RAM my system has.
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
11-17-2003 02:48 AM
11-17-2003 02:48 AM
Re: Problem determining how much RAM my system has.
To get the entire SuprDome's memory -- you can invoke "parstatus -v".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2003 02:52 AM
11-17-2003 02:52 AM
Re: Problem determining how much RAM my system has.
#!/bin/sh
if [ $(uname -r) = "B.11.11" -o $(uname -r) = "B.11.00" ]
then
echo "phys_mem_pages/D" | adb /stand/vmunix /dev/kmem|grep phys|tail -1|awk '{printf "%.0f Mb\n",$2/256}'
elif [ $(uname -r) = "B.10.20" ]
then
echo "physmem/D" | adb /stand/vmunix /dev/kmem|grep phys|tail -1|awk '{print "Memory size = " $2 / 256 " Megabytes"}'
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2003 02:57 AM
11-17-2003 02:57 AM
Re: Problem determining how much RAM my system has.
root@fht002a3 # vparstatus -w
The current virtual partition is fht002a3.
root@fht002a3 # vparstatus
[Virtual Partition]
Boot
Virtual Partition Name State Attributes Kernel Path Opts
============================== ===== ========== ========================= =====
fhd002a0 Up Dyn,Auto /stand/vmunix
fht002a1 Up Dyn,Auto /stand/vmunix
fht002a2 Up Dyn,Auto /stand/vmunix
fht002a3 Up Dyn,Auto /stand/vmunix
[Virtual Partition Resource Summary]
CPU Num Memory (MB)
CPU Bound/ IO # Ranges/
Virtual Partition Name Min/Max Unbound devs Total MB Total MB
============================== ================ ==== ====================
fhd002a0 4/ 8 4 4 15 0/ 0 16384
fht002a1 4/ 8 4 0 8 0/ 0 8192
fht002a2 2/ 4 2 0 8 0/ 0 4096
fht002a3 2/ 4 2 0 8 0/ 0 4096
root@fht002a3 #
Of course, print_manifest also would show you the amount of memory on your current vPar and all other sysinfo you'll need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2003 03:06 AM
11-17-2003 03:06 AM
Re: Problem determining how much RAM my system has.
Thank you for your quick answers !!!
Ps : This command is launched by the script /var/PSS/hpux_config.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2003 03:10 AM
11-17-2003 03:10 AM
Re: Problem determining how much RAM my system has.
vparstatus, print_manifest and the scripts suggested WILL show you your VPAR's memory.
parstatus -- will show you your entire complex (SuperDome) memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2003 03:32 AM
11-17-2003 03:32 AM
Solution--------------------------cut here---------------------------
# cat hpmem
#!/bin/ksh
#
# Taken from the HP/UniGraphics FAQ
# You must be ROOT to execute this since
# examine the running kernel
#
GetKernelSymbol()
{
echo "$1/D" | \
adb -k $hpux /dev/kmem | \
tr "\012" " " | \
read junk junk2 kval
}
hpux=/hp-ux
rev=$(uname -r | cut -d. -f2)
if ((rev > 9)); then hpux=/stand/vmunix
/bin/uname -a
GetKernelSymbol "processor_count"
print CPU Count: $kval
GetKernelSymbol "itick_per_tick"
let speed=kval/10000
print CPU Speed: $speed MHz
if ((rev > 10)); then
print CPU HW Support: `getconf HW_CPU_SU
print Kernel Support: `getconf KERNEL_BI
GetKernelSymbol "memory_installed_in_mac
else
GetKernelSymbol "physmem"
fi
let mb=kval*4/1024 # convert pages to MB
print RAM Size: $mb MB
GetKernelSymbol "bufpages"
let mb=kval*4/1024 # convert pages to MB
print bufpages: $mb MB
GetKernelSymbol "maxuprc"
print maxuprc: $kval
GetKernelSymbol "maxvgs"
print maxvgs: $kval
GetKernelSymbol "maxfiles"
print maxfiles: $kval
GetKernelSymbol "max_thread_proc"
print max_thread_proc: $kval
GetKernelSymbol "nfile"
print nfile: $kval
GetKernelSymbol "nflocks"
print nflock: $kval
GetKernelSymbol "nproc"
print nproc: $kval
GetKernelSymbol "ninode"
print ninode: $kval
GetKernelSymbol "vfd_cw"
print shmmax: $kval
GetKernelSymbol "shmmni"
print shmmni: $kval
GetKernelSymbol "dbc_max_pct"
print dbc_max_pct: $kval
--------------------------------cut here---------------------------------
OUTPUT is as follows from one of my boxes:
HP-UX chdcfas1 B.11.11 U 9000/800 624339393 unlimited-user license
CPU Count: 8
CPU Speed: 550 MHz
CPU HW Support: 64-bit
Kernel Support: 64-bit
RAM Size: 32768 MB
bufpages: 1310 MB
maxuprc: 4000
maxvgs: 255
maxfiles: 500
max_thread_proc: 256
nfile: 29539
nflock: 4096
nproc: 16020
ninode: 18468
shmmax: 1073741824
shmmni: 220
dbc_max_pct: 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2003 03:38 AM
11-17-2003 03:38 AM
Re: Problem determining how much RAM my system has.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2003 02:24 AM
12-04-2003 02:24 AM
Re: Problem determining how much RAM my system has.
No points here, Just FYI.
If you read Nelson's post again, the vparstatus command does give you the memory at the bottom of his first post.
The columns are hard to read, but it is there.