March 24, 2017

Proxy settings in Windows 10, LAN settings

right click start -> control panel -> internet options -> connections tab -> LAN settings

March 15, 2017

R7000 serial consle

With the top facing up, and Ethernet ports facing away from you, i.e. the 4 console pins on the right bottom of the board, the pinout are:

RX, which should connects to TX of your CP2102
TX
GND
Unused

February 28, 2017

openwrt kernel config change

In OpenWRT build, to change kernel config, you need to do the following:
1. make kernel_menuconfig CONFIG_TARGET=subtarget
This updates the .config file in build_dir/Linux-xxxxx
2. copy the file .config from the above directory to "target/Linux/your-board-name/config-3.14"
3. make V=99
The make command will copy the kernel config file from target/Linux to build_dir

Reference:
https://wiki.openwrt.org/doc/howto/build

January 12, 2017

golang vim-go setup

1. start with a fresh ~/.vim directory
2. install vim-plug if don't have it:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
3. add the following to your .vimrc file
call plug#begin()
Plug 'tpope/vim-sensible'
Plug 'fatih/vim-go'
Plug 'tmhedberg/matchit'
call plug#end()

au FileType go nmap <C-K> <Plug>(go-doc)
let g:go_fmt_command = "goimports"
4. inside vim, run "PlugInstall". This installs the plugins specified above. Restart vim. All plugins should be working now.
5. For vim-go, run ":GoInstallBinaries" to install missing tools needed by vim-go
6. Now Shift-K/Ctrl-K should run go-doc for the keyword under cursor.

 Note for go-doc to work correctly, the go source code file has to be in $GOPATH/src/package-name. It cannot not be a symlink outside of GOPATH. It cannot be a raw *.go file under $GOPATH/src either. It needs to be under a package directory.

January 6, 2017

windows 10 folder sort slow in file explorer

I solved this by unchecking the "Allow Files in the folder to have contents indexed in addition to file properties" option. You do this by first getting the Properties of the folder, then on the General tab press the Advanced button in the Attributes section. Apply the changes to the folder and , subfolders and files.      

December 29, 2016

debian/ubuntu snmp has lots of "error on subcontainer ‘ia_addr’ insert (-1)" reports in /var/log/syslog

Modifying /etc/defaults/snmpd and setting "-Lsd" to "-LS6d" in SNMPDOPTS and TRAPDOPTS hides the error message (as suggested by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559109).

Or you can use  `sed -i "s|-Lsd|-LS6d|" /etc/default/snmpd`  to fix the problem.

November 30, 2016

solve kvm soft lockup

       

Update: setting to jiffies on my guest seems to be the most stable (no lockups yet in the last 24 hours)

Original Post:
I googled around and by adding clocksource=jiffies to my kernel i fixed it. Instead of jiffies you could also try "pit". This is for the guest OS. You can also use kvm-clock if that is available to you. To check, run the following commands and see whether kvm-clock is available


# cat /sys/devices/system/clocksource/clocksource0/available_clocksource 
tsc hpet acpi_pm jiffies 
# cat /sys/devices/system/clocksource/clocksource0/current_clocksource 
tsc

Some people say that the best option for a precise clock on the guest is to use the kvm-clock source (pvclock) which is synchronized with clock's host.

There are also reports of disabling C-states in the BIOS.