From: Binkley Robert - rbinkl <Robert.Binkley@acxiom.com>
Subject: perl script scu and hwmgr combined outputs
Date: Tue, 27 May 2003 10:17:46 -0500 [thread overview]
Message-ID: <EA80FFF5E80CD5118A81009027DE9DFC03AA34FB@conmsx05.corp.acxiom.net> (raw)
#!/usr/bin/perl
foreach (`scu show edt`)
{
($bus,$tar,$lun,$prod_id)=(split())[0,1,2,6];
if ( $bus =~ /\d+/ && $tar =~ /\d+/ && $lun =~ /\d+/ )
{
$location="[$bus/$tar/$lun]";
$scuhash{$location}=$prod_id;
}
}
foreach (`hwmgr -show scsi`)
{
($dsk,$location)=(split())[7,8];
if ( $dsk =~ /dsk/ )
{
$size=(split(/\s+/,`disklabel -r $dsk|grep " c:"`))[2];
$size /= 2048;
$prod_id=$scuhash{$location};
$scuhash{$location}="$dsk:$prod_id:$size";
}
}
print "B/T/L Disk Product ID Size (MB)\n";
print "-------- ------ ---------- ---------\n";
foreach $location (sort keys %scuhash)
{
($dsk,$prod_id,$size)=split(/:/,$scuhash{$location});
if ( $dsk =~ /dsk/ )
{
printf("%-9s %-7s %-11s %0.2f\n",$location,$dsk,$prod_id,$size);
}
}
**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.
reply other threads:[~2003-05-27 15:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox