9 Legend

 • 

20.4K Posts

February 21st, 2013 10:00

i have not changed my default shell to bash but when i login as root and type bash ..it drops me to bash shell, at that point if i type isi_quota_ and hit TAB it tries to autocomplete. Is that not working for you ? I also type "set -o vi" as i like vi to be my default editor.

1 Rookie

 • 

114 Posts

February 21st, 2013 10:00

dynamox, try

isi smb in both default zsh and in bash

zsh autocompletes not only the command itself, but also the options to the isi commands :

zsh# isi smb

log-level   openfiles   sessions    settings    shares

so you don't have to search the command in the guide, you build it by pressing tab (similar to cisco CLI)

This is particularly usefully in 7.0 now, since most of the CLI is isi .. , the old isi_*_* commands are being depreciated. I like the new  semantics a lot more than the old one.

In contrast bash will only autocomplete the command, paths and vars. If I use bash and set -o vi i lose the autocomplete of the isi command.

2 Intern

 • 

467 Posts

February 21st, 2013 22:00

try

bindkey -v

bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward

Thats what I like..

the auto tab completion of isi commands is based on zsh compinstall.. I don't think you can make it work with bash..  best you can do is make zsh work more like bash..

9 Legend

 • 

20.4K Posts

February 22nd, 2013 07:00

you can make it work if you really want to put enough time into it, look at bash completion for command arguments. ZSH keeps them here /usr/local/share/zsh/site-functions , in bash it's here /etc/bash_completion.d . The problem that i have encountered is that scripts that were written for zsh i could not get to run in bash, keep getting syntax errors. Just don't have the time to convert them to bash friendly syntax. We know you are a perl wiz so if you figure it out how to convert them programmatically do share

1 Rookie

 • 

114 Posts

February 22nd, 2013 08:00

OK got it will learn emacs shorcuts

9 Legend

 • 

20.4K Posts

February 22nd, 2013 08:00

i don't want to highjack bhalilov@un thread, but have you guys figured out how to redirect output from isi commands to a file without the fields getting truncated, for example "isi quota list" ..looks fine on the screen but Path field gets truncated when piped to a file ?

2 Intern

 • 

467 Posts

February 22nd, 2013 08:00

Haha,  I was working on converting them myself manually with some success.. when i did an oneFS upgrade and the syntax of some things changes...  so I gave up...  haha

2 Intern

 • 

467 Posts

February 22nd, 2013 10:00

I didn't even notice until now... but it is annoying me now...

It's all python under the covers... isi is really a python script which envokes "/usr/libexec/isilon/isi" as it's shell - which appears to be a copy of python

node5# md5 /usr/libexec/isilon/isi

MD5 (/usr/libexec/isilon/isi) = af52367e3ce745bc222ca218e43d33df

node5# md5 /usr/bin/python

MD5 (/usr/bin/python) = af52367e3ce745bc222ca218e43d33df

Hows your python?

9 Legend

 • 

20.4K Posts

February 22nd, 2013 11:00

cool, does it preserve output formatting if you pipe it into a text file ?

9 Legend

 • 

20.4K Posts

February 22nd, 2013 11:00

me no speak no python ,  simple things like stdout redirection should not be this complicated. Common Isilon ..what were you thinking ?!?!

1 Rookie

 • 

114 Posts

February 22nd, 2013 11:00

in 7.0.x.x some commands have --format option :

isi quota quotas list

       ...

        [--format {table | json | csv | list}]

        [{--no-header | -a}]

        [{--no-footer | -z}]

        [{--verbose | -v}]

so you can get untruncated output and parse it with

Unfortunately, the format option is not available for all isi commands , for example isi sync does not have it. I hope  that as they rewrite the cli and add the features to the API, all cli options will become available to all isi commands. BTW the json format is the same as you'd get if you talk to  API.

9 Legend

 • 

20.4K Posts

February 22nd, 2013 12:00

that output looks nice, let's start another discussion.

1 Rookie

 • 

114 Posts

February 22nd, 2013 12:00

dynamox,

isi quota quotas list --format=csv

Type,AppliesTo,Path,Snap,Hard,Soft,Adv,Used

directory,DEFAULT,/ifs/test1/random/loooooooooooooooooooooooooooooooooooonnnnngggggggnaaaaaaaameeeeeeeeeeee,False,1000,,,12

nyst0087-2# isi quota quotas list --format=csv  | grep test

directory,DEFAULT,/ifs/test1/random/loooooooooooooooooooooooooooooooooooonnnnngggggggnaaaaaaaameeeeeeeeeeee,False,1000,,,12

BTW even without the --format option in 7.0.1.3 the long names are not truncaded :

isi quota quotas list 

Type         AppliesTo           Path                                                                                      Snap Hard    Soft    Adv  Used   

-------------------------------------------------------------------------------------------------------------------------------------------------------------

directory    DEFAULT             /ifs/OICT/KMS/share01                                                                     No   5.000G  -       -    303.06M

directory    DEFAULT             /ifs/test1/random/loooooooooooooooooooooooooooooooooooonnnnngggggggnaaaaaaaameeeeeeeeeeee No   1000b   -       -    12b    

-------------------------------------------------------------------------------------------------------------------------------------------------------------

maybe we shoud start another discussion about best ways for cli parsing I'm sure it would be of interest to others

4 Operator

 • 

1.2K Posts

February 23rd, 2013 05:00

For those still on 6.5.x:

Have a look at the (simple) definition of OUTPUT_DEFAULT_WIDTH

in line 55 of

/usr/local/lib/python2.6/site-packages/isi/ui/lib/format.py

Beware, check your support terms before messing with that code.

Peter

9 Legend

 • 

20.4K Posts

February 23rd, 2013 06:00

i have a feeling Isilon support will frown upon me modifying any of the system files, wish this could be set in my shell on the fly.

No Events found!

Top