Changes
Page history
docs: align oscam docs with markdown rules
authored
Apr 09, 2026
by
tem_invictus
Hide whitespace changes
Inline
Side-by-side
pages/setup/command-line-options.md
View page @
929c35ea
...
...
@@ -30,11 +30,12 @@ oscam -b -c /etc/oscam -t /var/tmp/oscam -B /var/run/oscam.pid
Configure where OSCam looks for configuration files and stores temporary data.
| Option | Description | Default |
|---
-----|-------------|---------
|
|
---
| --- | ---
|
|
`-c, --config-dir <dir>`
| Configuration files directory |
`/usr/local/etc`
|
|
`-t, --temp-dir <dir>`
| Temporary files directory |
`/tmp/.oscam`
(Linux/macOS)
<br>
`OS-TMP`
(Cygwin) |
|
`-t, --temp-dir <dir>`
| Temporary files directory |
`/tmp/.oscam`
(Linux/macOS)
;
`OS-TMP`
(Cygwin) |
**Example:**
```
bash
oscam
-c
/etc/oscam
-t
/var/tmp/oscam
```
...
...
@@ -44,17 +45,19 @@ oscam -c /etc/oscam -t /var/tmp/oscam
Control how OSCam runs as a system process.
| Option | Description | Notes |
|---
-----|-------------|---
---
-
|
|
---
| --- |
---
|
|
`-b, --daemon`
| Run as background daemon | Standard mode for production |
|
`-f, --foreground`
| Run in foreground | Only on STAPI/STAPI5 systems |
|
`-B, --pidfile <file>`
| Create PID file at specified path | Useful for init scripts |
|
`-w, --wait <seconds>`
| Wait for system clock sync at startup | Default:
`60`
seconds |
**Daemon vs Foreground:**
-
Use
`-b`
(daemon) for most systems to run OSCam in the background
-
Use
`-f`
(foreground) on STAPI/STAPI5 systems or when debugging
**Example:**
```
bash
oscam
-b
-B
/var/run/oscam.pid
-w
30
```
...
...
@@ -64,18 +67,19 @@ oscam -b -B /var/run/oscam.pid -w 30
Configure how OSCam handles restart requests (requires WebIf module).
| Option | Description |
|
--------|-------------
|
|
--- | ---
|
|
`-r, --restart <level>`
| Set restart level (see table below) |
**Restart Levels:**
| Level | Behavior | Use Case |
|
-------|----------|------
---
-
|
|
--- | --- |
---
|
|
`0`
| Exit on restart request | Manual control only |
|
`1`
| WebIf restart enabled (default) | Normal operation |
|
`2`
| Restart on segfaults | Automatic recovery |
**Example:**
```
bash
oscam
-b
-r
2
# Restart automatically on crashes
```
...
...
@@ -87,12 +91,13 @@ Control OSCam's logging behavior and verbosity.
### Basic Logging Options
| Option | Description | Default |
|---
-----|-------------|---------
|
|
---
| --- | ---
|
|
`-I, --syslog-ident <ident>`
| Syslog identifier |
`oscam`
|
|
`-S, --show-sensitive`
| Show sensitive data (serials, IDs) | Disabled (filtered) |
|
`-d, --debug <level>`
| Debug level mask |
`0`
(no debug) |
**Example:**
```
bash
oscam
-I
oscam-server
-S
-d
255
```
...
...
@@ -102,7 +107,7 @@ oscam -I oscam-server -S -d 255
Debug levels use bitmask values that can be combined by adding them together.
| Value | Component | What It Logs |
|
-------|-----------|--------------
|
|
--- | --- | ---
|
|
`0`
| None | No extra debugging (default) |
|
`1`
| Errors | Detailed error messages |
|
`2`
| Cards | ATR parsing, ECM, EMM, and CW dumps |
...
...
@@ -144,7 +149,7 @@ oscam -d 65535
Optimize OSCam's performance for your specific setup.
| Option | Description | Default | Maximum |
|
--------|-------------|---------|----
---
--
|
|
--- | --- | --- |
---
|
|
`-p, --pending-ecm <num>`
| Maximum pending ECM packets |
`32`
|
`4096`
|
This setting controls the ECM queue size. Increase for high-traffic setups:
...
...
@@ -158,16 +163,18 @@ oscam -p 128 # For busy servers
Advanced options for troubleshooting and development (not recommended for production).
| Option | Description | Requirements |
|
--------|-------------|---------
---
--
|
|
--- | --- |
---
|
|
`-a, --crash-dump`
| Write
`oscam.crash`
on segfault | GDB installed, debug binary |
|
`-s, --capture-segfaults`
| Capture segmentation faults | - |
|
`-g, --gcollect <mode>`
| Garbage collector debug mode | - |
**Garbage Collector Modes:**
-
`1`
- Immediate free (detect memory issues)
-
`2`
- Check for double frees
**Example:**
```
bash
oscam
-a
-s
-g
2
# Full crash debugging
```
...
...
@@ -177,11 +184,12 @@ oscam -a -s -g 2 # Full crash debugging
Get information about OSCam without starting the server.
| Option | Description |
|
--------|-------------
|
|
--- | ---
|
|
`-h, --help`
| Display help text |
|
`-V, --build-info`
| Show build configuration and version |
**Examples:**
```
bash
# Show help
oscam
-h
...
...
@@ -193,6 +201,7 @@ oscam -V
## Complete Examples
### Production Setup
```
bash
# Reliable production configuration
oscam
-b
\
...
...
@@ -204,6 +213,7 @@ oscam -b \
```
### Development & Testing
```
bash
# Debug client issues
oscam
-c
/etc/oscam
\
...
...
@@ -212,6 +222,7 @@ oscam -c /etc/oscam \
```
### High-Performance Server
```
bash
# Optimized for many clients
oscam
-b
\
...
...
@@ -222,6 +233,7 @@ oscam -b \
```
### Troubleshooting
```
bash
# Maximum debugging
oscam
-d
65535
\
...
...
@@ -233,18 +245,21 @@ oscam -d 65535 \
## Best Practices
### For Production
-
Always use
`-b`
(daemon mode) on standard systems
-
Set
`-r 2`
for automatic recovery from crashes
-
Use
`-B`
with pidfile for proper init script integration
-
Keep debug level at
`0`
unless troubleshooting
### For Testing
-
Use meaningful syslog identifiers with
`-I`
when running multiple instances
-
Enable sensitive data logging
`-S`
only during active troubleshooting
-
Combine debug levels to focus on specific components
-
Remember to disable debug logging after troubleshooting
### For Development
-
Use crash dumps
`-a`
only with debug builds
-
Monitor memory with garbage collector
`-g`
during testing
-
Test restart behavior with
`-r`
levels before deployment
...
...
@@ -252,14 +267,17 @@ oscam -d 65535 \
## Platform-Specific Notes
**STAPI/STAPI5 Systems:**
-
Use
`-f`
(foreground) instead of
`-b`
(daemon)
-
These platforms require foreground operation
**Embedded Devices:**
-
Use lower
`-w`
values (10-20 seconds) if clock sync is fast
-
Consider smaller
`-p`
values (16-32) if memory is limited
**Multi-Instance Setups:**
-
Use unique
`-I`
identifiers for each instance
-
Specify different
`-t`
temp directories for each instance
-
Use separate
`-B`
pidfiles for process management
\ No newline at end of file
-
Use separate
`-B`
pidfiles for process management