Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: syslog_parser.sh

Issue 2693001: Cleanup style nits in metrics daemon. (Closed) Base URL: ssh://git@chromiumos-git/metrics.git
Patch Set: Fix more nits from tfarina Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « metrics_library.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syslog_parser.sh
diff --git a/syslog_parser.sh b/syslog_parser.sh
index 7f3003ff4601a68c30d4fecfed77579ede199f84..7d064be967db041c379d2236d2723b130ccf34f5 100755
--- a/syslog_parser.sh
+++ b/syslog_parser.sh
@@ -12,7 +12,7 @@
# "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
+# 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
@@ -36,25 +36,25 @@ do
if [ $first -eq 1 ]
then
first=0
- program_name=$m
+ program_name=$m
else
first=1
- metrics_name=$m
-
+ 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;
+ 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
+ fi
done
# Do all the differencing here
@@ -66,4 +66,4 @@ END{
}
}"
-exec awk "$program" /var/log/syslog
+exec awk "$program" /var/log/syslog
« no previous file with comments | « metrics_library.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698