Start a Conversation

Unsolved

This post is more than 5 years old

3955

April 17th, 2008 13:00

Perl Scripting

Hello all. I am not sure if this is under the correct topic or not so please feel free to move if necessary. I was wondering if someone could point me in the direction of being able to use Perl Scripts to manage or Symmetrix arrays. We are currently using ECC 5.2 SP 5 and SE 6.4.3 in our environment for management. We are having some problems with ECC and are looking at a using SE more for day to day management using Perl scripts. We had heard that using Perl is possible. I am extremely new to Perl, but would like to learn if possible especially for the daily management of our arrays. Any help is appreciated. Thanks.

2 Intern

 • 

20.4K Posts

April 17th, 2008 16:00

sure you can use perl to create scripts that can be used with solutions enabler. I would say start using SE for tasks that you used to do in ECC and get comfortable with the syntax. As you get more comfortable with SE you can start scripting things in perl to help you with your daily tasks like backing up VCM database, creating symconfigure files ..etc. I am myself in the process of learning perl so i can convert so of my shell scripts to perl for compatibility.

2 Intern

 • 

2.8K Posts

April 18th, 2008 00:00

BTW a lot of new features (symrecover, symstar just to name some of them) are big (and complex) perl scripts ... However note that they are compiled, so you can't look at the source (at least I think you can't).

6 Posts

April 18th, 2008 08:00

Dynamox,
I have been using SE for about 2 years now for various taks, mainly mapping, masking, offsetting, and SRDF creation. I guess my problem is that I am not sure on how to apply Perl to SE. I don't really have any programming experience except for doing some simple batch files in Windows. I guess I am trying to fine a good avenue to learn scripting/programming for someone with zero programming experience. Can you recommend any easy to understand sources for learning scripting? I have gone to Cpan and such, but many of the articles there seem to be over my head. Thanks again.

Message was edited by:
mtiesman

2 Intern

 • 

20.4K Posts

April 18th, 2008 09:00

i have been using O'Reilly "camel" book ...but this is good too

http://www.perl.org/books/beginning-perl/

if you don't have prior experience with shell scripting it might be a little tougher ..but it should not discourage you at all ..logic is all you need :)

1 Message

April 18th, 2008 12:00

I recommended this book. It's an easy read, and not too long. Give you most of what your ever need...

http://www.oreilly.com/catalog/lperl3/

2 Intern

 • 

1.3K Posts

April 18th, 2008 13:00

Jump from here:

http://perlmonks.org/index.pl?node_id=284175

As for books, I'd start with "Learning Perl" from the O'Reilly publishers

1 Message

April 22nd, 2008 04:00

Perl is very good at generating those symconfigures etc.

I'd also recommend the o'reilly books - if you know some programming the perl cookbook is great as you can steal/borrow the recipes for things you are trying to do.

I'd start small - look at the commands you are using and try and get script to take the hard work. Get perl installed on your PC and away you go.

For instance a simple counthex script to generate a list of devices. Starting at 0f for 100 devices and steps of 4.

$dev=hex 010; # store the decimal number
$count=100;
$skip=4;
for (1..$count) {
# convert it to hex and print it out
print sprintf("%04X",$dev)."\n";
$dev += $skip;
}

It's a small step from there to generate a command file with all the other text bits around it.

Ed

6 Posts

April 22nd, 2008 07:00

Thanks everyone!! These forums are great. I will take a look at all the links and may run to the bookstore and pick up a couple Perl books.

50 Posts

November 10th, 2009 08:00

HI,

Can you please provide few sample perl scripts for symmtrix management tasks like symconfigure for meta,map and symask and fa port settings etc.

If you can email, please email them to 

Thanks a lot in advance.

Vamsi

36 Posts

November 10th, 2009 09:00

Hi All,

Even am trying to manage the Storage arrays ie EMC dmx, symmetrix using perl scripts.. currently we are using solutions enabler SE to manage the storage.. so here i want to use the perl script for the repetitive tasks, mapping, masking, to find the capacity, trending,reporting, for symconfiguration and etc.. i really new to this perl scripting.. and don't have any prior experience on this in fact any kind of programming languages..
Could any one please provide some sample scripts for the above..

I really appreicate it in advance..

thanks
puppan

36 Posts

November 20th, 2009 05:00

Hey hi dynamox,

could you please send me the scripts you have? it would help me even am learning the perl script.. your help is much appreciated.

Thanks

11 Posts

December 3rd, 2009 06:00

https://community.emc.com/docs/DOC-1964 is your friend.  Main thing I recommend is:

Get a decent XML editor to look at the output of the symcli commands.

The PDF has a decent subroutine for calling SYMCLI.  You'll probably want to modify it to trap errors that you want to actually perform some function on...

For example, I trap "no masking entries present" so I can validate that a device isn't masked before unmapping it...

if (( $rc eq 1) && ( $cmd =~ m/$symmaskdb.*list.assignments/ )) {
return(0);
}

etc. etc.

No Events found!

Top