Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
AlexFerenX
New Contributor III

How to show current foreground/background active packet captures?

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

4 REPLIES 4
AlexC-FTNT
Staff
Staff

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


- Toss a 'Like' to your fixxer, oh Valley of Plenty! and chose the solution, too00oo -
AlexFerenX

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

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


- Toss a 'Like' to your fixxer, oh Valley of Plenty! and chose the solution, too00oo -
akileshc
Staff
Staff

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-capt...]

Akilesh
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors