Comments (3)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 jeffschaller42 commented Permalink

Handy script; I like it! <div>&nbsp;</div> I took line 2 of the script as enough of an excuse to drill into the lsdev command a bit more; I wonder if you think this version of the command is any more direct? lsdev -C -F name -t ibm_ech` -- will output just the name of the device (for the awk statement) of any etherchannel type devices (saving 2 greps). I only had EC devices on a VIO server, but I'd assume (!) that it's the same type for a standalone system.

2 rpatusa commented Permalink

the syntax of lsattr -El is erroring out in the script. <br /> - Etherchannel device <br /> lsattr: 0514-500 Usage error - adapter_names <div>&nbsp;</div> Usage: <br /> lsattr {-D[-O]| -E[-O] | -F Format [-Z Character]} -l Name [-a Attribute]...[-H] <br /> [-f File] <br /> lsattr {-D[-O]| -F Format [-Z Character]}{[-c Class][-s Subclass][-t Type]} <br /> [-a Attribute]... [-H][-f File] <br /> lsattr -R {-l Name | [-c Class][-s Subclass][-t Type]} -a Attribute [-H] <br /> [-f File] <br /> lsattr {-l Name | [-c Class][-s Subclass][-t Type]} -o Operation [...] <br /> -F Format [-Z Character][-f File][-H] <br /> lsattr -h

3 brian_s commented Permalink

I'm not sure why you are getting a syntax error on the "lsattr" command. Try changing the first line of the script to "#!/usr/bin/ksh -x" to have it display the commands that are being run, so you can see the exact lsattr command line it is trying to run.