I've noticed that since updating my server to Debian Squeeze the amount of entropy as reported by /proc/sys/kernel/random/entropy_avail is much lower than it was before the upgrade. I would like to know if this lower pool size is big enough to function with or if I need to look into getting more entropy sources. I think having a way to log blocking reads of /dev/random would show whether I have enough entropy or not.
You can write a library with your own implementation of
read(...)
or whatever function you use to read from/dev/random
to wrap the actual call in profiling and logging methods. Then you should use aLD_PRELOAD
env variable to insert your custom implementation ofread
before the system one.