Monday, January 22, 2018
Ejecting / Closing cd tray from the Keyboard Ubuntu 17.10
I was fiddling with the keyboard buttons and found the "stop" multimedia button on my dell keyboard would eject the cd tray. It's actually a dvd-rw drive but I'll always think of it as a "cd drive".
If you press stop, it will eject the tray, but pressing it again won't close the tray.
That seems horribly asymmetric.
What to do? The command "eject -t" will close your cd drive so why not add that to my keyboard settings.
So I just add a new custom shortcut in Settings/Devices/Keyboard, name it "CD Close", set the command to "eject -t" and bind it to "Shift+Eject".
Since it's a custom keystroke, you don't get the neat little graphic "eject" symbol in the On Screen Display.
Why don't they give the user the option of having a custom graphic symbol to display also? Oh well, I guess you can't have everything.
While I was fiddling, I thought, why not convert my "back" button to a screenshot command since I use that all the time:
and my suspend custom shortcut:
Thursday, January 18, 2018
Netcat weirdness - 72 byte errors
I thought I'd take a closer look at what was happening with my netcat problem.
I ran a cmp on the files to see just what was happening.
cmp -l /media/sdk1/BACKUP_2018_01_15_BY_USB /media/sdk1/BACKUP_2018_01_15_BY_NETWORK 10056230615 5 0 10056230616 152 25 10056230617 264 351 10056230618 151 57 10056230619 14 205 10056230620 357 125 10056230621 156 0 10056230622 326 32 ...
(Oh and if those "bytes" look weird, cmp outputs the bytes in octal...go figure. cmp prints the byte offset in decimal and the byte itself in octal)
and what's weird is that the error blocks are 72 bytes in length. (I think that's the length of an ethernet frame)
and even more strange is that the error blocks are always the same exact data. Above you can see the sequence 0,25,351,57 etc...
That's the same 72 byte sequence in each error block.
I loaded the output into LibreOffice Calc and graphed it:
So out of 250GB of data, there are around 432 bytes different, 6 blocks of 72 (72*6=432).
Column H and I are just =CHAR(OCT2DEC(B1)) and = CHAR(OCT2DEC(C1)) copied downward.
I actually did the copy over the network twice and got different results:
(edit: I thought it was a realtek 8169 but it's actually a Marvell Yukon)
The sending network card is a Marvell Yukon (D-Link DGE-530T) using the skge driver running under Knoppix 8.1.
Wednesday, January 17, 2018
Netcat weirdness - corruption
I thought I'd try to image a hard drive over the local network.
I boot knoppix on each system, figure out the ip address with ifconfig and then
nc -l 5000 | pv > /media/sdc1/MY_IMAGE_FILE
and on the system to be imaged:
dd if=/dev/sda | pv | nc -N 192.168.1.1 5000
I like to pipe it through pv so I can see what's happening.
I've got a 250GB hard drive so at around 20MB/sec it takes a while, 250E9 / 20e6 / 60 / 60 = 3.47 hours.
But when I check it with md5sum I get different results. Very strange. I thought that TCP connections were supposed to be error corrected.
I do an image directly to a usb drive and the md5sums match.
netstat -s
nstat
gives a lot of statistics,
I see quite a few errors, maybe the network card or switch is acting up. This is the kind of thing that drives you crazy.
I boot knoppix on each system, figure out the ip address with ifconfig and then
nc -l 5000 | pv > /media/sdc1/MY_IMAGE_FILE
and on the system to be imaged:
dd if=/dev/sda | pv | nc -N 192.168.1.1 5000
I like to pipe it through pv so I can see what's happening.
I've got a 250GB hard drive so at around 20MB/sec it takes a while, 250E9 / 20e6 / 60 / 60 = 3.47 hours.
But when I check it with md5sum I get different results. Very strange. I thought that TCP connections were supposed to be error corrected.
I do an image directly to a usb drive and the md5sums match.
netstat -s
nstat
gives a lot of statistics,
I see quite a few errors, maybe the network card or switch is acting up. This is the kind of thing that drives you crazy.
Wednesday, January 3, 2018
Year end totals
I think I've been pretty consistent:
2.5 million steps in a year, no wonder my shoes look beat up.
Not quite amish level though.
2.5 million steps in a year, no wonder my shoes look beat up.
Not quite amish level though.
Subscribe to:
Posts (Atom)