View Single Post
  #2   (View Single Post)  
Old 15th September 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by pickle View Post
I'm having periodic problems with the arp command returning -1. I've been unable to determine the conditions that cause this, or even any info on what could cause arp to fail.
I can only guess that you are constantly calling arp(8). Although the documentation for shell_exec & exec "appear" to be functions which simply pass through the results of the defined command, it isn't that simple. I am not convinced by the information provided that the -1 is coming from arp(8).

My recommendation is three-fold:
  • Study the source for arp(8), & judge for yourself. The primary source file can be found at the following:

    http://www.openbsd.org/cgi-bin/cvswe...?annotate=1.49

    A cursory glance through the code did not reveal -1 ever being the output.
  • If you are still concerned about arp(8) being the culprit, create a simple shell script which repeated calls arp(8) saving the output. Determine if the same -1 errors occur here.
  • If I am correct assuming that you are calling arp(8) in a loop, add a delay. Periodic burps may indicate a race condition. Adding a delay during each loop iteration may help mask the problem.
Reply With Quote