HPE Storage Users Group
https://3parug.net/

Simple Script
https://3parug.net/viewtopic.php?f=17&t=1620
Page 1 of 1

Author:  3padm [ Fri Sep 04, 2015 5:55 am ]
Post subject:  Simple Script

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

Author:  3padm [ Tue Sep 08, 2015 2:07 am ]
Post subject:  Re: Simple Script

Hi,

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

Thanks

Author:  JohnMH [ Tue Sep 08, 2015 6:19 am ]
Post subject:  Re: Simple Script

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

Author:  3padm [ Sat Sep 12, 2015 3:43 am ]
Post subject:  Re: Simple Script

thanks that was very useful! The text comes out quite unformulated but this is a great start.

Cheers

Author:  Richard Siemers [ Sat Sep 12, 2015 3:19 pm ]
Post subject:  Re: Simple Script

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.

Author:  3padm [ Mon Sep 14, 2015 2:42 am ]
Post subject:  Re: Simple Script

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

Author:  Richard Siemers [ Mon Sep 14, 2015 10:59 pm ]
Post subject:  Re: Simple Script

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.

Author:  JohnMH [ Thu Sep 17, 2015 10:24 am ]
Post subject:  Re: Simple Script

{cli% set clienv csvtable 1} should help.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/