Skip to main content
AlexFerenX
New Member
September 18, 2024
Question

How to show current foreground/background active packet captures?

  • September 18, 2024
  • 2 replies
  • 1782 views

Hi!

 

On one hand, Fortinet warns "Packet capture can be very resource intensive. To minimize the performance impact .. use packet capture only during periods of minimal traffic ... and be sure to stop the command when you are finished." But, on the other hand, (in 7.0) FortiOS allows almost indefinite execution (only limited by maximum packet count which can take indefinite time to meet.)

 

Using CLI, is it possible to show currently active packet captures on the device (ie. both - those provisioned under "firewall sniffer" or activated using "diagnose sniffer packet")?

 

Thanks, Feren

2 replies

AlexC-FTNT
Staff
Staff
September 18, 2024

Every packet capture started in GUI (Network/diagnostic/packet capture) starts a new process "httpssnifferd", so you can see them with:

diag sys process pidof httpsniffer

or

fnsysctl ps (this will give some more information about the packet filters applied)

 

But this doesn't apply for applet capture or SSH capture. I couldn't find a way to see the active capture processes in these cases. That should be within the SSH/console connection process. It may be helpful to see which admin sessions are active and disconnect them if needed: Technical Tip : List active admin session of Firewall and disconnect the session via Command Line

AlexFerenX
New Member
September 18, 2024

Hi @AlexC-FTNT 


Every packet capture started in GUI (Network/diagnostic/packet capture) starts a new process "httpssnifferd", so you can see them with:

diag sys process pidof httpsniffer

or

fnsysctl ps (this will give some more information about the packet filters applied)

I'm not seeing "httpssnifferd" or "httpsnifferd", but I am seeing "raw_snifferd". Can you clarify?

 

Thanks!

AlexC-FTNT
Staff
Staff
September 19, 2024

I have no information at all on "raw_snifferd". Probably a matter of naming in different FortiOS versions.

akileshc
Staff
Staff
September 18, 2024

Hello Feren,

 

If you're using the packet capture tool in the GUI, you can control it via the CLI using the `on-demand-sniffer` commands, which are available in FortiOS version 7.4.4 and above.

 

To list all packet captures, use the following command:
# diagnose on-demand-sniffer list

 

However, please note that there are no options to list currently active packet captures; running with a terminal program like PuTTY or the CLI console from the GUI.

 

Using the packet capture tool [https://docs.fortinet.com/document/fortigate/7.4.4/administration-guide/462154/using-the-packet-capture-tool]