| Joe Schmo 2004-03-27, 12:21 am |
| Why not write your own "perfmon"? Then you'll have complete control over
all the log files. Project JEDI may have an equivalent component to what
perfmon provides. I am sure I've played with the same ActiveX control that
perfmon uses in the past. This could be an option if you wanted to develop
it yourself.
Otherwise, you could have a service (or application) periodically terminate
perfmon (posting a WM_CLOSE message to perfmon's main form should do the
trick, and is safer than TerminateProcess), process the log files since they
should no longer be in use, then restart perfmon.
These may not be the perfect solutions, but should get you what you're
looking for. If I find the ActiveX, I'll post another reply.
Hope it helps.
".mitro" <tro@adv.magwien.gv.at> wrote in message
news:1072086503.251660@proxy.dienste.wien.at...
> Hi there.
>
> I am currently writing an application for my company. This application has
> to find out how many poeple logon to our domain (per hour). In order to
get
> any information I use Windows' PerformanceMonitor (perfmon.exe) on every
> domain controller. Perfmon writes the number of logins since the last boot
> into a logfile once in an hour.
>
> What my program does, is copying these logfiles to the local machine
> (works), reads and evaluates it's contents (works), writes a seperate
local
> logfile (works) and deletes the local perfmon-files (works).
>
> The perfmon-logfiles are growing (by 24 lines a day) which will be a
problem
> sooner or later, since it takes longer everytime to copy the files. My
major
> problem: I cannot delete the logfiles on the domain controllers since they
> are locked by Windows as long as they are active. And I DO NOT want to
> delete the files manually every now and then.
>
> So here is my question: Does anyone know how to tell perfmon to stop
logging
> (so I can delete the files and create new ones)? It does not accept any
> parameters (as far as I know), so I guess there must be something in the
API
> ... ?
>
> Any suggestions would be greatly appreciated, thanks an advance & a merry
> christmas (once again)
>
> .mitro
>
>
|