1834721 Members
2704 Online
110069 Solutions
New Discussion

Re: simple qustions

 
Abdullah_2
Advisor

simple qustions

Dear All,

Hi,Here is a simple qustion cause i'm new person intersting in HP-UX.

- How i can get the data size fro a server HP-UX
- what is the meanning when someone ask me what is the make of the server ? is it like HP-UX ??
- how i get no of CPUs without going to sam ?

Many thanks in advance.
9 REPLIES 9
Khalid A. Al-Tayaran
Valued Contributor

Re: simple qustions


- size: du -sk

- To know the model of your server use: model.
also, to know the version of the OS use: uname -a

- Use the script in the scripts section here
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html
it's called hpmem.


Norman_21
Honored Contributor

Re: simple qustions

Hello,

I agree, use du to check for Disk Usage:
#du -k |sort -nr|pg
to start the list with the highest capacity.

To list how many processors from the command line:
#ioscan -fn|grep processor|wc -l

I'm not sure what you mean by system make, I think you mean the model, you can use the model command. Always, use man pages to check out a command:
# man du

I'm sure other guys will have better answers.
Thanks and hope this help.
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Tim D Fulford
Honored Contributor

Re: simple qustions

- How i get the data size fro server HP-UX
There are various interpretations to this question.
One is how much (in GB) disk is attached to system.
# ioscan -funCdisk
This will give you the types of disk. Some disk product numbers actually gove the size e.g. SEAGATE ST318404LC is 3rd Gen 18 GB and
ST332502LC is a 3rd gen 32 GB. If the product number is not helpful do a
# diskinfo /dev/rdsk/cXtYdZ
Another interpretation is how much disk space is configured into eacg volume group (& how much is free) to do this
# vgdisplay
The last I can think of is how much space is in each mounted filesystem.
# bdf

- what is the meanning when someone ask me what is the make of the server ? is it like HP-UX??
I guess they are asking for the model (not the make as it will be HP if you are runing HP-UX). You can get this by typing
# model
Another thing they may be asking is what version of HP-UX you are on. You can get this by typing
# uname -a
This will give a few answers, including the OS type (say HP-UX 11.11)
- how i get no of CPUs without going to sam??
# ioscan -knCprocessor
OR
# top
for both just count the nujber of relavent lines.

Regards

Tim

-
Fragon
Trusted Contributor

Re: simple qustions

Hi Abdullah,
Please have your Ignite-UX installed(normally it has been done), then you can use:
#/opt/ignite/bin/print_manifest
go get the useful infomation!

-ux
Norman_21
Honored Contributor

Re: simple qustions

Tim,

Your command line for the processor:

# ioscan -knC processor
ioscan: Invalid combination of options
usage: ioscan [-k | -u] [-d driver | -C class] [-I instance] [-H hw_path]
[-f | -F [-n]] [devfile]
-k: show kernel structures; don't scan hardware
-u: show usable devices; don't scan hardware
-d: show hardware controlled by specified driver
-C: show hardware in specified class
-I: show hardware with specified instance
-H: show hardware at specified path
-f: give full listing
-F: give listing separated by colons
-n: show device file names
or: ioscan -M module_path -H hw_path [-I instance]
-M: force-configure specified drivers
-H: force-configure specified hardware path
-I: force-configure specified hardware instance
I think you mean:
# ioscan -kC processor
but it deosn't tell how many CPUs the system has.
It's just a thought.
Thanks
Latif
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Tim D Fulford
Honored Contributor

Re: simple qustions

oooops

ioscan -fkCprocessor

Tim
-
Dagmar Boelen
Frequent Advisor

Re: simple qustions

The command top also shows the number of processors in you machine.
Geoff Wild
Honored Contributor

Re: simple qustions

Here's a script that will get you size of "mounted" filesystems by volume group.

#!/bin/sh
/usr/local/bin/bdfmegs|grep vg |tr -s " " " "|cut -d" " -f 1-4|sort|
awk 'BEGIN {
prev="";
totals[0]=0;
totals[1]=0;
totals[2]=0;
gtotals[0]=0;
gtotals[1]=0;
gtotals[2]=0;
printf("%4s %14s %14s %14s\n","VG","Size(MB)","In use","Available");
}
{split($1,curr,"/");
if (prev!="" && prev!=curr[3])
{printf("%4s %14d %14d %14d\n",prev,totals[0],totals[1],totals[2]);
gtotals[0]+=totals[0];
gtotals[1]+=totals[1];
gtotals[2]+=totals[2];
totals[0]=0;
totals[1]=0;
totals[2]=0;
}
prev=curr[3];
totals[0]+=$2;
totals[1]+=$3;
totals[2]+=$4;
}
END {
gtotals[0]+=totals[0];
gtotals[1]+=totals[1];
gtotals[2]+=totals[2];
printf("%4s %14d %14d %14d\n",prev,totals[0],totals[1],totals[2]);
printf("%4s %14s %14s %14s\n","----","--------------","--------------","--------------");
printf("%4s %14d %14d %14d\n","Totl",gtotals[0],gtotals[1],gtotals[2]);
}'



It uses the bdfmegs script attached...

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: simple qustions

Here's another script for number of cpus/speed and some kernel parms - called hpmem:

#!/bin/ksh
#
# Taken from the HP/UniGraphics FAQ
# You must be ROOT to execute this since it uses adb to
# 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



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.