16

We're investigating some JDBC issues, and one of the possible problems is /dev/random being exhausted. The workaround is to switch the JVM to using /dev/urandom, but I wan't to try and determine whether or not the /dev/random is being exhausted.

Is there a way to check if the entropy pool is being exhausted? I've gone hunting for nagios plugins and general bash commands, but I've turned up nothing.

Josh Smeaton
  • 1,380

2 Answers2

21

Sure! Ask /proc/sys/kernel/random/entropy_avail.

Shane Madden
  • 116,404
  • 13
  • 187
  • 256
2

as read someplace else... each new process get entropy from /dev/random

a simple way to avoid stealing the pool is a program, such as:

#!/usr/bin/env python

import time

while True:
    with open('/proc/sys/kernel/random/entropy_avail', 'r') as f:
        print(f.read().rstrip())
    time.sleep(1.0)
kasperd
  • 31,086