Skip to content

Commit 4811ab2

Browse files
Rename --pid flag to --frankenphp-pid
1 parent c09b0ec commit 4811ab2

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/caddy-configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ Ember automatically detects FrankenPHP by sending `GET /frankenphp/threads` to t
4343
If auto-detection does not work, you can specify the process ID manually:
4444

4545
```bash
46-
ember --pid 12345
46+
ember --frankenphp-pid 12345
4747
```
4848

49-
When no `--pid` is provided, Ember scans the process list for a FrankenPHP process. If none is found, it falls back to scanning for a Caddy process for CPU/RSS monitoring. When process scanning is unavailable, Ember derives CPU and RSS from the standard Go `process_*` Prometheus metrics exposed by Caddy's `/metrics` endpoint.
49+
When no `--frankenphp-pid` is provided, Ember scans the process list for a FrankenPHP process. If none is found, it falls back to scanning for a Caddy process for CPU/RSS monitoring. When process scanning is unavailable, Ember derives CPU and RSS from the standard Go `process_*` Prometheus metrics exposed by Caddy's `/metrics` endpoint.
5050

5151
## Remote Caddy Instances
5252

docs/cli-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ember [flags]
1313
| `--addr` | string | `http://localhost:2019` | Caddy admin API address |
1414
| `--interval` | duration | `1s` | Polling interval |
1515
| `--slow-threshold` | int | `500` | Slow request threshold in milliseconds. Requests above this are highlighted yellow; above 2x are red. |
16-
| `--pid` | int | `0` (auto) | FrankenPHP PID. Auto-detected if not set. |
16+
| `--frankenphp-pid` | int | `0` (auto) | FrankenPHP PID. Auto-detected if not set. |
1717
| `--json` | bool | `false` | JSON output mode (streaming JSONL). See [JSON Output](json-output.md). |
1818
| `--once` | bool | `false` | Output a single snapshot and exit. Requires `--json`. See [JSON Output](json-output.md). |
1919
| `--expose` | string | _(none)_ | Start Prometheus metrics endpoint on this address (e.g. `:9191`). See [Prometheus Export](prometheus-export.md). |
@@ -53,7 +53,7 @@ ember --slow-threshold 200
5353
ember --expose :9191 --metrics-prefix myapp
5454

5555
# Explicitly specify a FrankenPHP PID
56-
ember --pid 42
56+
ember --frankenphp-pid 42
5757
```
5858

5959
## Subcommands
@@ -90,7 +90,7 @@ ember status --addr http://prod:2019
9090
ember status --interval 2s
9191
```
9292

93-
The `--addr`, `--interval`, and `--pid` flags are available.
93+
The `--addr`, `--interval`, and `--frankenphp-pid` flags are available.
9494

9595
## Keybindings
9696

docs/frankenphp-dashboard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The FrankenPHP tab appears when Ember detects a FrankenPHP server. It provides per-thread introspection, worker management, and memory tracking.
44

5-
> **Note:** If the FrankenPHP tab does not appear, Ember could not reach the `/frankenphp/threads` admin API endpoint. Use `--pid` to specify the process manually, or verify that the admin API is accessible. See [Caddy Configuration](caddy-configuration.md).
5+
> **Note:** If the FrankenPHP tab does not appear, Ember could not reach the `/frankenphp/threads` admin API endpoint. Use `--frankenphp-pid` to specify the process manually, or verify that the admin API is accessible. See [Caddy Configuration](caddy-configuration.md).
66
77
## Dashboard Header
88

internal/app/run.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type config struct {
1919
noColor bool
2020
jsonMode bool
2121
once bool
22-
pid int
22+
frankenphpPID int
2323
expose string
2424
daemon bool
2525
metricsPrefix string
@@ -66,7 +66,7 @@ Keybindings:
6666
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
6767
defer cancel()
6868

69-
pid := int32(cfg.pid)
69+
pid := int32(cfg.frankenphpPID)
7070
if pid == 0 {
7171
detected, err := fetcher.FindFrankenPHPProcess(ctx)
7272
if err != nil {
@@ -99,7 +99,7 @@ Keybindings:
9999
pf := cmd.PersistentFlags()
100100
pf.StringVar(&cfg.addr, "addr", "http://localhost:2019", "Caddy admin API address")
101101
pf.DurationVar(&cfg.interval, "interval", 1*time.Second, "Polling interval")
102-
pf.IntVar(&cfg.pid, "pid", 0, "FrankenPHP PID (auto-detected if not set)")
102+
pf.IntVar(&cfg.frankenphpPID, "frankenphp-pid", 0, "FrankenPHP PID (auto-detected if not set)")
103103

104104
f := cmd.Flags()
105105
f.IntVar(&cfg.slowThreshold, "slow-threshold", 500, "Slow request threshold in ms")

internal/app/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Exit code 0 means Caddy is reachable, 1 means unreachable.`,
3232
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
3333
defer cancel()
3434

35-
pid := int32(cfg.pid)
35+
pid := int32(cfg.frankenphpPID)
3636
if pid == 0 {
3737
detected, err := fetcher.FindFrankenPHPProcess(ctx)
3838
if err != nil {

0 commit comments

Comments
 (0)