Page 1 of 1

Simple Script

Posted: Fri Sep 04, 2015 5:55 am
by 3padm
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

Re: Simple Script

Posted: Tue Sep 08, 2015 2:07 am
by 3padm
Hi,

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

Thanks

Re: Simple Script

Posted: Tue Sep 08, 2015 6:19 am
by JohnMH
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

Re: Simple Script

Posted: Sat Sep 12, 2015 3:43 am
by 3padm
thanks that was very useful! The text comes out quite unformulated but this is a great start.

Cheers

Re: Simple Script

Posted: Sat Sep 12, 2015 3:19 pm
by Richard Siemers
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.

Re: Simple Script

Posted: Mon Sep 14, 2015 2:42 am
by 3padm
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

Re: Simple Script

Posted: Mon Sep 14, 2015 10:59 pm
by Richard Siemers
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.

Re: Simple Script

Posted: Thu Sep 17, 2015 10:24 am
by JohnMH
{cli% set clienv csvtable 1} should help.