Help Needed Urgently
Dear All
I am new to linux. Yesterday I craete a shell script to monitor the entry of arp cache. The script is as follows: [root@localhost opt]# cat arpmonitor.sh #!/bin/bash echo '#############################'>>/opt/monitor date >>/opt/monitor echo '#############################'>>/opt/monitor arp -n | awk '{print $1}' >> /opt/monitor When I execute this script using the command ./arpmonitor it gives the following output ############################# Wed Apr 1 10:05:02 BDT 2009 ############################# Address 172.10.4.1 172.10.4.172 172.10.4.76 172.10.4.163 I want to run this script within 5 minutes interval. So I add following lines into the crontab */5 * * * * /opt/arpmonitor.sh Then I check the output and found the following entry at output file. ############################# Wed Apr 1 10:15:01 BDT 2009 ############################# ############################# Wed Apr 1 10:20:01 BDT 2009 ############################# That means arp -n | awk '{print $1}' >> /opt/monitor this command isn't executed. Waiting for a prompt reply. Thanks in advance. |
Give the whole path to the commands
eq /usr/sbin/arp /bin/date .... |
Quote:
If you want a quick, prompt reply, hire a consultant. |
there is also arpwatch and arpalert if you want a tool that is already written..
|
Quote:
Also, please use descriptive thread titles -- something that summarizes your problem. BTW, I believe you can edit your thread title. If you'll do that here & make it descriptive of your problem, I'll read it & try to help. |
All times are GMT -5. The time now is 06:16 AM. |