1832251 Members
2774 Online
110041 Solutions
New Discussion

system inventory

 
SOLVED
Go to solution
Alain Tesserot
Frequent Advisor

system inventory

I have several servers and many disks. How do I get information for disk size and free space on each disk for a report.
12 REPLIES 12
Rick Garland
Honored Contributor

Re: system inventory

To get the disk info, use the 'diskinfo' command

As to free space, many variables can play a role hee. Are you running a cluster? Do you have shared disks?

On the basic level, a 'vgdisplay -v' command can provide that info. How many 'FREE PEs' do you have?

Alain Tesserot
Frequent Advisor

Re: system inventory

I know about the diskinfo command. The problem is that we have many disks. Is there a way to query several device files at once?
Rick Garland
Honored Contributor

Re: system inventory

Check out this URL site and get the cfg2html script.

Will provide lots more info as well.

http://www.cfg2html.com/


Alan Meyer_4
Respected Contributor

Re: system inventory

With remsh configured on a central server, I have a script that cycles through all the servers to execute a bdf command. It's similiar to this:

for SERVER in node1 node2 node3 ;do
echo $SERVER
remsh $SERVER -n /usr/bin/bdf
done

you can add other commands like pvdisplay or vgdisplay to match the information you desire.

This can also be done if you have Servicecontrol Manager installed and configured.
" I may not be certified, but I am certifiable... "
Rick Garland
Honored Contributor

Re: system inventory

With remsh or ssh to can issue 1 command and a script can cycle through the servers in your environment and fetch/report that info for you.

RAC_1
Honored Contributor

Re: system inventory

Many ways to do it.

nicket tool
bdf
diskinfo
print_manifest (ignite needs to be installed)
SCR (System configuration Repository software)
cf2html

Anil
There is no substitute to HARDWORK
Alain Tesserot
Frequent Advisor

Re: system inventory

I can do diskinfo /dev/c0t0d0 and get disk information for that disk but if I have 100 disks, how do I get diskinfo to display all devices?
Rick Garland
Honored Contributor

Re: system inventory

An example,

use a shell script to gather the disk device names (/dev/dsk/cXtYdZ). In that script have a for loop that goes through each device and executes the diskinfo command against that device.
Patrick Wallek
Honored Contributor
Solution

Re: system inventory

#!/usr/bin/sh
for DISK in /dev/rdsk/c*
do
echo "diskinfo ${DISK}"
diskinfo ${DISK}
echo ""
done
Rick Garland
Honored Contributor

Re: system inventory

Start of an example script.

This will parse the lvmtab file and get the device names. It will convert the devices names to raw device names. Reading each line it will execute the diskinfo command.

strings /etc/lvmtab | grep /dev/dsk | sed 's/dsk/rdsk/g' | while read line
do
diskinfo $line
done

Remember, if there is MCSG or disk sharing in effect, do not trust these results. This is on a basic level of getting the requested info.
Alan Meyer_4
Respected Contributor

Re: system inventory

you can also get all the disks recognized by the system from ioscan:

ioscan -funCdisk |grep dsk |awk '{print $2}' |while read DISK ;do
diskinfo $DISK
done
" I may not be certified, but I am certifiable... "
Alain Tesserot
Frequent Advisor

Re: system inventory

Thanks everyone for the fast and good info.