Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Monitor Entropy Pool Use

You can check the use consumption of random numbers by running the following commands in two separate console windows:

Code Block
languagebash
titleMonitor use of random numbers with Unix
while true
do
    cat /proc/sys/kernel/random/entropy_avail
    sleep 1
done


You can consume random numbers from a script like this:

Code Block
languagebash
titleRun test for random numbers with Unix
for ((i=1; i<=100; i++)); do
   head -200 /dev/random | cksum | cut -f1 -d ' '
   sleep 0.1
done


You can consume random numbers from a similar script like this:

Code Block
languagebash
titleRun test for random numbers with Unix
# initial test
dd if=/dev/random of=/dev/null bs=1024 count=1 iflag=fullblock 

# full test (should rngtest be available)
rngtest -c 100 </dev/random

...