[root@control ~]# qemu-ga -v -p /dev/virtio-ports/com.haoning.spice.0
1437616495.53279: debug: received EOF
1437616495.153410: debug: received EOF
1437616495.253627: debug: received EOF
1437616495.353849: debug: received EOF
1437616495.454057: debug: received EOF
1437616495.554266: debug: received EOF
1437616495.654507: debug: received EOF
1437616495.754719: debug: received EOF
1437616495.854928: debug: received EOF
1437616495.955151: debug: received EOF
1437616496.55375: debug: received EOF
1437616496.155490: debug: received EOF
^C1437616496.170249: debug: received signal num 2, quitting
[root@control ~]#
已有功能
目前qga最新版本为1.5.50,linux已经实现下面的所有功能,windows仅支持加*的那些功能:
复制代码
Ø guest-sync-delimited*:宿主机发送一个int数字给qga,qga返回这个数字,并且在后续返回字符串响应中加入ascii码为0xff的字符,其作用是检查宿主机与qga通信的同步状态,主要用在宿主机上多客户端与qga通信的情况下客户端间切换过程的状态同步检查,比如有两个客户端A、B,qga发送给A的响应,由于A已经退出,目前B连接到qga的socket,所以这个响应可能被B收到,如果B连接到socket之后,立即发送该请求给qga,响应中加入了这个同步码就能区分是A的响应还是B的响应;在qga返回宿主机客户端发送的int数字之前,qga返回的所有响应都要忽略;
Ø guest-sync*:与上面相同,只是不在响应中加入0xff字符;
Ø guest-ping*:Ping the guest agent, a non-error return implies success;
Ø guest-get-time*:获取虚拟机时间(返回值为相对于1970-01-01 in UTC,Time in nanoseconds.);
Ø guest-set-time*:设置虚拟机时间(输入为相对于1970-01-01 in UTC,Time in nanoseconds.);
Ø guest-info*:返回qga支持的所有命令;
Ø guest-shutdown*:关闭虚拟机(支持halt、powerdown、reboot,默认动作为powerdown);
Ø guest-file-open:打开虚拟机内的某个文件(返回文件句柄);
Ø guest-file-close:关闭打开的虚拟机内的文件;
Ø guest-file-read:根据文件句柄读取虚拟机内的文件内容(返回base64格式的文件内容);
Ø guest-file-write:根据文件句柄写入文件内容到虚拟机内的文件;
Ø guest-file-seek:Seek to a position in the file, as with fseek(), and return the current file position afterward. Also encapsulates ftell()'s functionality, just Set offset=0, whence=SEEK_CUR;
Ø guest-file-flush:Write file changes bufferred in userspace to disk/kernel buffers;
Ø guest-fsfreeze-status:Get guest fsfreeze state. error state indicates;
Ø guest-fsfreeze-freeze:Sync and freeze all freezable, local guest filesystems;
Ø guest-fsfreeze-thaw:Unfreeze all frozen guest filesystems;
Ø guest-fstrim:Discard (or "trim") blocks which are not in use by the filesystem;
Ø guest-suspend-disk*:Suspend guest to disk;
Ø guest-suspend-ram*:Suspend guest to ram;
Ø guest-suspend-hybrid:Save guest state to disk and suspend to ram(This command requires the pm-utils package to be installed in the guest.);
Ø guest-network-get-interfaces:Get list of guest IP addresses, MAC addresses and netmasks;
Ø guest-get-vcpus:Retrieve the list of the guest's logical processors;
guest-set-vcpus:Attempt to reconfigure (currently: enable/disable) logical processors inside the guest。
同生成的做法一样,添加和移除类成员只要去修改fields和methods中的元素即可。这里我们拿一个简单的类做例子,下面这个Task类,我们来移除isNeedRemove方法,并且添加一个int 类型的addedField属性。
package asm.core;
/**
* Created by yunshen.ljy on 2015/6/
交换两个数字的方法有以下三种 ,其中第一种最常用
/*
输出最小的一个数
*/
public class jiaohuan1 {
public static void main(String[] args) {
int a =4;
int b = 3;
if(a<b){
// 第一种交换方式
int tmep =
1. Kafka提供了两种Consumer API
High Level Consumer API
Low Level Consumer API(Kafka诡异的称之为Simple Consumer API,实际上非常复杂)
在选用哪种Consumer API时,首先要弄清楚这两种API的工作原理,能做什么不能做什么,能做的话怎么做的以及用的时候,有哪些可能的问题
CompositeChannelBuffer体现了Netty的“Transparent Zero Copy”
查看API(
http://docs.jboss.org/netty/3.2/api/org/jboss/netty/buffer/package-summary.html#package_description)
可以看到,所谓“Transparent Zero Copy”是通
// this need android:minSdkVersion="11"
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onOptionsItemSelected(MenuItem item) {
$(document).ready(function () {
var request = {
QueryString :
function (val) {
var uri = window.location.search;
var re = new RegExp("" + val + "=([^&?]*)", &
ArticleSelect类在命名空间HoverTree.Model中可以认为是文章查询条件类,用于存放查询文章时的条件,例如HvtId就是文章的id。HvtIsShow就是文章的显示属性,当为-1是,该条件不产生作用,当为0时,查询不公开显示的文章,当为1时查询公开显示的文章。HvtIsHome则为是否在首页显示。HoverTree系统源码完全开放,开发环境为Visual Studio 2013
1. php 类
I found this class looking for something else actually but I remembered I needed some while ago something similar and I never found one. I'm sure it will help a lot of developers who try to
Design pattern for graph processing.
Since we consider a large number of graph-processing algorithms, our initial design goal is to decouple our implementations from the graph representation