DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th September 2010
pickle pickle is offline
New User
 
Join Date: Sep 2010
Posts: 1
Default arp command failing

Hi everyone,

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'm calling % arp -an through the PHP functions shell_exec() and exec() - both of which are simply intended to run a shell command.

Like I said - this is periodic. I can have this error generated multiple times 1 minute, then have the same code run 5 minutes later with no problems.

I'm not sure if I should be looking at the server load for the culprit, or maybe network load?

Thanks for any & all help.

P.S: Running on a 4.7 box upgraded from 4.6.
Reply With Quote
  #2   (View Single Post)  
Old 15th September 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
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
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delayed command? wubrgamer Other BSD and UNIX/UNIX-like 9 22nd April 2009 03:15 AM
pkg-get command not found whispersGhost Solaris 2 11th June 2008 01:06 PM
GENERIC.MP kernel failing to boot AMD dual-core system < 75% of the time JMJ_coder NetBSD General 3 9th June 2008 01:54 PM
crypt command whispersGhost Solaris 3 9th June 2008 05:37 AM
vlc port failing maxrussell FreeBSD Ports and Packages 11 27th May 2008 04:38 PM


All times are GMT. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick