This is our old Q&A Site. Please post any new questions and answers at

Hi, I have a requirement to launch the multiple wireshark instances for multiple trace files from my application. For example, number M subscribers are monitored in number N nodes/server, it will lead to N*M wireshark windows opened. Because of these many wireshark instance memory consumption is huge.

I would like to threshold the number of wireshark instances to be opened at a time (for ex. 10 instances). So when user tries to open the 11th wireshark instance that should not be allowed. I can know the number of wireshark instance open, but how could I find that when a wireshark window is closed, my application get the notification so that it allows to open the other wireshark instance?

please help.

asked 04 Dec '12, 04:03

manojdeoli's gravatar image

accept rate: 0%

edited 04 Dec '12, 04:04

on a side note... I'd use dumpcap directly instead of Wireshark, because if your only intent is to capture you do not need Wireshark at all, and can spare a lot of memory. Dumpcap is the capture tool used by Wireshark to capture the actual data, and is installed in the same program directory.

(04 Dec '12, 04:19) Jasper ♦♦

my application get the notification so that it allows to open the other wireshark instance?

How do you start Wireshark within your application?

(04 Dec '12, 08:10) Kurt Knochner ♦

I have java application, and I am launching it with CLI command: wireshark <path of="" trace="" file="">.

(04 Dec '12, 20:13) manojdeoli

can you please post the java code? Just the lines that start the external application.

(05 Dec '12, 02:14) Kurt Knochner ♦

Here is code:

final String wiresharkLocation = "/usr/local/bin/"; final String cmd = wiresharkLocation+"wireshark /tmp/manoj/7898.pcap" ; System.out.println(" cmd for launchWireshark : " + cmd); try { Process process = Runtime.getRuntime().exec(cmd); } catch (Exception e) { e.printStackTrace(); System.out.println("Exception at Wireshark launch. " + e); }

(05 Dec '12, 04:19) manojdeoli

Process process = Runtime.getRuntime().exec(cmd);

Try calling the method exitValue() of the Process object.

HINT: This is more a Java question than a Wireshark question and you might get better answers in forum dedicated to Java programming.


permanent link

answered 05 Dec '12, 11:22

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
accept rate: 15%

edited 05 Dec '12, 12:45

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 04 Dec '12, 04:03

question was seen: 2,005 times

last updated: 05 Dec '12, 12:45

p​o​w​e​r​e​d by O​S​Q​A