× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



and if you want to you can sort the grep output by piping thru sort

QSH CMD('ssh -T hscroot@xxxxxxxxxxxxxxxxxxxx lssyscfg -r lpar -m RACK2
-F name,lpar_id,state | grep -E "RACK2HST|GDWEB2" | sort')

options for sort:
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzahz/rzahzsort.htm?lang=en


Bryan



Bryan Dietz wrote on 5/28/2015 2:49 PM:
What if you piped the ssh command thru "grep"

like this :

| grep -E "CAHTECH1|CAHTECH2"

so your example would be something like:

QSH CMD('ssh -T hscroot@xxxxxxxxxxxxxxxxxxxx lssyscfg -r lpar -m RACK2
-F name,lpar_id,state | grep -E "RACK2HST|GDWEB2"')

Bryan


rob@xxxxxxxxx wrote on 5/28/2015 1:56 PM:
I am trying to communicate with the HMC. I am making good progress. I
can now do:
QSH CMD('ssh -T hscroot@xxxxxxxxxxxxxxxxxxxx lssyscfg -r lpar -m RACK2
--filter "lpar_names=RACK2HST" -F name,lpar_id,state')
and I get:
RACK2HST,3,Running
Press ENTER to end terminal session.

But when I try more lpar names I get:
QSH CMD('ssh -T hscroot@xxxxxxxxxxxxxxxxxxxx lssyscfg -r lpar -m RACK2
--filter "lpar_names=RACK2HST,GDWEB2" -F name,lpar_id,state')
The command entered has a malformed filter. The --filter parameter has
the f
orm "<filter name 1>=<value>,<filter name 2>=<value>,..." or ""<filter
name 1
=<value 1>,<value 2>,...",..." . Please correct the filter and retry
the
co
mmand. Note that depending on the shell being used, any nested double
quote
characters may need to be preceded by an escape character, which is
usually a
'\' character.
Press ENTER to end terminal session.

I got the same error with:
QSH CMD('ssh -T hscroot@xxxxxxxxxxxxxxxxxxxx lssyscfg -r lpar -m RACK2
--filter \""lpar_names=RACK2HST,GDWEB2,GDIHQ2,GDISYS2,MAILTWO\"" -F
name,lpar_id,state')

From the command line specifications available at:
https://www-304.ibm.com/webapp/set2/sas/f/hmcl/resources.html

List the partitions lpar1, lpar2, and lpar3:
lssyscfg -r lpar -m system1 --filter ""lpar_names=lpar1,
lpar2,lpar3""

List only the names, IDs, and states of partitions lpar1, lpar2, and
lpar3, and separate the output values with
a comma:
lssyscfg -r lpar -m system1 --filter ""lpar_names=lpar1,
lpar2,lpar3"" -F name,lpar_id,state

This works:
lssyscfg -r lpar -m RACK2 -F name,lpar_id,state
TSMAIX2,8,Running
MAILTWO,7,Running
GDISYS2,6,Running
GDIHQ2,5,Running
GDWEB2,4,Running
RACK2HST,3,Running
vios22,2,Running
vios21,1,Running

Rob Berendt


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.