218 static void* OpenProcessByName(
const String& sProcessName,
unsigned long dwDesiredAccess,
int& iOutProcessId);
219 static String ReadProcessCommandLineHandle(
void* hProc);
220 static MemoryInfo ReadProcessMemoryHandle(
void* hProc);
221 static DiskInfo ReadProcessDiskHandle(
void* hProc,
const String& sProcessName);
226 static int FindPidByName(
const String& sProcessName);
227 static MemoryInfo ReadLinuxProcessMemory(
int iPid);
228 static DiskInfo ReadLinuxProcessDisk(
int iPid);
Encapsulates a delegate method that has parameters and returns void.
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Represents a strongly typed list of objects that can be accessed by index mirroring ....
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Encapsulates a method that has parameters and does not return a value.
Represents a strongly typed list of objects accessible by index.
Streams system process updates asynchronously with batching and event notifications.
static String GetProcessCommandLine(const String &sProcessName)
Queries the full command line used to launch a process by name.
static void EnrichProcessInfo(ProcessInfo &proc, bool bIncludeNetwork=true)
Enriches an existing ProcessInfo instance with CPU, memory, disk, and network telemetry.
static Collections::Generic::List< int > GetProcessNetworkPort(const String &sProcessName)
Retrieves open listening ports bound by a process by name.
static SmartPointer< ProcessStreamer > CreateProcessStreamer(const ProcessStreamOptions &options=ProcessStreamOptions())
Creates a background process streaming engine configured with options.
static DiskInfo GetProcessDiskUsage(const String &sProcessName)
Queries disk transfer throughput for a process by name.
static MemoryInfo GetProcessMemoryUsage(const String &sProcessName)
Queries memory allocation details for a process by name.
static Collections::Generic::List< ServiceInfo > GetAllServices()
Enumerates all registered system background services and their current execution status.
SystemMetrics()
Initializes a new instance of SystemMetrics.
static MemoryInfo GetSystemMemoryUsage()
Retrieves total and consumed physical memory metrics for the entire machine.
static double GetSystemCpuUsage()
Computes total system CPU usage percentage across all processors.
static double GetSystemNetworkUsage()
Computes total network traffic throughput across all operational interfaces in Megabits per second.
static NetworkUsageInfo GetProcessNetworkUsage(const String &sProcessName)
Queries network transfer metrics for a process by name.
static ProcessNetworkConnectionInfo GetProcessNetworkInfo(const String &sProcessName)
Queries detailed socket connections for a process by name.
static void EnumerateProcessesAsync(const Action< const ProcessInfo & > &fnOnProcess, const Action<> &fnOnComplete=nullptr)
Asynchronously discovers processes on the host using fast discovery mode.
static DiskInfo GetSystemDiskUsage()
Retrieves total disk read and write transfer rates for the system.
Supports all classes in the DotNetDupe class hierarchy.
A unified smart pointer that supports both unique and shared ownership semantics.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Rate or aggregate count of disk read and write operations.
long long lDiskWriteBytes
Disk write throughput in bytes per second or total transfer count.
long long lDiskReadBytes
Disk read throughput in bytes per second or total transfer count.
DiskInfo()
Default constructor initializing to unpopulated (-1).
Snapshot of physical and virtual memory utilization for the system or a specific process.
MemoryInfo()
Default constructor initializing default counters.
long long lPhysicalMemoryBytes
Working set size (physical RAM resident) for the target process.
unsigned long long uMemoryTotalBytes
Total physical RAM installed on the host in bytes.
double dMemoryUsagePercent
Percentage of total physical memory currently in use (0.0 - 100.0).
long long lPrivateBytes
Private bytes allocated by the target process (-1 if unavailable).
unsigned long long uMemoryUsedBytes
Currently consumed physical RAM across all processes.
int iRemotePort
Remote peer port.
String sState
Socket connection state (e.g. "ESTABLISHED", "LISTEN", "TIME_WAIT").
String sLocalAddress
Local IPv4 or IPv6 IP address.
String sRemoteAddress
Remote peer IP address.
NetworkConnectionInfo()
Default constructor.
int iLocalPort
Local listening or bound port.
Network throughput counters for bytes transmitted and received.
long long lNetworkReadBytes
Incoming network throughput in bytes or octets.
NetworkUsageInfo()
Default constructor initializing to unpopulated (-1).
long long lNetworkWriteBytes
Outgoing network throughput in bytes or octets.
Comprehensive telemetry snapshot for an operating system process.
double dCpuUsagePercent
Process CPU consumption percentage (0.0 - 100.0).
String sName
Process executable name without path.
Collections::Generic::List< int > lstOpenPorts
Open listening ports.
int iProcessId
Operating system process identifier (PID).
NetworkUsageInfo network
Network traffic metrics.
ProcessInfo()
Default constructor.
String sCommandLine
Full command-line arguments used to spawn the process.
DiskInfo disk
Disk I/O telemetry.
bool bHasEstablishedConnection
True if any connection is established.
int iSessionId
Terminal Services session ID.
String sPath
Full filesystem path to the executable image.
MemoryInfo memory
Memory allocation statistics.
Collections::Generic::List< NetworkConnectionInfo > lstConnections
Active socket connections.
Collection of open ports and active connections attributed to a specific process.
ProcessNetworkConnectionInfo()
Default constructor.
Collections::Generic::List< NetworkConnectionInfo > lstConnections
Detailed active socket connections.
bool bHasEstablishedInboundConnection
True if process possesses at least one established connection.
Collections::Generic::List< int > lstOpenPorts
List of TCP/UDP ports bound or in LISTEN state.
Configuration options controlling the execution of a ProcessStreamer.
ProcessStreamOptions()
Default constructor configuring progressive telemetry defaults.
ServiceInfo()
Default constructor.
int iProcessId
Process ID hosting the service (0 if stopped).
String sDisplayName
Human-readable friendly display name.
String sStartType
Startup behavior (e.g. "Automatic", "Manual", "Disabled").
String sStatus
Current service state (e.g. "Running", "Stopped", "Paused").
String sServiceName
Internal service key identifier.