-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced Modes
python3 process_analyzer_allinone.py --watch --interval 30 --config config.yamlRe-collects periodically (default 60 s, minimum 5 s), runs collection + rules only — Ollama is never called in a loop; AI enrichment stays a deliberate one-shot action. Each cycle prints the top consumers and the differences vs the previous cycle (new processes, gone processes, risk changes) and regenerates the HTML. Stop with Ctrl+C.
python3 process_analyzer_allinone.py --pid 1234 --no-enrichRestricts the analysis to the target process plus its ancestors and all descendants, prints a detailed text report (identity, risk level and named signals, network connections, open files, SHA256 if --check-integrity, and the process tree), and generates the HTML for that subtree only.
Every run automatically appends a light snapshot to outputs/history.json (50 kept; --no-history to disable; sandbox runs are never recorded).
# Compare to the previous run
python3 process_analyzer_allinone.py --compare
# Compare to a specific JSON export
python3 process_analyzer_allinone.py --compare old_export.jsonThe report lists new processes, disappeared processes, risk level changes, and the largest CPU/RAM swings — useful for spotting slow-burning issues (memory leaks, creeping usage).
python3 process_analyzer_allinone.py --baselineEach run with --baseline adds a CPU/RAM sample per process name (Welford running statistics). From 3 samples on, a value more than 2 standard deviations above the mean becomes a named anomaly signal ("medium" level). Deliberately conservative: near-zero variance and sub-5% values never trigger.
python3 process_analyzer_allinone.py --check-integrityComputes the SHA256 of every executable (files > 200 MB skipped) and compares against outputs/integrity.json. Statuses: new, unchanged, modified, unreadable. A modified fingerprint is a "high" risk signal and never silently overwrites the reference — delete the database to re-baseline after a legitimate update.
python3 process_analyzer_allinone.py --cache --retry-failed 3SQLite cache keyed on SHA256(name + exe + cmdline), default TTL 7 days (--cache-ttl-days). Identical processes are served without an LLM call; cached results are flagged from_cache; failed enrichments are never cached. --retry-failed N retries transient failures (timeout, saturated Ollama) sequentially with exponential backoff.
python3 process_analyzer_allinone.py --sandbox capture.json --config config.yaml --no-enrichReplays a --json-export file instead of collecting the real system — test rule changes, whitelist/blacklist configs or rendering with zero risk, or analyze a capture taken on another machine.
# my_plugin.py
def enrich(process_info):
# process_info: dict (pid, name, exe, cmdline, cpu_percent, connections, container...)
if process_info.get("cpu_percent", 0) > 80:
return {"alert": "critical CPU usage"}
return {}python3 process_analyzer_allinone.py --plugin my_plugin.pyThe returned dict is merged into the process's enrichment (under plugin) and appears in JSON exports. Plugin errors are logged, never fatal.
python3 process_analyzer_allinone.py --csv-edges edges.csvOne line per edge (parent/child, shared file, network connection) with the labels and risk levels of both endpoints — importable into Gephi, Neo4j or a spreadsheet.
On Linux, processes running in containers (Docker, Podman, containerd, Kubernetes) are detected via /proc/<pid>/cgroup; the short container id appears in the panel and the exports.
Proc_Map_Analyzer · MIT License · Local-first: your process data never leaves your machine.
Setup
Usage
Concepts
Platforms
Help