Forum Discussion

weikang_Hu_9799's avatar
weikang_Hu_9799
Icon for Nimbostratus rankNimbostratus
Sep 27, 2007

Something about the Statistics for Virtual

Hi :

 

I am try to get the statistics for some virtual servers.

 

Here is my partial codes . It works but the icontrol return 28 values . Can someone help to tell me what's the meaning for each value ? Thanks ..

 

Actaully, my purpose is draw a plot for virtual server's throughput by each..(any suggestion is welcome)

 

 

 

public String GetVsName() throws Exception {

 

String[] Server_Names = m_binding.get_list();

 

iControl.LocalLBVirtualServerVirtualServerStatistics

 

Statistics_list = m_binding.get_statistics(Server_Names);

 

 

iControl.LocalLBVirtualServerVirtualServerStatisticEntry[] StatEntry = Statistics_list.getStatistics();

 

 

for (int j=0;j{

 

iControl.CommonStatistic[] commonstat= StatEntry[j].getStatistics();

 

iControl.CommonVirtualServerDefinition name= StatEntry[j].getVirtual_server();

 

System.out.println("VS_Name:="+name.getName());

 

 

// Here is the code to return 28 values //

 

for (int k=0;k {

 

System.out.println(commonstat[k].getValue().getLow());

 

}

 

}

 

 

 

1 Reply

  • A couple of things. First, the Common.Statistics structure returned has the following format:

     

     

    struct Common.Statistics {
      StatisticType type;
      ULong64 value;
      long time_stamp;
    };

     

     

    The type value will tell you what the specific statistic value is for. VirtualServer.get_statistics() returns the following statistics:

     

     

    STATISTIC_MINIMUM_CONNECTION_DURATION;
    STATISTIC_MEAN_CONNECTION_DURATION;
    STATISTIC_MAXIMUM_CONNECTION_DURATION;
    STATISTIC_NO_NODE_ERRORS;
    STATISTIC_CLIENT_SIDE_BYTES_IN;
    STATISTIC_CLIENT_SIDE_BYTES_OUT;
    STATISTIC_CLIENT_SIDE_PACKETS_IN;
    STATISTIC_CLIENT_SIDE_PACKETS_OUT;
    STATISTIC_CLIENT_SIDE_CURRENT_CONNECTIONS;
    STATISTIC_CLIENT_SIDE_MAXIMUM_CONNECTIONS;
    STATISTIC_CLIENT_SIDE_TOTAL_CONNECTIONS;
    STATISTIC_PVA_CLIENT_SIDE_BYTES_IN;
    STATISTIC_PVA_CLIENT_SIDE_BYTES_OUT;
    STATISTIC_PVA_CLIENT_SIDE_PACKETS_IN;
    STATISTIC_PVA_CLIENT_SIDE_PACKETS_OUT;
    STATISTIC_PVA_CLIENT_SIDE_CURRENT_CONNECTIONS;
    STATISTIC_PVA_CLIENT_SIDE_MAXIMUM_CONNECTIONS;
    STATISTIC_PVA_CLIENT_SIDE_TOTAL_CONNECTIONS;
    STATISTIC_EPHEMERAL_BYTES_IN;
    STATISTIC_EPHEMERAL_BYTES_OUT;
    STATISTIC_EPHEMERAL_PACKETS_IN;
    STATISTIC_EPHEMERAL_PACKETS_OUT;
    STATISTIC_EPHEMERAL_CURRENT_CONNECTIONS;
    STATISTIC_EPHEMERAL_MAXIMUM_CONNECTIONS;
    STATISTIC_EPHEMERAL_TOTAL_CONNECTIONS;
    STATISTIC_TOTAL_REQUESTS;
    STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS;
    STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS;

     

     

    You can look in the API docs for what each of the statistics mean.

     

     

    http://devcentral.f5.com/Wiki/default.aspx/iControl/Common__StatisticType.html

     

    Click here

     

     

     

    The second thing I'd like to point out is that you are only using the lower 32 bits of the ULong64 structure returned as the statistics value.

     

     

    struct Common.ULong64 {
      long high;
      long low;
    };

     

     

    If you have large amounts of traffic that exceeed the 32-bit boundary (~4 billion), then the lower 32 bit value will skip back to zero skewing your results. You'll want to make sure to combine those values into a single 64 bit value before calculating statistics on your end. The formula for the 64 bit conversion is (sorry I don't have the java code handy to do this - I'll try to dig it up).

     

     

    64_bit_value = ((ulong)value.high<<32)|value.low;

     

     

    Hope this helps...

     

     

    -Joe