diff options
author | Bertrand Simonnet <bsimonnet@google.com> | 2015-08-12 20:49:41 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-08-12 20:49:41 +0000 |
commit | eeab5cd585ccaef9d1d0e766bf7c36c661421b9a (patch) | |
tree | d194a0df2bca61d544a07ae64fd16564f1e150c4 /metricsd | |
parent | 497e38db9d79e786ffc3916d135c85fc284aeca1 (diff) | |
parent | 8715c9396a51232b7f7c801a32443b293d13badd (diff) | |
download | core-eeab5cd585ccaef9d1d0e766bf7c36c661421b9a.tar.gz core-eeab5cd585ccaef9d1d0e766bf7c36c661421b9a.tar.bz2 core-eeab5cd585ccaef9d1d0e766bf7c36c661421b9a.zip |
Merge "metricsd: Remove unused Chrome OS specific files."
Diffstat (limited to 'metricsd')
-rw-r--r-- | metricsd/init/metrics_daemon.conf | 18 | ||||
-rw-r--r-- | metricsd/init/metrics_library.conf | 25 | ||||
-rwxr-xr-x | metricsd/make_tests.sh | 12 | ||||
-rwxr-xr-x | metricsd/platform2_preinstall.sh | 13 | ||||
-rwxr-xr-x | metricsd/syslog_parser.sh | 69 |
5 files changed, 0 insertions, 137 deletions
diff --git a/metricsd/init/metrics_daemon.conf b/metricsd/init/metrics_daemon.conf deleted file mode 100644 index e6932cf99..000000000 --- a/metricsd/init/metrics_daemon.conf +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2014 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -description "Metrics collection daemon" -author "chromium-os-dev@chromium.org" - -# The metrics daemon is responsible for receiving and forwarding to -# chrome UMA statistics not produced by chrome. -start on starting system-services -stop on stopping system-services -respawn - -# metrics will update the next line to add -uploader for embedded builds. -env DAEMON_FLAGS="" - -expect fork -exec metrics_daemon ${DAEMON_FLAGS} diff --git a/metricsd/init/metrics_library.conf b/metricsd/init/metrics_library.conf deleted file mode 100644 index 03016d129..000000000 --- a/metricsd/init/metrics_library.conf +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2014 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -description "Metrics Library upstart file" -author "chromium-os-dev@chromium.org" - -# The metrics library is used by several programs (daemons and others) -# to send UMA stats. -start on starting boot-services - -pre-start script - # Create the file used as communication endpoint for metrics. - METRICS_DIR=/var/lib/metrics - EVENTS_FILE=${METRICS_DIR}/uma-events - mkdir -p ${METRICS_DIR} - touch ${EVENTS_FILE} - chown chronos.chronos ${EVENTS_FILE} - chmod 666 ${EVENTS_FILE} - # TRANSITION ONLY. - # TODO(semenzato) Remove after Chrome change, see issue 447256. - # Let Chrome read the metrics file from the old location. - mkdir -p /var/run/metrics - ln -sf ${EVENTS_FILE} /var/run/metrics -end script diff --git a/metricsd/make_tests.sh b/metricsd/make_tests.sh deleted file mode 100755 index 9dcc80475..000000000 --- a/metricsd/make_tests.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Builds tests. - -set -e -make tests -mkdir -p "${OUT_DIR}" -cp *_test "${OUT_DIR}" diff --git a/metricsd/platform2_preinstall.sh b/metricsd/platform2_preinstall.sh deleted file mode 100755 index ccf353ff4..000000000 --- a/metricsd/platform2_preinstall.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2014 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -set -e - -OUT=$1 -shift -for v; do - sed -e "s/@BSLOT@/${v}/g" libmetrics.pc.in > "${OUT}/lib/libmetrics-${v}.pc" -done diff --git a/metricsd/syslog_parser.sh b/metricsd/syslog_parser.sh deleted file mode 100755 index 7d064be96..000000000 --- a/metricsd/syslog_parser.sh +++ /dev/null @@ -1,69 +0,0 @@ -#! /bin/sh - -# This script parses /var/log/syslog for messages from programs that log -# uptime and disk stats (number of sectors read). It then outputs -# these stats in a format usable by the metrics collector, which forwards -# them to autotest and UMA. - -# To add a new metric add a line below, as PROGRAM_NAME METRIC_NAME. -# PROGRAM_NAME is the name of the job whose start time we -# are interested in. METRIC_NAME is the prefix we want to use for -# reporting to UMA and autotest. The script prepends "Time" and -# "Sectors" to METRIC_NAME for the two available measurements, uptime -# and number of sectors read thus far. - -# You will need to emit messages similar to the following in order to add a -# a metric using this process. You will need to emit both a start and stop -# time and the metric reported will be the difference in values - -# Nov 15 08:05 localhost PROGRAM_NAME[822]: start METRIC_NAME time 12 sectors 56 -# Nov 15 08:05 localhost PROGRAM_NAME[822]: stop METRIC_NAME time 24 sectors 68 - -# If you add metrics without a start, it is assumed you are requesting the -# time differece from system start - -# Metrics we are interested in measuring -METRICS=" -upstart start_x -" - -first=1 -program="" - -# Get the metrics for all things -for m in $METRICS -do - if [ $first -eq 1 ] - then - first=0 - program_name=$m - else - first=1 - metrics_name=$m - - # Example of line from /var/log/messages: - # Nov 15 08:05:42 localhost connmand[822]: start metric time 12 sectors 56 - # "upstart:" is $5, 1234 is $9, etc. - program="${program}/$program_name([[0-9]+]:|:) start $metrics_name/\ - { - metrics_start[\"${metrics_name}Time\"] = \$9; - metrics_start[\"${metrics_name}Sectors\"] = \$11; - }" - program="${program}/$program_name([[0-9]+]:|:) stop $metrics_name/\ - { - metrics_stop[\"${metrics_name}Time\"] = \$9; - metrics_stop[\"${metrics_name}Sectors\"] = \$11; - }" - fi -done - -# Do all the differencing here -program="${program}\ -END{ - for (i in metrics_stop) { - value_time = metrics_stop[i] - metrics_start[i]; - print i \"=\" value_time; - } -}" - -exec awk "$program" /var/log/syslog |