[Solved] Terminate TCPDUMP in a certain time period
Hello All,
As I stated in subject, I need a command to terminate my tcpdump command in a certain time period. (using HP-UX)
I am using below one to terminate when number of captured packages reach 3 limit.
But what if there will no packet come in 5 min for instance?
Please help me to find a way.
I have a job that runs for an unspecified amount of time. I want to run this as a cron job for a specified amount of time, say 2 hours. Once the time is up, the program should be killed in the middle of execution. How can I do this?
Thanks. (5 Replies)
Hi All,
I am working on a script which requires an input from user within one 1 min.
So if the user gives the required input within 1 min., it will execute on the basis of input provided by the user.Other wise it will execute on a default value(hard coded inside the script).
Now, I am... (19 Replies)
Hi all,
now i am writting one bash script. in that my requirement is
i need to create one directory and that the directory details to be stored in one file Ex. date/time and all in one file.
after that i need to delete the folder automatically exactly after 3months.
between these time... (5 Replies)
Hey guys, I'm fairly new at unix shell scripting and I have a quick question.
Quick overview I devolped a script where I generate a file ..and I want to grep any time greater than 30 minutes.
What i do is runa command to generates the below and puts it into a file:
I run
./ggsci << endit... (4 Replies)
Hi,
Below is my OS details.
uname -an
SunOS mymachine 5.10 Generic_144488-07 sun4v sparc SUNW,SPARC-Enterprise-T5220
I need to know when was my Apache server last started. Whats is the best and most reliable way to find out not just for Apache but for any PID per say?
I am... (16 Replies)
Hi,
Can some one please tell me how do I generate a report of the Memory Consumption over a time period:
HP-UX B.11.31 U ia64 0440531406 unlimited-user license
I normally use glance to monitor memory in run time.
Note: I do not have root privileges.
Thanks
Danish
... (5 Replies)
I used this script to get the connection to a domain in two specific minutes. I need to extend to give result over a range of minutes.
The below gives total number of connections in the minutes 00:40 and 01:13 on 22nd March.
egrep "22/Mar/2013:00:40|22/Mar/2013:01:13"... (1 Reply)
All,
How to get the list of files through a unix command which exists / created / updated between 8 PM to 11:59 PM from a particular location.
Regards
Oracle User (3 Replies)
I have a shell script that checks a file state.txt, deletes fit.bin if state.txt is empty. I cron this at 2am, I will want the script to stop by 8am irrespective of the value of state.txt, any ideas?
#!/usr/bin/ksh
while true; do
if ] ; then
echo
else
rm ~/fit.bin
exit
... (8 Replies)
Discussion started by: aydj
8 Replies
LEARN ABOUT OPENSOLARIS
pcap-savefile
PCAP-SAVEFILE(5) File Formats Manual PCAP-SAVEFILE(5)NAME
pcap-savefile - libpcap savefile format
DESCRIPTION
NOTE: applications and libraries should, if possible, use libpcap to read savefiles, rather than having their own code to read savefiles.
If, in the future, a new file format is supported by libpcap, applications and libraries using libpcap to read savefiles will be able to
read the new format of savefiles, but applications and libraries using their own code to read savefiles will have to be changed to support
the new file format.
``Savefiles'' read and written by libpcap and applications using libpcap start with a per-file header. The format of the per-file header
is:
+------------------------------+
| Magic number |
+--------------+---------------+
|Major version | Minor version |
+--------------+---------------+
| Time zone offset |
+------------------------------+
| Time stamp accuracy |
+------------------------------+
| Snapshot length |
+------------------------------+
| Link-layer header type |
+------------------------------+
All fields in the per-file header are in the byte order of the host writing the file. The first field in the per-file header is a 4-byte
magic number, with the value 0xa1b2c3d4. The magic number, when read by a host with the same byte order as the host that wrote the file,
will have the value 0xa1b2c3d4, and, when read by a host with the opposite byte order as the host that wrote the file, will have the value
0xd4c3b2a1. That allows software reading the file to determine whether the byte order of the host that wrote the file is the same as the
byte order of the host on which the file is being read, and thus whether the values in the per-file and per-packet headers need to be byte-
swapped.
Following this are:
A 2-byte file format major version number; the current version number is 2.
A 2-byte file format minor version number; the current version number is 4.
A 4-byte time zone offset; this is always 0.
A 4-byte number giving the accuracy of time stamps in the file; this is always 0.
A 4-byte number giving the "snapshot length" of the capture; packets longer than the snapshot length are truncated to the snapshot
length, so that, if the snapshot length is N, only the first N bytes of a packet longer than N bytes will be saved in the capture.
a 4-byte number giving the link-layer header type for packets in the capture; see pcap-linktype(7) for the LINKTYPE_ values that can
appear in this field.
Following the per-file header are zero or more packets; each packet begins with a per-packet header, which is immediately followed by the
raw packet data. The format of the per-packet header is:
+---------------------------------------+
| Time stamp, seconds value |
+---------------------------------------+
| Time stamp, microseconds value |
+---------------------------------------+
| Length of captured packet data |
+---------------------------------------+
|Un-truncated length of the packet data |
+---------------------------------------+
All fields in the per-packet header are in the byte order of the host writing the file. The per-packet header begins with a time stamp
giving the approximate time the packet was captured; the time stamp consists of a 4-byte value, giving the time in seconds since January 1,
1970, 00:00:00 UTC, followed by a 4-byte value, giving the time in microseconds since that second. Following that are a 4-byte value giv-
ing the number of bytes of captured data that follow the per-packet header and a 4-byte value giving the number of bytes that would have
been present had the packet not been truncated by the snapshot length. The two lengths will be equal if the number of bytes of packet data
are less than or equal to the snapshot length.
SEE ALSO pcap(3PCAP), pcap-linktype(7)
21 October 2008 PCAP-SAVEFILE(5)