4 Operator

 • 

8.6K Posts

August 25th, 2009 12:00

Did you see the part about it in the Release Notes ?

96 Posts

August 25th, 2009 13:00

I did see that section, it is the same info that is in the CLI doc and is kind of vague. How do I know what fields I have to choose from for each query tag, and how do I know what values I can use for each tag? For example, from the release notes:

nas_volume -query:inuse==n:IsRoot==False:name=dc -format:"%s\n" -fields:name

How do you know that 'n' for inuse and 'false' for isroot are valid values? How do you know you can use 'name' for -fields?

96 Posts

October 6th, 2009 06:00

Does anyone have any more info on this? Seems like it'd be pretty powerful if you knew how to use it.

4 Operator

 • 

8.6K Posts

October 6th, 2009 08:00

I assume you know that you can get the list of available fields with -query:tags
like nas_fs ¿query:tags

96 Posts

October 6th, 2009 08:00

Sneaky, I like that. Thanks.

96 Posts

October 6th, 2009 08:00

Is there any way to see the structure of the NAS_DB?

96 Posts

October 6th, 2009 08:00

Yes, I've got that. The last piece to the puzzle is values that might be in those fields.

4 Operator

 • 

8.6K Posts

October 6th, 2009 08:00

You could peek at the EMC scripts how they use -query

for example grep nas_fs /nas/sbin/* | grep -e "-query"

11 Posts

October 13th, 2009 05:00

nas_fs -query:tags gets you all the information regarding the fields you need. There are some that begin with a "C" which means its a nested query that hits other tables instead of a single value. Here are some examples I can give you. I leverage this to populate a mysql database front-ended by a php website to help track historical data for filesystem size/growth/usage as well as tree qutoas.

DUMP ALL FILESYSTEMS WITH SIZES:
nas_fs -query:inuse=y:type=uxfs:isroot=false -fields:ServersNumeric,Id,Name,SizeValues -format:'%s,%s,%s,%s\n'

DUMP ALL FILESYSTEM QUOTAS ON AN ENTIRE CELERRA:
nas_fs -query:\* -fields:ID,TreeQuotas -format:'%s:\n%q#\n' -query:\* -fields:FileSystem,Path,BlockHardLimit,BlockSoftLimit,BlockGracePeriod,BlockUsage -format:'%s : %s : %s : %s : %s : %s\n'

DUMP ALL QUOTAS FOR {FILESYSTEM}:
nas_fs -query:name={FILESYSTEM} -fields:TreeQuotas -format:'%q' -query:\* -fields:FileSystem,Path,BlockHardLimit,BlockSoftLimit,BlockGracePeriod,BlockUsage -format:'%s : %s : %s : %s : %s : %s\n'

List all Checkpoint filesystems:
nas_fs -query:inuse=y:type=ckpt:isroot=false -fields:ServersNumeric,Id,Name,SizeValues -format:'%s,%s,%s,%s\n'

All the Server_params for a specific server_X

nas_server -query:Name==server_2 -format:'%q' -fields:ParamTable -query:Name== -fields:ChangeEffective,ConfiguredDefaultValue,ConfiguredValue,Current,CurrentValue,Default,Facility,IsRebootRequired,IsVisible,Name,Type,Description -format:'%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s\n'



Wins/DNSDomain Config

nas_server -query:Name=server -fields:Name,DefaultWINS,DNSDomain -format:"%s,%s,%s\n"

32 Posts

February 14th, 2011 09:00

Are you looking for supported tags  then try below one..else let me know what are you looking for specifically..

nas_fs -query:tags

3 Posts

February 14th, 2011 09:00

That's perfect... thanks!!

3 Posts

February 14th, 2011 09:00

No, I have all of the tags listed, but am trying to determine how to handle the nested tables (those tagged with a "C" in the tags listings.)  In my example above for nas_server, IDLookupTable is a nested table.  This means that it doesn't return a single value, but rather is a table of its own.  I have been unable to determine how to format the query command to be able to get information from those nested tables.

32 Posts

February 14th, 2011 09:00

and you can use below ones too

nas_server -query:tags

nas_volume -query:tags

nas_disk -query:tags

32 Posts

February 14th, 2011 09:00

You should try something like this


nas_server -query:* -fields:IDLookupTable -format:'%q' -query:\* -fields:Name,Type -format:'%s : %s\n'

I use below one to list name servers..

nas_server -query:* -fields:NameServers -format:'%q' -query:\* -fields:Name,Type -format:'%s : %s\n'

3 Posts

February 14th, 2011 09:00

Has anyone been able to glean the method for querying/displaying the nested tables?  As an example, I tried:

$ nas_server -query:* -fields:IDLookupTable -format:"%s\n"
Error 2110: Invalid query syntax: the tag ("IDLOOKUPTABLE") corresponding to this format specifier ("%s") is not a simple tag

The IDLookupTable is a nested table.  I tried specifying a particular field that I would like from within that table, but have yet to hit on the appropriate syntax.  I've tried all of the following with no success:

-fields:IDLookupTable{Name}

-fields:IDLookupTable(Name)

-fields:IDLookupTable:Name

Any ideas?

Thanks!

Richard

No Events found!

Top