Oct 19, 2015
Technology1. Logsnash/Zabbix
Use Zabbix for monitoring the CloudStack Agents/Management Node?
2. OpenStack Liberty
http://docs.openstack.org/liberty/install-guide-ubuntu/
3. Newly added todoes
Added todoes issue in .zshrc:
alias vitodos='cdheroku && vim source/_posts/2015-10-19-todothings-1.markdown'
alias cattodos='cdheroku && cat source/_posts/2015-10-19-todothings-1.markdown'
4. Improve Your Efficiency
Improve Linux efficiency
5. BenchMarking
ArchLinux Tools For Benchmarking
nagios and weixin.
7. Data Visualization
Draw air pollution in Graphite?
Powermap?
8. Autossh
Auto ssh connection for some computer acrossing the internet.
9. Quickly stack.sh
I want to write some scripts for quickly setup the O..Stack env.
10. RunOrNot
It’s an app for judging run or not via fetching the data from various weather
and pm25 webiste, and generate the report.
Oct 19, 2015
TechnologyAIM
To build the testing Framework.
Reference Material
Paper_16-Performance_Evaluation_of_Private_Clouds.pdf
http://www.junauza.com/2012/05/best-system-benchmarking-tools-for.html
Software
Install following software:
# apt-get install -y libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make gcc nfs-common
postgresql-9.1 postgresql-contrib-9.1 mbw iperf
CPU
The following software are introduced for testing CPU Performance:
Linpack
Note: Only works on INTEL CPU.
Linux
Windows
Mac
Linux Steps:
$ tar xvf l_lpk_p_10.3.4.007.tgz
$ cd linpack_10.3.4/benchmarks/linpack
$ ./runme_xeon64
You can see the testing result via tail -f lin_xeon64.txt.
Note your CPU’s temperature and your system load are changing.
Lookbusy
https://www.devin.com/lookbusy/
Download and install it via:
# wget https://www.devin.com/lookbusy/download/lookbusy-1.4.tar.gz
# tar xzvf lookbusy-1.4.tar.gz
# cd lookbusy-1.4/
# ./configure --prefix=/usr
# make && make install
# lookbusy
Default will add 50% load to each CPU.
Memory
Stream
https://www.cs.virginia.edu/stream/ref.html
Get the source code from:
https://www.cs.virginia.edu/stream/FTP/Code/
Then compile it and run:
# make stream_c.exe
# ./stream_c.exe
Disk IO
Bonnie++
测试工具Bonnie++的使用
Network IO
Iperf
To be added.
OverAll
System Level Testing Framework.
UnixBench
Download the source file, then run it, and see the result.
# wget http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz
# tar xvf UnixBench5.1.3.tgz
# cd UnixBench
# make
# ./Run 2>&1 | tee RunResult.txt
LMBench
http://www.bitmover.com/lmbench/
LM Usage
Oct 15, 2015
TechnologyUSB Ethernet
Insert the USB Ethernet Dongle into the Ubuntu14.04, it will be automatically
recognized and initialized.
$ dmesg | tail
[10323.307662] asix 2-2.2:1.0 eth1: register 'asix' at usb-0000:00:1d.7-2.2, ASIX
AX88772B USB 2.0 Ethernet, 84:xx:xx:xx:xx
[10323.307704] usbcore: registered new interface driver asix
[10324.285425] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
$ ifconfig eth1
eth1 Link encap:Ethernet HWaddr 84:xx:xx:xx:
Be care to see the udev rules definition:
$ cat /etc/udev/rules.d/70-persistent-net.rules
# USB device 0x:0x (asix)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="84:xx:xx:xx:xx",
ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
IP Configuration
Add the following items into the network configuration file:
# vim /etc/network/interfaces
# usb network eth1
allow-hotplug eth1
iface eth1 inet static
address 10.0.80.1
netmask 255.255.255.0
Now restart the network, to see the ethernet has been enabled.
DHCPD Configuration
Add following configuration to the /etc/dhcp/dhcpd.conf:
### this is for USB NET
subnet
10.0.80.0 netmask 255.255.255.0 {
# --- default gateway
option routers
10.0.80.1;
# --- Netmask
option subnet-mask
255.255.255.0;
# --- Broadcast Address
option broadcast-address
10.0.80.255;
# --- Domain name servers, tells the clients which DNS servers to use.
option domain-name-servers
223.5.5.5,180.76.76.76;
option time-offset 0;
range 10.0.80.3 10.0.80.13;
default-lease-time 1209600;
max-lease-time 1814400;
}
IPtables and dhcpd
Add following items into the ~/.config/awesome/rc.lua
autorunApps =
{
--.........
"blueman-manager",
"fcitx",
"/home/dash/Downloads/what/whatpulse",
-- "pidgin",
"sudo iptables -t nat -A POSTROUTING -s 10.0.70.0/24 ! -d 10.0.70.0/24 -j MASQUERADE",
"sudo iptables -t nat -A POSTROUTING -s 10.0.80.0/24 ! -d 10.0.80.0/24 -j MASQUERADE"
"sudo dhcpd wlan0 eth1",
Now everytime we reboot the system, it will automatically start the dhcpd server and
let OpenWRT as the access Point.
Kernel IPV4 Forwarding
Check the configuration:
# sysctl -a | grep forward
Enable the forwarding manually:
# sysctl net.ipv4.ip_forward=1
added it into system startup:
# vim /etc/sysctl.d/30-ipforward.conf
net.ipv4.ip_forward=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.all.forwarding=1
Oct 14, 2015
TechnologyCloudmonkey Resize
First deploy the VM in stopped status:
(local) mycloudmonkey> deploy virtualmachine startvm=false
serviceofferingid=683f31f8-a939-468e-b4de-4512a8ccff8e
templateid=13fb2961-533e-4a7d-80f9-21d860269aad
zoneid=78509dc3-c828-429c-8154-9fffbc09384c
networkids=7c6e7e6b-6aa2-4f95-a835-8d18bf930061 name=testuserdata50G userdata='...`
Now resize the root volume into 50G size:
deploy virtualmachine serviceofferingid=ff775183-282b-48d7-b08e-eff51fef7683
templateid=67ca66ea-b021-4f91-ac8c-ff95f2576c9d
zoneid=1a258852-831c-4612-94f4-2551a98667bb name=testuserdata
userdata='Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PSI9PT09PT09PT09PT09PT0xOTk5MDU5OTcyMjA5ODg1MjY2PT0iCk1JTUUtVmVyc2lvbjogMS4wCgotLT09PT09PT09PT09PT09PTE5OTkwNTk5NzIyMDk4ODUyNjY9PQpDb250ZW50LVR5cGU6IHRleHQveC1zaGVsbHNjcmlwdDsgY2hhcnNldD0idXMtYXNjaWkiCk1JTUUtVmVyc2lvbjogMS4wCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdiaXQKQ29udGVudC1EaXNwb3NpdGlvbjogYXR0YWNobWVudDsg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