Operating System - HP-UX
1831504 Members
3174 Online
110025 Solutions
New Discussion

how can I find out the following, without using SAM ?

 
SOLVED
Go to solution
Scott Dunkley
Regular Advisor

how can I find out the following, without using SAM ?

Clock speed ?
Number of CPUS, not using TOP ?
Memory not using DMESG ?


Thanks,

Scott.
Better to regret something you have done, than something you havn't
4 REPLIES 4
Pete Randall
Outstanding Contributor
Solution

Re: how can I find out the following, without using SAM ?

Scott,

Clock speed:

HPUX=/stand/vmunix

MHZ=$(echo itick_per_tick/D | adb -k $HPUX /dev/kmem | tail -1 | awk '{print $2/10000}')
echo $MHZ


CPU's:
ioscan -k |grep -n processor |wc -l


Memory:

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 '{print $2*4/1024}')
echo $MYMEM


Pete

Pete
john korterman
Honored Contributor

Re: how can I find out the following, without using SAM ?

Hi,
if ignite has been installed, you can get the no. of cpus and amount of memory by executing print_manifest.

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

Re: how can I find out the following, without using SAM ?

Hi Scott,
These kind of questions regulary appear in the forums. I've compiled a list (not complete probably) :
# 32 of 64 bit kernel ...
getconf KERNEL_BITS
64

echo physmem/D | adb -k /stand/vmunix /dev/kmem
physmem:
physmem: 24576

for HP-UX 11.x systems running on 32 bit architecture:
example:

echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem
phys_mem_pages:
phys_mem_pages: 24576

for HP-UX 11.x systems running on 64 bit architecture:
example:

echo phys_mem_pages/D | adb64 -k /stand/vmunix /dev/mem | tail -1 | awk '$2 > 0 {print $2 /256}'
phys_mem_pages:
phys_mem_pages: 262144

The results of these commands are in memory pages, multiply by 4096
to obtain the size in bytes.

To determine the amount of lockable memory:
example:

echo total_lockable_mem/D | adb -k /stand/vmunix /dev/mem
total_lockable_mem:
total_lockable_mem: 185280

To determine the number of free swap pages :
example:

echo swapspc_cnt/D | adb -k /stand/vmunix /dev/kmem
swapspc_cnt:
swapspc_cnt: 216447

This will display the number of free swap pages.
Multiply the number returned by 4096 for the number of free swap bytes.

To determine the processor speed:
example:
echo itick_per_usec/D | adb -k /stand/vmunix /dev/mem
itick_per_usec:
itick_per_usec: 360

To determine the number of processors in use:
example:
echo "runningprocs/D" | adb -k /stand/vmunix /dev/mem
runningprocs:
runningprocs: 2

To determine the number of pages of buffer cache ( 4Kb in size)
example:
echo bufpages/D | adb -k /stand/vmunix /dev/mem
bufpages:
bufpages: 18848

To display kernel parameters using adb use the parameter name :
example:
echo nproc/D | adb -k /stand/vmunix /dev/mem
nproc:
nproc: 276

To determine the kernel your booted from:
example:
10.x
echo 'boot_string/S' | adb /stand/vmunix /dev/mem
boot_string:
boot_string: disc(52.6.0;0)/stand/vmunix

11.x
echo 'boot_string/S' | adb64 -k /stand/vmunix /dev/mem
boot_string:
boot_string: disk(0/0/2/0.6.0.0.0.0.0;0)/stand/vmunix

Hope it helps,
Tom
A life ? Cool ! Where can I download one of those from ?
Anonymous
Not applicable

Re: how can I find out the following, without using SAM ?

on http://groups.yahoo.com/group/cfg2html/
you find a script that collects that for you(and much more;-)