Hide Forgot
+++ This bug was initially created as a clone of Bug #1012610 +++ Description of problem: Despite the efforts in #609016 and #902688, this is still / again broken. Version of selected components: ksm-1.4.2-9.fc19.x86_64 How to reproduce: Understand committed_memory() in ksmtuned, then: $ < /dev/null awk '{ sum += $1 }; END { print sum }' $ Additional info: Please change the awk clause in line 77 of ksmtuned to the obvious and correct solution: 'END { print 0+sum }': $ < /dev/null awk '{ sum += $1 }; END { print 0+sum }' 0 $ --- Additional comment from Cole Robinson on 2013-10-31 16:24:12 EDT --- Thanks for the suggestion, moving to POST since there's a fix --- Additional comment from Fedora Update System on 2013-11-05 20:27:03 EST --- qemu-1.4.2-13.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/qemu-1.4.2-13.fc19 Here's the diff we applied in Fedora: diff --git a/ksmtuned b/ksmtuned index c96507c..7bc5743 100644 --- a/ksmtuned +++ b/ksmtuned @@ -71,10 +71,10 @@ KSMCTL () { committed_memory () { # calculate how much memory is committed to running qemu processes local pidlist - pidlist=$(pgrep -d ' ' -- '^qemu(-kvm|:.{1,11})$') + pidlist=$(pgrep -d ' ' -- '^qemu(-(kvm|system-.+)|:.{1,11})$') if [ -n "$pidlist" ]; then ps -p "$pidlist" -o rsz= - fi | awk '{ sum += $1 }; END { print sum }' + fi | awk '{ sum += $1 }; END { print 0+sum }' } free_memory () { (covers another bug as well)
Fixed in version qemu-kvm-1.5.3-22.el7. Michal
In qemu-kvm-1.5.3-30.el7.x86_64: committed_memory () { local pidlist pidlist=$(pgrep -d ' ' -- '^qemu(-kvm|:.{1,11})$') if [ -n "$pidlist" ]; then ps -p "$pidlist" -o rsz= fi | awk '{ sum += $1 }; END { print 0+sum }' } Here: - pidlist=$(pgrep -d ' ' -- '^qemu(-kvm|:.{1,11})$') + pidlist=$(pgrep -d ' ' -- '^qemu(-(kvm|system-.+)|:.{1,11})$') Above patch does not apply, only: - fi | awk '{ sum += $1 }; END { print sum }' + fi | awk '{ sum += $1 }; END { print 0+sum }' If this is intended, then verified.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.