mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 21:54:48 +00:00
pt-summary added shared memory info - modified tests accordingly
This commit is contained in:
@@ -1443,6 +1443,7 @@ parse_free_minus_b () { local PTFUNCNAME=parse_free_minus_b;
|
||||
name_val "Total" $(shorten $(awk '/Mem:/{print $2}' "${file}") 1)
|
||||
name_val "Free" $(shorten $(awk '/Mem:/{print $4}' "${file}") 1)
|
||||
name_val "Used" "physical = $(shorten ${physical} 1), swap allocated = $(shorten ${swap_alloc} 1), swap used = $(shorten ${swap_used} 1), virtual = ${virtual}"
|
||||
name_val "Shared" $(shorten $(awk '/Mem:/{print $5}' "${file}") 1)
|
||||
name_val "Buffers" $(shorten $(awk '/Mem:/{print $6}' "${file}") 1)
|
||||
name_val "Caches" $(shorten $(awk '/Mem:/{print $7}' "${file}") 1)
|
||||
name_val "Dirty" "$(awk '/Dirty:/ {print $2, $3}' "${file}")"
|
||||
|
@@ -17,12 +17,11 @@ my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/;
|
||||
use Test::More tests => 2;
|
||||
|
||||
for my $i (2..3) {
|
||||
|
||||
ok(
|
||||
no_diff(
|
||||
sub { print `$trunk/bin/pt-summary --read-samples "$trunk/t/pt-summary/samples/Linux/00$i/" | tail -n+3` },
|
||||
"t/pt-summary/samples/Linux/output_00$i.txt"),
|
||||
"--read-samples samples/Linux/00$i works"
|
||||
"--read-samples samples/Linux/00$i works",
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
total used free shared buffers cached
|
||||
Mem: 1059586048 236732416 822853632 0 51183616 127881216
|
||||
Mem: 1059586048 236732416 822853632 1357284 51183616 127881216
|
||||
-/+ buffers/cache: 57667584 1001918464
|
||||
Swap: 2147475456 0 2147475456
|
||||
MemTotal: 1034752 kB
|
||||
|
@@ -17,6 +17,7 @@ Architecture | CPU = 32-bit, OS = 32-bit
|
||||
Total | 1010.5M
|
||||
Free | 784.4M
|
||||
Used | physical = 226.1M, swap allocated = 2.0G, swap used = 0.0, virtual = 226.1M
|
||||
Shared | 0.0
|
||||
Buffers | 48.8M
|
||||
Caches | 122.2M
|
||||
Dirty | 152 kB
|
||||
|
@@ -17,6 +17,7 @@ Architecture | CPU = 32-bit, OS = 32-bit
|
||||
Total | 1010.5M
|
||||
Free | 784.7M
|
||||
Used | physical = 225.8M, swap allocated = 2.0G, swap used = 0.0, virtual = 225.8M
|
||||
Shared | 1.3M
|
||||
Buffers | 48.8M
|
||||
Caches | 122.0M
|
||||
Dirty | 80 kB
|
||||
|
Reference in New Issue
Block a user