Docs GitHub
-- --
Theme:
Language:
EN فا

Result Writer Settings#

💡 Tip: You can change these settings directly in the bgscan application instead of editing the TOML file manually.

Navigate to SettingsGeneral Settings tab 2 in the main menu to configure these options interactively using the TUI inspector.

Configuration file: settings/writer_settings.toml

Buffering and flush behavior of the result writer, plus where result files are stored.

Each scan stage owns one writer. Workers push results into a channel, the writer accumulates them into a batch, and each flush merge-sorts that batch into the stage’s CSV file.

Quick Reference#

SettingDefaultDescription
merge_flush_interval2000Flush interval in milliseconds
chan_sizeplatform-dependentCapacity of the worker to writer channel
batch_sizeplatform-dependentResults buffered in memory before a flush
result_directory"result"Base directory for result files

Merge Flush Interval#

merge_flush_interval = 2000

Time between periodic flushes, in milliseconds. Valid range is 100 ms to 5 minutes. A flush also happens as soon as batch_size results accumulate, and once more when the writer stops, so nothing accepted before shutdown is lost.

Shorter intervals write results to disk sooner and rewrite the file more often. Longer intervals cut disk I/O and hold more results in memory.

Channel Size#

chan_size = 1024

Capacity of the channel workers use to hand results to the writer goroutine. When the channel fills, workers block until the writer catches up. Raise it if a stage produces results in bursts faster than the merge can absorb. Valid range is 1 to 1,000,000.

Batch Size#

batch_size = 4096

Number of results held in memory before a flush is forced. It also sets the initial batch slice capacity and the size of the buffered writer used during the merge. Valid range is 1 to 1,000,000.

Result Directory#

result_directory = "result"

Base directory, relative to the bgscan binary, holding one subdirectory per result schema: result/icmp/, result/tcp/, result/http/, result/xray/, result/dns_resolver/, result/dnstt/, and result/slipstream/. Directories are created on demand.

The value must be a plain directory name, not a path.