Category Archives: Linux

ARM64 Linux Performance Tuning

This is personal notebook for ARM64 performance tuning.

Read more »

htop more column for mass CPUs

htop can support multiple columns in one screen, just press F2 enter setup mode, and change left column and right column to CPUs (1-4/8) [Bar] and CPUs (5-8/8) [Bar]

htoprc , put it on /etc/htoprc or ~/.config/htop/htoprc

# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=1
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
show_cpu_usage=1
show_cpu_frequency=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
left_meters=LeftCPUs4 Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs4 Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2

The NVM Checksum Is Not Valid

這個是我 Intel i350-T4 最近出現的錯誤訊息,是最近 Power 壞掉之後才發生的,錯誤訊息如下

[ 775.510780] igb: Intel(R) Gigabit Ethernet Network Driver – version 5.4.0-k
[ 775.510782] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 775.526676] igb 0000:01:00.0: The NVM Checksum Is Not Valid
[ 775.602407] igb: probe of 0000:01:00.0 failed with error -5
[ 775.617632] igb 0000:01:00.1: The NVM Checksum Is Not Valid
[ 775.693405] igb: probe of 0000:01:00.1 failed with error -5
[ 775.708632] igb 0000:01:00.2: The NVM Checksum Is Not Valid
[ 775.784404] igb: probe of 0000:01:00.2 failed with error -5
[ 775.799632] igb 0000:01:00.3: The NVM Checksum Is Not Valid
[ 775.875410] igb: probe of 0000:01:00.3 failed with error -5
Read more »

自架 DNS 防成人內容

果然還是到了這一天,雖然總是有一天他們會看到,但是多多少少還是要設一道簡單的關卡
最簡單的是在路由器上設定 DNS ,畢竟誰都不喜歡在自己的手機電腦裝軟體吧

Read more »

CentOS8 ARM64/AARCH64 Install Docker

It’s not complex to install docker on ARM64 platform and make it work, but it needs a trick

Read more »

ARM64 mfpu=neon-fp-armv8 and unrecognized command line option

又學到一個小知識

原因是因為 -mfpu=neon-fp-armv8 是 arm32 compiler option ARM64 使用 Linux ABI 那邊就規範要支援 Floatpoint 和 ASIMD(也就是 neon 的 64bit 版 )

不要用 -mfpu 指令就可以了

ref.
-mfpu=neon-fp-armv8 and unrecognized command line option

QEMU Network Problem When Run With Docker

如果 Docker 和 QEMU 同時執行時,QEMU 內部透過 tap interface bridge 到 host network 的網路會出不去

這個問題的原因是 Docker 起來之後,會將 iptables 的 packet forward 預設變成 DROP

這時可以在 Docker 起來的時候將 bridge interface 加到 iptables 規則內即可,首先編輯 systemd docker service

Read more »

QEMU Run x86_64/AMD64 VM on ARM64/AARCH64

This is a work note for run x86_64/AM64 on ARM64/AARCH64 server .
Because they are different archeticture, so, run x86_64 on ARM server would be very slow.

and some functions might be different when run on different platform

Read more »

WSL (Windows Subsystem for Linux) 和 Windows App 的檔案權限問題

WSL 在一些輕量級的 Linux application 下很好用,不過如果專案稍大一點,vim 就不夠力

這時候如果用 Windows application 同時開發,如果寫入到 home 目錄的權限,檔案的 mode 會是 000
要手動改 755 才可以編輯

WSL 執行時仍然是用執行使用者的權限,雖然也可以跑在 admin mode 但是不建議

所以要讓 WSL Linux 和 Windows 同時開發,要將程式放在 /mnt/<driver> 下
讓 Windows 管理整個權限,就不會有寫到 home 目錄之後,檔案的 mode 變 000 的狀況

ref
VSCODE cannot save file launched by WSL 18.04

Debian 使用 backports 和 experimental 的方法

Debian stable 的套件都很舊, 有時候要找新一點的 binary 時, 就需要用到 backports 或是 experimental
Read more »