Stop Perfmon.exe from within a Delphi Application

From: .mitro (tro_at_adv.magwien.gv.at)
Date: 12/22/03


Date: Mon, 22 Dec 2003 10:48:18 +0100

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



Relevant Pages

  • Re: Peformance Monitor does not monitor/collect data
    ... one of them, perfmon no longer works. ... I can't find any other options to repair perfmon other than a reinstallation or repair of windows, which are not viable options for this. ...
    (microsoft.public.windows.server.general)
  • Re: Perfmon
    ... (not perfmon) and added registry settings ... > these entries from the registry.. ... > performance monitor in windows. ... > 2003 server installation, without huge detriment to the server. ...
    (microsoft.public.win2000.registry)
  • Unable to perform "Perfmon" to a remote Windows XP Pro workstation
    ... When attemtping to perform a "perfmon" from any of my Windows based servers ... The Domain administrator global group is defined in the remote Windows XP ... Pro's local administrators group. ...
    (microsoft.public.windowsxp.security_admin)
  • unable to perform "perfmon" on a remote Windows XP Pro
    ... When attemtping to perform a "perfmon" from any of my Windows based servers ... The Domain administrator global group is defined in the remote Windows XP ... Pro's local administrators group. ...
    (microsoft.public.win2000.security)
  • Re: subprocess on Windows
    ... > Now I'm trying to use the Windows GUI, and I want to have an icon I can ... > click to launch gvim. ... > # Launch gvim on today's logfile, ... > Windows cmd.exe window flashes on the screen first. ...
    (comp.lang.ruby)