Service Flags and Ports
FBOSS daemons are configured mostly through gflags command-line flags, which can also be set as defaults through defaultCommandLineArgs in the agent, QSFP, and FSDB configs (see Agent Configuration). This page collects the flags most often needed when running or debugging FBOSS, with their defaults from the source, and a table of every default port. Every binary prints its full flag list with --help (gflags binaries) or --helpfull.
Default Ports
| Port |
Service |
Flag (in the service) |
| 5908 |
FSDB |
--fsdbPort |
| 5909 |
Agent (fboss_sw_agent, wedge_agent) |
--port |
| 5910 |
qsfp_service |
--port |
| 5930 |
led_service |
--led_service_port |
| 5931, 5932, ... |
Hardware agent for switch index 0, 1, ... (DEFAULT_HW_CTRL_BASE_PORT = 5931) |
|
| 5957 |
FSDB high-priority (DSF) |
--fsdbPort_high_priority |
| 5958 |
FSDB planned replacement port |
--migrated_fsdbPort |
| 5959 |
Agent planned replacement port; also the SwSwitch port hardware agents connect to |
--migrated_port, --swswitch_port |
| 5960 |
qsfp_service planned replacement port |
--migrated_port |
| 5970 |
sensor_service |
--thrift_port |
| 5971 |
data_corral_service |
--thrift_port |
| 5972 |
fan_service |
--thrift_port |
| 5973 |
rackmon |
--port |
| 5975 |
platform_manager (daemon mode) |
--thrift_port |
| 6909 |
BGP daemon (as known to fboss2 and fboss-sim) |
|
The 59xx defaults collide with VNC; the migrated_* flags exist for a future move.
Agent Flags
These apply to fboss_sw_agent, wedge_agent-sai_impl, and, where relevant, fboss_hw_agent-sai_impl.
Configuration and Mode
| Flag |
Default |
Meaning |
--config |
/etc/coop/agent.conf |
Agent config file |
--multi_switch |
false |
Split mode (software agent plus hardware agents) |
--switchIndex |
0 |
Which ASIC a hardware agent serves |
--hw_agent_for_testing |
false |
Prepare a hardware agent for tests: enable the test Thrift handler and consume the config written by the software agent with overrides |
--use_raw_platform_mapping |
false |
Rebuild the platform mapping from the raw mapping and port assignments |
--platform_mapping_override_path |
empty |
Use this platform mapping JSON instead of the built-in one |
--multi_npu_platform_mapping |
false |
Use the multi-NPU platform mapping |
--platform_descriptor_config_path |
empty |
Root of platform descriptors for config-driven platform detection |
--mode |
empty |
Force the platform mode (for example wedge, minipack, wedge400) instead of detecting it from fruid.json |
--fruid_filepath |
/var/facebook/fboss/fruid.json |
FRU ID file |
Features
| Flag |
Default |
Meaning |
--tun_intf |
true |
Create TUN interfaces so other processes can send and receive through switch ports |
--enable_lldp |
true |
Run LLDP |
--enable_macsec |
false |
Enable MACsec |
--publish_boot_type |
true |
Publish the boot type at start-up |
--enable_stats_update_thread |
true |
Run the periodic stats update thread |
--counter_refresh_interval |
1 |
Counter refresh interval in seconds; 0 fetches stats from hardware |
--can_warm_boot |
true |
Enable warm boot |
--disable_neighbor_updates |
false |
Disable the agent's neighbor updater |
--publish_state_to_fsdb, --publish_stats_to_fsdb |
false |
Publish to FSDB |
--subscribe_to_state_from_fsdb, --subscribe_to_stats_from_fsdb |
false |
Subscribe from FSDB |
Thrift Server
| Flag |
Default |
Meaning |
--port |
5909 |
Agent Thrift port |
--migrated_port |
5959 |
Replacement port |
--swswitch_port |
5959 |
(hardware agent) SwSwitch port to connect to |
--thrift_idle_timeout |
60 |
Idle timeout in seconds |
--thrift_task_expire_timeout |
30 |
Task expiry in seconds ("Programming 16K routes can take 20+ seconds") |
--sw_thrift_server_stop_timeout_s |
10 |
Seconds to wait for the Thrift server to stop |
--thrift_rate_limit_shadow_mode |
true |
Rate limits only log and count |
--agent_enable_thrift_acceptor |
false |
Only accept connections from loopback and --agent_trusted_subnets |
--agent_trusted_subnets |
empty |
Comma-separated CIDRs (FBOSS control traffic is IPv6-only, for example 2001:db8::/32) |
State Directories and Dumps
| Flag |
Default |
Meaning |
--volatile_state_dir |
/dev/shm/fboss |
Volatile state, including warm boot files |
--persistent_state_dir |
/var/facebook/fboss |
Persistent state |
--volatile_state_dir_phy, --persistent_state_dir_phy |
/dev/shm/fboss/qsfp_service/phy, /var/facebook/fboss/qsfp_service/phy |
PHY state |
--crash_switch_state_file |
crash_switch_state |
File for the SwitchState dump on crash |
--crash_thrift_switch_state_file |
crash_thrift_switch_state |
Thrift SwitchState dump on crash |
--crash_hw_state_file |
crash_hw_state |
Hardware state dump on crash |
--hw_config_file |
hw_config |
Hardware config dumped at start-up |
Logging and SAI Tracing
| Flag |
Default |
Meaning |
--logging |
fboss=DBG2 (compiled-in logging config) |
folly logging config; for example --logging DBG5 |
--minloglevel |
|
glog level: 0 = INFO, 1 = WARNING, 2 = ERROR, 3 = FATAL |
--enable_replayer |
false |
Record SAI calls (SAI replayer) |
--sai_log |
/var/facebook/logs/fboss/sdk/sai_replayer.log |
SAI replayer log file |
Other Services
| Service |
Flags (default) |
qsfp_service |
--qsfp_config (/etc/coop/qsfp.conf), --loop_interval (5), --stats_publish_interval (60), --xphy_stats_loop_interval (10), --can_qsfp_service_warm_boot (true), --port_manager_mode (false). Full list on qsfp_service. |
fsdb |
--fsdb_config (/etc/coop/fsdb/current), --ssl_policy (required), --streamExpire_ms (900000). Full list on FSDB. |
platform_manager |
--run_once (true), --explore_interval_s (60), --enable_pkg_mgmnt (true), --reload_kmods (false), --local_rpm_path. |
sensor_service |
--sensor_fetch_interval (5), --fsdb_statsStream_interval_seconds (5). |
fan_service |
--control_interval (1), --subscribe_to_qsfp_data_from_fsdb (false). |
data_corral_service |
--refresh_interval_ms (10000). |
led_service |
--led_config (/etc/coop/led.conf). |
| All platform services |
--config_file (embedded default), --run_in_netos (false). Details on Platform Services. |
Changing Flags
- One-off: stop the systemd unit and run the binary by hand with the flag.
- Persistent for the agent or
qsfp_service: add the flag to defaultCommandLineArgs in the config file; values are strings.
- Persistent for a unit: add the flag to the unit's
ExecStart with a systemd drop-in, then systemctl daemon-reload and restart. The fboss-sim setup script does exactly this for fboss_sw_agent.
- At run time: the agent enables
fb303 setOption() to change flags such as log levels on the fly.
See Also