Forum Discussion
OTS02
Cirrus
Mar 30, 2009dump persistence records
Is it possible to dump the persistence records to a file, using iConntrol? I am using source ip affinity persistence.
Viewing persistence records fro the GUI, generates the following syslog:
mui/locallb/stats/persistence/stats.jsp HTTP/1.1" 7082
So far I haven't been able to find anything similar in the SDK.
Thanks
16 Replies
- OTS02
Cirrus
Never mind. I found post, "Dumping persistence record table for a VS", which should be all that I need. - OTS02
Cirrus
Well, I thought that I could figure it out on my own, but I'm not there yet. Could someone show me a sample of c code to make this call? Thanks. - OTS02
Cirrus
Here is where I am stuck:
private void b_persistence_Click(object sender, EventArgs e)
{
string vsname, vsaddress;
long vsport;
vsname = "Bolifo_COMM_PL4-12340";
vsaddress = "10.10.210.210";
vsport = 12340;
iControl.LocalLBVirtualServer[][] virt_serv = new iControl.LocalLBVirtualServer[1][];
iControl.CommonVirtualServerDefinition[][] vs_def = new iControl.CommonVirtualServerDefinition[1][];
vs_def[0] = new iControl.CommonVirtualServerDefinition[1];
vs_def[0][0] = new iControl.CommonVirtualServerDefinition();
vs_def[0][0].name = vsname;
vs_def[0][0].address = vsaddress;
vs_def[0][0].port = vsport;
string[] vsname1 = new string[] { vsname };
iControl.LocalLBPersistenceMode vs_persmode = iControl.LocalLBPersistenceMode.PERSISTENCE_MODE_DESTINATION_ADDRESS_AFFINITY;
iControl.LocalLBPersistenceRecord[][] persistence_records = new iControl.LocalLBPersistenceRecord[0][];
persistence_records = m_interfaces.LocalLBVirtualServer.get_persistence_record(vsname1, vs_persmode);
}
When compiling, I get the message "Argument '2': cannot convert from 'iControl.LocalLBPersistenceMode' to 'iControl.LocalLBPersistenceMode[]'"
When I try to declare vs_persmode as 'iControl.LocalLBPersistenceMode[], the compiler rejects that too. Please help. - The second parameter to get_persistence_record is a 1-d array of PersistenceMode's, also, you have a bunch of extra variables in there you don't need. The code can be reduced to this.
private void b_persistence_Click(object sender, EventArgs e) { string[] vsname1 = new string[] { "Bolifo_COMM_PL4-12340" }; iControl.LocalLBPersistenceMode[] vs_persmodes = new iControl.LocalLBPersistenceMode[] { iControl.LocalLBPersistenceMode.PERSISTENCE_MODE_DESTINATION_ADDRESS_AFFINITY }; iControl.LocalLBPersistenceRecord[][] persistence_records = m_interfaces.LocalLBVirtualServer.get_persistence_record(vsname1, vs_persmodes); }
Hope this helps...
-Joe - OTS02
Cirrus
Yes - it compiles! Thanks Joe. What's more, I think I may be starting to understand why it works.
When debugging and mousing over the persistence_records variable, I don't see anything in it. Should I see the persistent connections at that point, or do I have to save it to a file or something?
Thanks Joe!!! - OTS02
Cirrus
I also tried it from the pool perspective (LocalLBPool.get_persistence_record), and the variable returns empty. I don't know what I should be seeing. I thought that it would be a table filled with all of the persistent connections (there are ~ 200). Please advise. Thanks. - OTS02
Cirrus
The LTM that I was calling to was version 9.2.3.
I called to another LTM (version 9.3.1), and I get an XML error(There is an error in XML document (39, 51).) {"Instance validation error: '' is not a valid value for CommonProtocolType."}. - OTS02
Cirrus
Joe, can you give me any guidance on this one? - OTS02, sorry for the delay, it's been a hectic week.
I just ran the virtual server code against my 9.6 box and it's working fine, although I didn't do it with the pool interface. There should be values returned if you specify the correct persistence mode in the request and you actually have persistent connections of that type at the time of the request. If this method is not returning values for you then you'll likely need to get in touch with product support as it looks like it's a problem with the server code.
-Joe - OTS02
Cirrus
Joe,
Concentrating on the 9.3.1 boxes, I notice that I only get the XML error when there are records to be pulled. When I make the call to the "standby" unit, I do not get the error - the record returns empty. But when I make the call to the "active" unit (which has persistent connections), I get the XML error.
I have made sure that my Visual Studio is up to date on patches, but that did not help either.
I have attached the detail of the XML error to the post. If you could glance at it, I would be much obliged.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
