Problem with external file

I’m having a problem retrieving data from an external file. The following loop displays the data out of order:

foreach { selectedpool } [class get pool_member_status_list] {

append response “$selectedpool \n”

}

I tried using $::pool_member_status_list instead of “[class get pool_member_status_list]” but both return the same out of order set of strings.

Any ideas welcome!

Thanks,

D

Hi D,

There isn’t a guarantee of getting the datagroup contents back in the same order they’re listed (whether using an internal or external datagroup). I think this is due to hashing that LTM performs when parsing the datagroup entries.

If you need to get them in a specific order, you could prepend a digit or letter to the class element and then sort by that. But I think that could be computationally expensive.

Out of curiosity, why do you need the elements back in order?

Aaron

Aaron,

I was interested in gathering the stats that come along with some of the pools but reported on separate lines. Working without them or pulling them via another method seems to be the best options.

Thanks,

D