HPE Storage Users Group

A Storage Administrator Community




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Simple Script
PostPosted: Fri Sep 04, 2015 5:55 am 

Joined: Fri Aug 09, 2013 5:51 am
Posts: 44
Hi,

I suspect this is a very simple task but thought I'd ask the experts rather than experiment on live array!

All I need to do is have a script execute and return some stats off the 3par, say showpd and dump it in a txt file on a windows box. What I am after are the end to end steps. i.e.
-create bat file
-place creds in such n such manner
-run cli showpd
-dump file here C:\someDir\

This would be much appreciated !
Cheers


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple Script
PostPosted: Tue Sep 08, 2015 2:07 am 

Joined: Fri Aug 09, 2013 5:51 am
Posts: 44
Hi,

Appreciate this is very simple stuff to most but could someone comment on the above ?

Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple Script
PostPosted: Tue Sep 08, 2015 6:19 am 

Joined: Wed Nov 19, 2014 5:14 am
Posts: 505
There's lots of ways to achieve this, you could do something simple with 'PLINK' which is part of putty with something as simple as below.

plink -ssh -l USERID -pw PASSWORD IPADDRESS showpd >>>output.txt

Have a look at some plink examples and also some of the more complex scripts hdtvguy has uploaded.
https://www.google.com/?gws_rd=ssl#q=script+redirect+output+site:3parug.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple Script
PostPosted: Sat Sep 12, 2015 3:43 am 

Joined: Fri Aug 09, 2013 5:51 am
Posts: 44
thanks that was very useful! The text comes out quite unformulated but this is a great start.

Cheers


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple Script
PostPosted: Sat Sep 12, 2015 3:19 pm 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
To fix improve formatting, try using the CLI instead of plink/ssh, and set the variable to force csv output. the CLI doc should be your bible on such things... even scripts you pull from these forums you should vet line by line with official docs to be certain, since you don't have a dev/test box.

_________________
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple Script
PostPosted: Mon Sep 14, 2015 2:42 am 

Joined: Fri Aug 09, 2013 5:51 am
Posts: 44
Hi Richard,

Thanks for your suggestion. I guess I would have to ask the same question again :)
So how would one achieve this via the cli?

-create bat file
-place creds
-run cli showpd
-dump file here C:\someDir\

Again apologiesfor the noddy questions, hopefully there are other people out there who can benefit from knowing this!

Cheers


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple Script
PostPosted: Mon Sep 14, 2015 10:59 pm 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
3padm wrote:
-create bat file
-place creds
-run cli showpd
-dump file here C:\someDir\


I would start off with these steps first:

-Google/download/print 3PAR InForm OS CLI Administrator’s Manual (for your Inserv OS version)
-Install CLI on a desktop/server where you want your scripts to managed/run from.
-Read manual section covering "Global Options and Environment Variables"
-Read up on showpd and statpd commands

That should give you a good start on what you are asking.

_________________
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.


Top
 Profile  
Reply with quote  
 Post subject: Re: Simple Script
PostPosted: Thu Sep 17, 2015 10:24 am 

Joined: Wed Nov 19, 2014 5:14 am
Posts: 505
{cli% set clienv csvtable 1} should help.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | DVGFX2 by: Matt