1829009 Members
2210 Online
109986 Solutions
New Discussion

system information

 
SOLVED
Go to solution
A.K.
Frequent Advisor

system information

Hi ,
I want to get the following information about my servers HPUX servers (11.00 & 10.20)
CPU
Memory
Disk space
Serial
OS Kernel width
All of the above without using SAM just command that I can put into a script
Any idea?

Thanks,
A.K.
12 REPLIES 12
Pete Randall
Outstanding Contributor

Re: system information

A.K.,


I use this:

echo `hostname` "is a " `model |sed 's/9000\/800\///' |sed 's/9000\/899\///'` "with" `ioscan -k |grep -n p
rocessor |wc -l` `cpuspeed` "Mhz processors and" `memory` "KB of memory"



Here's the cpuspeed script:

HPUX=/stand/vmunix

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



Here's the memory script:

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


Diskspace, Serial and kernel width are available else where, you can search for them or someone will be along shortly.


Pete

Pete
Patrick Wallek
Honored Contributor
Solution

Re: system information

There are numerous ways to do this. My 2 favorites are:

1) Ignite/UX print_manifest - /opt/ignite/bin/print_manifest - Do a 'man print_manifest' for more information. If you don't have Ignite/UX installed, you can get it here: http://software.hp.com/products/IUX/

2) CFG2HTML - does you whole system configuration and generates an HTML file with all the details.

http://come.to/cfg2html

It works on HP-UX 10.20, 11.0 and 11i.
Dario_1
Trusted Contributor

Re: system information

Hi:

For CPU information try these:

echo "selclass qualifier cpu;info;wait;infolog"|cstm

ioscan -fC processor


Regards,

Dario
Geoff Wild
Honored Contributor

Re: system information

Disk:

#!/bin/sh
# This script will return the total disk space in system.
# Geoff Wild
#
system=`uname -n`
#ttldisk=`df -t -l | awk 'BEGIN {tot=0} $2 == "total" {tot=tot+$1} END {print (tot*512)/1000000000}'`
ttldisk=`df -t -l | awk 'BEGIN {tot=0} $2 == "total" {tot=tot+$1} END {print (tot*512)/1024/1024/1024}'`
#ttlfree=`df -l | awk -F: '{print $2}' | awk 'BEGIN {tot=0} {tot=tot+$1} END {print (tot*512)/1000000000}'`
#ttlfree=`df -t -l | awk -F: '{print $2}' | awk 'BEGIN {tot=0} {tot=tot+$1} END {print (tot*512)/1000000000}'`
ttlused=`df -t -l | awk 'BEGIN {tot=0} $2 == "used" {tot=tot+$1} END {print (tot*512)/1024/1024/1024}'`
ttlfree=`echo $ttldisk $ttlused | awk '{$3 = $1 - $2 ; print $3}'`
echo "Total disk space on $system is: $ttldisk GB" | tee /usr/tmp/$system.diskspace
echo "Total used space on $system is: $ttlused GB" | tee -a /usr/tmp/$system.diskspace
echo "Total free space on $system is: $ttlfree GB" | tee -a /usr/tmp/$system.diskspace
echo " " | tee -a /usr/tmp/$system.diskspace
echo "Note: this is only for currently mounted file systems..." | tee -a /usr/tmp/$system.diskspace


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.
Helen French
Honored Contributor

Re: system information

I would say the best command is:

# /opt/ignite/bin/print_manifest

This command will give you all information you need in a nice order. BUT you need to have Ignite-UX installed on the server to run this command.

Me next bet would be STM:

# stm
# cstm
# mstm

You will get more information from there specific to each hardware.
Life is a promise, fulfill it!
Hai Nguyen_1
Honored Contributor

Re: system information

A.K.

/opt/ignite/bin/print_manifest will get you what you need.

Hai
Bill Douglass
Esteemed Contributor

Re: system information

Also, you can copy print_manifest from an ignite-installed server to your other hosts. It runs fine without installing the complete ignite package on every host.
A.K.
Frequent Advisor

Re: system information

Folks, I don???t have Ignite installed
Bill Hassell
Honored Contributor

Re: system information

RUN! Do not walk to the website:

http://www.software.hp.com/products/IUX/

Download the Ignite/UX depot and install it on *every* machine, then run the print_manifest command (and I would save it in a file or print it). Then the very next step is to run make_tape_recovery (check the man pages for options) to save your vg00 disk(s) onto a bootable backup tape. For systems without a tape drive, setup an Ignite network server and use make_net_recovery. Without an Ignite/UX bootable backup image, you are looking at very long recovery times (perhaps days) in case you lose your boot disk(s).


Bill Hassell, sysadmin
twang
Honored Contributor

Re: system information

I like using nickel to collect system information periodically.
Con O'Kelly
Honored Contributor

Re: system information

I have attached a copy of a script I run every week to gather server configuration info. You can comment out certain functions if you don't require that info.

Cheers
Con
Jason_216
Occasional Advisor

Re: system information

i am agree with twang, nickel is the best tools, it also generate html file 4 u, if u want to view the file in Windows based system, as my experiense my boss always ask my about my server info, so i just used nickel to generate the file, and that i can ask my web-master to post it the my intranet, rather then asking by BOSS every once.

from,
jason