Name

VMListProcessesInGuest

Description

($err, @processProperties) = VMListProcessesInGuest($vmHandle,
                                                    $options);

This function lists the running processes in the guest operating system.

Parameters

vmHandle
Identifies a virtual machine. Call VMOpen() to create a virtual machine handle.
options
Must be 0.

Return Value

$err. The error code returned by the operation. For returned values, see Topics > Error Codes.

@processProperties. An array of hashes containing the process properties.

Remarks

Side Effects

None.

Requirements

use VMware::Vix::Simple;
use VMware::Vix::API::Constants;
since VMware Workstation 6.0
Minimum Supported Guest OS: Microsoft Windows NT Series, Linux

Example

$(err, @processProperties) = VMListProcessesInGuest($vmHandle);
die "VMListProcessesInGuest() failed, $err ", GetErrorText($err), "\n" if $err != VIX_OK;

my $num = @processProperties;
my $i;

foreach $i (1..$num) {
   print "process: $processProperties[$i-1]{'PROCESS_NAME'}\t";
   print "pid: $processProperties[$i-1]{'PROCESS_ID'}\t";
   print "owner: $processProperties[$i-1]{'PROCESS_OWNER'}\t";
   print "command: $processProperties[$i-1]{'PROCESS_COMMAND'}\n";
   print "debugged: $processProperties[$i-1]{'PROCESS_BEING_DEBUGGED'}\n";
   print "started: $processProperties[$i-1]{'PROCESS_START_TIME'}\n";
}

Copyright (C) 2007-2017 VMware, Inc. All rights reserved.