chandras002
Occasional Visitor
Dear all,
last few days, struggling on this... i want to run tcpdump for every 1 hours using crontab on my Asus merlin - AC88U - firmware 380.65_4. Now testing for every 1 min
so,
1) I have a script name admin.sh : /jffs/scripts/admin.sh
Make it executable and it works interactively from command line (creates .pcap file )
2) services-start on jffs/scripts - has following code
3) on Router, permission enable to run jffs scripts
What is happening? I can not see a1.pcap file on /jffs/scripts folder.
on System log, i can see the following
4) Output of cru l
why i can not see pcap file , if the script is running. ? please advise ..
>>cru a TCPdump2 "*/1 * * * * /jffs/scripts/sh admin.sh , used sh because i use admin.sh from command line (manually) the script giving ->>-sh: admin.sh: not found error.
last few days, struggling on this... i want to run tcpdump for every 1 hours using crontab on my Asus merlin - AC88U - firmware 380.65_4. Now testing for every 1 min
so,
1) I have a script name admin.sh : /jffs/scripts/admin.sh
Code:
!/bin/sh
echo This is test script running
tcpdump -w a1.pcap -i eth0 -s 65535
Make it executable and it works interactively from command line (creates .pcap file )
2) services-start on jffs/scripts - has following code
Code:
#!/bin/sh
sleep 20
/opt/etc/init.d/rc.unslung start
/usr/sbin/cru a TCPdump2 "*/1 * * * * /jffs/scripts/sh admin.sh"
# enable the following seems no effect
#cp /jffs/configs/cron /var/spool/cron/crontabs/admin
3) on Router, permission enable to run jffs scripts
What is happening? I can not see a1.pcap file on /jffs/scripts folder.
on System log, i can see the following
Code:
rond[538]: USER admin pid 1656 cmd /jffs/scripts/sh admin.sh
Apr 1 18:55:01 cron[1660]: (admin) CMD (/opt/bin/run-parts /opt/etc/cron.5mins^I)
Apr 1 18:55:01 cron[1661]: (admin) CMD (/opt/bin/run-parts /opt/etc/cron.1min^I
4) Output of cru l
Code:
admin@RT-AC88U-1D88:/jffs/scripts# cru l
*/1 * * * * /jffs/scripts/sh admin.sh #TCPdump2#
admin@RT-AC88U-1D88:/jffs/scripts#
why i can not see pcap file , if the script is running. ? please advise ..
>>cru a TCPdump2 "*/1 * * * * /jffs/scripts/sh admin.sh , used sh because i use admin.sh from command line (manually) the script giving ->>-sh: admin.sh: not found error.