Author: admin

Designing dashboard screen

Designing dashboard screen, need to meet these goals: 1) able to show status of VM 2) i think people usually have less than 32 VMs runnning, so the design will be optimized to show 32 VMs 3) i will reference redhat cloudforms interface


2013/11/22 0

web socket example to stream screen to html 5 player

Here is a working example using web socket to stream screen to html 5 player. The server is in java, I use websockify.py to route the websocket to java socket. html 5 player


2013/10/22 0

SwingUtilities.updateComponentTreeUI(this); will reset all custom UI

SwingUtilities.updateComponentTreeUI(this); will reset your own UI, if you call setUI() in constructor. Example: PeterCustomeTabbedPane —– extend ——> MaryCustomTabbedPane —-  extend ->   JTabbedPane (swing component) Suppose PeterCustomeTabbedPane and MaryCustomTabbedPane have their own TabbedPaneUI, once you called SwingUtilities.updateComponentTreeUI(this); , PeterCustomeTabbedPane’s UI class will be reset to MaryCustomTabbedPane’s UI class. Workaround: !!! dont call setUI in PeterCustomeTabbedPane, override the setUI() method and set whatever…
Read more


2013/10/13 0

i may know why the gdb command “x” only request one byte each time

I am playing the gdbstub in qemu, i found a bug there http://peter.kingofcoders.com/?p=859 , if i invoke the function cpu_physical_memory_rw(0xffff0, mem_buf, 50, 0) , qemu crashes. Then, i tested the gdb command “x /20bx 0xffff0” and use tcpflow to capture the gdb packet, i found out gdb send 20 command and each time request one byte only.…
Read more


2013/10/08 0

qemu 1.6.0 rc2 has bug

I found a bug in qemu, version 1.6.0 rc2. When i invoke: where addr=0xffff0 and noOfBytes=50, qemu will has segmentation fault. I called the cpu_physical_memory_rw right after the qemu is started (haven’t run yet) with gdb. The vm was in real mode, i am not sure it is crossing memory boundary problem. But i just…
Read more


2013/10/07 0

Enable core dump in mac

enable core dump in mac, you need these commands The core dump files are in /cores by default


2013/10/06 0

QMP Supported Commands

QMP Supported Commands:   This document describes all commands currently supported by QMP. Most of the time their usage is exactly the same as in the user Monitor, this means that any other document which also describe commands (the manpage, QEMU’s manual, etc) can and should be consulted. QMP has two types of commands: regular…
Read more


2013/09/22 0

JLibGDB need 333 mins to execute 10 millions single step commands to gdb

JLibGDB need 335 mins to send 10 millions single step commands to gdb and execute. Not bad.


2013/08/22 0

my vlc command to stream video to pc/iOS/android

Stream to a mp4 Stream to a FLV  Stream to a HLS


2013/08/22 2

Qemu + GDB, the single step speed is not fast

In bochs, i can invokes around 40 single step commands in my 2012 mac air. People think qemu is much faster than bochs, it is truth but not for single step. I wrote a java program and keep sending single-step command to qemu through socket (GDB protocol, the average speed is 32 commands per seconds.…
Read more


2013/08/18 0

JLibGDB

I was trying to create a new debug server in qemu, but it is failed, there are so many pieces of code are twitted with GDB, so a new debug server is unable to make it work. Now I changed my direction, because on gdb communication protocol, i extend it to fit for peter-bochs (will…
Read more


2013/08/15 0

Design concept

This is my first draft of design concept of the VM page in Titan, please give me comment PSD download here


2013/08/03 4

A little enhancement

If the openstack is down when you start titan server, it will show you the status.


2013/08/03 0

Titan design draft 2013/07/27

Going to develop this network montior/setup screen.


2013/07/28 0

Why the Cloud Wars Have Yet to be Won

The cloud computing industry is still young relative to the history of computing, but increasingly, speculators are in a rush to declare a “winner.” Of course, based on certain metrics it’s possible to identify leaders. But we certainly don’t think the game is over, and we were pleased to see that Charlie Babcock of InformationWeek agrees with…
Read more


2013/07/23 0

GDB two-breakpoints inter-communication between gdb and gdbstub of qemu

$tcpflow -c -i lo0 port 1234 tcpflow[5508]: 127.000.000.001.01234-127.000.000.001.58366: new flow 127.000.000.001.58366-127.000.000.001.01234: + 127.000.000.001.58366-127.000.000.001.01234: $qSupported:multiprocess+;xmlRegisters=i386;qRelocInsn+#b5 127.000.000.001.01234-127.000.000.001.58366: + 127.000.000.001.01234-127.000.000.001.58366: $PacketSize=1000#f1 127.000.000.001.58366-127.000.000.001.01234: + 127.000.000.001.58366-127.000.000.001.01234: $Hg0#df 127.000.000.001.01234-127.000.000.001.58366: + 127.000.000.001.01234-127.000.000.001.58366: $OK#9a 127.000.000.001.58366-127.000.000.001.01234: + 127.000.000.001.58366-127.000.000.001.01234: $?#3f 127.000.000.001.01234-127.000.000.001.58366: + 127.000.000.001.01234-127.000.000.001.58366: $T05thread:01;#07 127.000.000.001.58366-127.000.000.001.01234: + 127.000.000.001.58366-127.000.000.001.01234: $Hc-1#09 127.000.000.001.01234-127.000.000.001.58366: + 127.000.000.001.01234-127.000.000.001.58366: $OK#9a 127.000.000.001.58366-127.000.000.001.01234: + 127.000.000.001.58366-127.000.000.001.01234: $qC#b4 127.000.000.001.01234-127.000.000.001.58366: + 127.000.000.001.01234-127.000.000.001.58366: $QC1#c5 127.000.000.001.58366-127.000.000.001.01234: + 127.000.000.001.58366-127.000.000.001.01234: $qAttached#8f 127.000.000.001.01234-127.000.000.001.58366:…
Read more


2013/06/16 0

gdb – qemu : two breakpoints flowchart

This is the flowchart for qemu-gdb after i insert two breakpoints at 0x7c00 and 0x7c01, you can see everytime gdb hit a breakpoints, it will remove all breakpoints. And if the current address is the address that hit the breakpoint, when you want to “cont”, gdb will send a “s” command first.


2013/06/12 0

gdb crash, for another debug server

if you are create your own debug server,  gdb will crash, take a look: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffebfff700 (LWP 32202)] 0x000055555577632b in gdb_set_stop_cpu (env=env@entry=0x5555564f6d20) at /root/workspace/qemu-1.5.0/gdbstub.c:2510 2510 gdbserver_state->c_cpu = env; Missing separate debuginfos, use: debuginfo-install SDL-1.2.15-3.fc18.x86_64 cyrus-sasl-lib-2.1.23-37.fc18.x86_64 glib2-2.34.2-2.fc18.x86_64 glibc-2.16-28.fc18.x86_64 libX11-1.5.0-3.fc18.x86_64 libXau-1.0.6-4.fc18.x86_64 libXcursor-1.1.13-2.fc18.x86_64 libXext-1.3.1-2.fc18.x86_64 libXfixes-5.0-3.fc18.x86_64 libXrandr-1.4.0-1.fc18.x86_64 libXrender-0.9.7-2.fc18.x86_64 libpng-1.5.13-1.fc18.x86_64 libxcb-1.9-1.fc18.x86_64 nss-softokn-freebl-3.14.3-1.fc18.x86_64…
Read more


2013/06/12 0

a bug in tightvnc java library

I found a bug for the tightvnc java library, if my setup like this tightvnc (java) -> java proxy server -> java proxy server -> vnc server IT doesn’t work, after I trace the code, this could caused by this line: this.is = new DataInputStream(new BufferedInputStream(is)); In Reader.java constructor, it is called twice. You can see that if you…
Read more


2013/05/28 3

GKD Dev Plan 2013/05/25

test : PB -> C -> catch breakpoint -> C C -> catch breakpoint -> N x Si -> C restart Qemu refactor all the equals(“bochs”) code to LibGKD better to use enum for bochs/qemu enhance profiling feature for vnc recording Here is the list of gdb command: (gdb) help all   Command class: aliases…
Read more


2013/05/25 0

Able to display the qemu screen in GKD

I use Tightvnc java library to display the qemu screen in GKD. The tightvnc java library is able to display in a JFrame/JApplet, but not in a JPanel, so I modified it to make it work in a JPanel, all the code is in , take a look the function initVNCPanel()


2013/05/21 0

example launch the vnc by tightvnc java library

After a few hours hack into the tightvnc code, i can display the vnc onto a JPanel, i will replace the buggy novnc with my own vnc proxy server, so user don’t need to setup the novnc for openstack but able to remote to every instance using openstack. PeterIPasswordRetriever.java:


2013/05/20 0

tightvnc java viewer, cancel connection dialog popup

when running tightvnc java viewer, add parameter “-password=mypassword myhost:9401” change line 181 in Viewer.java, from to


2013/05/19 0

The script i use to restart the devstack

This is the script i use to restart the devstack, i am using it with ubuntu 12.10 64 bits and devstack restart_devstack.sh


2013/05/17 0

Samsung galaxy s4, charging the battery, using samsung USB cable is much faster

Samsung galaxy s4, charging the battery, using samsung USB cable is much faster than third-party usb cable, here is my test 1) samsung power adapter + samsung usb cable, charge from 10% to 30% takes 20 minutes 2) samsung power adapter + third-party 3M-long usb cable, charge from 10% to 30% takes 1 hour and 15…
Read more


2013/05/13 1

converted LibGKD to maven project

converted LibGKD to maven project, because peter-swing is now a maven project, better to convert it too


2013/05/12 0

openstack token expiry date

my colleague Thomas discovered that if we send two commands to openstack using the curl to get the same token, the expiry will keep changing to later time. This will cause the token never expire.


2013/05/07 0

peter-dwarf can support 32 bits elf only

There is a western friend told me he can’t use peter-dwarf to parse his 64 bits elf file, after i trace my code, i finally found my peter-dwarf library only support 32 bits elf. I need some time to enhance it and make it 64 bits.


2013/04/26 2

something need to care when you use devstack

I have a ubuntu 12.10 64 bits, i can easily install devstack, but there are some points still need to care about the devstack 1. Devstack installation script is to git clone the latest version from the openstack source repository, if the repository’s code contain bug, your openstack will fail. If you use devstack in…
Read more


2013/04/24 1

steps to reinstall devstack

steps to reinstall devstack 1) Remove all the openstack;s databases from mysql, glance, keystone, nova, etc… 2) Delete the install directory of devstack, default is /opt/stack 3) Remove your old devstack git clone directory, because we want to check out the latest code 4) You *don’t* need to delete /usr/local/lib/python2.7/distpackages/openstack* , but if you did…
Read more


2013/04/22 4

let’s beat vSphere using openstack

Let’s beat vSphere using openstack, first step is to learn everything from it o VMware vSphere 5 Evaluation Guide – Volume1 VMware-vSphere-Evaluation-Guide-1 o VMware vSphere 5 Evaluation Guide – Volume 2 – Advance Storage Features VMware-vSphere-Evaluation-Guide-2-Advanced-Storage o VMware vSphere 5 Evaluation Guide – Volume 3 – Advance Networking Features VMware-vSphere-Evaluation-Guide-3-Advanced-Networking o VMware vSphere 5 Evaluation…
Read more


2013/04/17 0

A very professional ppt that talk about system performance tuning

A very professional ppt that talk about system performance tuning download : scalelinuxperformance-130224171331-phpapp01


2013/04/17 0

development openstack dashboard

I and my colleague are currently develop some modules on openstack dashboard. Here is the list for you to know : when you modify a page in dashboard, which files you need to deal with, this will save you some time: download : openstack_dashboard


2013/04/12 0

openstack – restart error : Max retries exceeded with url

If you install openstack by devstack, when you reboot your server and restart the openstack by this script http://www.scalegrid.net/blog/?p=52, when you browse to the dashboard and you will see this error message “HTTPConnectionPool(host=’192.168.100.170′, port=8776): Max retries exceeded with url: /v1/b721f5b1f7cd43dd83ee573f6d4e6c74/os-quota-sets/b721f5b1f7cd43dd83ee573f6d4e6c74 (Caused by <class ‘socket.error’>: [Errno 111] Connection refused)” You should check with your endpoints server…
Read more


2013/04/09 0

Openstack architecture diagram (kvm, qemu-kvm, libvirt, nova, cinder)a

Correct me if i am wrong. Openstack components (nova, cinder, glance) controls libvirt to provide visualization and libvirt use qemu-kvm as the hypervisor. The reason openstack don’t control the qemu-kvm directly is because libvirt provides better cross VM functionality (it can adopt to xen, vmware, etc…) and it provides high-end function such pool management and…
Read more


2013/03/29 0

put python+django to apache through virtualhost

to put python+django to apache through virtualhost 1) edit /etc/httpd/conf/httpd.conf 2) edit /root/workspace/MyDjangoProject/P1/wsgi.py, change it to


2013/03/26 0

error in manage.py createsuperuser

error in manage.py createsuperuser To solve the above issues, type in


2013/03/26 0

GDB will remove all breakpoint and set it back repeatly

When you set the breakpoint by input the “b” command, the gdb will not set it immediately, it will wait until the user pressed “c” to cont execute the program. After you pressed “c”, gdb will set all the breakpoints for you. The most funny thing is : when gdb hit a breakpoint and gain…
Read more


2013/03/23 0