Get Process Information Action

Declaration

<AMGETPROCESSINFO REMOTEMACHINE="209.223.157.132" DOMAINNAME="netauto" USERNAME="user" PASSWORD="password" PROCESSNAME="firefox.exe" RESULTDATASET="theProcess"/>

See Also

Get Volume Information Action, Print, Send Keystrokes, Log Event Action, Run Action

Description

Creates and populates an AutoMate dataset with information about the specified Windows process, such as Process Name, ID, start time, thread/handle count, system resource usage by the process, etc. (a full list is entered below).

Practical Usage

Useful for gathering am assortment of information regarding a specified process. This action can get process information from the local machine or a remote machine.

Parameters

General Tab

Local machine / Remote machine

Specifies whether the process to get information about resides on the local machine or a remote machine.

Use WMI

Yes/No, Required, Default="NO"
MARKUP: PROCESSNAME="AMEM"

WMI is the communication layer that Microsoft servers use to interact with remote machines on the network, however, it can be used to communicate with the local machine as well. If enabled, this parameter specifies to use WMI (Windows Management Instrumentation) to get the process information on the local machine. If disabled, .Net is used instead. This parameter is disabled by default. When the Remote machine option is selected, the Use WMI parameter is automatically enabled and grayed out. This is because only WMI can be used to get process information from a remote machine.

Machine name

Text, Required
MARKUP: REMOTEMACHINE="machinename.domain.com"

Specifies the host name or IP address of the remote machine to get process information from. This parameter is available only when the Remote Machine option is selected.

Domain name

Text, Required
MARKUP: DOMAINNAME="netauto"

Specifies the domain name of the remote machine to get process information from. This parameter is available only when the Remote Machine option is selected.

Username

Text, Required
MARKUP: USERNAME="user.name"

Specifies a valid username used to logon to the remote machine to get process information from. This parameter is available only when the Remote Machine option is selected.

Password

Text, Required
MARKUP: PASSWORD="password"

Specifies the password corresponding to the username entered in the Username field. This parameter is available only when the Remote Machine option is selected.

Get process by Process Name

Text, Optional
MARKUP: PROCESSNAME="firefox.exe"

If selected, specifies the name of the process to get information about. This can be entered manually or it can be selected from the drop-down menu by clicking the down arrow.

Get process by Process ID

Number, Optional
MARKUP: PROCESSID="23432"

If selected, specifies the unique identifier of the process to get information about. This is a number used to uniquely identify a process.

Create and populate dataset with process information

Text [Dataset Name], Required
MARKUP: RESULTDATASET="ProcessInfo"

Specifies the name of a dataset to be created and populated with the process information.

 

Dataset Columns

This action creates and populates an AutoMate dataset with property information about the specified Windows process. If getting information about a process that resides on the local machine, the information populated by the specified dataset differ depending on whether the Use WMI option is enabled/disabled. If enabled, AutoMate retrieves process information via the Win32_Process WMI class. If disabled, Automate retrieves the information via the .NET Framework Class Library.

The table below represents the complete list of dataset columns populated during runtime and their description as derived from the Win32_Process WMI class (populated when Use WMI option is enabled).

Name

Description

Caption

Short description of an object—a one-line string.

CommandLine

Command line used to start a specific process, if applicable. This property is new for Windows XP.

CreationClassName

Name of the first concrete class in the inheritance chain that is used to create an instance. You can use this property with other key properties of the class to uniquely identify all of the instances of the class and its subclasses.

CreationDate

Date the process begins executing.

CSCreationClassName

Creation class name of the scoping computer system.

CSName

Name of the scoping computer system..

Description

Description of an object.

ExecutablePath

Path to the executable file of the process.

ExecutionState

This property is not implemented and does not get populated for any instance of this class. This property is always NULL.

Handle

Process identifier.

HandleCount

Total number of open handles owned by the process. HandleCount is the sum of the handles currently open by each thread in this process. A handle is used to examine or modify the system resources. Each handle has an entry in a table that is maintained internally. Entries contain the addresses of the resources and data to identify the resource type.

InstallDate

Date a process  is installed. The process may be installed without a value being written to this property.

KernelModeTime

Time in kernel mode, in 100 nanosecond units. If this information is not available, use a value of 0 (zero).

MaximumWorkingSetSize

Maximum working set size of the process. The working set of a process is the set of memory pages visible to the process in physical RAM. These pages are resident, and available for an application to use without triggering a page fault.

MinimumWorkingSetSize

Minimum working set size of the process. The working set of a process is the set of memory pages visible to the process in physical RAM. These pages are resident and available for an application to use without triggering a page fault.

Name

Label for an object. When inherited by a subclass, the property can be overridden to be a key property.

OSCreationClassName

Creation class name of the scoping operating system.

OSName

Name of the scoping operating system.

OtherOperationCount

Number of I/O operations performed that are not read or write operations.

OtherTransferCount

Amount of data transferred during operations that are not read or write operations.

PageFaults

Number of page faults that a process generates.

PageFileUsage

Amount of page file space that a process is using currently. This value is consistent with the VMSize value in TaskMgr.exe.

ParentProcessId

Unique identifier of the process that creates a process. Process identifier numbers are reused, so they only identify a process for the lifetime of that process. It is possible that the process identified by ParentProcessId is terminated, so ParentProcessId may not refer to a running process. It is also possible that ParentProcessId incorrectly refers to a process that reuses a process identifier. You can use the CreationDate property to determine whether the specified parent was created after the process represented by this Win32_Process instance was created.

PeakPageFileUsage

Maximum amount of page file space used during the life of a process.

PeakVirtualSize

The peak paged memory size.

PeakWorkingSetSize

Peak working set size of a process.

Priority

Scheduling priority of a process within an operating system. The higher the value, the higher priority a process receives. Priority values can range from 0 (zero), which is the lowest priority to 31, which is highest priority.

PrivatePageCount

Current number of pages allocated that are only accessible to the process represented by this Win32_Process instance.

ProcessId

Global process identifier that is used to identify a process. The value is valid from the time a process is created until it is terminated.

QuotaNonPagedPoolUsage

Quota amount of nonpaged pool usage for a process.

QuotaPagedPoolUsage

Quota amount of paged pool usage for a process.

QuotaPeakNonPagedPoolUsage

Peak quota amount of nonpaged pool usage for a process.

QuotaPeakPagedPoolUsage

Peak quota amount of paged pool usage for a process.

ReadOperationCount

Number of read operations performed.

ReadTransferCount

Amount of data read.

SessionId

Unique identifier that an operating system generates when a session is created. A session spans a period of time from logon until logoff from a specific system.

Status

This property is not implemented and does not get populated for any instance of this class. It is always NULL.

TerminationDate

Process was stopped or terminated. To get the termination time, a handle to the process must be held open. Otherwise, this property returns NULL. 

ThreadCount

Number of active threads in a process. An instruction is the basic unit of execution in a processor, and a thread is the object that executes an instruction. Each running process has at least one thread.

UserModeTime

Time in user mode, in 100 nanosecond units. If this information is not available, use a value of 0 (zero).

VirtualSize

Current size of the virtual address space that a process is using, not the physical or virtual memory actually used by the process. Using virtual address space does not necessarily imply corresponding use of either disk or main memory pages. Virtual space is finite, and by using too much, the process might not be able to load libraries. This value is consistent with what you see in Perfmon.exe.

WindowsVersion

Version of Windows in which the process is running.

WorkingSetSize

Amount of memory in bytes that a process needs to execute efficiently—for an operating system that uses page-based memory management. If the system does not have enough memory (less than the working set size), thrashing occurs. If the size of the working set is not known, use NULL or 0 (zero). If working set data is provided, you can monitor the information to understand the changing memory requirements of a process.

WriteOperationCount

Number of write operations performed.

WriteTransferCount

Amount of data written.

 

The table below contains the complete list of dataset columns populated during runtime and their description as derived from the .NET Framework Class Library (populated when Use WMI option is disabled).

Name

Description

BasePriority

The base priority of the associated process.

CanRaiseEvents

A value indicating whether the component can raise an event.

Container

The IContainer that contains the Component.

DesignMode

A value that indicates whether the Component is currently in design mode.

EnableRaisingEvents

Gets or sets whether the Exited event should be raised when the process terminates.

Events

The list of event handlers that are attached to this Component.

ExitCode

The value that the associated process specified when it terminated.

ExitTime

The time that the associated process exited.

Handle

The native handle of the associated process.

HandleCount

The number of handles opened by the process.

HasExited

A value indicating whether the associated process has been terminated.

Id

The unique identifier for the associated process.

MachineName

The name of the computer the associated process is running on.

MainModule

The main module for the associated process.

MainWindowHandle

The window handle of the main window of the associated process.

MaxWorkingSet

Gets or sets the maximum allowable working set size for the associated process.

MinWorkingSet

Gets or sets the minimum allowable working set size for the associated process.

Modules

The modules that have been loaded by the associated process.

NonpagedSystemMemorySize

The nonpaged system memory size allocated to this process.

NonpagedSystemMemorySize64

The amount of nonpaged system memory allocated for the associated process.

PagedMemorySize

The paged memory size.

PagedMemorySize64

The amount of paged memory allocated for the associated process.

PagedSystemMemorySize

The paged system memory size.

PagedSystemMemorySize64

The amount of pageable system memory allocated for the associated process.

PeakPagedMemorySize

The peak paged memory size.

PeakPagedMemorySize64

The maximum amount of memory in the virtual memory paging file used by the associated process.

PeakVirtualMemorySize

The peak virtual memory size.

PeakVirtualMemorySize64

The maximum amount of virtual memory used by the associated process.

PeakWorkingSet  

The peak working set size for the associated process.

PeakWorkingSet64

The maximum amount of physical memory used by the associated process.

PriorityBoostEnabled

Gets or sets a value indicating whether the associated process priority should temporarily be boosted by the operating system when the main window has the focus.

PriorityClass

Gets or sets the overall priority category for the associated process.

PrivateMemorySize  

Gets the private memory size.

PrivateMemorySize64

Gets the amount of private memory allocated for the associated process.

PrivilegedProcessorTime

PrivilegedProcessorTime Gets the privileged processor time for this process.

ProcessName

Gets the name of the process.

ProcessorAffinity

Gets or sets the processors on which the threads in this process can be scheduled to run.

Responding

A value indicating whether the user interface of the process is responding.

SessionId

The Terminal Services session identifier for the associated process.

Site

Gets or sets the ISite of the Component. (Inherited from Component.)

StandardError

A stream used to read the error output of the application.

StandardInput

A stream used to write the input of the application.

StandardOutput

A stream used to read the output of the application.

StartInfo

Gets or sets the properties to pass to the Start method of the Process.

StartTime

The time that the associated process was started.

SynchronizingObject

Gets or sets the object used to marshal the event handler calls that are issued as a result of a process exit event.

Threads

The set of threads that are running in the associated process.

TotalProcessorTime

The total processor time for this process.

UserProcessorTime

The user processor time for this process.

VirtualMemorySize

The size of the process's virtual memory.

VirtualMemorySize64

The amount of the virtual memory allocated for the associated process.

WorkingSet

The associated process's physical memory usage.

WorkingSet64

The amount of physical memory allocated for the associated process.

 

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

This example retrieves process information in regards to Internet Explorer (iexplore) and displays the information in a message box.

<AMGETPROCESSINFO USEWMI="YES" PROCESSNAME="iexplore.exe" RESULTDATASET="theProcess" />

<AMMESSAGEBOX WINDOWTITLE="Process Information">Process Name: %theProcess.Name%

Process Description: %theProcess.Description%

Process Path: %theProcess.ExecutablePath%

Process identifier: %theProcess.Handle%

Process ID: %theProcess.ProcessId%

Process Virtual Size: %theProcess.VirtualSize%

Process Session ID: %theProcess.SessionId%</AMMESSAGEBOX>