Forums Register Login

tshark not giving any output

+Pie Number of slices to send: Send
I have written the following code to run tshark from java.



The output is

pcap_path = D:\sangeeta\experiment\ISCX\June-11\New Folder\testbed-11jun.pcap

file_path = D:\sangeeta\experiment\ISCX\June-11\New Folder\june-11\june-11-icmp.txt

[C:\program files\wireshark\tshark.exe, -T, fields, -n, -r, D:\sangeeta\experime
nt\ISCX\June-11\New Folder\testbed-11jun.pcap, -E, separator=,, -e, frame.number
, -e, frame.time_epoch, -e, icmp.resptime, >, D:\sangeeta\experiment\ISCX\June-1
1\New Folder\june-11\june-11-icmp.txt]


But the file icmp.txt is empty. Tshark is not writing anything to the file icmp.txt

Please help.

Your help will be highly appreciated.

Thanks.


Puglu
+Pie Number of slices to send: Send
Hi Puglu, welcome to JavaRanch!

Please use code tags on your post so to make your code readable. Thanks.
2
+Pie Number of slices to send: Send
You are trying to redirect the output to a file using

which requires that cmd.exe is used to run the process. This is just one of the traps described in "the traps" article. Although the article is aimed at Runtime.exec() the traps are applicable to the Process objects created by ProcessdBuilder. You seem to have fallen for at least 4 of the traps.
+Pie Number of slices to send: Send
Thank you for the reply. I will try to solve and get back.
+Pie Number of slices to send: Send
I solved the problem. Thank you very much Mr. Richard Tookey for the guideline.

Myyron Murray Latorilla I will use code tags from next time onwards. Thanks for the suggestion.
Do you want ants? Because that's how you get ants. And a tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1519 times.
Similar Threads
Runtime.exec() method not executing correct command?
June Newsletter Puzzle
sending mail using servlet
Why the command line utility hangs when invoked through java program?
Write a program that reads and writes from binary or text files
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:42:07.