Re: Process Idle Time

From: Chuck Chopp (ChuckChopp_at_rtfmcsi.com)
Date: 08/17/04


Date: Tue, 17 Aug 2004 12:20:58 -0400

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
    ... >> What happens if a batch file is invoked from the command prompt? ... >> file in turn invokes several executables. ... it depends on what sorts of commands are used in the BAT or CMD file. ... > any external commands being executed as a result of processing the BAT or ...
    (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)
  • Re: External Commands and the Output Window
    ... It seems like external commands would be the simplest way to go here. ... get output to go to the Output window, you just check the 'Use output ... pretty sure you can also automate defining the keyboard shortcuts (don't ...
    (microsoft.public.vsnet.ide)