Forum Discussion
Crontab not working
Hi all,
Trying to set up a rotating tcpdump on F5 , I added the following entries in crontab :
0,15,30,45 * * * * pkill tcpdump 0,15,30,45 * * * * tcpdump -ni 0.0:nnnp -s0 host x.x.x.x or host y.y.y.y or host z.z.z.z -w /var/tmp/2518/2518_v4_`date +%Y%m%d%H%M%S`.pcap
I cannot manage to have it running. What am I missing?
- youssef1
Cumulonimbus
Hello,
I advise you to proceed like that (don't use pkill tcpdump 0,15,30,45 ... instead use timeout as shown below):
So first of specify when you want to trigged your tcpdump, you can use an online generator:
https://www.freeformatter.com/cron-expression-generator-quartz.html
Then use command
in order to setup how many times you want to capture (suppose 5 sec), you will obtain (crontab every 10 minutes):timeout (sec)
*/10 * * * *
tcpdump -ni 0.0:nnnp -s0 host x.x.x.x or host y.y.y.y or host z.z.z.z -w /var/tmp/2518/2518_v4_`date +%Y%m%d%H%M%S`.pcaptimeout 5
Keep me update regards
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com