12 2017 档案

摘要:GDB调试qemu-kvm 前面几篇博文都是记录一些kvm相关包编译安装及使用,但都没深入去代码看看。看源码在配合上相关原理才能更好的理解kvm。但qemu-kvm的代码量很多,对我来讲直接看源码收获甚少,所以找了个调试工具——GDB来配合阅读代码。接下来记录下GDB的使用。 1、qemu-kvm添 阅读全文
posted @ 2017-12-21 15:15 gaoren 阅读(3332) 评论(0) 推荐(0)
摘要:基于python调用libvirt API 1、程序代码 2、运行,结果如图1所示 图 1 3、中间过程错误说明 执行运行命令时出现如图2所示的错误 图 2 本文实验环境是利用编译安装的qemu和libvirt,没有安装libvirt-python的依赖包,所以需要python官网上下载相应的包,下 阅读全文
posted @ 2017-12-19 10:16 gaoren 阅读(7736) 评论(0) 推荐(0)
摘要:libvirt API简单小程序 1、程序代码如下 2、程序编译并运行,运行结果如图1所示 -lvirt指定程序链接时的共享库,在本文实验环境中依赖的共享库文件路径为/usr/lib/libvirt.so 图 1 将运行结果和virsh的运行的结果相比较,virsh的结果如图2所示 图 2 阅读全文
posted @ 2017-12-18 20:01 gaoren 阅读(1335) 评论(0) 推荐(0)
摘要:speedtest_cli的安装与使用 1、下载 图 1 2、授权 3、运行 图 2 阅读全文
posted @ 2017-12-18 15:20 gaoren 阅读(7236) 评论(0) 推荐(0)
摘要:qemu与libvirt编译与安装 一 、qemu编译前准备 以下链接为的本次编译环境为前提继续进行。 1、安装必要依赖包 二、下载qemu源码 1、qemu可以在官网链接中直接下载最新版本 2、从git上下载 两种方式都可以下载qemu源码。本文利用git来下载。 三、编译安装qemu 1、qem 阅读全文
posted @ 2017-12-18 13:55 gaoren 阅读(6080) 评论(0) 推荐(0)
摘要:Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M <= m * p where M and m are 阅读全文
posted @ 2017-12-16 18:36 gaoren 阅读(398) 评论(0) 推荐(0)
摘要:An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the 阅读全文
posted @ 2017-12-15 16:09 gaoren 阅读(142) 评论(0) 推荐(0)
摘要:A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find t 阅读全文
posted @ 2017-12-07 21:18 gaoren 阅读(212) 评论(0) 推荐(0)
摘要:Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social n 阅读全文
posted @ 2017-12-04 16:43 gaoren 阅读(272) 评论(0) 推荐(0)
摘要:Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and 阅读全文
posted @ 2017-12-02 10:37 gaoren 阅读(162) 评论(0) 推荐(0)
摘要:Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" first if it is negative. For exam 阅读全文
posted @ 2017-12-01 14:02 gaoren 阅读(183) 评论(0) 推荐(0)