Page MenuHomePhabricator

Bash tools with histograms, trends, and "field" tool should be available to all users on fluorine
Closed, DeclinedPublic

Description

Per hangout discussion.

  • Puppetize for mwlog hosts (or everywhere)
    • histogram script
    • trends script
    • field script
  • Document somewhere on Wikitech.
  • Announce to engineering-l.

Event Timeline

aaron assigned this task to ori.
aaron raised the priority of this task from to Needs Triage.
aaron updated the task description. (Show Details)
aaron subscribed.

Change 273983 had a related patch set uploaded (by Ori.livneh):
Make 'field' / 'fields' shell functions available to everyone

https://gerrit.wikimedia.org/r/273983

Change 273983 merged by Ori.livneh:
Make 'field' / 'fields' shell functions available to everyone

https://gerrit.wikimedia.org/r/273983

aaron triaged this task as Low priority.May 26 2017, 5:08 PM

@aaron @faidon are you still interested in the remainder of ori's tools ("histogram" and "trends")?

trend and trends:

#!/bin/bash
log-trend() {
  sparkline=$(ls -t1 /a/mw-log/archive/"$1".log*.gz | head -30 | tac | xargs -L 1 lcz | spark)
  printf "%-30s\t%s\n" "$1" "$sparkline"
}

log-trends() {
  export -f log-trend
  ls -1 /a/mw-log/*.log             |\
    xargs -n1 -I{} basename {} .log |\
    xargs -P $(nproc) -n1 bash -c 'log-trend "$@"' _ | sort
}

Unclear to me what the histogram tool actually refers to. Maybe https://github.com/wikimedia/puppet/blob/production/modules/admin/files/home/ori/.binned/dist ? @Gilles or @Krinkle or @aaron, do you know?

I believe that is the script, yes, though I can't seem to figure out how to it to format properly (the histogram bars are the same size).

Not enough interest