Displaying TRNG information

SUSE Linux Enterprise Server 15 SP5 LPAR mode z/VM guest KVM guest

Read the byte_counter attribute of the TRNG device in sysfs.

About this task

The sysfs representation of a TRNG device is a directory: /sys/devices/virtual/misc/trng. This sysfs directory contains an attribute, byte_counter, with statistical data.

Procedure

Issue this command to read the byte_counter attribute:
# cat /sys/devices/virtual/misc/trng/byte_counter

Example

To see statistics of a TRNG device, issue:
# cat /sys/devices/virtual/misc/trng/byte_counter
trng: 6187
hwrng: 528
arch: 1319696
total: 1326411

Where:

trng
shows the number of bytes delivered through the /dev/trng device node.
hwrng
shows the bytes retrieved from the generic hw_rng device driver and contributed to /dev/hwrng.
arch
shows the amount of data that is supplied by the arch random implementation and delivered to the random device driver device nodes /dev/random and /dev/urandom.
total
shows the sum of all bytes.