SlimStat host -W 1 problem

I’ve installed statistics analyser SlimStat and run into a problem where there’s no resolution on reverse IP lookups. The PHP script uses a shell executable like this:

host -W 1 IP#

The version of the host command running on DH doesn’t recognise the -W option that sets a timeout, one second in this case. I tried running the command with just -w but don’t see a reverse lookup in my db.

Any hints much appreciated!


according to the man page for host, you would want your command to look like this:

host -s 1

using the lowercase w here " causes the program to retry forever if the response to a regular query times out. Normally it will time out after some 10 seconds per nameserver address tried." So it could be that you didn’t find the entry becuase the command never completed as expected.

–Matttail - personal website

Yes, I found the -s option as well, but SlimStat still had problems with it. I suspect the host command has different versions on different systems, generating very different output strings.

The solution for now was to force SlimStat to use the PHP gethostbyaddr( some_ip ); function.

Thanks for the reply.