Bear in mind that entropy is measured against a source using a model. It is unlikely you will find any model or attack against /dev/urandom
that worked purely by analysing its output - from that perspective it will have "perfect" entropy by any realistic measure. However, so would Mersenne Twister unless you knew how to build a model that extracted its state . . . in which case you could reduce that to zero entropy after 624 measurements.
In short, measuring "entropy" of any RNG with a generic model is unlikely to show you anything. If you don't take care, even very bad RNGs will pass tests such as compressibility or naive checks for patterns.
There are tools that allow you to check that a source is statistically random in various ways. I could suggest Dieharder as it provides a command-line interface which is easy to connect via a *nix pipe. This will run a variety of simulations and pattern-detection algorithms against a source of alleged random bytes.
A test against /dev/urandom
should look like this:
cat /dev/urandom | dieharder -g 200 -a
. . . and may take a few hours to complete, since the tests consume large amounts of source data.
Caveats:
Proving something is "random" is not easy. At best you get a probability of getting the same result from a theoretical truly random source. If you run hundreds of tests (like Dieharder does), then some will probably end up reporting a low $p$ value - e.g. 0.01 or less. This is not necessarily bad. RNGs that really fail Dieharder tend to do so very dramatically with $p < 0.000001$ in multiple related tests.
If you find that a source is statistically random, that does not mean it is secure, just that it has demonstrated one desirable property of a secure system.