perl script scu and hwmgr combined outputs

From: Binkley Robert - rbinkl (Robert.Binkley_at_acxiom.com)
Date: 05/27/03

  • Next message: Binkley Robert - rbinkl: "Password expire time script "tru64""
    Date: Tue, 27 May 2003 10:17:46 -0500
    To: "Tru64 UNIX Admins (E-mail) (E-mail)" <tru64-unix-managers@ornl.gov>, "Tru64-Unix-Managers (E-mail)" <tru64-unix-managers@ornl.gov>
    
    

    #!/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.


  • Next message: Binkley Robert - rbinkl: "Password expire time script "tru64""

    Relevant Pages

    • [HPADM] RE: Security Tracking
      ... I have been given a task, on monitoring one of out credit customers ... The information contained in this communication is ... is intended only for the use of the recipient ... delete the original message or any copy of it from your ...
      (HP-UX-Admin)
    • Resize root volume with Solaris Volume Manager
      ... I was able to successfully resize ... The information contained in this communication is ... is intended only for the use of the recipient ... delete the original message or any copy of it from your ...
      (SunManagers)
    • COM Help
      ... some searching and reading on google I have run ... The information contained in this communication is ... is intended only for the use of the recipient ... delete the original message or any copy of it from your ...
      (comp.lang.python)
    • Re: Help renaming devices
      ... of my TSM server for library sharing, i.e rmt1 on the client is rmt4 on the ... The information contained in this communication is ... is intended only for the use of the recipient ... delete the original message or any copy of it from your ...
      (AIX-L)
    • CFS Performance
      ... We have noticed that a single "dd" can overwhelm the memory channel ... The information contained in this communication is ... is intended only for the use of the recipient ... delete the original message or any copy of it from your ...
      (Tru64-UNIX-Managers)