stubs added.
This commit is contained in:
parent
d3f8882e22
commit
59b139f1b1
|
@ -0,0 +1,34 @@
|
|||
#include "stdafx.h"
|
||||
#include "Monitor.h"
|
||||
#include "Common.h"
|
||||
#include "LogicalDisk.h"
|
||||
|
||||
list<wstring> LogicalDisk::GetInstances()
|
||||
{
|
||||
return Common::GetInstanceName(L"LogicalDisk");
|
||||
}
|
||||
|
||||
list<wstring> LogicalDisk::GetCounterList()
|
||||
{
|
||||
return Common::GetCounterList(L"LogicalDisk");
|
||||
}
|
||||
|
||||
// Avg. Disk Queue Length
|
||||
// % Disk Read Time
|
||||
// Avg. Disk Read Queue Length
|
||||
// % Disk Write Time
|
||||
// Avg. Disk Write Queue Length
|
||||
// Avg. Disk sec/Transfer
|
||||
// Avg. Disk sec/Read
|
||||
// Avg. Disk sec/Write
|
||||
// Disk Transfers/sec
|
||||
// Disk Reads/sec
|
||||
// Disk Writes/sec
|
||||
// Disk Bytes/sec
|
||||
// Disk Read Bytes/sec
|
||||
// Disk Write Bytes/sec
|
||||
// Avg. Disk Bytes/Transfer
|
||||
// Avg. Disk Bytes/Read
|
||||
// Avg. Disk Bytes/Write
|
||||
// % Idle Time
|
||||
// Split IO/Sec
|
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
#include "Monitor.h"
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class MONITOR_API LogicalDisk
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
|
@ -0,0 +1,46 @@
|
|||
#include "stdafx.h"
|
||||
#include "Monitor.h"
|
||||
#include "Common.h"
|
||||
#include "Memory.h"
|
||||
|
||||
list<wstring> Memory::GetCounterList()
|
||||
{
|
||||
return Common::GetCounterList(L"Memory");
|
||||
}
|
||||
|
||||
// Page Faults/sec
|
||||
// Available Bytes
|
||||
// Committed Bytes
|
||||
// Commit Limit
|
||||
// Write Copies/sec
|
||||
// Transition Faults/sec
|
||||
// Cache Faults/sec
|
||||
// Demand Zero Faults/sec
|
||||
// Pages/sec
|
||||
// Pages Input/sec
|
||||
// Page Reads/sec
|
||||
// Pages Output/sec
|
||||
// Pool Paged Bytes
|
||||
// Pool Nonpaged Bytes
|
||||
// Page Writes/sec
|
||||
// Pool Paged Allocs
|
||||
// Pool Nonpaged Allocs
|
||||
// Free System Page Table Entries
|
||||
// Cache Bytes
|
||||
// Cache Bytes Peak
|
||||
// Pool Paged Resident Bytes
|
||||
// System Code Total Bytes
|
||||
// System Code Resident Bytes
|
||||
// System Driver Total Bytes
|
||||
// System Driver Resident Bytes
|
||||
// System Cache Resident Bytes
|
||||
// % Committed Bytes In Use
|
||||
// Available KBytes
|
||||
// Available MBytes
|
||||
// Transition Pages RePurposed/sec
|
||||
// Free & Zero Page List Bytes
|
||||
// Modified Page List Bytes
|
||||
// Standby Cache Reserve Bytes
|
||||
// Standby Cache Normal Priority Bytes
|
||||
// Standby Cache Core Bytes
|
||||
// Long-Term Average Standby Cache Lifetime (s)
|
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
#include "Monitor.h"
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class MONITOR_API Memory
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
|
@ -412,11 +412,18 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Common.h" />
|
||||
<ClInclude Include="LogicalDisk.h" />
|
||||
<ClInclude Include="Memory.h" />
|
||||
<ClInclude Include="Monitor.h" />
|
||||
<ClInclude Include="MonitorApi.h" />
|
||||
<ClInclude Include="NetworkInterface.h" />
|
||||
<ClInclude Include="PhysicalDisk.h" />
|
||||
<ClInclude Include="Processor.h" />
|
||||
<ClInclude Include="ProcessorInformation.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="System.h" />
|
||||
<ClInclude Include="Tcp.h" />
|
||||
<ClInclude Include="Udp.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Common.cpp" />
|
||||
|
@ -458,6 +465,10 @@
|
|||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release-x86|x64'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LogicalDisk.cpp" />
|
||||
<ClCompile Include="Memory.cpp" />
|
||||
<ClCompile Include="NetworkInterface.cpp" />
|
||||
<ClCompile Include="PhysicalDisk.cpp" />
|
||||
<ClCompile Include="Processor.cpp" />
|
||||
<ClCompile Include="ProcessorInformation.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -474,6 +485,9 @@
|
|||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release-x86|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release-x86|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="System.cpp" />
|
||||
<ClCompile Include="Tcp.cpp" />
|
||||
<ClCompile Include="Udp.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
|
|
@ -33,6 +33,27 @@
|
|||
<ClInclude Include="Processor.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="System.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="NetworkInterface.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Tcp.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Udp.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PhysicalDisk.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Memory.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LogicalDisk.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -50,5 +71,26 @@
|
|||
<ClCompile Include="Processor.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="System.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NetworkInterface.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Tcp.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Udp.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PhysicalDisk.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Memory.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LogicalDisk.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -29,4 +29,51 @@ public:
|
|||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
static double GetProcessorTimePercent(wchar_t * instanceName, int idleTime);
|
||||
};
|
||||
|
||||
class MONITOR_API System
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API NetworkInterface
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API Tcp
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterListForV4();
|
||||
static list<wstring> GetCounterListForV6();
|
||||
};
|
||||
|
||||
class MONITOR_API Udp
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterListForV4();
|
||||
static list<wstring> GetCounterListForV6();
|
||||
};
|
||||
|
||||
class MONITOR_API PhysicalDisk
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API Memory
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API LogicalDisk
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
|
@ -0,0 +1,34 @@
|
|||
#include "stdafx.h"
|
||||
#include "Monitor.h"
|
||||
#include "Common.h"
|
||||
#include "NetworkInterface.h"
|
||||
|
||||
list<wstring> NetworkInterface::GetInstances()
|
||||
{
|
||||
return Common::GetInstanceName(L"Network Interface");
|
||||
}
|
||||
|
||||
list<wstring> NetworkInterface::GetCounterList()
|
||||
{
|
||||
return Common::GetCounterList(L"Network Interface");
|
||||
}
|
||||
|
||||
// Packets Sent/sec
|
||||
// Current Bandwidth
|
||||
// Bytes Received/sec
|
||||
// Packets Received Unicast/sec
|
||||
// Packets Received Non-Unicast/sec
|
||||
// Packets Received Discarded
|
||||
// Packets Received Errors
|
||||
// Packets Received Unknown
|
||||
// Bytes Sent/sec
|
||||
// Packets Sent Unicast/sec
|
||||
// Packets Sent Non-Unicast/sec
|
||||
// Packets Outbound Discarded
|
||||
// Packets Outbound Errors
|
||||
// Output Queue Length
|
||||
// Offloaded Connections
|
||||
// TCP Active RSC Connections
|
||||
// TCP RSC Coalesced Packets/sec
|
||||
// TCP RSC Exceptions/sec
|
||||
// TCP RSC Average Packet Size
|
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
#include "Monitor.h"
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class MONITOR_API NetworkInterface
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
|
@ -0,0 +1,35 @@
|
|||
#include "stdafx.h"
|
||||
#include "Monitor.h"
|
||||
#include "Common.h"
|
||||
#include "PhysicalDisk.h"
|
||||
|
||||
list<wstring> PhysicalDisk::GetInstances()
|
||||
{
|
||||
return Common::GetInstanceName(L"PhysicalDisk");
|
||||
}
|
||||
|
||||
list<wstring> PhysicalDisk::GetCounterList()
|
||||
{
|
||||
return Common::GetCounterList(L"PhysicalDisk");
|
||||
}
|
||||
|
||||
// % Disk Time
|
||||
// Avg. Disk Queue Length
|
||||
// % Disk Read Time
|
||||
// Avg. Disk Read Queue Length
|
||||
// % Disk Write Time
|
||||
// Avg. Disk Write Queue Length
|
||||
// Avg. Disk sec/Transfer
|
||||
// Avg. Disk sec/Read
|
||||
// Avg. Disk sec/Write
|
||||
// Disk Transfers/sec
|
||||
// Disk Reads/sec
|
||||
// Disk Writes/sec
|
||||
// Disk Bytes/sec
|
||||
// Disk Read Bytes/sec
|
||||
// Disk Write Bytes/sec
|
||||
// Avg. Disk Bytes/Transfer
|
||||
// Avg. Disk Bytes/Read
|
||||
// Avg. Disk Bytes/Write
|
||||
// % Idle Time
|
||||
// Split IO/Sec
|
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
#include "Monitor.h"
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class MONITOR_API PhysicalDisk
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
|
@ -0,0 +1,27 @@
|
|||
#include "stdafx.h"
|
||||
#include "Monitor.h"
|
||||
#include "Common.h"
|
||||
#include "System.h"
|
||||
|
||||
list<wstring> System::GetCounterList()
|
||||
{
|
||||
return Common::GetCounterList(L"System");
|
||||
}
|
||||
|
||||
// File Read Operations/sec
|
||||
// File Write Operations/sec
|
||||
// File Control Operations/sec
|
||||
// File Read Bytes/sec
|
||||
// File Write Bytes/sec
|
||||
// File Control Bytes/sec
|
||||
// Context Switches/sec
|
||||
// System Calls/sec
|
||||
// File Data Operations/sec
|
||||
// System Up Time
|
||||
// Processor Queue Length
|
||||
// Processes
|
||||
// Threads
|
||||
// Alignment Fixups/sec
|
||||
// Exception Dispatches/sec
|
||||
// Floating Emulations/sec
|
||||
// % Registry Quota In Use
|
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
#include "Monitor.h"
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class MONITOR_API System
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
|
@ -0,0 +1,36 @@
|
|||
#include "stdafx.h"
|
||||
#include "Monitor.h"
|
||||
#include "Common.h"
|
||||
#include "Tcp.h"
|
||||
|
||||
list<wstring> Tcp::GetCounterListForV4()
|
||||
{
|
||||
return Common::GetCounterList(L"TCPv4");
|
||||
}
|
||||
|
||||
list<wstring> Tcp::GetCounterListForV6()
|
||||
{
|
||||
return Common::GetCounterList(L"TCPv6");
|
||||
}
|
||||
|
||||
// v4
|
||||
// Segments/sec
|
||||
// Connections Established
|
||||
// Connections Active
|
||||
// Connections Passive
|
||||
// Connection Failures
|
||||
// Connections Reset
|
||||
// Segments Received/sec
|
||||
// Segments Sent/sec
|
||||
// Segments Retransmitted/sec
|
||||
|
||||
// v6
|
||||
// Segments/sec
|
||||
// Connections Established
|
||||
// Connections Active
|
||||
// Connections Passive
|
||||
// Connection Failures
|
||||
// Connections Reset
|
||||
// Segments Received/sec
|
||||
// Segments Sent/sec
|
||||
// Segments Retransmitted/sec
|
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
#include "Monitor.h"
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class MONITOR_API Tcp
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterListForV4();
|
||||
static list<wstring> GetCounterListForV6();
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
#include "stdafx.h"
|
||||
#include "Monitor.h"
|
||||
#include "Common.h"
|
||||
#include "Udp.h"
|
||||
|
||||
list<wstring> Udp::GetCounterListForV4()
|
||||
{
|
||||
return Common::GetCounterList(L"UDPv4");
|
||||
}
|
||||
|
||||
list<wstring> Udp::GetCounterListForV6()
|
||||
{
|
||||
return Common::GetCounterList(L"UDPv6");
|
||||
}
|
||||
|
||||
// v4
|
||||
// Datagrams/sec
|
||||
// Datagrams Received/sec
|
||||
// Datagrams No Port/sec
|
||||
// Datagrams Received Errors
|
||||
// Datagrams Sent/sec
|
||||
|
||||
// v6
|
||||
// Datagrams/sec
|
||||
// Datagrams Received/sec
|
||||
// Datagrams No Port/sec
|
||||
// Datagrams Received Errors
|
||||
// Datagrams Sent/sec
|
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
#include "Monitor.h"
|
||||
#include <list>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
class MONITOR_API Udp
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterListForV4();
|
||||
static list<wstring> GetCounterListForV6();
|
||||
};
|
|
@ -29,4 +29,51 @@ public:
|
|||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
static double GetProcessorTimePercent(wchar_t * instanceName, int idleTime);
|
||||
};
|
||||
|
||||
class MONITOR_API System
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API NetworkInterface
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API Tcp
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterListForV4();
|
||||
static list<wstring> GetCounterListForV6();
|
||||
};
|
||||
|
||||
class MONITOR_API Udp
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterListForV4();
|
||||
static list<wstring> GetCounterListForV6();
|
||||
};
|
||||
|
||||
class MONITOR_API PhysicalDisk
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API Memory
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API LogicalDisk
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
|
@ -29,4 +29,51 @@ public:
|
|||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
static double GetProcessorTimePercent(wchar_t * instanceName, int idleTime);
|
||||
};
|
||||
|
||||
class MONITOR_API System
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API NetworkInterface
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API Tcp
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterListForV4();
|
||||
static list<wstring> GetCounterListForV6();
|
||||
};
|
||||
|
||||
class MONITOR_API Udp
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterListForV4();
|
||||
static list<wstring> GetCounterListForV6();
|
||||
};
|
||||
|
||||
class MONITOR_API PhysicalDisk
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API Memory
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
||||
|
||||
class MONITOR_API LogicalDisk
|
||||
{
|
||||
public:
|
||||
static list<wstring> GetInstances();
|
||||
static list<wstring> GetCounterList();
|
||||
};
|
|
@ -1,17 +1,18 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
list<wstring> instances=Processor::GetInstances();
|
||||
list<wstring> counterList=Processor::GetCounterList();
|
||||
{
|
||||
list<wstring> counterList=LogicalDisk::GetCounterList();
|
||||
list<wstring> instances=LogicalDisk::GetInstances();
|
||||
list<wstring>::iterator iter;
|
||||
for(iter=instances.begin();iter!=instances.end();iter++)
|
||||
{
|
||||
wprintf(L"%ls\n",(*iter).c_str());
|
||||
}
|
||||
std::wcout.imbue(std::locale("chs"));
|
||||
for(iter=counterList.begin();iter!=counterList.end();iter++)
|
||||
{
|
||||
wprintf(L"%ls\n",(*iter).c_str());
|
||||
wcout<<(*iter).c_str()<<endl;
|
||||
}
|
||||
for(iter=instances.begin();iter!=instances.end();iter++)
|
||||
{
|
||||
wcout<<(*iter).c_str()<<endl;
|
||||
}
|
||||
|
||||
while(1)
|
||||
|
|
Loading…
Reference in New Issue