tcpv6 monitor completed.
This commit is contained in:
parent
a57090fdab
commit
c7ceef609d
|
@ -284,6 +284,15 @@ class MONITOR_API TCPv6
|
|||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
static double GetSegmentsPerSecond(int idleTime);
|
||||
static double GetConnectionsEstablished();
|
||||
static double GetConnectionsActive();
|
||||
static double GetConnectionsPassive();
|
||||
static double GetConnectionFailures();
|
||||
static double GetConnectionsReset();
|
||||
static double GetSegmentsReceivedPerSecond(int idleTime);
|
||||
static double GetSegmentsSentPerSecond(int idleTime);
|
||||
static double GetSegmentsRetransmittedPerSecond(int idleTime);
|
||||
};
|
||||
|
||||
class MONITOR_API UDPv4
|
||||
|
|
|
@ -13,8 +13,7 @@ double TCPv6::GetSegmentsPerSecond(int idleTime)
|
|||
{
|
||||
wstring fullCounterPath(L"");
|
||||
fullCounterPath+=L"\\TCPv6\\Segments/sec";
|
||||
double ret=Common::GetCounterValue(fullCounterPath.c_str());
|
||||
//double ret=Common::GetCounterValueWithIdle(fullCounterPath.c_str(),idleTime);
|
||||
double ret=Common::GetCounterValueWithIdle(fullCounterPath.c_str(),idleTime);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -68,8 +67,7 @@ double TCPv6::GetSegmentsReceivedPerSecond(int idleTime)
|
|||
{
|
||||
wstring fullCounterPath(L"");
|
||||
fullCounterPath+=L"\\TCPv6\\Segments Received/sec";
|
||||
double ret=Common::GetCounterValue(fullCounterPath.c_str());
|
||||
//double ret=Common::GetCounterValueWithIdle(fullCounterPath.c_str(),idleTime);
|
||||
double ret=Common::GetCounterValueWithIdle(fullCounterPath.c_str(),idleTime);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -78,8 +76,7 @@ double TCPv6::GetSegmentsSentPerSecond(int idleTime)
|
|||
{
|
||||
wstring fullCounterPath(L"");
|
||||
fullCounterPath+=L"\\TCPv6\\Segments Sent/sec";
|
||||
double ret=Common::GetCounterValue(fullCounterPath.c_str());
|
||||
//double ret=Common::GetCounterValueWithIdle(fullCounterPath.c_str(),idleTime);
|
||||
double ret=Common::GetCounterValueWithIdle(fullCounterPath.c_str(),idleTime);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -88,7 +85,6 @@ double TCPv6::GetSegmentsRetransmittedPerSecond(int idleTime)
|
|||
{
|
||||
wstring fullCounterPath(L"");
|
||||
fullCounterPath+=L"\\TCPv6\\Segments Retransmitted/sec";
|
||||
double ret=Common::GetCounterValue(fullCounterPath.c_str());
|
||||
//double ret=Common::GetCounterValueWithIdle(fullCounterPath.c_str(),idleTime);
|
||||
double ret=Common::GetCounterValueWithIdle(fullCounterPath.c_str(),idleTime);
|
||||
return ret;
|
||||
}
|
|
@ -8,13 +8,13 @@ class MONITOR_API TCPv6
|
|||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
double TCPv6::GetSegmentsPerSecond(int idleTime);
|
||||
double TCPv6::GetConnectionsEstablished();
|
||||
double TCPv6::GetConnectionsActive();
|
||||
double TCPv6::GetConnectionsPassive();
|
||||
double TCPv6::GetConnectionFailures();
|
||||
double TCPv6::GetConnectionsReset();
|
||||
double TCPv6::GetSegmentsReceivedPerSecond(int idleTime);
|
||||
double TCPv6::GetSegmentsSentPerSecond(int idleTime);
|
||||
double TCPv6::GetSegmentsRetransmittedPerSecond(int idleTime);
|
||||
static double GetSegmentsPerSecond(int idleTime);
|
||||
static double GetConnectionsEstablished();
|
||||
static double GetConnectionsActive();
|
||||
static double GetConnectionsPassive();
|
||||
static double GetConnectionFailures();
|
||||
static double GetConnectionsReset();
|
||||
static double GetSegmentsReceivedPerSecond(int idleTime);
|
||||
static double GetSegmentsSentPerSecond(int idleTime);
|
||||
static double GetSegmentsRetransmittedPerSecond(int idleTime);
|
||||
};
|
|
@ -284,6 +284,15 @@ class MONITOR_API TCPv6
|
|||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
static double GetSegmentsPerSecond(int idleTime);
|
||||
static double GetConnectionsEstablished();
|
||||
static double GetConnectionsActive();
|
||||
static double GetConnectionsPassive();
|
||||
static double GetConnectionFailures();
|
||||
static double GetConnectionsReset();
|
||||
static double GetSegmentsReceivedPerSecond(int idleTime);
|
||||
static double GetSegmentsSentPerSecond(int idleTime);
|
||||
static double GetSegmentsRetransmittedPerSecond(int idleTime);
|
||||
};
|
||||
|
||||
class MONITOR_API UDPv4
|
||||
|
|
|
@ -284,6 +284,15 @@ class MONITOR_API TCPv6
|
|||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
static double GetSegmentsPerSecond(int idleTime);
|
||||
static double GetConnectionsEstablished();
|
||||
static double GetConnectionsActive();
|
||||
static double GetConnectionsPassive();
|
||||
static double GetConnectionFailures();
|
||||
static double GetConnectionsReset();
|
||||
static double GetSegmentsReceivedPerSecond(int idleTime);
|
||||
static double GetSegmentsSentPerSecond(int idleTime);
|
||||
static double GetSegmentsRetransmittedPerSecond(int idleTime);
|
||||
};
|
||||
|
||||
class MONITOR_API UDPv4
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
list<wstring> counterList=TCPv4::GetCounterList();
|
||||
list<wstring> counterList=TCPv6::GetCounterList();
|
||||
list<wstring>::iterator iter;
|
||||
std::wcout.imbue(std::locale("chs"));
|
||||
for(iter=counterList.begin();iter!=counterList.end();iter++)
|
||||
|
@ -11,7 +11,7 @@ int _tmain(int argc, _TCHAR* argv[])
|
|||
}
|
||||
while(1)
|
||||
{
|
||||
printf("%lf\n",TCPv4::GetSegmentsRetransmittedPerSecond(1000));
|
||||
printf("%lf\n",TCPv6::GetSegmentsRetransmittedPerSecond(1000));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue