‘Uncategorized’ 分类存档

MacOS Tips



System Preferences -> Accessibility -> Mouse & Trackpad -> Trackpad Options -> Enable dragging -> three finger drag


System Preferences -> Desktop & Screen Saver -> Hot corners -> choose one corner and choose “Start Screen Saver”


  1. 在fusion的setting中启动Retina 显示,并开启自动调整
  2. 在win10中安装Vmware tools
  3. 在win10的Display中,选择高级scaling setting,打开“let windows try to fix apps ……”

How to resize LVM on Centos7/Ubuntu14.04 ?

After install Centos7, found disk size less, so I need resize the disk, you can use some tools to achieve the function, e.g: GParted or disk-genius. But if your Server disk format is LVM, you can easy to manual adjust that. I don’t know how to resize LVM by Gparted or disk-genius. For this article, will discuss how to adjust Centos7/Ubuntu14.04 by LVM. That should same action/command in Centos and Ubuntu.

If you want to check steps in Ubuntu, can check this attachment: lvm-resize-ubuntu14.04

1. Follow disk info

Check system contents by “sudo df -H”, check all disk status by “sudo fdisk -l”.

[root@frank ~]# df -H
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/myvg-root  7.4G  7.4G  4.0M 100% /
devtmpfs               2.1G     0  2.1G   0% /dev
tmpfs                  2.1G  250k  2.1G   1% /dev/shm
tmpfs                  2.1G  9.5M  2.1G   1% /run
tmpfs                  2.1G     0  2.1G   0% /sys/fs/cgroup
/dev/mapper/myvg-home  731M  140M  591M  20% /home
/dev/sda1              521M  126M  396M  25% /boot
/dev/sr0               4.2G  4.2G     0 100% /run/media/root/CentOS 7 x86_64

2. Relationship for VG, PV and LV


Auto check share memory utilization for IOX by Python


In some scenario, we need to monitor some data in router/switch by automation. This article will show example that how to check share memory utilization. And you can easy to change the script base on your requirement/scenario.


Due to “telnetlib” couldn’t exactly check expect messages by read_until() function (that couldn’t control exactly time when the info return to buffer), so I change to “expect”. And follow Bo’s example Python Expect Demo, and there is a good documents for expect demo from IBM too: 探索 Pexpect,第 2 部分:Pexpect 的实例分析



After installed Centos 6.7 for CISCO WAE, I found python version is 2.6 that is much older, and I need ansible1.9, but Centos default upgrade to ansible2.2… in order to easy management ansible1.9 that is python package, I plan to install PIP. From official website, suggest not use 2.6 under pip, so I need to upgrade python to 2.7 too.

But I found WAE use 2.6 after I succeed upgrade python to 2.7…Summarized the totally steps that will help me review in future.

Upgrade Python

After checked from follow link, python 2.7.9 integrate pip, so install this version 🙂

1. Install some package that require by python

python have multi dependencie

[root@wae ~]# yum install gcc
[root@wae ~]# yum install openssl-devel

2. Install python 2.7.9

[root@wae ~]# wget
[root@wae ~]# mv Python-2.7.9.tgz /opt/
[root@wae ~]# cd /opt/
[root@wae opt]# tar -xvf Python-2.7.9.tgz 
[root@wae opt]# cd Python-2.7.9
[root@wae Python-2.7.9]# ./configure --prefix=/usr/local/python2.7
[root@wae Python-2.7.9]# make
[root@wae Python-2.7.9]# make install


Building Citra in MacOS

Platform: MacBook Pro
Version: 10.12.3
Cpu: Core i7 2.2
Xcode: 8.2.1

1. Based on github release, install all component by brew:

2.Have alarm after cmake:

MacOS:Documents frank$ cd citra/
MacOS:citra frank$
MacOS:citra frank$
MacOS:citra frank$ export Qt5_DIR=$(brew --prefix)/opt/qt5
MacOS:citra frank$ export MACOSX_DEPLOYMENT_TARGET=10.9
MacOS:citra frank$ mkdir build
MacOS:citra frank$ cd build
MacOS:build frank$ cmake .. -GXcode
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:36 (project):
No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:36 (project):
No CMAKE_CXX_COMPILER could be found.

-- Configuring incomplete, errors occurred!
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeOutput.log".
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeError.log".


blonde teen swallows videos