Collect Analyzer results from an EMC storage unit (VNX,CX,Sym) with Powershell


Just wanted to toss a little something up about working with EMC units. I recently had to run analyzer on a unit for EMC to spec out a new system for us and when I tried to pull the logs off, it kept crashing (not a huge fan of java). Even though there are only a handful of files I decided this would be a good use for Powershell.

$SPIPS = "192.168.1.123","192.168.1.124"

foreach($IP in $SPIPS)

{

$files = naviseccli.exe -h $ip analyzer -archive -list | %{$_ -like "(apm.*)"} | ?{$_} | %{naviseccli -h $ip analyzer -archiveretrieve -file $Matches[1]}

}

Hope this helps someone!

Advertisements

About jrich

I am the Solutions Architect for Apex Learning in Seattle WA. I've been working with computers since I was 13. Started programming when I was 14. Had my first IT job as tech support at an ISP at the age of 15 and became a network admin at the age of 17. Since then I've worked at a variety of small to mid size companies supporting, maintaining and developing all aspects of IT. Mostly working with Windows based networks but have recently been working with Solaris system as well. I created this blog mostly as a place for me to take my own notes, but also share things that I had a hard time finding the info for.

Posted on September 9, 2011, in EMC (CX VNX), Uncategorized, WMF (Powershell/WinRM) and tagged , , , , . Bookmark the permalink. 4 Comments.

  1. I was trying to implement the Get-Spcollects.ps1 cripts that you have made.

    I am very new to scripting,, and i wanted to know where do i change the Ip address in the script to reflect my SAN IP.

    • at the very top, you change the variable $spips (sp ip’s) to the two IPs of your san, in my example i used 192.168.1.123 and 124

      you could actually put in a whole bunch of IPs if you had multiple units. just quote them and put a , between them.. so if you had 4 units, you’d give it 8 IPs (both storage processors for each unit)

      I should probably update this post, i’ve learned more since this time :)

      • Hi it is me back.

        I was again trying to get this configured so it can be handed over to the monitoring team to get the Spcollects.

        I tried to change the Ip as you mentioned but i guess i am really new or i am missing on how to run the Script.

        Can you please update the script with assume are two of my Ipaddress 192.61.108.65 and 192.61.108.66, and also send me details on how to run the script.

        I would really appreciate it you could help me with this.

  2. boy its been a while since i wrote this… its horrible :)

    I’ll break it out so you can test it yourself to see where its going wrong. They might have changed the output a bit, i think i last tested it on flare 21 or so.

    $list = naviseccli.exe -h 192.61.108.65 analyzer -archive -list

    $list #will show the output

    $files = $list | ?{ $_ -match “(apm.*)” } | % { $matches[1] }

    $files # will show the sp collect files, they should all start with apm.

    $files | % { naviseccli -h $ip analyzer -archiveretrieve -file $_ }

    that will download the files… i for some reason changed -match to -like in my post… -like is a wildcard search, and it doesnt populate $matches, only -match does that…

    also im thinking that this will grab ALL collects, which over time could be a lot.. i need to update this :-/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: