pt-stalk doesn't reset cycles_true after collection

Bug #994947 reported by Jervin R
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to
Fix Released
Daniel Nichter
Fix Released
Daniel Nichter
Fix Released
Daniel Nichter

Bug Description

By default when triggered to collect and threshold matches, cycles_true does not reset to 0. This may lead to inconsistent data being collected.

[root@trim2 ~]# pt-stalk --version
pt-stalk 2.1.1

[root@trim2 ~]# pt-stalk --threshold=15 --interval=1 --cycles=15 --dest=/home/percona/collected
2012_05_04_20_41_06 Starting /usr/bin/pt-stalk --function=status --variable=Threads_running --threshold=15 --match= --cycles=15 --interval=1 --iterations= --run-time=30 --sleep=300 --dest=/home/percona/collected --prefix= --notify-by-email= --log=/var/log/pt-stalk.log --pid=/var/run/
2012_05_04_20_41_20 Check results: Threads_running=16, matched=yes, cycles_true=1
2012_05_04_20_41_21 Check results: Threads_running=17, matched=yes, cycles_true=2
2012_05_04_20_41_22 Check results: Threads_running=17, matched=yes, cycles_true=3
2012_05_04_20_41_23 Check results: Threads_running=18, matched=yes, cycles_true=4
2012_05_04_20_41_24 Check results: Threads_running=18, matched=yes, cycles_true=5
2012_05_04_20_41_25 Check results: Threads_running=18, matched=yes, cycles_true=6
2012_05_04_20_41_26 Check results: Threads_running=18, matched=yes, cycles_true=7
2012_05_04_20_41_27 Check results: Threads_running=19, matched=yes, cycles_true=8
2012_05_04_20_41_28 Check results: Threads_running=19, matched=yes, cycles_true=9
2012_05_04_20_41_29 Check results: Threads_running=20, matched=yes, cycles_true=10
2012_05_04_20_41_30 Check results: Threads_running=19, matched=yes, cycles_true=11
2012_05_04_20_41_31 Check results: Threads_running=19, matched=yes, cycles_true=12
2012_05_04_20_41_32 Check results: Threads_running=20, matched=yes, cycles_true=13
2012_05_04_20_41_33 Check results: Threads_running=20, matched=yes, cycles_true=14
2012_05_04_20_41_34 Check results: Threads_running=20, matched=yes, cycles_true=15
2012_05_04_20_41_34 Collect triggered
2012_05_04_20_41_34 Collector PID 15530
2012_05_04_20_41_34 Sleeping 300 seconds after collect

2012_05_04_20_46_34 Check results: Threads_running=19, matched=yes, cycles_true=16
2012_05_04_20_46_34 Collect triggered
2012_05_04_20_46_34 Collector PID 17181
2012_05_04_20_46_34 Sleeping 300 seconds after collect

Related branches

Revision history for this message
Jervin R (revin) wrote :

A quick fix is to add cycles_true=0 after collection i.e. around line 1115

1115 cycles_true=0

tags: added: pt-stalk wrong-behavior
Changed in percona-toolkit:
status: New → Triaged
milestone: none → 2.1.2
importance: Undecided → High
summary: - pt-stalk should reset cycles_true after collection
+ pt-stalk doesn't reset cycles_true after collection
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers