Guest NayJo Posted July 11, 2007 Posted July 11, 2007 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
Guest NayJo Posted July 12, 2007 Posted July 12, 2007 Re: Writing perfomance data to a log file "NayJo" <CrawNOSPAMforMEford@mindspring.com> wrote in message news:eYIvjN$wHHA.4384@TK2MSFTNGP02.phx.gbl... > 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. > I found out that Perfmon format files are read-only.
Recommended Posts