Repository navigation
StaleScan
stale-scan.php is fully compatible with Collate:Network version 2.0 and later. It is a script that pings each static IP in the database that doesn't have the feature disabled by IP or, in version 2.2 and later, by subnet.
This script accepts two options:
-h (or --help): Outputs the help message.
-v (or --verbose): Outputs detail about the progress of the script as it executes.
This script should be setup to execute via cron on a POSIX system. If you have limited address space, run this script more often (as often as once per day if necessary) so that you find un-used IPs sooner. Typically, once per week should be often enough to make this script useful.
NOTE: You may be able to run this script on a Windows system if you modify the $command variable at the top of the script to not include the -A option but this script was not written with Windows in mind and future versions will likely not be written with Windows in mind either.
By default, each host is pinged four times and considered active if any pings are ponged. (I'm allowed to make up words, it's my documentation :-) You can change the number of times each host is pinged by modifying the $command variable at the top of the script to -c # where # is the number of times you'd like a host to be pinged.
NOTE: Most networks are full of hosts that often go more than four hours between sending/receiving traffic. Because of this, it is common to see the first or first two packets get dropped while an ARP lookup occurs. It is best not to set this value below 3.
Successful pings will be executed very quickly. By default, you can expect your time per host to be roughly four times the latency. Expect up to 5 seconds per host that does not respond. ARP requests (and the dropped packets while they complete) will add one second per dropped packet. See the manual page for the ping command for ways that you might fine-tune this script for better performance. Never use -f or -l options for ping in this script!