# Can packetbeat set the number of packets to be captured as tcpdump does?

**URL:** <https://discuss.elastic.co/t/can-packetbeat-set-the-number-of-packets-to-be-captured-as-tcpdump-does/98530>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [August 28, 2017, 9:44am UTC](https://discuss.elastic.co/t/can-packetbeat-set-the-number-of-packets-to-be-captured-as-tcpdump-does/98530 "2017-08-28T09:44:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moooofly](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@moooofly](https://discuss.elastic.co/u/moooofly)\
**Post date:** [August 28, 2017, 9:44am UTC](https://discuss.elastic.co/t/can-packetbeat-set-the-number-of-packets-to-be-captured-as-tcpdump-does/98530/1 "2017-08-28T09:44:49Z")

</div>

Showing help of packetbeat, I find no options for setting the number of packets to be captured as tcpdump dose, is there a possibility to support this feature?

Thanks in advance!

```auto
% ./packetbeat --version
packetbeat version 5.3.4 (amd64), libbeat 5.3.4
%
% ./packetbeat --help

Usage of ./packetbeat:
  -E value
    	Configuration overwrite (default null)
  -I string
    	Read packet data from specified file
  -N	Disable actual publishing for testing
  -O	Read packets one at a time (press Enter)
  -c value
    	Configuration file, relative to path.config (default packetbeat.yml)
  -configtest
    	Test configuration and exit.
  -cpuprofile string
    	Write cpu profile to file
  -d string
    	Enable certain debug selectors
  -devices
    	Print the list of devices and exit
  -dump string
    	Write all captured packets to this libpcap file
  -e	Log to stderr and disable syslog/file output
  -httpprof string
    	Start pprof http server
  -l int
    	Loop file. 0 - loop forever (default 1)
  -memprofile string
    	Write memory profile to this file
  -path.config value
    	Configuration path
  -path.data value
    	Data path
  -path.home value
    	Home path
  -path.logs value
    	Logs path
  -setup
    	Load the sample Kibana dashboards
  -strict.perms
    	Strict permission checking on config files (default true)
  -t	Read packets as fast as possible, without sleeping
  -v	Log at INFO level
  -version
    	Print the version and exit
  -waitstop int
    	Additional seconds to wait before shutting down

```

```auto
$tcpdump --help
tcpdump version 4.9.0
libpcap version 1.7.4
OpenSSL 1.0.2g 1 Mar 2016
Usage: tcpdump [-aAbdDefhHIJKlLnNOpqStuUvxX#] [-B size] [-c count]
		[-C file_size] [-E algo:secret] [-F file] [-G seconds]
		[-i interface] [-j tstamptype] [-M secret] [--number]
		[-Q in|out|inout]
		[-r file] [-s snaplen] [--time-stamp-precision precision]
		[--immediate-mode] [-T type] [--version] [-V file]
		[-w file] [-W filecount] [-y datalinktype] [-z postrotate-command]
		[-Z user] [expression]

```

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 28, 2017, 2:45pm UTC](https://discuss.elastic.co/t/can-packetbeat-set-the-number-of-packets-to-be-captured-as-tcpdump-does/98530/2 "2017-08-28T14:45:19Z")

</div>

No, there is no setting to limit the number of packets processed. packetbeat is not tcpdump + sending to Elasticsearch. It is actively parsing and analysing ongoing transactions on the application layer.

---

<div class="post-metadata">

**Author:** ![moooofly](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@moooofly](https://discuss.elastic.co/u/moooofly)\
**Post date:** [August 30, 2017, 6:14am UTC](https://discuss.elastic.co/t/can-packetbeat-set-the-number-of-packets-to-be-captured-as-tcpdump-does/98530/3 "2017-08-30T06:14:13Z")

</div>

thank you very much, i will work this around in another way.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 27, 2017, 6:14am UTC](https://discuss.elastic.co/t/can-packetbeat-set-the-number-of-packets-to-be-captured-as-tcpdump-does/98530/4 "2017-09-27T06:14:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
