N
NayJo
Hi,
I'm using the performance data helper library to write some performance
counters to a log file but the only format available to me seems to be the
CSV format.
Is there a way I can have the log written in PERFMON format?
////// start code
pdhStatus = PdhBrowseCounters(&pdhBrowseDialogConfigurationBlock)
if (pdhStatus == ERROR_SUCCESS || pdhStatus == PDH_DIALOG_CANCELLED)
{
DWORD dwFlags = (PDH_LOG_WRITE_ACCESS | PDH_LOG_CREATE_ALWAYS)
DWORD dwLogType = PDH_LOG_TYPE_CSV // PDH_LOG_TYPE_PERFMON not
supported?
DWORD dwMaxSize = 0x20000000 // .5 GB?
// PdhOpenLog returns ERROR_SUCCESS when log type is CSV
// and PDH_NOT_IMPLEMENTED when log type is Perfmon.
pdhStatus = PdhOpenLog( ptcFilename, dwFlags, &dwLogType,
(HQUERY)hPDHQuery, dwMaxSize, NULL, &hPDHLog)
}
////// snip
Counters are properly selected and data is logged as log as I use the CSV
file format but this is not what I want to use.
Many thanks ahead of time.
J
I'm using the performance data helper library to write some performance
counters to a log file but the only format available to me seems to be the
CSV format.
Is there a way I can have the log written in PERFMON format?
////// start code
pdhStatus = PdhBrowseCounters(&pdhBrowseDialogConfigurationBlock)
if (pdhStatus == ERROR_SUCCESS || pdhStatus == PDH_DIALOG_CANCELLED)
{
DWORD dwFlags = (PDH_LOG_WRITE_ACCESS | PDH_LOG_CREATE_ALWAYS)
DWORD dwLogType = PDH_LOG_TYPE_CSV // PDH_LOG_TYPE_PERFMON not
supported?
DWORD dwMaxSize = 0x20000000 // .5 GB?
// PdhOpenLog returns ERROR_SUCCESS when log type is CSV
// and PDH_NOT_IMPLEMENTED when log type is Perfmon.
pdhStatus = PdhOpenLog( ptcFilename, dwFlags, &dwLogType,
(HQUERY)hPDHQuery, dwMaxSize, NULL, &hPDHLog)
}
////// snip
Counters are properly selected and data is logged as log as I use the CSV
file format but this is not what I want to use.
Many thanks ahead of time.
J