ISA Server performance counters RRS feed

  • Question

  • Hi All,

    First of all, Wishing everyone a happy new year.

    I wrote a small program ( C#/WMI) to retrieve the ISA Firewall engine performance counters

     // Performance counters for the Firewall Engine
     public UInt32 ISAFWENGActiveConnections;
     public UInt32 ISAFWENGConnectionsPerSec;
     public UInt32 ISAFWENGTCPConnectionsEstablishedPerSec;
     public UInt64 ISAFWENGBytes;
     public UInt64 ISAFWENGBytesPerSec;
     public UInt64 ISAFWENGPackets;
     public UInt64 ISAFWENGPacketsPerSec;
     public UInt64 ISAFWENGAllowedPackets;
     public UInt64 ISAFWENGAllowedPacketsPerSec;
     public UInt64 ISAFWENGDroppedPackets;
     public UInt64 ISAFWENGDroppedPacketsPerSec;
     public UInt64 ISAFWENGBackloggedPackets;

    public bool GetValues(String strCompName, String strUsername, String strPassword, ref MSISAParams ISAParamsInfo)
     bool bRet = false ;

     String strScope = "\\\\" + strCompName + " \\root\\CIMV2";
     ConnectionOptions op = new ConnectionOptions();
     op.Username = strUsername;
     op.Password = strPassword;
     ManagementScope scope = new ManagementScope(strScope, op);

    // ISA Firewall Engine performance counters ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_PerfFormattedData_Fweng_ISAServerFirewallPacketEngine" );
    ManagementObjectSearcher searcher1 = new ManagementObjectSearcher(scope, query);
    ManagementObjectCollection queryCollection = searcher1.Get();
     foreach (ManagementObject queryObj in queryCollection)
     ISAParamsInfo.ISAFWENGActiveConnections = Convert.ToUInt32(queryObj["ActiveConnections" ]);
    ISAParamsInfo.ISAFWENGConnectionsPerSec = Convert.ToUInt32(queryObj["ConnectionsPersec" ]);
     ISAParamsInfo.ISAFWENGTCPConnectionsEstablishedPerSec = Convert.ToUInt32(queryObj["TCPEstablishedConnections" ]);
     ISAParamsInfo.ISAFWENGBytes = Convert.ToUInt64(queryObj["Bytes" ]);
     ISAParamsInfo.ISAFWENGBytesPerSec = Convert.ToUInt64(queryObj["BytesPersec" ]);
     ISAParamsInfo.ISAFWENGPackets = Convert.ToUInt64(queryObj["Packets" ]);
     ISAParamsInfo.ISAFWENGPacketsPerSec = Convert.ToUInt64(queryObj["PacketsPersec" ]);
     ISAParamsInfo.ISAFWENGAllowedPackets = Convert.ToUInt64(queryObj["AllowedPackets" ]);
    ISAParamsInfo.ISAFWENGAllowedPacketsPerSec = Convert.ToUInt64(queryObj["AllowedPacketsPersec" ]);
     ISAParamsInfo.ISAFWENGDroppedPackets = Convert.ToUInt64(queryObj["DroppedPackets" ]);
     ISAParamsInfo.ISAFWENGDroppedPacketsPerSec = Convert.ToUInt64(queryObj["DroppedPacketsPersec" ]);
     ISAParamsInfo.ISAFWENGBackloggedPackets = Convert.ToUInt64(queryObj["BackloggedPackets" ]);
     catch (Exception e)
    bRet = false ;


     I am able to retrieve the values for above mentioned counters. The problem arises for the vales of 'per sec' counters. Using the ISA Performance monitor tool, I am able to see the values of those counters but using the code I am getting ' 0' for those counters.

    For example:

    Using ISA Performance monitor tool, value of Bytes / sec : 1237

    Using Code, value of Bytes / sec  : 0


    I am unable to figure out the problem.




    Tanish S.


    • Edited by Tanish Monday, January 3, 2011 1:32 PM Removed the <br> from the code
    Monday, January 3, 2011 1:25 PM


  • Hi,


    Thank you for the update.


    As I am not familiar with program, if you want to retrieve the ISA Firewall engine performance counters, you may turn to our MSDN forum for help. The engineers and community members there have more experience and can help you in a more efficient way.


    MSDN Forum




    Nick Gu - MSFT
    Monday, January 10, 2011 5:36 AM