Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
f7e40ae8
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f7e40ae8
编写于
4月 04, 2006
作者:
K
Karel Zak
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add nodeinfo, rename dinfo to dominfo, fix libvirt.h typo
上级
831f910e
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
54 addition
and
12 deletion
+54
-12
ChangeLog
ChangeLog
+7
-0
docs/FAQ.html
docs/FAQ.html
+1
-1
docs/libvir.html
docs/libvir.html
+1
-1
include/libvirt.h
include/libvirt.h
+1
-1
include/libvirt.h.in
include/libvirt.h.in
+1
-1
include/libvirt/libvirt.h
include/libvirt/libvirt.h
+1
-1
include/libvirt/libvirt.h.in
include/libvirt/libvirt.h.in
+1
-1
src/virsh.c
src/virsh.c
+41
-6
未找到文件。
ChangeLog
浏览文件 @
f7e40ae8
Tue Apr 4 12:41:53 CEST 2006 Karel Zak <kzak@redhat.com>
* src/virsh.c: add new command "nodeinfo"
* include/libvirt.h.in: fix typo (virNodeInfo.memory is in kB)
* docs/FAQ.html docs/libvir.html src/virsh.c: rename command
"dinfo" to "dominfo"
Mon Apr 3 14:46:39 EDT 2006 Daniel Veillard <veillard@redhat.com>
Mon Apr 3 14:46:39 EDT 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt.h[.in] src/driver.h src/libvirt.c
* include/libvirt.h[.in] src/driver.h src/libvirt.c
...
...
docs/FAQ.html
浏览文件 @
f7e40ae8
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<li><em>
Failure to use the API for non-root users
</em>
<li><em>
Failure to use the API for non-root users
</em>
<p>
Large parts of the API may only be accessible with root priviledges,
<p>
Large parts of the API may only be accessible with root priviledges,
however the read only access to the xenstore data doesnot have to be
however the read only access to the xenstore data doesnot have to be
forbidden to user, at least for monitoring purposes. If "virsh dinfo"
forbidden to user, at least for monitoring purposes. If "virsh d
om
info"
fails to run as an user, change the mode of the xenstore read-only socket
fails to run as an user, change the mode of the xenstore read-only socket
with:
</p>
with:
</p>
<p><code>
chmod 666 /var/run/xenstored/socket_ro
</code></p>
<p><code>
chmod 666 /var/run/xenstored/socket_ro
</code></p>
...
...
docs/libvir.html
浏览文件 @
f7e40ae8
...
@@ -567,7 +567,7 @@ containing the same field as a virError in C, but cast to Python.</p>
...
@@ -567,7 +567,7 @@ containing the same field as a virError in C, but cast to Python.</p>
<li><em>
Failure to use the API for non-root users
</em>
<li><em>
Failure to use the API for non-root users
</em>
<p>
Large parts of the API may only be accessible with root priviledges,
<p>
Large parts of the API may only be accessible with root priviledges,
however the read only access to the xenstore data doesnot have to be
however the read only access to the xenstore data doesnot have to be
forbidden to user, at least for monitoring purposes. If "virsh dinfo"
forbidden to user, at least for monitoring purposes. If "virsh d
om
info"
fails to run as an user, change the mode of the xenstore read-only socket
fails to run as an user, change the mode of the xenstore read-only socket
with:
</p>
with:
</p>
<p><code>
chmod 666 /var/run/xenstored/socket_ro
</code></p>
<p><code>
chmod 666 /var/run/xenstored/socket_ro
</code></p>
...
...
include/libvirt.h
浏览文件 @
f7e40ae8
...
@@ -158,7 +158,7 @@ typedef struct _virNodeInfo virNodeInfo;
...
@@ -158,7 +158,7 @@ typedef struct _virNodeInfo virNodeInfo;
struct
_virNodeInfo
{
struct
_virNodeInfo
{
char
model
[
32
];
/* string indicating the CPU model */
char
model
[
32
];
/* string indicating the CPU model */
unsigned
long
memory
;
/* memory size in
mega
bytes */
unsigned
long
memory
;
/* memory size in
kilo
bytes */
unsigned
int
cpus
;
/* the number of active CPUs */
unsigned
int
cpus
;
/* the number of active CPUs */
unsigned
int
mhz
;
/* expected CPU frequency */
unsigned
int
mhz
;
/* expected CPU frequency */
unsigned
int
nodes
;
/* the number of NUMA cell, 1 for uniform mem access */
unsigned
int
nodes
;
/* the number of NUMA cell, 1 for uniform mem access */
...
...
include/libvirt.h.in
浏览文件 @
f7e40ae8
...
@@ -158,7 +158,7 @@ typedef struct _virNodeInfo virNodeInfo;
...
@@ -158,7 +158,7 @@ typedef struct _virNodeInfo virNodeInfo;
struct _virNodeInfo {
struct _virNodeInfo {
char model[32]; /* string indicating the CPU model */
char model[32]; /* string indicating the CPU model */
unsigned long memory;/* memory size in
mega
bytes */
unsigned long memory;/* memory size in
kilo
bytes */
unsigned int cpus; /* the number of active CPUs */
unsigned int cpus; /* the number of active CPUs */
unsigned int mhz; /* expected CPU frequency */
unsigned int mhz; /* expected CPU frequency */
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
...
...
include/libvirt/libvirt.h
浏览文件 @
f7e40ae8
...
@@ -158,7 +158,7 @@ typedef struct _virNodeInfo virNodeInfo;
...
@@ -158,7 +158,7 @@ typedef struct _virNodeInfo virNodeInfo;
struct
_virNodeInfo
{
struct
_virNodeInfo
{
char
model
[
32
];
/* string indicating the CPU model */
char
model
[
32
];
/* string indicating the CPU model */
unsigned
long
memory
;
/* memory size in
mega
bytes */
unsigned
long
memory
;
/* memory size in
kilo
bytes */
unsigned
int
cpus
;
/* the number of active CPUs */
unsigned
int
cpus
;
/* the number of active CPUs */
unsigned
int
mhz
;
/* expected CPU frequency */
unsigned
int
mhz
;
/* expected CPU frequency */
unsigned
int
nodes
;
/* the number of NUMA cell, 1 for uniform mem access */
unsigned
int
nodes
;
/* the number of NUMA cell, 1 for uniform mem access */
...
...
include/libvirt/libvirt.h.in
浏览文件 @
f7e40ae8
...
@@ -158,7 +158,7 @@ typedef struct _virNodeInfo virNodeInfo;
...
@@ -158,7 +158,7 @@ typedef struct _virNodeInfo virNodeInfo;
struct _virNodeInfo {
struct _virNodeInfo {
char model[32]; /* string indicating the CPU model */
char model[32]; /* string indicating the CPU model */
unsigned long memory;/* memory size in
mega
bytes */
unsigned long memory;/* memory size in
kilo
bytes */
unsigned int cpus; /* the number of active CPUs */
unsigned int cpus; /* the number of active CPUs */
unsigned int mhz; /* expected CPU frequency */
unsigned int mhz; /* expected CPU frequency */
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
...
...
src/virsh.c
浏览文件 @
f7e40ae8
...
@@ -714,22 +714,22 @@ cmdDestroy(vshControl * ctl, vshCmd * cmd)
...
@@ -714,22 +714,22 @@ cmdDestroy(vshControl * ctl, vshCmd * cmd)
}
}
/*
/*
* "dinfo" command
* "d
om
info" command
*/
*/
static
vshCmdInfo
info_dinfo
[]
=
{
static
vshCmdInfo
info_d
om
info
[]
=
{
{
"syntax"
,
"dinfo <domain>"
},
{
"syntax"
,
"d
om
info <domain>"
},
{
"help"
,
"domain information"
},
{
"help"
,
"domain information"
},
{
"desc"
,
"Returns basic information about the domain."
},
{
"desc"
,
"Returns basic information about the domain."
},
{
NULL
,
NULL
}
{
NULL
,
NULL
}
};
};
static
vshCmdOptDef
opts_dinfo
[]
=
{
static
vshCmdOptDef
opts_d
om
info
[]
=
{
{
"domain"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
"domain name or id"
},
{
"domain"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
"domain name or id"
},
{
NULL
,
0
,
0
,
NULL
}
{
NULL
,
0
,
0
,
NULL
}
};
};
static
int
static
int
cmdDinfo
(
vshControl
*
ctl
,
vshCmd
*
cmd
)
cmdD
om
info
(
vshControl
*
ctl
,
vshCmd
*
cmd
)
{
{
virDomainInfo
info
;
virDomainInfo
info
;
virDomainPtr
dom
;
virDomainPtr
dom
;
...
@@ -777,6 +777,40 @@ cmdDinfo(vshControl * ctl, vshCmd * cmd)
...
@@ -777,6 +777,40 @@ cmdDinfo(vshControl * ctl, vshCmd * cmd)
return
ret
;
return
ret
;
}
}
/*
* "nodeinfo" command
*/
static
vshCmdInfo
info_nodeinfo
[]
=
{
{
"syntax"
,
"nodeinfo"
},
{
"help"
,
"node information"
},
{
"desc"
,
"Returns basic information about the node."
},
{
NULL
,
NULL
}
};
static
int
cmdNodeinfo
(
vshControl
*
ctl
,
vshCmd
*
cmd
ATTRIBUTE_UNUSED
)
{
virNodeInfo
info
;
if
(
!
vshConnectionUsability
(
ctl
,
ctl
->
conn
,
TRUE
))
return
FALSE
;
if
(
virNodeGetInfo
(
ctl
->
conn
,
&
info
)
<
0
)
{
vshError
(
ctl
,
FALSE
,
"failed to get node information"
);
return
FALSE
;
}
vshPrint
(
ctl
,
VSH_MESG
,
"%-20s %s
\n
"
,
"CPU model:"
,
info
.
model
);
vshPrint
(
ctl
,
VSH_MESG
,
"%-20s %d
\n
"
,
"CPU(s):"
,
info
.
cpus
);
vshPrint
(
ctl
,
VSH_MESG
,
"%-20s %d MHz
\n
"
,
"CPU frequency:"
,
info
.
mhz
);
vshPrint
(
ctl
,
VSH_MESG
,
"%-20s %d
\n
"
,
"CPU socket(s):"
,
info
.
sockets
);
vshPrint
(
ctl
,
VSH_MESG
,
"%-20s %d
\n
"
,
"Core(s) per socket:"
,
info
.
cores
);
vshPrint
(
ctl
,
VSH_MESG
,
"%-20s %d
\n
"
,
"Thread(s) per core:"
,
info
.
threads
);
vshPrint
(
ctl
,
VSH_MESG
,
"%-20s %d
\n
"
,
"NUMA cell(s):"
,
info
.
nodes
);
vshPrint
(
ctl
,
VSH_MESG
,
"%-20s %lu kB
\n
"
,
"Memory size:"
,
info
.
memory
);
return
TRUE
;
}
/*
/*
* "dumpxml" command
* "dumpxml" command
*/
*/
...
@@ -992,7 +1026,8 @@ cmdQuit(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
...
@@ -992,7 +1026,8 @@ cmdQuit(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
static
vshCmdDef
commands
[]
=
{
static
vshCmdDef
commands
[]
=
{
{
"connect"
,
cmdConnect
,
opts_connect
,
info_connect
},
{
"connect"
,
cmdConnect
,
opts_connect
,
info_connect
},
{
"create"
,
cmdCreate
,
opts_create
,
info_create
},
{
"create"
,
cmdCreate
,
opts_create
,
info_create
},
{
"dinfo"
,
cmdDinfo
,
opts_dinfo
,
info_dinfo
},
{
"dominfo"
,
cmdDominfo
,
opts_dominfo
,
info_dominfo
},
{
"nodeinfo"
,
cmdNodeinfo
,
NULL
,
info_nodeinfo
},
{
"dumpxml"
,
cmdDumpXML
,
opts_dumpxml
,
info_dumpxml
},
{
"dumpxml"
,
cmdDumpXML
,
opts_dumpxml
,
info_dumpxml
},
{
"dstate"
,
cmdDstate
,
opts_dstate
,
info_dstate
},
{
"dstate"
,
cmdDstate
,
opts_dstate
,
info_dstate
},
{
"suspend"
,
cmdSuspend
,
opts_suspend
,
info_suspend
},
{
"suspend"
,
cmdSuspend
,
opts_suspend
,
info_suspend
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录