1838697 Members
5173 Online
110128 Solutions
New Discussion

Re: System Information

 
SOLVED
Go to solution
Andrikopoulos
Occasional Contributor

System Information

Hello all,
could give me some help on how i could find some informations on CPU, RAM memory and physical disks (the commands please)
Thank you
7 REPLIES 7
Pete Randall
Outstanding Contributor
Solution

Re: System Information

If you have Ignite installed, you can use the print_manifest command.

You can also use SAM to display system properties (Sam -> Performance
Monitors -> System Properties).

There are also utilities like "cfg2html" ( http://come.to/cfg2html ),
"nickel" ( ftp://ftp.hp.com/pub/catia/Utils/nickel.shar ) and "sysinfo"
( http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sysinfo-3.3.1/ ).

Finally, you can also obtain this information from the command line with a
series of little scripts like these:

CPU

HPUX=/stand/vmunix

MODEL=$(grep -i $(model | tr "/" " " \
| awk '{print $NF}') \
/usr/sam/lib/mo/sched.models \
| awk '{print $NF}')

MHZ=$(echo itick_per_tick/D \
| adb -k $HPUX /dev/kmem \
| tail -1 \
| awk '{print $2/10000}')
echo `hostname` has `ioscan -k |grep -n processor \
|wc -l` $MODEL $MHZ "Mhz processor(s)"


Number of CPUs

ioscan -k |grep -n processor |wc -l




RAM

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



And, even more finally, you can obtain CPU speed and RAM without CSTM or root ac
cess as described by Nancy Rippey here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=851889


Pete

Pete
Peter Godron
Honored Contributor

Re: System Information

Hi,
the easiest to use is SAM.
If you after command lines only, do a search on "system info" which will give for example:

perl -e 'local($PSTAT, $PSTAT_PROCESSOR)=(239,10);
local($struct_pst_processor)=("L30");
local($cpu_info, $cpu_ticks);
$cpu_info = "\0" x 120;
syscall($PSTAT, $PSTAT_PROCESSOR, $cpu_info, length($cpu_info), 1, 0);
($cpu_ticks)=(unpack($struct_pst_processor, $cpu_info))[26];
print "speed=".int($cpu_ticks/10000)."\n";'

echo runningprocs/D | adb -k /stand/vmunix /dev/mem

dmesg | grep Physical
Ninad_1
Honored Contributor

Re: System Information

Simplest is SAM.
If you want thru command line
Then
For CPU - no of CPUs
echo "selclass qualifier cpu;info;wait;infolog" | /usr/sbin/cstm
Memory -
echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm
Server model -
model - will tell you your server model
Disks -
ioscan -fnC disk

Regards,
Ninad
Mridul Shrivastava
Honored Contributor

Re: System Information

You can use the following command:

# echo "map selall info;wait infolog" | cstm > /tmp/cstm.txt

then by viewing cstm.txt, u will get all the info abt the system h/w.
Time has a wonderful way of weeding out the trivial
Geoff Wild
Honored Contributor

Re: System Information

For more documentation, you can dl and install cfg2html:

http://groups.yahoo.com/group/cfg2html/

That will give you a nice html page of just about everything you wanted to know about your server but were afraid to ask :)

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.
Geoff Wild
Honored Contributor

Re: System Information

Argh - ignore my last thread - just noticed that Pete already mentioned it...

I attached the sysinfo from hp.

Run from cron like so:

# Run the sysinfo script
0 6 1 * * /usr/bin/SysInfo -a -b -o /usr/tmp/`hostname`.sysinfo ; /usr/bin/chmod 644 /usr/tmp/`hostname`.sysinfo >/tmp/sysinfo.cron 2>&1

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.
Sp4admin
Trusted Contributor

Re: System Information

hi,

What about glancePlus or xstm tools. These tools should provide the information your looking for.

my
$0.02

Sp4admin