- °³¿ä
- C++ ·¡ÆÛ ±¸Çö
- Perfmon.h
- Perfmon.cpp
- »ùÇÃ
- °¢Á¾ º´¸ñ Çö»ó°ú °ü·ÃÀÌ ÀÖ´Â Ä«¿îÅ͵é
- ¸Þ¸ð¸® °ü·Ã º´¸ñ
- CPU °ü·Ã º´¸ñ
- µð½ºÅ© °ü·Ã º´¸ñ
- ij½Ã °ü·Ã º´¸ñ
- ´ÙÁß CPU ¸Ó½Å¿¡¼ÀÇ º´¸ñ
- ³×Æ®¿öÅ© °ü·Ã º´¸ñ
- Âü°í
- ¸µÅ©
- ´Ù¿î·Îµå
1 °³¿ä
À©µµ¿ìÁî ȯ°æ¿¡¼´Â PDH(Performance Data Helper) ¶óÀ̺귯¸®¸¦ ÀÌ¿ëÇØ, ½Ã½ºÅÛÀÇ ¼º´É/»óÅ Á¤º¸¸¦ ½±°Ô ¾Ë¾Æ³¾ ¼ö ÀÖ´Ù. ¼¹ö ÇÁ·Î±×·¥¿¡´Ù ÀÌ ±â´ÉÀ» Áý¾î³Ö°í, Åë°è¸¦ ÆÄÀÏ¿¡´Ù ±â·ÏÇØµÎ¸é, ³ªÁß¿¡ ¹º°¡ ´«¿¡ º¸ÀÌÁö ¾Ê´Â ¹®Á¦°¡ »ý°åÀ» ¶§ ´ëóÇÒ ¼ö ÀÖ´Â ±Ù°Å ÀÚ·á°¡ µÈ´Ù.
CPU »ç¿ë·®, ¸Þ¸ð¸® »ç¿ë·® °°Àº °ÍÀº ±âº»À̰í, TCP Connection reset, µð½ºÅ© IO·® µî ¾Ë¾Æ³¾ ¼ö ÀÖ´Â Á¤º¸´Â »ó´çÈ÷ ´Ù¾çÇÏ´Ù.
ÀÎÅÍÆäÀ̽º´Â µÎ °¡Áö°¡ ÀÖ´Ù. PDH ·¡ÆÛ¸¦ ÀÌ¿ëÇÒ ¼öµµ ÀÖ°í, ·¹Áö½ºÆ®¸®¸¦ Á÷Á¢ ¾×¼¼½ºÇÒ ¼öµµ Àִµ¥, PDH¸¦ ÀÌ¿ëÇÒ °æ¿ì¿¡´Â Á» ´õ ½±Áö¸¸, pdh.dll ÆÄÀÏ¿¡ Ãß°¡ÀûÀÎ Á¾¼Ó¼ºÀÌ »ý±â°í, ·¹Áö½ºÆ®¸®¸¦ ÀÌ¿ëÇÒ °æ¿ì¿¡´Â Á¾¼Ó¼º ¹®Á¦´Â ÇÇÇØ°¥ ¼ö ÀÖÀ¸³ª, ÄÚµù·®ÀÌ ¸¹¾ÆÁø´Ù.
2 C++ ·¡ÆÛ ±¸Çö
//////////////////////////////////////////////////////////////////////////////
/// \file Perfmon.h
/// \author excel96
/// \date 2005.3.28
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include <string>
#include <vector>
//////////////////////////////////////////////////////////////////////////////
/// \class Perfmon
/// \brief ¼º´É ¸ð´ÏÅ͸µÀ» À§ÇÑ PDH(Performance Data Helper) ¶óÀ̺귯¸® ·¡ÆÛ
//////////////////////////////////////////////////////////////////////////////
class Perfmon
{
private:
struct IMPL;
IMPL* m_pImpl;
public:
/// \brief »ý¼ºÀÚ
/// \param filename ·Î±× ÆÄÀÏ À̸§. NULLÀÏ °æ¿ì ÆÄÀÏ¿¡´Ù ±â·ÏÇÏÁö ¾Ê´Â´Ù.
Perfmon(const char* filename = NULL);
/// \brief ¼Ò¸êÀÚ
virtual ~Perfmon();
public:
/// \brief ÇØ´çÇÏ´Â Ä«¿îÅÍ¿¡ ´ëÇÑ µ¥ÀÌÅÍ ¼öÁýÀ» ½ÃÀÛÇÑ´Ù.
/// \param pszCounter Ä«¿îÅÍ ¹®ÀÚ¿
/// \return bool Ä«¿îÅ͸¦ ¹«»çÈ÷ Ãß°¡ÇÑ °æ¿ì¿¡´Â true¸¦ ¹ÝȯÇϰí, ¹º°¡
/// ¿¡·¯°¡ »ý±ä °æ¿ì¿¡´Â false¸¦ ¹ÝȯÇÑ´Ù.
bool start(const char* pszCounter);
/// \brief µ¥ÀÌÅÍ ¼öÁýÀ» ÁßÁöÇÑ´Ù.
void stop();
/// \brief ÇöÀç Ä«¿îÅÍÀÇ °ªÀ» ¹ÝȯÇÑ´Ù.
/// \return long Ä«¿îÅÍÀÇ °ª
long current() const;
/// \brief ÇØ´ç °æ·Î ÇÏÀ§¿¡ ÀÖ´Â Ä«¿îÅÍ °´Ã¼ ¹®ÀÚ¿µéÀ» ¹ÝȯÇÑ´Ù.
/// \param path °æ·Î ¹®ÀÚ¿.
/// - <pre>\object(parent/instance#index)\counter</pre>
/// - <pre>"\\LogicalDisk(*/*#*)\\*"</pre>
/// - <pre>"\\Network Interface(*/*#*)\\*"</pre>
/// \return bool Ä«¿îÅÍ °´Ã¼¸¦ ¹«»çÈ÷ ¾ò¾î³½ °æ¿ì¿¡´Â true, ¹º°¡ ¿¡·¯°¡
/// »ý±ä °æ¿ì¿¡´Â false¸¦ ¹ÝȯÇÑ´Ù.
static bool enumerate(const char* path, vector<string>& counters);
};
2.2 Perfmon.cpp
//////////////////////////////////////////////////////////////////////////////
/// \file Perfmon.cpp
/// \author excel96
/// \date 2005.3.28
//////////////////////////////////////////////////////////////////////////////
#include "ServerLibPCH.h"
#include "Perfmon.h"
#include <Pdh.h>
#include <PdhMsg.h>
#pragma comment(lib, "Pdh")
//////////////////////////////////////////////////////////////////////////////
/// \sturct Perfmon::IMPL
/// \brief Perfmon Ŭ·¡½º ³»ºÎ µ¥ÀÌÅÍ PIMPL
//////////////////////////////////////////////////////////////////////////////
struct Perfmon::IMPL
{
HQUERY hQuery; ///< Äõ¸® ÇÚµé
HCOUNTER hCounter; ///< Ä«¿îÅÍ ÇÚµé
HLOG hLog; ///< ·Î±× ÆÄÀÏ ÇÚµé
const char* szFilename; ///< ÆÄÀÏ À̸§
/// \brief »ý¼ºÀÚ
IMPL(const char* filename)
: hQuery(NULL), hCounter(NULL), hLog(NULL), szFilename(filename)
{
}
/// \brief ÇØ´çÇÏ´Â Ä«¿îÅÍ¿¡ ´ëÇÑ µ¥ÀÌÅÍ ¼öÁýÀ» ½ÃÀÛÇÑ´Ù.
/// \param pszCounter Ä«¿îÅÍ ¹®ÀÚ¿
/// \return bool Ä«¿îÅ͸¦ ¹«»çÈ÷ Ãß°¡ÇÑ °æ¿ì¿¡´Â true¸¦ ¹ÝȯÇϰí, ¹º°¡
/// ¿¡·¯°¡ »ý±ä °æ¿ì¿¡´Â false¸¦ ¹ÝȯÇÑ´Ù.
bool start(const char* pszCounter)
{
stop();
if (PdhOpenQuery(NULL, 0, &hQuery) != ERROR_SUCCESS)
{
filelog(NULL, "PdhOpenQuery failed - %s", GetLastErrorString().c_str());
Assert(false && "PdhOpenQuery failed");
return false;
}
if (PdhValidatePath(pszCounter) != ERROR_SUCCESS)
{
filelog(NULL, "PdhValidatePath failed - %s", GetLastErrorString().c_str());
Assert(false && "PdhValidatePath failed");
return false;
}
if (PdhAddCounter(hQuery, pszCounter, 0, &hCounter) != ERROR_SUCCESS)
{
filelog(NULL, "PdhAddCounter failed - %s", GetLastErrorString().c_str());
stop();
Assert(false && "PdhAddCounter failed");
return false;
}
if (szFilename != NULL)
{
DWORD dwLogType = PDH_LOG_TYPE_CSV;
if (PdhOpenLog(szFilename,
PDH_LOG_WRITE_ACCESS | PDH_LOG_CREATE_ALWAYS,
&dwLogType, hQuery, 0, NULL, &hLog) != ERROR_SUCCESS)
{
filelog(NULL, "PdhOpenLog failed - %s", GetLastErrorString().c_str());
stop();
Assert(false && "PdhOpenLog failed");
return false;
}
}
return true;
}
/// \brief µ¥ÀÌÅÍ ¼öÁýÀ» ÁßÁöÇÑ´Ù.
void stop()
{
if (hCounter)
PdhRemoveCounter(hCounter);
if (hQuery)
PdhCloseQuery(hQuery);
if (hLog)
PdhCloseLog(hLog, PDH_FLAGS_CLOSE_QUERY);
hQuery = NULL;
hCounter = NULL;
hLog = NULL;
}
/// \brief ÇöÀç Ä«¿îÅÍÀÇ °ªÀ» ¹ÝȯÇÑ´Ù.
/// \return long Ä«¿îÅÍÀÇ °ª
long current() const
{
if (PdhCollectQueryData(hQuery) != ERROR_SUCCESS)
return 0;
PDH_FMT_COUNTERVALUE value;
if (PdhGetFormattedCounterValue(
hCounter, PDH_FMT_LONG, NULL, &value) != ERROR_SUCCESS)
{
return 0;
}
if (szFilename != NULL)
PdhUpdateLog(hLog, "This is a comment.");
return value.longValue;
}
};
//////////////////////////////////////////////////////////////////////////////
/// \brief »ý¼ºÀÚ
/// \param filename ·Î±× ÆÄÀÏ À̸§. NULLÀÏ °æ¿ì ÆÄÀÏ¿¡´Ù ±â·ÏÇÏÁö ¾Ê´Â´Ù.
//////////////////////////////////////////////////////////////////////////////
Perfmon::Perfmon(const char* filename)
: m_pImpl(new IMPL(filename))
{
AssertPtr(m_pImpl);
}
//////////////////////////////////////////////////////////////////////////////
/// \brief ¼Ò¸êÀÚ
//////////////////////////////////////////////////////////////////////////////
Perfmon::~Perfmon()
{
stop();
delete m_pImpl;
}
//////////////////////////////////////////////////////////////////////////////
/// \brief ÇØ´çÇÏ´Â Ä«¿îÅÍ¿¡ ´ëÇÑ µ¥ÀÌÅÍ ¼öÁýÀ» ½ÃÀÛÇÑ´Ù.
/// \param pszCounter Ä«¿îÅÍ ¹®ÀÚ¿
/// \return bool Ä«¿îÅ͸¦ ¹«»çÈ÷ Ãß°¡ÇÑ °æ¿ì¿¡´Â true¸¦ ¹ÝȯÇϰí, ¹º°¡
/// ¿¡·¯°¡ »ý±ä °æ¿ì¿¡´Â false¸¦ ¹ÝȯÇÑ´Ù.
//////////////////////////////////////////////////////////////////////////////
bool Perfmon::start(const char* pszCounter)
{
return m_pImpl->start(pszCounter);
}
//////////////////////////////////////////////////////////////////////////////
/// \brief µ¥ÀÌÅÍ ¼öÁýÀ» ÁßÁöÇÑ´Ù.
//////////////////////////////////////////////////////////////////////////////
void Perfmon::stop()
{
m_pImpl->stop();
}
//////////////////////////////////////////////////////////////////////////////
/// \brief ÇöÀç Ä«¿îÅÍÀÇ °ªÀ» ¹ÝȯÇÑ´Ù.
/// \return long Ä«¿îÅÍÀÇ °ª
//////////////////////////////////////////////////////////////////////////////
long Perfmon::current() const
{
return m_pImpl->current();
}
//////////////////////////////////////////////////////////////////////////////
/// \brief ÇØ´ç °æ·Î ÇÏÀ§¿¡ ÀÖ´Â Ä«¿îÅÍ °´Ã¼ ¹®ÀÚ¿µéÀ» ¹ÝȯÇÑ´Ù.
/// \param path °æ·Î ¹®ÀÚ¿.
/// <pre>\object(parent/instance#index)\counter</pre>
/// <pre>"\\LogicalDisk(*/*#*)\\*"</pre>
/// <pre>"\\Network Interface(*/*#*)\\*"</pre>
/// \return bool Ä«¿îÅÍ °´Ã¼¸¦ ¹«»çÈ÷ ¾ò¾î³½ °æ¿ì¿¡´Â true, ¹º°¡ ¿¡·¯°¡
/// »ý±ä °æ¿ì¿¡´Â false¸¦ ¹ÝȯÇÑ´Ù.
//////////////////////////////////////////////////////////////////////////////
bool Perfmon::enumerate(const char* path, vector<string>& counters)
{
HQUERY hQuery = NULL;
LPSTR szCtrPath = NULL;
DWORD dwCtrPathSize = 0;
PDH_STATUS status = ERROR_SUCCESS;
bool bResult = false;
status = ::PdhOpenQuery(NULL, 0, &hQuery);
if (status != ERROR_SUCCESS)
return false;
// First try with an initial buffer size.
dwCtrPathSize = 1000;
szCtrPath = (LPSTR)::GlobalAlloc(GPTR, dwCtrPathSize);
status = ::PdhExpandCounterPath(path, szCtrPath, &dwCtrPathSize);
// Check for a too small buffer.
if (status == PDH_MORE_DATA)
{
// dwCtrPathSize has the required length, minus the last NULL
dwCtrPathSize++;
::GlobalFree(szCtrPath);
szCtrPath = (LPSTR)::GlobalAlloc(GPTR, dwCtrPathSize);
status = ::PdhExpandCounterPath(path, szCtrPath, &dwCtrPathSize);
}
// Upon success, print all counter path names.
if (status == PDH_CSTATUS_VALID_DATA)
{
LPTSTR ptr = szCtrPath;
char buf[512] = {0, };
while (*ptr)
{
sprintf_s(buf, sizeof(buf), "%s", ptr);
counters.push_back(string(buf));
ptr += strlen(ptr) + 1;
}
bResult = true;
}
::GlobalFree(szCtrPath);
::PdhCloseQuery(hQuery);
return bResult;
}
2.3 »ùÇÃ
CPU »ç¿ë·®°ú IOCP ÂÊ¿¡¼ ³ª¿À´Â Nonpaged Pool »ç¿ë·®À» È¸é ¹× ÆÄÀÏ¿¡´Ù Ãâ·ÂÇÑ´Ù.
#include "Perfmon.h"
int main()
{
Perfmon cpu("cpu.csv");
Perfmon mem("mem.csv");
cpu.start("\\Processor(_Total)\\% Processor Time");
mem.start("\\Memory\\Pool Nonpaged Bytes");
for (int i=0; i<10; ++i)
{
Sleep(1000);
printf("CPU load: %d%, Nonpaged bytes: %d KB\n",
cpu.current(), mem.current() / 1024);
}
return 0;
}
3 °¢Á¾ º´¸ñ Çö»ó°ú °ü·ÃÀÌ ÀÖ´Â Ä«¿îÅ͵é
°¢Á¾ º´¸ñ Çö»ó°ú °ü·Ã ÀÖ´Â Ä«¿îÅÍ¿¡ ´ëÇÑ Á¤º¸´Â
Bottleneck-Detection Counters ÆäÀÌÁö¸¦ Âü°íÇϱ⠹ٶõ´Ù.
3.1 ¸Þ¸ð¸® °ü·Ã º´¸ñ
| Counter | Description |
| \Memory\Page Faults/sec | ÃÊ´ç ÆäÀÌÁö ÆúÆ® ¹ß»ý Ƚ¼ö. ÇÏµå ÆúÆ® ¹× ¼ÒÇÁÆ® ÆúÆ® ¸ðµÎ¸¦ Æ÷ÇÔÇÑ´Ù. |
| \Memory\Page Reads/sec | ÇÏµå ÆúÆ®¸¦ ÇØ°áÇϱâ À§ÇØ µð½ºÅ©¸¦ ÀоîµéÀ̴ Ƚ¼ö. |
| \Memory\Page Writes/sec | ÆäÀÌÁö ¾Æ¿ôÀ» À§ÇØ µð½ºÅ©¿¡´Ù ¾²´Â Ƚ¼ö. |
| \Memory\Pages Input/sec | ÇÏµå ÆúÆ®¸¦ ÇØ°áÇϱâ À§ÇØ µð½ºÅ©¸¦ ÀоîµéÀ̴ Ƚ¼ö. |
| \Memory\Pages Output/sec | ÆäÀÌÁö ¾Æ¿ôÀ» À§ÇØ µð½ºÅ©¿¡´Ù ¾²´Â Ƚ¼ö. |
| \Memory\Available Bytes | ¸Þ¸ð¸® ¿©À¯ºÐ. |
| \Memory\Pool Nonpaged Bytes | Àüü ÇÁ·Î¼¼½º¿¡ ´ëÇÑ Nopaged Pool¿¡¼ÀÇ ÇÒ´ç·®. Áï Process(_Total )\ Pool Nonpaged BytesÀÇ ¾ç°ú °°´Ù. |
| \Process\Page Faults/sec | ÇØ´ç ÇÁ·Î¼¼½º ³»ÀÇ ½º·¹µå¿¡ ÀÇÇØ ÀϾ´Â ÃÊ´ç ÆäÀÌÁö ÆúÆ®ÀÇ È½¼ö. |
| \Process\Working Set | ÇØ´ç ÇÁ·Î¼¼½ºÀÇ ¿öÅ· ¼ÂÀÇ Å©±â. |
| \Process\Private Bytes | ÇöÀç ÇØ´ç ÇÁ·Î¼¼½º¸¸ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï ÇÒ´çµÈ ¸Þ¸ð¸®. |
| \Process\Page File Bytes | ÇØ´ç ÇÁ·Î¼¼½º°¡ »ç¿ëÇϰí ÀÖ´Â ÆäÀÌ¡ ÆÄÀÏÀÇ Å©±â. |
3.2 CPU °ü·Ã º´¸ñ
| Counter | Description |
| \Processor\% Processor Time | ¾ÖÇø®ÄÉÀÌ¼Ç ¶Ç´Â ¿î¿µÃ¼Á¦ °ü·Ã ÇÁ·Î¼¼½º¸¦ ½ÇÇàÇÏ´Â µ¥ µé¾î°£ ½Ã°£ÀÇ ºñÀ². Áï IDLE »óÅÂÀÇ ¹Ý´ë. |
| \System\% Total Processor Time | |
| \System\Processor Queue Length | ÇÁ·Î¼¼¼ Å¥¿¡ µé¾î°¡ ÀÖ´Â ½º·¹µåÀÇ °¹¼ö. ÀÌ Å¥¿¡ µé¾î°¡ÀÖ´Â ÀÖ´Â ½º·¹µå´Â ¸ðµÎ ready »óÅ´Ù. Áï ÀÌ Å¥°¡ ±æ¾îÁø´Ù´Â ¸»Àº ½º·¹µå°¡ CPU¿¡ ºñÇØ ³Ê¹« ¸¹´Ù´Â ¸»ÀÌ´Ù. |
| \Process\% Privileged Time | °£´ÜÈ÷ ¸»ÇØ ÇØ´ç ÇÁ·Î¼¼½º°¡ ½Ã½ºÅÛ ÄÝ¿¡ »ç¿ëÇÑ ½Ã°£ÀÇ ºñÀ². |
| \Process\% Processor Time | ÇØ´ç ÇÁ·Î¼¼½º°¡ ÀÚ½ÅÀÇ Äڵ带 ½ÇÇàÇϴµ¥ »ç¿ëÇÑ ½Ã°£ÀÇ ºñÀ². |
| \Process\% User Time | ÇØ´ç ÇÁ·Î¼¼½º°¡ User Mode¿¡¼ µ¿ÀÛÇÑ ½Ã°£ÀÇ ºñÀ². Áï ½Ã½ºÅÛ ÄÝÀ» Á¦¿ÜÇϰí, ÀÚ½ÅÀÇ Äڵ带 ½ÇÇàÇϴµ¥ »ç¿ëÇÑ ½Ã°£ÀÇ ºñÀ². |
| \Process\Priority Base | ÇØ´ç ÇÁ·Î¼¼½ºÀÇ ¿ì¼± ¼øÀ§. |
| \Thread\% Privileged Time | °£´ÜÈ÷ ¸»ÇØ ÇØ´ç ½º·¹µå°¡ ½Ã½ºÅÛ ÄÝ¿¡ »ç¿ëÇÑ ½Ã°£ÀÇ ºñÀ². |
| \Thread\% Processor Time | ÇØ´ç ½º·¹µå°¡ ÀÚ½ÅÀÇ Äڵ带 ½ÇÇàÇϴµ¥ »ç¿ëÇÑ ½Ã°£ÀÇ ºñÀ². |
| \Thread\% User Time | ÇØ´ç ½º·¹µå°¡ User Mode¿¡¼ µ¿ÀÛÇÑ ½Ã°£ÀÇ ºñÀ². Áï ½Ã½ºÅÛ ÄÝÀ» Á¦¿ÜÇϰí, ÀÚ½ÅÀÇ Äڵ带 ½ÇÇàÇϴµ¥ »ç¿ëÇÑ ½Ã°£ÀÇ ºñÀ². |
| \Thread\Context Switches/sec | ÇØ´ç ½º·¹µå°¡ ÄÜÅØ½ºÆ® ½ºÀ§ÄªÀ» ÀÏÀ¸Å² Ƚ¼ö. |
| \Thread\Priority Base | ½º·¹µåÀÇ ¿ø·¡ ¿ì¼± ¼øÀ§. |
| \Thread\Priority Current | ½º·¹µåÀÇ ÇöÀç ¿ì¼± ¼øÀ§. |
| \Thread\Thread State | ½º·¹µåÀÇ »óÅÂ. 0 - Initialized, 1 - Ready, 2 - Running, 3 - Standby, 4 - Terminated, 5 - Waiting, 6 - Transition, 7 - Unknown |
3.3 µð½ºÅ© °ü·Ã º´¸ñ
| Counter | Description |
| \PhysicalDisk\% Disk Time | ÇØ´ç µð½ºÅ©°¡ Àбâ/¾²±â ÀÛ¾÷À» ¼öÇàÇÑ ½Ã°£ÀÇ ºñÀ². Áï IDLEÇÏÁö ¾Ê¾Ò´ø ½Ã°£ÀÇ ºñÀ². |
| \PhysicalDisk\Avg. Disk Queue Length | ÇØ´ç µð½ºÅ© Å¥¿¡ µé¾î°£ Àбâ/¾²±â ÀÛ¾÷ÀÇ Æò±Õ °¹¼ö. |
| \PhysicalDisk\Current Disk Queue Length | ÇöÀç µð½ºÅ© Å¥¿¡ µé¾î°¡ÀÖ´Â IO ¿äû °¹¼ö. |
| \PhysicalDisk\Avg. Disk Sec/Read | µð½ºÅ©¿¡¼ µ¥ÀÌÅ͸¦ ÀоîµéÀ̴µ¥ °É¸° Æò±Õ ½Ã°£. |
| \PhysicalDisk\Avg. Disk Sec/Write | µð½ºÅ©¿¡´Ù µ¥ÀÌÅ͸¦ ¾²´Âµ¥ °É¸° Æò±Õ ½Ã°£. |
| \PhysicalDisk\Disk Read Bytes/sec | Àбâ ÀÛ¾÷À» ÇÏ´Â µ¿¾È ÃÊ´ç Àü¼ÛµÈ µ¥ÀÌÅÍÀÇ Å©±â. |
| \PhysicalDisk\Disk Write Bytes/sec | ¾²±â ÀÛ¾÷À» ÇÏ´Â µ¿¾È ÃÊ´ç Àü¼ÛµÈ µ¥ÀÌÅÍÀÇ Å©±â. |
| \PhysicalDisk\Avg. Disk Bytes/Read | Àбâ ÀÛ¾÷À» ÇÏ´Â µ¿¾È Àü¼ÛµÈ µ¥ÀÌÅÍÀÇ Æò±Õ. |
| \PhysicalDisk\Avg. Disk Bytes/Write | ¾²±â ÀÛ¾÷À» ÇÏ´Â µ¿¾È Àü¼ÛµÈ µ¥ÀÌÅÍÀÇ Æò±Õ.. |
| \PhysicalDisk\Disk Reads/sec | µð½ºÅ©¿¡ ¿äûµÈ ÀÛ¾÷ Áß¿¡ ÀбâÀÇ ºñÀ². |
| \PhysicalDisk\Disk Writes/sec | µð½ºÅ©¿¡ ¿äûµÈ ÀÛ¾÷ Áß¿¡ ¾²±âÀÇ ºñÀ². |
3.4 ij½Ã °ü·Ã º´¸ñ
| Counter | Description |
| \Memory\Cache Bytes | ÇöÀç »ç¿ëÁßÀÎ ¸ðµç ij½¬ ¸Þ¸ð¸®ÀÇ ÃÑÇÕ. |
| \Memory\Cache Faults/sec | ÃÊ´ç ij½¬ ÆúÆ®ÀÇ ¹ß»ý Ƚ¼ö. |
| \Memory\Page Faults/sec | ÃÊ´ç ÆäÀÌÁö ÆúÆ® ¹ß»ý Ƚ¼ö. ÇÏµå ÆúÆ® ¹× ¼ÒÇÁÆ® ÆúÆ® ¸ðµÎ¸¦ Æ÷ÇÔÇÑ´Ù. |
| \Memory\Pages Input/sec | ÇÏµå ÆúÆ®¸¦ ÇØ°áÇϱâ À§ÇØ µð½ºÅ©¸¦ ÀоîµéÀ̴ Ƚ¼ö. |
| \Memory\Pages Output/sec | ÆäÀÌÁö ¾Æ¿ôÀ» À§ÇØ µð½ºÅ©¿¡´Ù ¾²´Â Ƚ¼ö. |
| \Cache\Copy Reads/sec | Shows the rate at which read operations from pages of the file system cache involve a copy read. |
| \Cache\Data Flushes/sec | Shows the rate at which the file system cache has flushed its contents to disk in response to a request to flush or to satisfy a write-through file write request. |
| \Cache\Copy Read Hits % | Shows the percentage of cache copy read requests that did not require a disk read to access the page in the cache. A copy read is a file read operation that is satisfied by a memory copy from a page in the cache to the application's buffer. The LAN redirector uses this method for retrieving information from the cache, as does the LAN server for small transfers. This method is also used by the disk file systems. |
| \Cache\Lazy Write Pages/sec | Shows the rate at which the Lazy Writer thread has written to disk. |
| \Cache\Lazy Write Flushes/sec | Shows the rate at which the Lazy Writer thread writes to disk. |
| \Cache\Read Aheads/sec | Shows the rate at which read operations from the file system cache detect sequential access to a file. The read aheads permit the data to be transferred in larger blocks than those being requested by the application, reducing the overhead per access. |
| \PhysicalDisk\Disk Reads/sec | µð½ºÅ©¿¡ ¿äûµÈ ÀÛ¾÷ Áß¿¡ ÀбâÀÇ ºñÀ². |
| \PhysicalDisk\Disk Writes/sec | µð½ºÅ©¿¡ ¿äûµÈ ÀÛ¾÷ Áß¿¡ ¾²±âÀÇ ºñÀ². |
3.5 ´ÙÁß CPU ¸Ó½Å¿¡¼ÀÇ º´¸ñ
| Counter | Description |
| \System\% Total Processor Time | |
| \System\Processor Queue Length | ÇÁ·Î¼¼¼ Å¥¿¡ µé¾î°¡ ÀÖ´Â ½º·¹µåÀÇ °¹¼ö. ÀÌ Å¥¿¡ µé¾î°¡ÀÖ´Â ÀÖ´Â ½º·¹µå´Â ¸ðµÎ ready »óÅ´Ù. Áï ÀÌ Å¥°¡ ±æ¾îÁø´Ù´Â ¸»Àº ½º·¹µå°¡ CPU¿¡ ºñÇØ ³Ê¹« ¸¹´Ù´Â ¸»ÀÌ´Ù. |
| \Processor\% Processor Time | ¾ÖÇø®ÄÉÀÌ¼Ç ¶Ç´Â ¿î¿µÃ¼Á¦ °ü·Ã ÇÁ·Î¼¼½º¸¦ ½ÇÇàÇÏ´Â µ¥ µé¾î°£ ½Ã°£ÀÇ ºñÀ². Áï IDLE »óÅÂÀÇ ¹Ý´ë. |
| \Process\% Processor Time | ÇØ´ç ÇÁ·Î¼¼½º°¡ ÀÚ½ÅÀÇ Äڵ带 ½ÇÇàÇϴµ¥ »ç¿ëÇÑ ½Ã°£ÀÇ ºñÀ². |
| \Thread\% Processor Time | ÇØ´ç ½º·¹µå°¡ ÀÚ½ÅÀÇ Äڵ带 ½ÇÇàÇϴµ¥ »ç¿ëÇÑ ½Ã°£ÀÇ ºñÀ². |
3.6 ³×Æ®¿öÅ© °ü·Ã º´¸ñ
| Counter | Description |
| \Network Interface\Bytes Total/sec | ÇØ´ç ³×Æ®¿öÅ© ÀÎÅÍÆäÀ̽º¸¦ ÅëÇØ ÃÊ´ç ÀÐ°í ¾´ µ¥ÀÌÅÍÀÇ Å©±â. |
| \Network Interface\Bytes Sent/sec | ÇØ´ç ³×Æ®¿öÅ© ÀÎÅÍÆäÀ̽º¸¦ ÅëÇØ ÃÊ´ç ÀÐÀº µ¥ÀÌÅÍÀÇ Å©±â. |
| \Network Interface\Bytes Received/sec | ÇØ´ç ³×Å©¿öÅ© ÀÎÅÍÆäÀ̽º¸¦ ÅëÇØ ÃÊ´ç ¾´ µ¥ÀÌÅÍÀÇ Å©±â. |
| \Protocol_layer_object\Segments Received/sec | ÇöÀç ¿¬°áµÈ ¿¬°áÀ» ÅëÇØ ¹ÞÀº ¼¼±×¸ÕÆ®ÀÇ °¹¼ö. |
| \Protocol_layer_object\Segments Sent/sec | ÇöÀç ¿¬°áµÈ ¿¬°áÀ» ÅëÇØ ¾´ ¼¼±×¸ÕÆ®ÀÇ °¹¼ö. ÀçÀü¼Û µ¥ÀÌÅ͸¸ µé¾î°£ ¼¼±×¸ÕÆ®´Â Á¦¿Ü. |
| \Protocol_layer_object\Frames Sent/sec | |
| \Protocol_layer_object\Frames Received/sec | |
| \Server\Bytes Total/sec | ÇØ´ç ¼¹ö°¡ ³×Æ®¿öÅ©¸¦ ÅëÇØ Àаųª ¾´ µ¥ÀÌÅÍÀÇ Å©±â. |
| \Server\Bytes Received/sec | ÇØ´ç ¼¹ö°¡ ³×Æ®¿öÅ©¸¦ ÅëÇØ ÀÐÀº µ¥ÀÌÅÍÀÇ Å©±â. |
| \Server\Bytes Transmitted/sec | ÇØ´ç ¼¹ö°¡ ³×Æ®¿öÅ©¸¦ ÅëÇØ ¾´ µ¥ÀÌÅÍÀÇ Å©±â. |
| \Network Segment\% Network Utilization | |
Protocol_layer_object Ç׸ñÀº TCP, UDP µîÀ» ¸»ÇÑ´Ù.
4 Âü°í
- MSDN¿¡ º¸¸é pdh.h ÆÄÀϸ¸ include ÇÏ¸é ´Ù µÇ´Â °Íó·³ µÇ¾î ÀÖÀ¸³ª, pdhmsg.h ÆÄÀϵµ Æ÷ÇÔÇØ¾ß °¢Á¾ »ó¼öµé(PDH_XXX ½Ã¸®Áî)À» »ç¿ëÇÒ ¼ö ÀÖ´Ù.
5 ¸µÅ©
6 ´Ù¿î·Îµå
SeriousMoin v1 (koMoinMoin 1.0a4 Modified)