FreeBSD (and maybe other BSDs) have different member
names in struct ifreq when compared to Linux, such as:
- uses ifr_data instead of ifr_newname for setting
interface names
- uses ifr_index instead of ifr_ifindex for interface
index
Also, add a check for SIOCGIFHWADDR for
Eric Blake wrote:
From: Roman Bogorodskiy bogorods...@gmail.com
FreeBSD (and maybe other BSDs) have different member
names in struct ifreq when compared to Linux, such as:
- uses ifr_data instead of ifr_newname for setting
interface names
- uses ifr_index instead of ifr_ifindex
When configured with '--without-gnutls', it fails again in
remote_protocol.c:
http://people.freebsd.org/~novel/misc/libvirt_remote_protocol_warns.txt
Going further and disabling remote results in another failure:
http://people.freebsd.org/~novel/misc/libvirt_node_devices_warns.txt
Roman
'long int' [-Wbad-function-cast]
Roman Bogorodskiy
pgpE5mG3seWNV.pgp
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Eric Blake wrote:
On 05/02/2013 06:38 AM, Roman Bogorodskiy wrote:
Eric Blake wrote:
These fixes solve a compilation failure on FreeBSD:
util/virnetdevtap.c: In function 'virNetDevTapGetName':
util/virnetdevtap.c:56: warning: unused parameter 'tapfd'
[-Wunused-parameter
- provide virNetDevSetMAC() implementation based on SIOCSIFLLADDR
ioctl.
- adjust virNetDevExists() to check for ENXIO error because
FreeBSD throws it when device doesn't exist
---
configure.ac | 8
src/util/virnetdev.c | 41 -
2 files
Eric Blake wrote:
On 05/02/2013 09:32 PM, Roman Bogorodskiy wrote:
Can you actually compile it successfully without '--disable-werror'?
Looks like I skipped a few files:
$ ./config.status --version | head -n3
libvirt config.status 1.0.5
configured by ./configure, generated
Eric Blake wrote:
On 05/03/2013 07:35 AM, Roman Bogorodskiy wrote:
- provide virNetDevSetMAC() implementation based on SIOCSIFLLADDR
ioctl.
- adjust virNetDevExists() to check for ENXIO error because
FreeBSD throws it when device doesn't exist
---
configure.ac | 8
-option]
and many other similar errors.
Any idea what would be a proper fix for that?
Roman Bogorodskiy
pgpVtxCFbRp6Y.pgp
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
because I don't use
it since it still fails at gcrypt.h deprecated stuff anyways (and I
haven't test a fix for that with clang I posted in other thread).
Roman Bogorodskiy
pgpWu2Cz0kUT6.pgp
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman
Eric Blake wrote:
On 05/13/2013 09:46 AM, Eric Blake wrote:
On 05/11/2013 08:27 AM, Roman Bogorodskiy wrote:
The sad part is that we aren't even using the deprecated symbols - their
mere inclusion in the installed header is provoking the problems. It
looks like newer gcc is a bit
FreeBSD ships an old gcc 4.2.1 which generates
bogus code, e.g. getsockopt() call returns
struct xucred with bogus values, which doesn't even
allow to connect to libvirtd:
error: Failed to find group record for gid '1284660778': No error: 0
So roll back to just -fstack-protector on FreeBSD.
---
This method is useful not only in virnetdev.c.
---
src/libvirt_private.syms | 1 +
src/util/virnetdev.c | 15 +--
src/util/virnetdev.h | 12
src/util/virnetdevmacvlan.c | 2 +-
src/util/virnetdevvportprofile.c | 2 +-
5 files
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls.
---
src/util/virnetdevtap.c | 109 +++-
1 file changed, 107 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
index 75599db..468d3a8 100644
---
This method is useful not only in virnetdev.c.
---
src/libvirt_private.syms | 1 +
src/util/virnetdev.c | 15 +--
src/util/virnetdev.h | 11 +++
src/util/virnetdevmacvlan.c | 2 +-
src/util/virnetdevvportprofile.c | 2 +-
5 files
Changes from the previous version:
* virNetDevSetupControl patch: remove pointless config.h include from
virnetdev.h
* virnetdevtap.c patch: rebase to include new tapfdSize param for
virNetDevTapCreate()
Roman Bogorodskiy (2):
Make virNetDevSetupControl() public.
BSD: implement
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls.
---
src/util/virnetdevtap.c | 116 +++-
1 file changed, 114 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
index bb4b3ba..a12f816 100644
---
.
Serge Hallyn is the most frequent submitter of patches from
Ubuntu in recent history, so I'd like to invite him to join.
Alternatively, Serge, feel free to suggest someone else to
represent Ubuntu's interests.
Is it worth adding any BSD representation? Roman Bogorodskiy might
Eric Blake wrote:
On 05/25/2013 09:24 AM, Roman Bogorodskiy wrote:
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls.
---
src/util/virnetdevtap.c | 116
+++-
1 file changed, 114 insertions(+), 2 deletions
This method is useful not only in virnetdev.c.
---
src/libvirt_private.syms | 1 +
src/util/virnetdev.c | 15 +--
src/util/virnetdev.h | 15 ++-
3 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls.
---
src/util/virnetdevtap.c | 118 +++-
1 file changed, 116 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
index bb4b3ba..265676c 100644
---
Changes from v2:
* changed error message in virNetDevSetupControl() as per
Dan's suggestion
* avoid compile time signature change for virNetDevSetupControl()
* fixed memleak in virNetDevTapCreate()
Roman Bogorodskiy (2):
Make virNetDevSetupControl() public.
BSD: implement
Roman Bogorodskiy wrote:
Changes from v2:
* changed error message in virNetDevSetupControl() as per
Dan's suggestion
* avoid compile time signature change for virNetDevSetupControl()
* fixed memleak in virNetDevTapCreate()
I forgot to mention I dropped net/if.h usage part.
Eric
---
src/util/virnetdevmacvlan.c | 2 +-
src/util/virnetdevvportprofile.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index 6c338fa..a61c45f 100644
--- a/src/util/virnetdevmacvlan.c
+++
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls.
---
src/util/virnetdevtap.c | 118 +++-
1 file changed, 116 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
index bb4b3ba..265676c 100644
---
This method is useful not only in virnetdev.c.
---
src/libvirt_private.syms | 1 +
src/util/virnetdev.c | 15 +--
src/util/virnetdev.h | 14 +-
3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
Changes from v3:
* Include linux/if.h header fix so it won't lost why Eric is on vacation
* Fix struct virIfreq definition in case when HAVE_STRUCT_IFREQ is not
defined (thanks to Laine Stump for noticing that)
Roman Bogorodskiy (3):
Make virNetDevSetupControl() public.
BSD: implement
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls.
Also, drop static virNetDevSetupControl() as we have
public one avialable now.
---
src/util/virnetdevbridge.c | 91 --
1 file changed, 48 insertions(+), 43 deletions(-)
diff --git
---
configure.ac | 11
src/util/virnetdevbridge.c | 134 -
2 files changed, 143 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 59a3d6d..ef246a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2399,6
Jiri Denemark wrote:
On Wed, Jun 19, 2013 at 20:47:30 +0400, Roman Bogorodskiy wrote:
Implementation uses SIOCIFCREATE2 and SIOCIFDESTROY ioctls.
Also, drop static virNetDevSetupControl() as we have
public one avialable now.
---
src/util/virnetdevbridge.c | 91
Provide an implementation of virNetDev(Set|Clear)IPv4Address based on
BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
---
configure.ac | 15 +++
src/util/virnetdev.c | 16
2 files changed, 31 insertions(+)
diff --git a/configure.ac
virNetDevBridgeSetSTPDelay accepts delay in milliseconds,
but BSD implementation was expecting seconds. Therefore,
it was working correctly only with delay == 0.
---
src/util/virnetdevbridge.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevbridge.c
Daniel P. Berrange wrote:
On Sat, Jun 22, 2013 at 06:01:17PM +0400, Roman Bogorodskiy wrote:
virNetDevBridgeSetSTPDelay accepts delay in milliseconds,
but BSD implementation was expecting seconds. Therefore,
it was working correctly only with delay == 0.
---
src/util
Provide an implementation of virNetDev(Set|Clear)IPv4Address based on
BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
---
configure.ac | 15 +++
src/util/virnetdev.c | 26 ++
2 files changed, 41 insertions(+)
diff --git
they should be
virNetDevIPAddress(Add|Del) ) (That's a separate issue, though).
Thanks for suggestion, I have added a check.
BTW, doc string for virNetDevSetIPv4Address() references brDelInetAddress()
which
doesn't exist (I guess it's a leftover after rename as well).
Roman Bogorodskiy
might notice I didn't move some ports of the
platform specific code. E.g. I left networkEnableIpForwarding
in bridge_driver.c because it feels like the implementation for
e.g. all BSDs would be the same (while firewalling stuff would
be different on BSDs) to avoid code copy/paste.
Roman
In order to properly detect bridge related definitions such as
BRDGSFD, BRDGADD and BRDGDEL on kFreeBSD we need to include
stdint.h.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715321
Reported by Laurent Bigonville.
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
This is another cleanup before extracting platform-specific
parts from bridge_driver.
Rename struct network_driver to _virNetworkDriverState and
add appropriate typedefs: virNetworkDriverState and
virNetworkDriverStatePtr.
This will help us to avoid potential problems when moving
this struct to
this split patch.
Roman Bogorodskiy
pgpX8NgSL1dRp.pgp
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Continue preparation for extracting platform-specific
parts from bridge_driver: s/Iptables/Firewall/ for
firewall related function names.
---
src/network/bridge_driver.c | 70 ++---
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git
Commit 834c9c94 introduced virDBusMessageEncode and
virDBusMessageDecode functions, however corresponding stubs
were not added to !WITH_DBUS section, therefore 'make check'
started to fail when compiled w/out dbus support like that:
Expected symbol virDBusMessageDecode is not in ELF library
---
virCgroupAvailable() implementation calls getmntent_r
without checking if HAVE_GETMNTENT_R is defined, so it fails
to build on platforms without getmntent_r support.
Make virCgroupAvailable() just return false without
HAVE_GETMNTENT_R.
---
src/util/vircgroup.c | 4 +++-
1 file changed, 3
link_addr detection in configure always reports that
link_addr is missing because it uses link_addr(NULL, NULL) in
AC_LINK_IFELSE check with limited set of headers that doesn't
define NULL.
Fix by replacing 'NULL' with just '0'.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1
Martin Kletzander wrote:
On 07/24/2013 03:02 PM, Roman Bogorodskiy wrote:
link_addr detection in configure always reports that
link_addr is missing because it uses link_addr(NULL, NULL) in
AC_LINK_IFELSE check with limited set of headers that doesn't
s/doesn't/don't/
doesn't
provide config.log?
Roman Bogorodskiy
pgpPNzNsqqMxP.pgp
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/usr/home/jgh/workspace/ports/devel/libvirt/work/libvirt-1.1.1'
gmake: *** [all] Error 2
Are you testing rc1? If so, please try rc2.
Roman Bogorodskiy
pgp2_kPV6WNjV.pgp
Description: PGP signature
--
libvir-list mailing list
libvir-list
Following the suggestion and re-compiling with -fPIC doesn't help.
Anybody has an idea how to fix that?
Roman Bogorodskiy
pgpINZh8uBTQH.pgp
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Daniel P. Berrange wrote:
On Mon, Jul 29, 2013 at 10:30:15AM +0400, Roman Bogorodskiy wrote:
Hi,
Linking fails on FreeBSD:
CCLD libvirt.la
/usr/bin/ld: ./.libs/libvirt_util.a(libvirt_util_la-vircgroup.o):
relocation R_X86_64_PC32 against `virCgroupPartitionEscape' can
Build without cgroups support started to fail again recently. Do the
following to fix it:
- Add missing 'partition' arg that was added to the
virCgroupValidateMachineGroup() but forgotten for the stub
of the same function
- Add stubs for virCgroupMakeGroup() and virCgroupNew()
---
One more comment on that. It's probably the time to think how to
refactor this code, because it's becoming very hard to navigate through
preprocessor macros' mess...
Roman Bogorodskiy wrote:
Build without cgroups support started to fail again recently. Do the
following to fix it:
- Add
will not be very fast ;)
Roman Bogorodskiy wrote:
* Move platform specific things (e.g. firewalling and route
collision checks) into bridge_driver_platform
* Create two platform specific implementations:
- bridge_driver_linux: Linux implementation using iptables,
it's actually the code
util/vircgroup.c uses a lot of macros to detect if cgroup is supported
by the system or not. These macros are pretty smart and allow to keep
code compact, however the downside of that is that it's getting harder
to navigate through the cgroup code.
So re-organise macros in a more simple fashion,
Eric Blake wrote:
On 07/31/2013 11:27 PM, Roman Bogorodskiy wrote:
Build without cgroups support started to fail again recently. Do the
following to fix it:
- Add missing 'partition' arg that was added to the
virCgroupValidateMachineGroup() but forgotten for the stub
Eric Blake wrote:
On 08/03/2013 12:01 PM, Roman Bogorodskiy wrote:
util/vircgroup.c uses a lot of macros to detect if cgroup is supported
by the system or not. These macros are pretty smart and allow to keep
code compact, however the downside of that is that it's getting harder
Continue converting to VIR_CGROUP_SUPPORTED
---
src/util/vircgroup.c | 378 +++
1 file changed, 202 insertions(+), 176 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 3640fbd..795897b 100644
--- a/src/util/vircgroup.c
- Convert virCgroupGet* to VIR_CGROUP_SUPPORTED
- Convert virCgroup(Get|Set)FreezerState to VIR_CGROUP_SUPPORTED
- Convert virCgroupRemoveRecursively to VIR_CGROUP_SUPPORTED
---
src/util/vircgroup.c | 363 +--
1 file changed, 204 insertions(+), 159
- Introduce VIR_CGROUP_SUPPORTED conditional
- Convert virCgroupKill* to use it
- Convert virCgroupIsolateMount() to use it
---
src/util/vircgroup.c | 59
1 file changed, 32 insertions(+), 27 deletions(-)
diff --git a/src/util/vircgroup.c
Complete the refactoring by adding missing stubs so it compiles on
platform without cgroup support.
---
src/util/vircgroup.c | 311 ++-
1 file changed, 306 insertions(+), 5 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index
Complete moving to VIR_CGROUP_SUPPORTED
---
src/util/vircgroup.c | 497 ---
1 file changed, 272 insertions(+), 225 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 795897b..e5625f8 100644
--- a/src/util/vircgroup.c
+++
Implement networkEnableIpForwarding() using BSD style sysctl.
---
configure.ac| 7 ---
src/network/bridge_driver.c | 14 ++
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index d3219ce..cc2213d 100644
--- a/configure.ac
Provide an implementation of virNetDev(Set|Clear)IPv4Address based on
BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
---
configure.ac | 15 +++
src/util/virnetdev.c | 24
2 files changed, 39 insertions(+)
diff --git a/configure.ac
Implement networkEnableIpForwarding() using BSD style sysctl.
---
configure.ac| 7 ---
src/network/bridge_driver.c | 13 +
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index d3219ce..cc2213d 100644
--- a/configure.ac
Roman Bogorodskiy wrote:
Implement networkEnableIpForwarding() using BSD style sysctl.
---
configure.ac| 7 ---
src/network/bridge_driver.c | 13 +
2 files changed, 17 insertions(+), 3 deletions(-)
ping?
Roman Bogorodskiy
pgphJ37aCW7yP.pgp
Description
Roman Bogorodskiy wrote:
Provide an implementation of virNetDev(Set|Clear)IPv4Address based on
BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
---
configure.ac | 15 +++
src/util/virnetdev.c | 24
2 files changed, 39
Eric Blake wrote:
On 08/11/2013 07:54 AM, Roman Bogorodskiy wrote:
Provide an implementation of virNetDev(Set|Clear)IPv4Address based on
BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
---
configure.ac | 15 +++
src/util/virnetdev.c | 24
Roman Bogorodskiy wrote:
Eric Blake wrote:
On 08/11/2013 07:54 AM, Roman Bogorodskiy wrote:
Provide an implementation of virNetDev(Set|Clear)IPv4Address based on
BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
---
configure.ac | 15
/bhyve/bhyve_driver.c
new file mode 100644
index 000..a155b1a
--- /dev/null
+++ b/src/bhyve/bhyve_driver.c
@@ -0,0 +1,529 @@
+/*
+ * bhyve_driver.c: core driver methods for managing bhyve guests
+ *
+ * Copyright (C) 2013 Roman Bogorodskiy
+ *
+ * This library is free software; you can redistribute
on secure
Roman Bogorodskiy (1):
bhyve: add a basic driver
configure.ac| 37
daemon/libvirtd.c | 9 +
include/libvirt/virterror.h | 1 +
src/Makefile.am | 35 +++
src/bhyve/bhyve_driver.c| 529
src
the missing #endif before I did a git commit
--amend so it didn't appear here. But if this is ACK'd rest assured, I've
fixed it locally.
Just for the record, this patch (with adding #endif) fixes build for me
as well.
Roman Bogorodskiy
--
libvir-list mailing list
libvir-list@redhat.com
= __import__('libvirt-override').__version__,
url = 'http://www.libvirt.org',
maintainer = 'Libvirt Maintainers',
maintainer_email = 'libvir-list@redhat.com',
Roman Bogorodskiy
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir
guests
+ *
+ * Copyright (C) 2013 Roman Bogorodskiy
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option
under #ifdef __FreeBSD__ only.
Roman Bogorodskiy (1):
BSD: implement nodeGetMemoryStats
src/nodeinfo.c | 73 ++
1 file changed, 73 insertions(+)
--
1.8.4.3
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman
Add a BSD implementation of nodeGetMemoryStats based
on sysctl(3).
---
src/nodeinfo.c | 73 ++
1 file changed, 73 insertions(+)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 1838547..ecacfa4 100644
--- a/src/nodeinfo.c
+++
Add a BSD implementation of nodeGetMemoryStats based
on sysctl(3).
---
src/nodeinfo.c | 80 +-
1 file changed, 79 insertions(+), 1 deletion(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 1838547..5e84e78 100644
--- a/src/nodeinfo.c
for checking that. I'll re-roll the patch then.
Roman Bogorodskiy
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Add a BSD implementation of nodeGetMemoryStats based
on sysctl(3).
---
src/nodeinfo.c | 82 +-
1 file changed, 81 insertions(+), 1 deletion(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 1838547..05bc038 100644
--- a/src/nodeinfo.c
John Ferlan wrote:
On 01/03/2014 01:35 PM, Roman Bogorodskiy wrote:
Add a BSD implementation of nodeGetMemoryStats based
on sysctl(3).
---
src/nodeinfo.c | 82
+-
1 file changed, 81 insertions(+), 1 deletion(-)
ACK
Hi
time. I decided to go without
virsh-host.c modification and used VIR_NODE_CPU_STATS_UTILIZATION.
If you know better way of doing that, I'm open for suggestions.
Roman Bogorodskiy (1):
BSD: implement nodeGetCPUStats
src/nodeinfo.c | 85
Implementation obtains CPU usage information using
kern.cp_time and kern.cp_times sysctl(8)s and reports
CPU utilization.
---
src/nodeinfo.c | 85 ++
1 file changed, 85 insertions(+)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index
Daniel P. Berrange wrote:
On Tue, Jan 14, 2014 at 12:47:20PM +0400, Roman Bogorodskiy wrote:
I had doubts how to implement that. Looks like the current
implementation is tied to Linux CPU metrics:
user nice system idle iowait
That list is hardcoded into virsh-host.c. FreeBSD
Implementation obtains CPU usage information using
kern.cp_time and kern.cp_times sysctl(8)s and reports
CPU utilization.
---
include/libvirt/libvirt.h.in | 8
src/nodeinfo.c | 104 +++
tools/virsh-host.c | 11 -
3 files
Daniel P. Berrange wrote:
On Tue, Jan 14, 2014 at 12:47:20PM +0400, Roman Bogorodskiy wrote:
I had doubts how to implement that. Looks like the current
implementation is tied to Linux CPU metrics:
user nice system idle iowait
That list is hardcoded into virsh-host.c. FreeBSD
This is useful in certain circumstances, for example when
libvirtd is being executed by FreeBSD rc script, it cannot find
dmidecode installed from FreeBSD ports because it doesn't have
/usr/local (default prefix for ports) in PATH.
---
configure.ac | 4
src/util/virsysinfo.c | 2 +-
Implementation obtains CPU usage information using
kern.cp_time and kern.cp_times sysctl(8)s and reports
CPU utilization.
---
include/libvirt/libvirt.h.in | 8
src/nodeinfo.c | 104 +++
tools/virsh-host.c | 11 -
3 files
A set of fields for CPU stats could vary on different platforms,
for example, FreeBSD doesn't report 'iowait'.
Make virsh print out only the fields that were actually filled.
---
tools/virsh-host.c | 118 -
1 file changed, 71 insertions(+), 47
: 0,8%
system: 0,9%
idle:97,5%
intr: 0,8%
usage:2,5%
Includes intr, doesn't have iowait.
Roman Bogorodskiy (2):
BSD: implement nodeGetCPUStats
virsh: report only filled values in 'nodecpustats'
include/libvirt/libvirt.h.in | 8 +++
src
Roman Bogorodskiy wrote:
A set of fields for CPU stats could vary on different platforms,
for example, FreeBSD doesn't report 'iowait'.
Make virsh print out only the fields that were actually filled.
---
tools/virsh-host.c | 118
100644
index 000..7b13722
--- /dev/null
+++ b/m4/virt-driver-bhyve.m4
@@ -0,0 +1,52 @@
+dnl The bhyve driver
+dnl
+dnl Copyright (C) 2014 Roman Bogorodskiy
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl
to bhyve_command.c
* Attempt to unload VM on errors
Roman Bogorodskiy (1):
bhyve: add a basic driver
configure.ac| 11 +
daemon/libvirtd.c | 9 +
include/libvirt/virterror.h | 1 +
m4/virt-driver-bhyve.m4 | 52
src/Makefile.am | 38 +++
src/bhyve
Implement virProcess{Get,Set}Affinity() using cpuset_getaffinity()
and cpuset_setaffinity() calls. Quick search showed that they are
only available on FreeBSD, so placed it inside existing #ifdef
blocks for FreeBSD instead of adding configure checks.
---
src/util/virprocess.c | 39
cpuset -l 0-3 -p 1308
And check back again:
virsh # vcpuinfo qemu
VCPU: 0
CPU:0
State: running
CPU Affinity:
virsh #
Roman Bogorodskiy (1):
BSD: implement virProcess{Get,Set}Affinity
src/util/virprocess.c | 39 +--
1
Some syntax-check rules use GNU sed specific regexps, so allow
to override which sed would be used to fix 'syntax-check' for
non GNU-userland systems.
---
cfg.mk | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 207dfeb..bd984bd 100644
---
, as Eric pointed.
For sure, using portable regexps is better way, but I don't know how
much of effort that would be.
Roman Bogorodskiy
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Implementation obtains CPU usage information using
kern.cp_time and kern.cp_times sysctl(8)s and reports
CPU utilization.
---
include/libvirt/libvirt.h.in | 8
src/nodeinfo.c | 104 +++
tools/virsh-host.c | 11 -
3 files
A set of fields for CPU stats could vary on different platforms,
for example, FreeBSD doesn't report 'iowait'.
Make virsh print out only the fields that were actually filled.
---
tools/virsh-host.c | 119 -
1 file changed, 72 insertions(+), 47
way to
implement CPU stats on FreeBSD.
Meanwhile, I've uploaded an updated patch which revolves your comments.
Thanks,
Roman Bogorodskiy
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Check for presence of sys/cpuset.h header and cpuset_getaffinity()
in configure instead of just using #ifdef __FreeBSD__ for that code.
---
configure.ac | 10 ++
src/util/virprocess.c | 7 +--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/configure.ac
Copyright (C) 2014 Roman Bogorodskiy
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later
Ján Tomko wrote:
Rewrite the function to use an array instead of a struct,
translating the field names to int via an enum.
That works as expected on FreeBSD.
Thanks,
Roman Bogorodskiy
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
and pause).
I guess it'd be better not to use it so bhyve process doesn't suddenly
vanish from libvirt radar?
Roman Bogorodskiy
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
1 - 100 of 997 matches
Mail list logo