Forum Discussion

Kevin_Davies_40's avatar
Aug 27, 2010

Tables and Tables

Do we have any way to list the names of the subtables defined in memory?

 

 

A solution I am working on will use a thousand or so small tables and for the purposes of testing we need to clear them but presently there is no way to track them without creating another table just for this purpose. That information must exist somewhere internally....

 

 

Would be nice if there was an [info tables "name*... "] simlar to the info globals command then I could do something like

 

 

foreach name [info globals "table_*"] {

 

table delete -subtable $name -all

 

}

 

 

Jarvil

 

 

 

  • spark_86682's avatar
    spark_86682
    Historic F5 Account
    Posted By Jarvil on 08/27/2010 04:47 PM

     

    Do we have any way to list the names of the subtables defined in memory?

     

    That information must exist somewhere internally....

     

    There's no command to do this, no. There is no collection of subtable names in memory either, so any command to do that would have to go searching through the whole system to list them, which would be criminally inefficient, to say nothing of all the other problems it would pose.

     

     

    A solution I am working on will use a thousand or so small tables and for the purposes of testing we need to clear them but presently there is no way to track them without creating another table just for this purpose. That really is the best solution.
  • is this a change with verson 10? in version 9 I had a command that would list my class tables by using the [info globals name*] (where name* was a wildcard to return those starting with 'name'.

     

     

    it doesn't work in version 10, probably, i'm assuming, is because these are no longer globals. so no good way to find these tables, I assume?

     

     

    not sure about the comment about 'criminally inefficient,....' there should be a system level list of all defined tables.. how else would it be able to resolve a reference?

     

     

    thanks...

     

    until then will have to define a table of tables or make explicit references etc...
  • is this a change with verson 10? in version 9 I had a command that would list my class tables by using the [info globals name*] (where name* was a wildcard to return those starting with 'name'.

     

     

    it doesn't work in version 10, probably, i'm assuming, is because these are no longer globals. so no good way to find these tables, I assume?

     

     

    not sure about the comment about 'criminally inefficient,....' there should be a system level list of all defined tables.. how else would it be able to resolve a reference?

     

     

    thanks...

     

    until then will have to define a table of tables or make explicit references etc...
  • spark_86682's avatar
    spark_86682
    Historic F5 Account
    Posted By brad on 09/27/2010 08:20 AM

     

    is this a change with verson 10? in version 9 I had a command that would list my class tables by using the [info globals name*] (where name* was a wildcard to return those starting with 'name'. Well, it's a change in the sense that tables and subtable didn't exist at all in version 9. :-) I think you're confusing this with classes/datagroups. The session table was enhanced in v10.1 to provide subtables, and other functionality. You can read the tutorial on them for more info.