@@ -26,10 +26,12 @@ chmod +x apache-tuner
2626
2727### Flags
2828```
29- ./apache-tuner [--analyze] [--locate] [--apply] [--json] [--no-reload] [--version ] [--budget <0.x>] [--log-file <path|none>]
29+ ./apache-tuner [--analyze] [--locate] [--apply] [--json] [--export <path>] [-- no-reload] [--mpm <type> ] [--budget <0.x>] [--log-file <path|none>] [--version ]
3030```
3131- ` --json ` : Return analysis as JSON (for monitoring/CM pipelines). Only valid with analyze mode.
32+ - ` --export ` : Write only the tuned config block to a file without editing Apache configs.
3233- ` --no-reload ` : When combined with ` --apply ` , write the config but skip the reload/restart.
34+ - ` --mpm ` : Force the assumed MPM type (` prefork ` , ` worker ` , or ` event ` ) when detection is blocked.
3335- ` --version ` : Print the current Apache Smart Tuner release.
3436- ` --budget ` : Override the tier-derived Apache RAM budget with a decimal percentage (e.g., ` 0.40 ` ).
3537- ` --log-file ` : Send tuner logs to a custom file or ` none ` to disable filesystem logging.
@@ -47,6 +49,12 @@ Produce JSON suitable for automation or dashboards:
4749./apache-tuner --json
4850```
4951
52+ Export only the recommended block for review or CM pipelines:
53+
54+ ``` bash
55+ ./apache-tuner --export /tmp/apache-smart-tuner.conf
56+ ```
57+
5058Inspect where existing MPM settings live:
5159
5260``` bash
@@ -66,7 +74,7 @@ Text analysis output includes environment detection, an error log & stability re
6674------------------------------------------------
6775 Apache Smart Tuner Analysis
6876------------------------------------------------
69- Detected MPM: prefork
77+ Detected MPM: prefork (source: binary -V)
7078Tier: LOW-MID
7179Total RAM: 8192 MB
7280CPU Cores: 4
@@ -76,7 +84,7 @@ Avg httpd proc size: 10 MB
7684------------------------------------------------
7785 Error log & stability review
7886------------------------------------------------
79- [--] Log source /var/log/apache2/error.log (last 24 hours )
87+ [--] Log source /var/log/apache2/error.log (last 15000 lines )
8088 [OK] Worker saturation No MaxRequestWorkers saturation observed
8189 [OK] ServerLimit warnings No ServerLimit notices detected
8290 [OK] Process crashes/segfaults No Process crashes/segfaults observed in sampled lines.
@@ -93,7 +101,7 @@ Avg httpd proc size: 10 MB
93101 MaxConnectionsPerChild 0 => 4000
94102------------------------------------------------
95103# BEGIN APACHE_SMART_TUNER
96- # Apache Smart Tuner v1.19.1 (Tier: LOW-MID, MPM: prefork)
104+ # Apache Smart Tuner v1.20.0 (Tier: LOW-MID, MPM: prefork)
97105Timeout 120
98106KeepAlive On
99107MaxKeepAliveRequests 100
@@ -115,9 +123,10 @@ JSON output mirrors the same data structure for pipelines:
115123
116124``` json
117125{
118- "version" : " 1.19.1 " ,
126+ "version" : " 1.20.0 " ,
119127 "mode" : " analyze" ,
120128 "mpm" : " prefork" ,
129+ "mpm_source" : " binary -V" ,
121130 "tier" : " LOW-MID" ,
122131 "total_ram_mb" : 8192 ,
123132 "cpu_cores" : 4 ,
@@ -128,10 +137,11 @@ JSON output mirrors the same data structure for pipelines:
128137 "apache_budget_pct" : 0.35 ,
129138 "apache_budget_source" : " tier" ,
130139 "log_file" : " /var/log/apache-smart-tuner.log" ,
131- "recommended_block" : " # BEGIN APACHE_SMART_TUNER\n # Apache Smart Tuner v1.19.1 (Tier: LOW-MID, MPM: prefork)\n Timeout 120\n KeepAlive On\n MaxKeepAliveRequests 100\n KeepAliveTimeout 5\n\n <IfModule prefork.c>\n ServerLimit 272\n MaxRequestWorkers 256\n StartServers 2\n MinSpareServers 2\n MaxSpareServers 8\n MaxConnectionsPerChild 4000\n </IfModule>\n # END APACHE_SMART_TUNER\n " ,
140+ "export_path" : " " ,
141+ "recommended_block" : " # BEGIN APACHE_SMART_TUNER\n # Apache Smart Tuner v1.20.0 (Tier: LOW-MID, MPM: prefork)\n Timeout 120\n KeepAlive On\n MaxKeepAliveRequests 100\n KeepAliveTimeout 5\n\n <IfModule prefork.c>\n ServerLimit 272\n MaxRequestWorkers 256\n StartServers 2\n MinSpareServers 2\n MaxSpareServers 8\n MaxConnectionsPerChild 4000\n </IfModule>\n # END APACHE_SMART_TUNER\n " ,
132142 "log_review" : {
133143 "status" : " ready" ,
134- "message" : " Analyzed last 15000 lines" ,
144+ "message" : " Analyzed the last 24 hours ( 15000 lines) " ,
135145 "error_log_path" : " /var/log/apache2/error.log" ,
136146 "sampled_lines" : 15000 ,
137147 "scoreboard_hits" : 0 ,
@@ -180,7 +190,7 @@ Apache keeps old children alive long enough to finish in-flight requests during
180190- ** Reload control:** When Apache is running, the tuner reloads automatically unless ` --no-reload ` is set; if Apache is stopped, it writes the config and logs the pending start.
181191
182192## Versioning
183- The project follows semantic versioning. The current release is ** 1.19.1 ** .
193+ The project follows semantic versioning. The current release is ** 1.20.0 ** .
184194
185195## License
186196GPL-3.0-or-later. Authored by
** Ryan MacDonald
< [email protected] > ** .
0 commit comments