Operating System - HP-UX
1834628 Members
3687 Online
110069 Solutions
New Discussion

Swapinfo don't shows memory

 
SOLVED
Go to solution
V. Nyga
Honored Contributor

Swapinfo don't shows memory

Hi all,

HP C360, UX 11.0:
I can't get info about RAM with swapinfo -tam:

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
reserve - 58 -58
total 1024 58 966 6% - 0 -

syslog and phys_mem_pages says 512 MB

I've downloaded patches PHCO_22676 and PHKL_22771 but they're at the workstation yet.

Any ideas?
Volkmar
*** Say 'Thanks' with Kudos ***
12 REPLIES 12
john korterman
Honored Contributor

Re: Swapinfo don't shows memory

Hi,
where is swapinfo supposed to do that?

regards,
John K.
it would be nice if you always got a second chance
RAC_1
Honored Contributor

Re: Swapinfo don't shows memory

swapinfo never showed that.

dmesg/phys_mem_pages,stm will give that details.
There is no substitute to HARDWORK
G. Vrijhoeven
Honored Contributor

Re: Swapinfo don't shows memory

Hi Volkmar,

check man swapinfo. It reports virtual memory.

Gideon
V. Nyga
Honored Contributor

Re: Swapinfo don't shows memory

Thanks for the quick response!

But swapinfo -tam always shows one line with memory - and this line doesn't appear in this configuration!
No problem with C3600 and UX 11.0 or Cxxxx and UX 10.20!

Volkmar
*** Say 'Thanks' with Kudos ***
Umapathy S
Honored Contributor

Re: Swapinfo don't shows memory

Volkmar,
swapinfo gives info on the swap usage only.

For Physical memory, dmesg or
2. for 10.20
REAL_MEM=`echo "physmem/D"| adb -k /stand/vmunix /dev/kmem | tail -1 | awk '{ print $2/256} '`
for 11.00
REAL_MEM=`echo "phys_mem_pages/D"| adb -k /stand/vmunix /dev/kmem | tail -1 | awk '{ print $2/256} '`

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
V. Nyga
Honored Contributor

Re: Swapinfo don't shows memory

Ok it doesn't shows RAM, but it should show any virtual memory beside device swap memory.
You agree?

Volkmar

*** Say 'Thanks' with Kudos ***
Pete Randall
Outstanding Contributor

Re: Swapinfo don't shows memory

People,

What Volkmar is saying is that the "memory" line is missing from his "swapinfo -tam" output. Here's what it should look like:

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol3
reserve - 269 -269
memory 731 302 429 41%
total 2779 571 2208 21% - 0 -

Notice the next to the last line - the one labeled "memory" - that's what he's missing.


Pete (who has no clue why it's missing)

Pete
G. Vrijhoeven
Honored Contributor

Re: Swapinfo don't shows memory

Hi Volkmar,

I agree. swapinfo -tam on 11.00 should give:

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 232 3864 6% 0 - 1 /dev/vg00/lvol2
dev 2048 228 1820 11% 0 - 1 /dev/vg00/lvol14
reserve - 2704 -2704
memory 4705 2771 1934 59%
total 10849 5935 4914 55% - 0 -

But the memory is no real memory but virtual

can you do a what
what /usr/sbin/swapinfo
/usr/sbin/swapinfo:
$Revision: 82.3.2.5 $
PATCH_11_00: swapinfo.o 01/02/04

Gideon
Umapathy S
Honored Contributor
Solution

Re: Swapinfo don't shows memory

Volkmar,
That relates to pseudo swap and it appears only when configured.
Check the kernel param swapmem_on. If this parameter is turned off then the memory will appear.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
John Palmer
Honored Contributor

Re: Swapinfo don't shows memory

This does indeed refer to pseudo-swap which is configured with the kernel parameter 'swapmem_on'.

swapmem_on = 1 (the system default), pseudo swap enabled, swapinfo will display a 'memory' line.

swapmem_on = 0 pseudo swap disabled, no memory line displayed by swapinfo.

Regards,
John
V. Nyga
Honored Contributor

Re: Swapinfo don't shows memory

Ok, thanks
I've checked my sytem now
Gideon: I've the same revision
Umapathy: kernel param swapmem_on is set to 0 (zero).
And I've found Bill Hassell's explanation:
'Today, where typical RAM is several thousand megs, swapmem_on=1 is typical (and the default) so that virtual memory (the space that all processs can use) is defined as 75% * RAM + swap-space.'

So 0 it on and 1 is off - quite curious.
And 1 means memory is part of virtual memory (and is displayed) in swapinfo.

Thank all
Volkmar
*** Say 'Thanks' with Kudos ***
Todd McDaniel_1
Honored Contributor

Re: Swapinfo don't shows memory

Here is a great script that I cant remember where I found it. Maybe on a dba site....

It gives the following output on my N-4000:

# ./hpmem
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





----------------------------cut here-----------------------
# cat hpmem
#!/bin/ksh
#
# Taken from the HP/UniGraphics FAQ
# You must be ROOT to execute this since it uses adb t
# 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 ;fi
/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_SUPP_BITS`-bit
print Kernel Support: `getconf KERNEL_BITS`-bit
GetKernelSymbol "memory_installed_in_machine"
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

Unix, the other white meat.