User Tools

Site Tools


public:stuff

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
public:stuff [2022/10/10 18:36]
canvon Add Video file comparison using mpv
public:stuff [2022/10/19 00:47] (current)
canvon [Speed test] Fix breaking the following section
Line 11: Line 11:
 root@ubuntu:~# timeout --foreground -s INT 60s dd if=/dev/sda bs=4096 of=/dev/null  # ad-hoc USB3 storage speed test... root@ubuntu:~# timeout --foreground -s INT 60s dd if=/dev/sda bs=4096 of=/dev/null  # ad-hoc USB3 storage speed test...
 </code> </code>
 +
 +The idea is to not measure transfer duration of a fixed size, but to let it run through until a fixed time has passed (and then look at the transfer speed). For this, we wrap the ''dd'' invocation into the ''timeout'' command.
 +
 +The problem, then, was that ''dd'' didn't output **anything** when run under ''timeout''.
 +
 +The solution was to use //both// of ''--foreground'' and ''-s INT'' (after the timeout expires, fire signal SIGINT at the wrapped process) //together//. This restored dd's output-at-end, which will now tell the overall transfer speed, as previously expected.
  
  
public/stuff.1665419773.txt.gz · Last modified: 2022/10/10 18:36 by canvon