Monitors and observes running processes with their command line details.
Tested against Windows 10 / Python 3.11 / Anaconda
pip install cmdlineobserver
updated XML
This function continuously collects information about running processes, specifically their
command line details, and stores them in a Pandas DataFrame. It can be configured with a
custom breaking condition to stop data collection and save the results to a CSV file.
Parameters:
- breakcondition (callable, optional): A function that takes a DataFrame as input and
returns a boolean indicating whether to stop data collection. If not provided or set
to False, data collection continues indefinitely.
- save_path (str, optional): If specified, the collected data will be saved to a CSV
file at the specified path when the breaking condition is met.
Returns:
- pandas.DataFrame: A DataFrame containing information about running processes, including
columns such as 'CommandLine', 'ProcessId', and more.
Example:
# columns for possible conditions:
# CommandLine,CSName,Description,ExecutablePath,ExecutionState,Handle,HandleCount,InstallDate,KernelModeTime,
# MaximumWorkingSetSize,MinimumWorkingSetSize,Name,OSName,OtherOperationCount,OtherTransferCount,PageFaults,
# PageFileUsage,ParentProcessId,PeakPageFileUsage,PeakVirtualSize,PeakWorkingSetSize,Priority,PrivatePageCount,
# ProcessId,QuotaNonPagedPoolUsage,QuotaPagedPoolUsage,QuotaPeakNonPagedPoolUsage,QuotaPeakPagedPoolUsage,
# ReadOperationCount,ReadTransferCount,SessionId,Status,TerminationDate,ThreadCount,UserModeTime,
# VirtualSize,WindowsVersion,WorkingSetSize,WriteOperationCount,WriteTransferCount,procid
Example:
from cmdlineobserver import observe_cmdline
df = observe_cmdline(
#breakcondition=lambda df: not df.loc[df.CommandLine.str.contains("cmd.exe")].empty,
save_path="c:\\cmdlineobserver.csv",
)
print(df)
Note:
- The DataFrame columns correspond to various process attributes, and you can customize
the conditions to break the observation loop based on specific criteria.
Metadata
Release files for cmdlineobserver 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cmdlineobserver-0.10.tar.gz | 5.0 kB | Without provenance | Details for cmdlineobserver-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cmdlineobserver-0.10-py3-none-any.whl | Python 3 | none | any | Details for cmdlineobserver-0.10-py3-none-any.whl |
Total release size: 12.7 kB
Release files / cmdlineobserver-0.10.tar.gz
| Download URL | cmdlineobserver-0.10.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8203b2f238be096996ab56c77b47370c08b6e2ff6a13e3f5760ae3032e056195
|
|
BLAKE2b-256 checksum How to use checksums |
68258554d1c5e2830f3ea924d4d43a1c4f2c836a1ea20bf96e22a7d36c987c3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / cmdlineobserver-0.10-py3-none-any.whl
| Download URL | cmdlineobserver-0.10-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7bf1944fe6c53643da068190416f22f99b308b1710ac13a01a34c7100ea52bd4
|
|
BLAKE2b-256 checksum How to use checksums |
a7ae61916081922bdb39bcc3027cdf3858c7c0a633f323d5b9db83e16cfb18c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for cmdlineobserver 0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.