How do I use HP 3PAR cli commands? (6810 Views)
Reply
Frequent Advisor
StuartA46
Posts: 46
Registered: ‎10-06-2011
Message 1 of 8 (6,810 Views)
Accepted Solution

How do I use HP 3PAR cli commands?

All:

 

1st, am I in the correct Forum?

 

2nd, question:  I'm used to EMC symcli and naviseccli, where you just issue the command you want, and then you "awk" or "grep" the output as you see fit.  On the 3PAR, apparently, you issue the command "cli", then you get a "cli prompt" then you execute your commands.  How do you run "scripts" of commands, with "awk" and "grep", etc?

 

Does anybody have a simple example of a 3PAR script session they can show me?

 

   Stuart

Acclaimed Contributor
Dennis Handly
Posts: 25,281
Registered: ‎03-06-2006
Message 2 of 8 (6,804 Views)

Re: How do I use HP 3PAR cli commands?

>am I in the correct Forum?

 

(I've asked the topic to be moved to SAN enterprise.)

 

>On the 3PAR, apparently, you issue the command "cli", then you get a "cli prompt" then you execute your commands.  How do you run "scripts" of commands, with "awk" and "grep", etc?

 

You can invoke cli in several ways.

1) Invoke the cli shell and do several commands, as you did.

 

2) Invoke cli with the command on the command line:

cli shownode

 

3) Or invoke the command directly as "shownode", which basically does 2).

Frequent Advisor
StuartA46
Posts: 46
Registered: ‎10-06-2011
Message 3 of 8 (6,799 Views)

Re: How do I use HP 3PAR cli commands?

Dennis:

 

that's great news!  but if I run "cli shownode" or just "shownode" how do I specify the Array IP address, my username and my password?  Do i stick it in the command?   Is there some kind of "environmnet setup"?

 

    Stuart

Acclaimed Contributor
Dennis Handly
Posts: 25,281
Registered: ‎03-06-2006
Message 4 of 8 (6,795 Views)

Re: How do I use HP 3PAR cli commands?

>if I run "cli shownode" or just "shownode" how do I specify the Array IP address, my username and my password?  Do I stick it in the command?  Is there some kind of "environment setup"?

 

Two ways:

1) export TPDSYSNAME & TPDPWFILE

2) Use the -sys & –pwf options.  (Or –user & –password instead of -pwf.)

 

See cli command page 70.

See setpassword command page 310 to create the -pwf file.

 

3.1.1 CLI ref manual:

http://bizsupport.austin.hp.com/bc/docs/support/SupportManual/c02985999/c02985999.pdf

Frequent Advisor
StuartA46
Posts: 46
Registered: ‎10-06-2011
Message 5 of 8 (6,781 Views)

Re: How do I use HP 3PAR cli commands?

Dennis:

 

Thanks.  I will try this today.

 

    Stuart

Honored Contributor
Sheldon Smith
Posts: 911
Registered: ‎07-27-2003
Message 6 of 8 (6,762 Views)

Re: How do I use HP 3PAR cli commands?

Note: If you have more than one array, you need a separate password file for each, even if they have the same username and password.

Acclaimed Contributor
Dennis Handly
Posts: 25,281
Registered: ‎03-06-2006
Message 7 of 8 (6,758 Views)

Re: How do I use HP 3PAR cli commands?

[ Edited ]

>you need a separate password file for each, even if they have the same username and password.

 

You're right for a normal user name.  And it also fails if you delete and recreate the same user.

Acclaimed Contributor
Dennis Handly
Posts: 25,281
Registered: ‎03-06-2006
Message 8 of 8 (6,734 Views)

Re: How do I use HP 3PAR cli commands?

>If you have more than one array, you need a separate password file for each, even if they have the same username and password.

 

There is an obvious solution to this.  :-)

1) On the first machine use createuser

2) Then login to that user and use setpassword -saveonly -file file1

3) Look inside file1 to get the encrypted password

 

Then on other machines, use:

createuser -e encrypted-password ...

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.