@@ -8,13 +8,101 @@ The Linux EDR tool can be run directly using the Python module.
88# Basic monitoring with default settings (requires root)
99sudo uv run python -m linux_edr.cli run
1010
11+ # Run in debug mode to see detailed event logs
12+ sudo uv run python -m linux_edr.cli run --debug
13+
1114# Custom 5-minute reporting interval and save reports to a file
1215sudo uv run python -m linux_edr.cli run --interval 5 --output /var/log/linux-edr-events.jsonl
1316
1417# Use a specific configuration file
1518sudo uv run python -m linux_edr.cli run --config /etc/linux_edr/my_config.ini
1619```
1720
21+ ### Standard Run Mode
22+
23+ When run in standard mode, the tool will:
24+ 1 . Enable syscall tracing for configured events (execve, fork, clone, connect by default)
25+ 2 . Initialize the scheduler with the configured interval
26+ 3 . Start monitoring in the background
27+ 4 . Display minimal output
28+
29+ Example output:
30+ ```
31+ Enabling ftrace event: /sys/kernel/tracing/events/syscalls/sys_enter_execve/enable
32+ Enabling ftrace event: /sys/kernel/tracing/events/syscalls/sys_exit_execve/enable
33+ Enabling ftrace event: /sys/kernel/tracing/events/syscalls/sys_enter_fork/enable
34+ Enabling ftrace event: /sys/kernel/tracing/events/syscalls/sys_exit_fork/enable
35+ Enabling ftrace event: /sys/kernel/tracing/events/syscalls/sys_enter_clone/enable
36+ Enabling ftrace event: /sys/kernel/tracing/events/syscalls/sys_exit_clone/enable
37+ Enabling ftrace event: /sys/kernel/tracing/events/syscalls/sys_enter_connect/enable
38+ Enabling ftrace event: /sys/kernel/tracing/events/syscalls/sys_exit_connect/enable
39+ Successfully enabled 8 syscall trace events
40+ Adding job tentatively -- it will be properly scheduled when the scheduler starts
41+ Linux EDR initialized with interval=15m
42+ Added job "LinuxEDRApp._summarize" to job store "default"
43+ Scheduler started
44+ ```
45+
46+ ### Debug Run Mode
47+
48+ In debug mode, the tool will:
49+ 1 . Provide more detailed output during initialization
50+ 2 . Show each raw event as it's captured
51+ 3 . Display more information about scheduler operations
52+
53+ This is useful for troubleshooting or understanding what data is being collected.
54+
55+ ## Configuration File
56+
57+ Linux EDR uses a ` config.ini ` file with the following sections and options:
58+
59+ ``` ini
60+ [DEFAULT]
61+ # Path to the kernel trace_pipe
62+ trace_path = /sys/kernel/tracing/trace_pipe
63+
64+ # Report generation interval in minutes
65+ report_interval = 15
66+
67+ # LLM model to use
68+ model = gpt-4o-mini
69+
70+ # Enable debug logging (true/false)
71+ debug = false
72+
73+ [OPENAI]
74+ # Your OpenAI API key (or leave empty to use environment variable)
75+ api_key =
76+
77+ [REPORTS]
78+ # Directory to store hierarchical reports
79+ reports_dir = reports
80+
81+ [ADVANCED]
82+ # Maximum number of events to store before generating an interim report
83+ max_events_buffer = 10000
84+
85+ # Maximum number of summary lines to include in LLM prompt
86+ max_summary_lines = 50
87+
88+ # Whether to include raw event data in reports (true/false)
89+ include_raw_events = true
90+
91+ # Whether to include security findings in reports (true/false)
92+ include_security_findings = true
93+
94+ # Whether to log verbose raw event data in debug mode (true/false)
95+ verbose_debug_logging = true
96+
97+ # Whether to enable syscall tracing (true/false)
98+ enable_syscall_tracing = true
99+
100+ # Comma-separated list of syscalls to trace (enter and exit events will be enabled)
101+ syscalls_to_trace = execve,fork,clone,connect
102+ ```
103+
104+ You can customize this file and specify its location using the ` --config ` parameter when running the tool.
105+
18106## Viewing Configuration
19107
20108To see the effective configuration (after loading defaults, file settings, and command-line overrides):
0 commit comments