config capture

Prev Next

Commands used to configure the capture


show capture status

Shows the current capture status

show capture status

show capture status

Example output:

Sun Jan 15 11:21:17 2023] > show capture status
[Sun Jan 15 11:21:17 2023]
[Sun Jan 15 11:21:17 2023] Current Capture Status
[Sun Jan 15 11:21:17 2023] ------------------+--------------------
[Sun Jan 15 11:21:17 2023] Capture Running   | true
[Sun Jan 15 11:21:17 2023] Capture Name      | asdf_20230115_1041
[Sun Jan 15 11:21:17 2023] Capture Bytes     |                0
[Sun Jan 15 11:21:17 2023] Capture Packets   |                0
[Sun Jan 15 11:21:17 2023] Capture Drop      |                0
[Sun Jan 15 11:21:17 2023] Capture FCS Error |                0
[Sun Jan 15 11:21:17 2023] Capture Rate      |     0.000000 Gbps
[Sun Jan 15 11:21:17 2023]                   |     0.000000 MPps
[Sun Jan 15 11:21:17 2023] Capture Start     |
[Sun Jan 15 11:21:17 2023] Capture Duration  |
[Sun Jan 15 11:21:17 2023] ------------------+--------------------
[Sun Jan 15 11:21:17 2023] >

show capture schedule

Shows the current capture schedule

show capture schedule

Example output:

[Sun Jan 15 11:22:07 2023] > show capture schedule
[Sun Jan 15 11:22:07 2023]
[Sun Jan 15 11:22:07 2023] Scheduled Capture Status
[Sun Jan 15 11:22:07 2023]
[Sun Jan 15 11:22:07 2023]                                          |   24/7 |  Start   |   Stop   |Mon|Tue|Wed|Thu|Fri|Sat|Sun|
[Sun Jan 15 11:22:07 2023] -----------------------------------------+--------+----------+----------+---+---+---+----+--+---+---+
[Sun Jan 15 11:22:07 2023] wan_colo0                                |  false | 00:00:00 | 24:00:00 |   |   |   |   |   |   |   |
[Sun Jan 15 11:22:07 2023] -----------------------------------------+--------+----------+----------+---+---+---+----+--+---+---+
[Sun Jan 15 11:22:07 2023] >

show capture list

Displays list of all captures on the system

show capture list

Example output

[Sun Jan 15 11:23:21 2023] > show capture list
[Sun Jan 15 11:23:21 2023] Showing captures
[Sun Jan 15 11:23:21 2023] [wan_colo0_20221230_0000]          1310720 B (Wed . 18:04:08 . 28-12-2022)
[Sun Jan 15 11:23:21 2023] [wan_colo0_20221228_0000]      29613621248 B (Wed . 18:03:58 . 28-12-2022)
[Sun Jan 15 11:23:21 2023] [wan_colo0_20221227_0000]       3442999296 B (Tue . 23:59:35 . 27-12-2022)
[Sun Jan 15 11:23:21 2023] [wan_colo0_20221226_0000]      16513236992 B (Mon . 23:59:38 . 26-12-2022)
[Sun Jan 15 11:23:21 2023] [wan_colo0_20221225_0000]       1869873152 B (Sun . 23:59:42 . 25-12-2022)
[Sun Jan 15 11:23:21 2023] [wan_colo0_20221224_0000]       6031671296 B (Sat . 23:59:39 . 24-12-2022)
[Sun Jan 15 11:23:21 2023] [wan_colo0_20221223_0000]      33109311488 B (Fri . 23:59:36 . 23-12-2022)
[Sun Jan 15 11:23:21 2023] >

There is JSON support for this command when run from the bash shell

fmadiocli --json "show capture list"

Example output is

fmadio@fmadio200v4-636:~$ fmadiocli  --json "show capture list" | head
fmad fmadlua Oct 18 2024 (/opt/fmadio/bin/fmadiolua --nocal /opt/fmadio/bin/fmadiocli --json show capture list )
Disable cycle calibration
[Wed Dec 18 12:00:46 2024] CmdLine [--json]
[Wed Dec 18 12:00:46 2024] JSON [show capture list]
{"Id":                  0313,"Name":                    "asdf_20241117_1750","StreamByte":      33788002304,"StreamByteStr":    "31GB","StreamBytePct": 0.000000,"PktCnt":              0,"PktByte":            0,"TSBeginNS":          1731837115552370083,"TSBeginLocal":     "2024-11-17 17:51:55.552.370.083","TSBeginUTC":         "2024-11-17 09:51:55.552.370.083 UTC","TSEndNS":                1731837115552365461,"TSEndLocal":       "2024-11-17 17:51:55.552.365.461","TSEndUTC":           "2024-11-17 09:51:55.552.365.461 UTC","TSDurationNS":   -4622,"PktAvgBps":              -0.000000,"PktAvgPps":          -0.000000,"PctComp":            0.000,"PctInv":                  0.000,"PctCap":                 0.000,"PctCache":               0.000,"PctDisk":                0.000,"PctDrop":                0.000,"zero":              0}
{"Id":                  0315,"Name":                    "asdf_20241117_2308","StreamByte":      484704256,"StreamByteStr":      "0GB","StreamBytePct":  0.792236,"PktCnt":              6000000,"PktByte":              384000000,"TSBeginNS":          1731855973901532596,"TSBeginLocal":     "2024-11-17 23:06:13.901.532.596","TSBeginUTC":         "2024-11-17 15:06:13.901.532.596 UTC","TSEndNS":                1731855973901532596,"TSEndLocal":       "2024-11-17 23:06:13.901.532.596","TSEndUTC":           "2024-11-17 15:06:13.901.532.596 UTC","TSDurationNS":   0,"PktAvgBps":          0.000000,"PktAvgPps":           0.000000,"PctComp":     0.000,"PctInv":                  0.000,"PctCap":                 0.000,"PctCache":               0.000,"PctDisk":                0.000,"PctDrop":                0.000,"zero":              0}
{"Id":                  0316,"Name":                    "asdf_20241117_2309","StreamByte":      1106247680,"StreamByteStr":     "1GB","StreamBytePct":  0.781012,"PktCnt":              13499892,"PktByte":             863993088,"TSBeginNS":          1731855973901532596,"TSBeginLocal":     "2024-11-17 23:06:13.901.532.596","TSBeginUTC":         "2024-11-17 15:06:13.901.532.596 UTC","TSEndNS":                1731855973901532596,"TSEndLocal":       "2024-11-17 23:06:13.901.532.596","TSEndUTC":           "2024-11-17 15:06:13.901.532.596 UTC","TSDurationNS":   0,"PktAvgBps":          0.000000,"PktAvgPps":           0.000000,"PctComp":     0.000,"PctInv":                  0.000,"PctCap":                 0.000,"PctCache":               0.000,"PctDisk":                0.000,"PctDrop":                0.000,"zero":              0}
.
.


show capture roll

FW: 8367+

Shows the current capture roll setting

show capture roll

Example output

[Sun Jan 15 11:25:18 2023] > show capture roll
[Sun Jan 15 11:25:18 2023] Capture Roll Setting:
[Sun Jan 15 11:25:18 2023]    Roll every 1.00 Hour
[Sun Jan 15 11:25:18 2023] >

show capture flush

Shows the current capture flushing behaviour

show capture flush

Example output

[Sun Jan 15 11:25:55 2023] > show capture flush
[Sun Jan 15 11:25:56 2023] Capture Flush Setting:
[Sun Jan 15 11:25:56 2023]    Periodic Flush: 10 Sec
[Sun Jan 15 11:25:56 2023] >

config capture start <name>

Starts a capture  with the specified name

config capture start <name>

Example output

[Sat Jan 21 01:39:12 2023] > config capture start test-capture
[Sat Jan 21 01:39:12 2023]
[Sat Jan 21 01:39:12 2023] Starting Quick Capture [test-capture]
[Sat Jan 21 01:39:12 2023] OK: [Sat Jan 21 01:39:12 2023] successfully started capture [test-capture]
[Sat Jan 21 01:39:12 2023] >

NOTE:

  • Use config capture statusto verify the current state


config capture stop

Stops the currently active capture

NOTE: This will only stop captures manually started, for scheduled captures please disable the schedule entry to stop the capture

config capture stop

Example output

[Sat Jan 21 01:40:33 2023] > config capture stop
[Sat Jan 21 01:40:33 2023]
[Sat Jan 21 01:40:33 2023] Stopping Capture
[Sat Jan 21 01:40:33 2023] OK: [Sat Jan 21 01:40:33 2023] successfully stopped capture [test-capture]
[Sat Jan 21 01:40:33 2023] >

Note:

  • use config capture status to verify the current state


config capture flush

Sets the capture flushing behavior. There are 2 modes

  • period (this will force the flush a fixed time period / interval)

  • idle (this will flush when no packets have been received after a specified time period / interval)

Default setting is flush 1sec after capture is idle

config capture flush period <value>
config capture flush idle <value>

Example output period: flush always every 1 second

NOTE: 1sec is very aggressive mode and will consume additional storage. However it does provide low latency when watching low bandwidth captures.

[Sun Jan 15 11:27:34 2023] > config capture flush period 1
[Sun Jan 15 11:27:35 2023] Setting Flush Mode[period] Timeout 1 sec
[Sun Jan 15 11:27:35 2023]
[Sun Jan 15 11:27:35 2023] **** requires restarting of capture to take effect ****
[Sun Jan 15 11:27:35 2023]

Example output idle, flush when idle for ≥1sec

[Sun Jan 15 11:27:44 2023] > config capture flush idle 10
[Sun Jan 15 11:27:44 2023] Setting Flush Mode[idle] Timeout 10 sec
[Sun Jan 15 11:27:44 2023]
[Sun Jan 15 11:27:44 2023] **** requires restarting of capture to take effect ****
[Sun Jan 15 11:27:44 2023]
[Sun Jan 15 11:27:44 2023] >

config capture roll

Configures the capture rolling behavior

  • Default is (0) which rolls every 24 H at midnight.

Example configures capture to roll every 1 hour.

config capture roll <value>h
config capture roll <value>m

The suffix on the value is

  • h - hours

  • m - minutes

Example output

[Sun Jan 15 11:31:46 2023] > config capture roll 1h
[Sun Jan 15 11:31:47 2023] Setting Capture Roll Every 1 Hour
[Sun Jan 15 11:31:47 2023]
[Sun Jan 15 11:31:47 2023] **** requires restarting of capture to take effect ****
[Sun Jan 15 11:31:47 2023]
[Sun Jan 15 11:31:47 2023] >

config capture restart

Stops and then immediately restarts the ongoing capture (quick or scheduled).

config capture restart

Example output:

[Sat Jan 18 03:39:34 2025] > config capture restart
fmad fmadlua Jan 18 2025 (/usr/local/bin/fmadiolua /opt/fmadio/bin/scheduler.lua --check 0 1 )
calibrating...
0 : 2095078332           2.0951 cycles/nsec offset:4.922 Mhz
Cycles/Sec 2095078332.0000 Std:       0 cycle std(  0.00000000) Target:2.10 Ghz
logger: unknown priority name: nil.
Result 1737158400000000000 : GMT 20250118_000000 wday Sat : local 20250118_000000 wday Sat : false nil
done 0.158397Sec 0.002640Min
wait for respawn 0/120
wait for respawn 1/120
wait for respawn 2/120
wait for respawn 3/120
wait for respawn 4/120
wait for respawn 5/120
wait for respawn 6/120
wait for respawn 7/120
wait for respawn 8/120
wait for respawn 9/120
wait for respawn 10/120
wait for respawn 11/120
wait for respawn 12/120
wait for respawn 13/120
wait for respawn 14/120
wait for respawn 15/120
wait for respawn 16/120
wait for respawn 17/120
wait for respawn 18/120
wait for respawn 19/120
wait for respawn 20/120
wait for respawn 21/120
wait for respawn 22/120
wait for respawn 23/120
wait for respawn 24/120
wait for respawn 25/120
wait for respawn 26/120
wait for respawn 27/120
wait for respawn 28/120
wait for respawn 29/120
wait for respawn 30/120
wait for respawn 31/120
wait for respawn 32/120
wait for respawn 33/120
wait for respawn 34/120
wait for respawn 35/120
wait for respawn 36/120
wait for respawn 37/120
processes respawned
[Sat Jan 18 03:40:14 2025] Capture successfully restarted