From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Binkley Robert - rbinkl Newsgroups: gmane.os.tru64.managers Subject: perl script scu and hwmgr combined outputs Date: Tue, 27 May 2003 10:17:46 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: main.gmane.org 1054048569 23308 80.91.224.249 (27 May 2003 15:16:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 27 May 2003 15:16:09 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Tue May 27 17:16:07 2003 Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 19KgBL-00063U-00 for ; Tue, 27 May 2003 17:16:07 +0200 Original-Received: (qmail 2862 invoked by uid 5); 27 May 2003 15:18:03 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 2852 invoked by uid 49493); 27 May 2003 15:18:03 -0000 Original-Received: from Robert.Binkley@acxiom.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-1.7/5.0):. Processed in 0.388499 secs); 27 May 2003 15:18:03 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 27 May 2003 15:18:02 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HFJ000XXX5RMJ@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 27 May 2003 11:18:01 -0400 (EDT) Original-Received: from aerynsun.acxiom.com (aerynsun.acxiom.com [198.160.100.121]) by emroute1.cind.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HFJ003NVX5QYG@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 27 May 2003 11:17:51 -0400 (EDT) Original-Received: from conmsc01.conway.acxiom.com (unverified) by aerynsun.acxiom.com (Content Technologies SMTPRS 4.3.6) with ESMTP id ; Tue, 27 May 2003 10:17:46 -0500 Original-Received: by conmsc01.corp.acxiom.net with Internet Mail Service (5.5.2656.59) id ; Tue, 27 May 2003 10:17:45 -0500 Content-return: allowed Original-To: "Tru64 UNIX Admins \(E-mail\) \(E-mail\)" , "Tru64-Unix-Managers \(E-mail\)" X-Mailer: Internet Mail Service (5.5.2656.59) Xref: main.gmane.org gmane.os.tru64.managers:4342 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:4342 #!/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.