Brendan Gregg | e422f5e | 2016-07-01 18:38:30 -0700 | [diff] [blame] | 1 | Examples of urandomread.py, the Linux eBPF/bcc version. |
| 2 | |
| 3 | |
| 4 | To demonstrate this, the following workload was issued: |
| 5 | |
| 6 | # dd if=/dev/urandom of=/dev/null bs=1k count=5 |
| 7 | |
| 8 | While urandomread.py was tracing in another session: |
| 9 | |
| 10 | # ./urandomread.py |
| 11 | TIME(s) COMM PID GOTBITS |
| 12 | 22592556.392825000 dd 14228 8192 |
| 13 | 22592556.392949000 dd 14228 8192 |
| 14 | 22592556.393068999 dd 14228 8192 |
| 15 | 22592556.393183999 dd 14228 8192 |
| 16 | 22592556.393298000 dd 14228 8192 |
| 17 | |
| 18 | The GOTBITS of 8192 matches the workload of 1 Kbyte (8 Kbit) reads. |
| 19 | |
| 20 | This program was really written as a simple example of tracing a tracepoint. |