pt-stalk is too verbose, fills up log

Bug #1099933 reported by Raghavendra D Prabhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
High
Daniel Nichter

Bug Description

pt-stalk prints like

Check results: Threads_running=160, matched=no, cycles_true=0

every second.

Now, when running pt-stalk in daemon mode and it is writing to a
log, running it for a while can really fill up the logs.

It would be better to have a quiet option or verbosity levels.

I used like

        if [[ "$matched" ]]; then
                local msg="Check results: $OPT_VARIABLE=$value, matched=${matched:-no}, cycles_true=$cycles_true"
                log "$msg"
        fi

to print only when it is matched.

Tags: pt-stalk

Related branches

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Normally this would be a feature request, but it's true: the tool is noisy with no way to turn off the noise, and that can lead to a very large log file. So it's a bug now! :-)

tags: added: pt-stalk
Changed in percona-toolkit:
status: New → Triaged
importance: Undecided → High
Changed in percona-toolkit:
milestone: none → 2.1.9
Changed in percona-toolkit:
status: Triaged → In Progress
assignee: nobody → Daniel Nichter (daniel-nichter)
summary: - pt-stalk needs a quiet option
+ pt-stalk is too verbose, fills up log
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Since this tool is meant to be a long-running daemon, I decided on --verbose rather than --quiet so that defaults are "daemon-ready". --verbose=2 is default now, which means it will not print the "matched=no" lines, just the "matched=yes" lines and various collect-related info. You can --verbose 1 if you want only warnings and errors, or --verbose 0 which is like pt-table-checksum --quiet --quiet: only errors.

Since this is a bash tool, doing --verbose --verbose to modify the level (or --quiet --quiet) is too difficult because we would have to make and test sizable changes to the option parsing lib which is already subtle given that it's bash doing fancy getopt-like processing.

Changed in percona-toolkit:
status: In Progress → Fix Committed
Changed in percona-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-346

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.