The previous version had issues with rapidly creating and disposing of StatsdPipe instances. If, say, 100 were created in the same millisecond, they would all be given the same Random seed. In this version, we use ThreadStatic storage to reduce the number of Random instances created, maintain thread safety, and allow randomness to vary much more quickly that per-millisecond.
give the same arguments as the real start-stop-daemon line (startas instead of exec), otherwise the daemon is not properly detected as started.
…ale dependent, so if the system locale is a country that uses commas for decimal places, for example, Germany, then when the sample rate is formatted, you end up with "0,1" instead of "0.1". Solution is to use Locale.ENGLISH everywhere.
Remove eval()! :)
%i isn't a valid conversion type for String formatters: http://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html