cmdlineobserver


Namecmdlineobserver JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/cmdlineobserver
SummaryMonitors and observes running processes with their command line details.
upload_time2023-09-16 18:03:12
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords process observer cmdline
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Monitors and observes running processes with their command line details.

## Tested against Windows 10 / Python 3.11 / Anaconda

### pip install cmdlineobserver


### updated XML

```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.


```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/cmdlineobserver",
    "name": "cmdlineobserver",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "process,observer,cmdline",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/68/25/8554d1c5e2830f3ea924d4d43a1c4f2c836a1ea20bf96e22a7d36c987c3a/cmdlineobserver-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# Monitors and observes running processes with their command line details.\r\n\r\n## Tested against Windows 10 / Python 3.11 / Anaconda\r\n\r\n### pip install cmdlineobserver\r\n\r\n\r\n### updated XML\r\n\r\n```xml \r\n\r\nThis function continuously collects information about running processes, specifically their\r\ncommand line details, and stores them in a Pandas DataFrame. It can be configured with a\r\ncustom breaking condition to stop data collection and save the results to a CSV file.\r\n\r\nParameters:\r\n- breakcondition (callable, optional): A function that takes a DataFrame as input and\r\n  returns a boolean indicating whether to stop data collection. If not provided or set\r\n  to False, data collection continues indefinitely.\r\n- save_path (str, optional): If specified, the collected data will be saved to a CSV\r\n  file at the specified path when the breaking condition is met.\r\n\r\nReturns:\r\n- pandas.DataFrame: A DataFrame containing information about running processes, including\r\n  columns such as 'CommandLine', 'ProcessId', and more.\r\n\r\nExample:\r\n\t# columns for possible conditions:\r\n\t# CommandLine,CSName,Description,ExecutablePath,ExecutionState,Handle,HandleCount,InstallDate,KernelModeTime,\r\n\t# MaximumWorkingSetSize,MinimumWorkingSetSize,Name,OSName,OtherOperationCount,OtherTransferCount,PageFaults,\r\n\t# PageFileUsage,ParentProcessId,PeakPageFileUsage,PeakVirtualSize,PeakWorkingSetSize,Priority,PrivatePageCount,\r\n\t# ProcessId,QuotaNonPagedPoolUsage,QuotaPagedPoolUsage,QuotaPeakNonPagedPoolUsage,QuotaPeakPagedPoolUsage,\r\n\t# ReadOperationCount,ReadTransferCount,SessionId,Status,TerminationDate,ThreadCount,UserModeTime,\r\n\t# VirtualSize,WindowsVersion,WorkingSetSize,WriteOperationCount,WriteTransferCount,procid\r\n\r\n\tExample:\r\n\t\tfrom cmdlineobserver import observe_cmdline\r\n\t\tdf = observe_cmdline(\r\n\t\t\t#breakcondition=lambda df: not df.loc[df.CommandLine.str.contains(\"cmd.exe\")].empty,\r\n\t\t\tsave_path=\"c:\\\\cmdlineobserver.csv\",\r\n\t\t)\r\n\t\tprint(df)\r\n\r\n\r\nNote:\r\n- The DataFrame columns correspond to various process attributes, and you can customize\r\n  the conditions to break the observation loop based on specific criteria.\r\n\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Monitors and observes running processes with their command line details.",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/cmdlineobserver"
    },
    "split_keywords": [
        "process",
        "observer",
        "cmdline"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7ae61916081922bdb39bcc3027cdf3858c7c0a633f323d5b9db83e16cfb18c7",
                "md5": "be772f5494c6349a749383e22b4f284a",
                "sha256": "7bf1944fe6c53643da068190416f22f99b308b1710ac13a01a34c7100ea52bd4"
            },
            "downloads": -1,
            "filename": "cmdlineobserver-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "be772f5494c6349a749383e22b4f284a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7670,
            "upload_time": "2023-09-16T18:03:11",
            "upload_time_iso_8601": "2023-09-16T18:03:11.020097Z",
            "url": "https://files.pythonhosted.org/packages/a7/ae/61916081922bdb39bcc3027cdf3858c7c0a633f323d5b9db83e16cfb18c7/cmdlineobserver-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68258554d1c5e2830f3ea924d4d43a1c4f2c836a1ea20bf96e22a7d36c987c3a",
                "md5": "3802cc083da2487c32135b7e3eb7529a",
                "sha256": "8203b2f238be096996ab56c77b47370c08b6e2ff6a13e3f5760ae3032e056195"
            },
            "downloads": -1,
            "filename": "cmdlineobserver-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "3802cc083da2487c32135b7e3eb7529a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5047,
            "upload_time": "2023-09-16T18:03:12",
            "upload_time_iso_8601": "2023-09-16T18:03:12.951318Z",
            "url": "https://files.pythonhosted.org/packages/68/25/8554d1c5e2830f3ea924d4d43a1c4f2c836a1ea20bf96e22a7d36c987c3a/cmdlineobserver-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-16 18:03:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "cmdlineobserver",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "cmdlineobserver"
}
        
Elapsed time: 0.20943s