-
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branches 'log-throttle' and 'vmw_balloon'
- Loading branch information
Showing
16 changed files
with
280 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/sh | ||
# PCP QA Test No. 1595 | ||
# Exercise Linux kernel virtual machine memory metrics. | ||
# | ||
# Copyright (c) 2024 Red Hat. All Rights Reserved. | ||
# | ||
|
||
seq=`basename $0` | ||
echo "QA output created by $seq" | ||
|
||
# get standard environment, filters and checks | ||
. ./common.product | ||
. ./common.filter | ||
. ./common.check | ||
|
||
_check_valgrind | ||
[ $PCP_PLATFORM = linux ] || _notrun "Tests Linux kernel memory metrics" | ||
|
||
_cleanup() | ||
{ | ||
cd $here | ||
$sudo rm -rf $tmp $tmp.* | ||
} | ||
|
||
status=1 # failure is the default! | ||
$sudo rm -rf $tmp $tmp.* $seq.full | ||
trap "_cleanup; exit \$status" 0 1 2 3 15 | ||
|
||
_filter() | ||
{ | ||
sed \ | ||
-e "s,$PCP_PMDAS_DIR,PCP_PMDAS_DIR,g" \ | ||
#end | ||
} | ||
|
||
# real QA test starts here | ||
root=$tmp.root | ||
export LINUX_STATSPATH=$root | ||
pmda="60,$PCP_PMDAS_DIR/linux/pmda_linux.so,linux_init" | ||
memmetrics=`pminfo mem.vmmemctl | LC_COLLATE=POSIX sort` | ||
|
||
for mem in $here/linux/sysfs-vmmemctl-* | ||
do | ||
rm -fr $root | ||
mkdir -p $root/sys/kernel/debug || _fail "root in use when processing $mem" | ||
cp $mem $root/sys/kernel/debug/vmmemctl | ||
cd $root | ||
base=`basename $mem` | ||
|
||
echo "== Valgrind checking vmmemctl metric metadata - $base" | ||
_run_valgrind pminfo -L -K clear -K add,$pmda -dmtT $memmetrics 2>&1 \ | ||
| _filter | ||
|
||
echo "== Valgrind checking vmmemctl metric values - $base" | ||
_run_valgrind pminfo -L -K clear -K add,$pmda -fm $memmetrics 2>&1 \ | ||
| _filter | ||
|
||
echo && echo "== done" && echo | ||
cd $here | ||
done | ||
|
||
# success, all done | ||
status=0 | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
QA output created by 1595 | ||
== Valgrind checking vmmemctl metric metadata - sysfs-vmmemctl-001 | ||
=== std out === | ||
|
||
mem.vmmemctl.current PMID: 60.35.4 [Virtual machine balloon memory actually allocated] | ||
Data Type: 64-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff | ||
Semantics: instant Units: byte | ||
Help: | ||
Virtual machine balloon memory actually allocated | ||
|
||
mem.vmmemctl.target PMID: 60.35.5 [Virtual machine balloon memory allocation target size] | ||
Data Type: 64-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff | ||
Semantics: instant Units: byte | ||
Help: | ||
Virtual machine balloon memory allocation target size | ||
=== std err === | ||
=== filtered valgrind report === | ||
Memcheck, a memory error detector | ||
Command: pminfo -L -K clear -K add,60,PCP_PMDAS_DIR/linux/pmda_linux.so,linux_init -dmtT mem.vmmemctl.current mem.vmmemctl.target | ||
LEAK SUMMARY: | ||
definitely lost: 0 bytes in 0 blocks | ||
indirectly lost: 0 bytes in 0 blocks | ||
ERROR SUMMARY: 0 errors from 0 contexts ... | ||
== Valgrind checking vmmemctl metric values - sysfs-vmmemctl-001 | ||
=== std out === | ||
|
||
mem.vmmemctl.current PMID: 60.35.4 | ||
value 4194304000 | ||
|
||
mem.vmmemctl.target PMID: 60.35.5 | ||
value 4193390592 | ||
=== std err === | ||
=== filtered valgrind report === | ||
Memcheck, a memory error detector | ||
Command: pminfo -L -K clear -K add,60,PCP_PMDAS_DIR/linux/pmda_linux.so,linux_init -fm mem.vmmemctl.current mem.vmmemctl.target | ||
LEAK SUMMARY: | ||
definitely lost: 0 bytes in 0 blocks | ||
indirectly lost: 0 bytes in 0 blocks | ||
ERROR SUMMARY: 0 errors from 0 contexts ... | ||
|
||
== done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
balloon capabilities : 0x3e | ||
used capabilities : 0x1e | ||
is resetting : n | ||
target : 1023777 | ||
current : 1024000 | ||
start : 0 (0 failed) | ||
target : 768 (0 failed) | ||
lock : 0 (0 failed) | ||
unlock : 0 (0 failed) | ||
guestType : 0 (0 failed) | ||
batchLock : 0 (0 failed) | ||
batchUnlock : 0 (0 failed) | ||
2m-lock : 15 (0 failed) | ||
2m-unlock : 2 (0 failed) | ||
doorbellSet : 0 (0 failed) | ||
timer : 768 | ||
doorbell : 14 | ||
reset : 0 | ||
shrink : 0 | ||
shrinkFree : 0 | ||
alloc (4k): 0 | ||
alloc (2M): 2036 | ||
allocFail (4k): 0 | ||
allocFail (2M): 0 | ||
errAlloc (4k): 0 | ||
errAlloc (2M): 0 | ||
errFree (4k): 0 | ||
errFree (2M): 0 | ||
free (4k): 0 | ||
free (2M): 36 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import socket | ||
import cpmapi as api | ||
from pcp import pmapi | ||
|
||
address = 'localhost' | ||
port = 44321 | ||
|
||
c = [] | ||
for i in range(0, 1234): | ||
print('context', i) | ||
ctx = pmapi.pmContext(api.PM_CONTEXT_HOST, "local:") | ||
print('created', i) | ||
c.append(ctx) | ||
|
||
s = [] | ||
for i in range(0, 1234): | ||
sock = socket.socket() | ||
print('socket', i) | ||
sock.connect((address, port)) | ||
print('connect', i) | ||
sock.send(b"abba\r") # -- gives a too-large PDU | ||
print('send', i) | ||
# s.append(sock) # -- exercise pduread: timeout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.