Interesting.
Need to dig a bit deeper, but for me it does not work correctly.
The auto completion list for hinv. is reported as
hinv.cpu.bogomips hinv.cpu.stepping hinv.map.scsi hinv.pagesize
hinv.cpu.cache hinv.cpu.vendor hinv.ncpu hinv.physmem
hinv.cpu.clock hinv.machine hinv.ndisk
hinv.cpu.model hinv.map.cpu_num hinv.nfilesys
but pminfo hinv.cpu reports
hinv.cpu.clock
hinv.cpu.vendor
hinv.cpu.model
hinv.cpu.stepping
hinv.cpu.cache
hinv.cpu.bogomips
So I'm not sure where the metrics namespace info is coming from!
And with -h and/or -a, hard to see how this is going to work without
surprises.
On Mon, 2009-05-11 at 15:09 +1000, Nathan Scott wrote:
> Enjoy! Considering installing this to /etc/bash_completion.d -
> anyone have any thoughts?
>
> cheers.
>
> ----- Forwarded Message -----
> From: "Roman Revyakin" <rrevyakin@xxxxxxxxxx>
> Sent: Monday, May 11, 2009 2:36:36 PM GMT +10:00 Canberra / Melbourne / Sydney
> Subject: PCP metrics auto-completion in the command line
>
> Hi guys,
>
> I do not know how much each of of you guys interact with the
> command-line PCP tools like pminfo or pmdumptext, in any case here's
> what I find helpful: autocompletion of the PCP metrics in your command
> line. (For Bash users only as of now, sorry).
>
> Untar the attached tarball in your home, and add the following lines to
> your .bashrc
>
> if [ -d ~/.bash_completion.d ]
> then
> for f in `ls ~/.bash_completion.d`
> do
> source ~/.bash_completion.d/"$f"
> done
> fi
>
> Try it out after sourcing your new .bashrc:
>
> pminfo -f aconex.<TAB>
>
> Autocompletion works for the following set of programs as of now:
>
> pminfo
> pmdumptext
> pmdumplog
> pmlogsummary
> pmstore
> pmval
>
> Enjoy,
> Roman
>
> --
> Roman Revyakin
> ETO Systems Engineer
> Aconex
> The easy way to save time and money on your project
>
> 696 Bourke Street, Melbourne, Victoria, Australia
> Tel: +61 3 9240 0200 Fax: +61 3 9240 0299
>
> _______________________________________________
> pcp mailing list
> pcp@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/pcp
>
|