Re: Process Idle Time

From: Krishna Monian (KrishnaMonian_at_discussions.microsoft.com)
Date: 08/17/04


Date: Tue, 17 Aug 2004 12:07:03 -0700

Is there something that is remotely equivalent to GetProcessTimes on Win 98
and Win Me?

Thanks
Krishna

"Chuck Chopp" wrote:

> Krishna Monian wrote:
>
> > What happens if a batch file is invoked from the command prompt? The batch
> > file in turn invokes several executables. From my understanding this won't be
> > reflected in the ProcessTimes of the command prompt. Am I right?
> >
> > Is there any way to work around this?
>
> Again, it depends on what sorts of commands are used in the BAT or CMD file.
> If they are commands that are internal, as in they are built into CMD.EXE,
> then then that instance of CMD.EXE will utilize some CPU time as it executes
> those internal commands. A small amount of CPU time will be utilized, too,
> for the actual parsing of the BAT or CMD file itself. However, if there are
> any external commands being executed as a result of processing the BAT or
> CMD file, then those external commands will run in separate prcoesses and
> will not result in CMD.EXE utilizing any significant amount of CPU time.
>
> I don't understand what sort of work around you are asking for. This is
> simply how CMD.EXE functions [and COMMAND.COM, for that matter]. While an
> external console mode program is executing, CMD.EXE will appear idle as it
> is in a wait state. The subprocess that it created to execute the external
> command will then be busy or idle on its own depending on what it is doing
> and how the user is interacting with it.
>
>
> --
> Chuck Chopp
>
> ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
>
> RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
> 103 Autumn Hill Road 864 801 2774 fax
> Greer, SC 29651
>
> Do not send me unsolicited commercial email.
>



Relevant Pages

  • Re: Process Idle Time
    ... > file in turn invokes several executables. ... > reflected in the ProcessTimes of the command prompt. ... it depends on what sorts of commands are used in the BAT or CMD file. ... then those external commands will run in separate prcoesses and ...
    (microsoft.public.win32.programmer.kernel)
  • Re: help adding start and shutdown script
    ... Part of your security comes from the fact that all commands come from ... as the last entry into your $PATH variable, all other directories in your searchpath override executables that reside in the current directory. ... But, to tell it once again: I do not recommend this, if you don't want malware to be theoretically able to override often used commands like "ls", "cd" etc. by placing an executalbe with the same name into a commonly used folder. ... The stop_net script will now execute without typing './'. ...
    (linux.redhat)
  • Re: Process Idle Time
    ... I basically want to know if the prompt is busy in any way. ... >> file in turn invokes several executables. ... it depends on what sorts of commands are used in the BAT or CMD file. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: help adding start and shutdown script
    ... Part of your security comes from the fact that all commands come from ... as the last entry into your $PATH variable, all other directories in your searchpath override executables that reside in the current directory. ... But, to tell it once again: I do not recommend this, if you don't want malware to be theoretically able to override often used commands like "ls", "cd" etc. by placing an executalbe with the same name into a commonly used folder. ...
    (linux.redhat)
  • got it!
    ... set up a batch file in the winnt folder so i could run a series of commands ... You also have to lower the version of the policy, ... >> (you can use the scheduler to schedule remotely): ...
    (microsoft.public.win2000.security)