Travel

Categories

use snmpget to get linux cpu loading, etc

CPU Statistics

Load 1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1 5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2 15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3

CPU percentage of user CPU time: .1.3.6.1.4.1.2021.11.9.0 raw user cpu time: .1.3.6.1.4.1.2021.11.50.0 percentages of system CPU time: .1.3.6.1.4.1.2021.11.10.0 raw system cpu time: .1.3.6.1.4.1.2021.11.52.0 percentages of idle CPU time: .1.3.6.1.4.1.2021.11.11.0 raw idle cpu time: .1.3.6.1.4.1.2021.11.53.0 raw nice cpu time: […]

Reduce the size of titlebar and windows border in Windows 8

Modify the below registry :

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics] “CaptionHeight”=”-285″ “CaptionFont”=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\ 00,00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 “ScrollWidth”=”-240″ “ScrollHeight”=”-240″ “PaddedBorderWidth”=”0”

Why can’t find new quick IME in Windows 8? 速成關聯字

Get the fix from http://support.microsoft.com/kb/2827860

如真有需要用到關聯字功能

速成機碼如下:

http://staff.ie.cuhk.edu.hk/~sfluk/files/quick.REG

 

倉頡機碼如下:

http://staff.ie.cuhk.edu.hk/~sfluk/files/changjei.REG

off utorrent ads

First go to ADVANCED and set the following to FALSE:

net.discoverable – to FALSE / this makes your utorrent more secure

web.ui.allow paring – set to FALSE / this makes your utorrent more secure

This following will turn off all the ads – set everything to FALSE (if it is not already set that […]

Vmware workstation Linux version cannot bridge to a vlan interface directly

The vmware workstation virtual network editor cannot bridge to a vlan interface

Follow the below procedures :

1. edit /etc/vmware/networking

2. append the line : add_bridge_mapping vlan4 3

3. vmware-networks –stop;vmware-networks –start

4. vmware-networks –status and you will get : Bridge networking on vmnet3 is running

5. select /dev/vmnet3 at your vm settings and it […]

Dovecot with MBOX, IMAP and subfolders, or “Target mailbox doesn’t allow inferior mailboxes”

The MBOX format limits your clients to creating subfolders that can either store folders, or emails, not both. When creating a folder, you differentiate between a folder for storing folders or for storing emails by adding or leaving out a forward slash at the end of the folder name: A folder name like ‘withsubfolders/’ will […]

awstats + GeoIP

1.當你安裝號Awstats後,報表會反解IP位置,當然你可以加入外掛讓Awstats顯示國家與程式還有組織的訊息

2.下載所需要的資料 wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz wget http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz

3.建立資料夾 sudo mkdir /usr/share/GeoIP

4.移檔與解壓縮

mv GeoIP.dat.gz /usr/share/GeoIP/ gunzip /usr/share/GeoIP/GeoIP.dat.gz mv GeoLiteCity.dat.gz /usr/share/GeoIP/ gunzip /usr/share/GeoIP/GeoLiteCity.dat.gz mv GeoIPASNum.dat.gz /usr/share/GeoIP/ gunzip /usr/share/GeoIP/GeoIPASNum.dat.gz 5.下載與安裝GeoIP套件 wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz tar -xvzf GeoIP.tar.gz cd GeoIP-1.4.6 ./configure make make check sudo make install *注意你在./configur,查看是否有錯誤,版主出現少一個套件名稱 configure: error: Zlib header (zlib.h) not found. Tor requires zlib […]

Load balancing & NAT-ing multiple uplinks on Linux

LAN: eth0: 192.168.0.1/24

IP1: eth1: 192.168.1.1/24, gateway: 192.168.1.2/24

IP2: eth2: 192.168.2.1/24, gateway: 192.168.2.2/24

So here is how I would do by using iptables method:

Route tables

First edit the /etc/iproute2/rt_tables to add a map between route table numbers and ISP names

… 10 IP1 20 IP2 …

So table 10 and 20 is for ISP1 […]

Measure IOPs in Unix/Linux

http://www.refmanual.com/2012/11/16/measure-unix-iops/

IOPS = (MBps Throughput / KB per IO) * 1024 Or MBps = (IOPS * KB per IO) / 1024

CentOS/RHEL 6 virtualized guest tuning

1.yum install tuned tuned-utils

2. tuned-adm profile virtual-guest

3. dd if=/dev/zero of=tmpfile bs=1M count=1000

See the tables below :

Profile explanation :

default The default power-saving profile. This is the most basic power-saving profile. It enables only the disk and CPU plug-ins. Note that this is not the same as turning tuned-adm off, where […]

WP-Highlight