Skip to content
Wenliang ZHANG edited this page Dec 16, 2020 · 9 revisions

Git diff side by side

Diff side by side

Huge VM size caused by glibc

glibc_rhel_6_excessive_virtual_memory

$ sudo pmap -x <pid>

LSI MegaRAID

# rpm -i /tmp/MegaCli-8.07.06-1.noarch.rpm
# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL
# smartctl -a -d megaraid,29 /dev/sda

tee and color control

Unbuffer and tee can show log on screen and save it into file. But the file contains control chacacters. To overcome it, use a script to remove the control chacaters. Another way is to view is with `less’. The content of `nocolor’ is “sed -e ‘s/\x1B\[[0-9A-Za-z]\{1,\}\x1B\[K//g’ -e ‘s/\x1B\[K//g’ build.log”.

$ unbuffer make -j 2>&1 | tee build.log
$ nocolor build.log
Clone this wiki locally