http://code.google.com/p/emt/source/detail?r=240
Modified:
/trunk/base/compact_field.php
/trunk/base/config.php
/trunk/base/emt_read.php
/trunk/base/field.php
/trunk/base/io_base.php
/trunk/base/log.php
/trunk/base/semaphore.php
/trunk/base/view.php
/trunk/bin/emt_gather
/trunk/bin/emt_nsca
/trunk/bin/emt_view
/trunk/emt.spec.template
/trunk/plugins/bin/emt_apache_mod_status
/trunk/plugins/bin/emt_memcached
/trunk/plugins/bin/mc_conn_tester.pl
/trunk/plugins/bin/per_proc_mem
/trunk/plugins/bin/proc_memory
/trunk/plugins/commands/emt_apache.php
/trunk/plugins/commands/emt_memcached.php
/trunk/plugins/commands/emt_mysql.php
/trunk/plugins/commands/iostat.php
/trunk/plugins/commands/mc_conn_tester.php
/trunk/plugins/commands/per_proc_mem.php
/trunk/plugins/commands/proc_total.php
/trunk/plugins/commands/swap_used.php
/trunk/plugins/commands/vmstat.php
/trunk/plugins/extra/Stomp.php
/trunk/plugins/fields/disk.php
/trunk/plugins/fields/hostname.php
/trunk/plugins/fields/mem.php
/trunk/plugins/fields/network.php
/trunk/plugins/output/dateindex_text.php
/trunk/plugins/output/local_text.php
/trunk/plugins/output/sqlite3.php
/trunk/plugins/output/sqlite_old.php
/trunk/plugins/output/stomp.php
/trunk/plugins/views/all.php
/trunk/plugins/views/mc_conn_tester.php
/trunk/plugins/views/mysql.php
/trunk/plugins/views/swap.php
=======================================
--- /trunk/base/compact_field.php Thu Jan 12 15:31:08 2012
+++ /trunk/base/compact_field.php Fri Apr 13 09:26:31 2012
@@ -6,7 +6,7 @@
* Set of functions for turning a csv line into field objects and
* back again.
*
- * The basic format for a field is
+ * The basic format for a field is
*
instance:name{sub_field1,sub_field2}={val1,val2},instance:name{sub_field1,sub_field2}={val1,val2}
*/
@@ -39,7 +39,7 @@
/**
* Transform the compact field string
- * format of foo:bar{sub1,sub2}={val1,val2}
+ * format of foo:bar{sub1,sub2}={val1,val2}
* too and from field objects
*/
class compact_field extends field {
@@ -101,7 +101,7 @@
if (strstr($this->field_str, ':')) {
list ($this->instance_name, $trash) = preg_split('/:/',
$this->field_str);
$this->field_str = str_replace($this->instance_name . ':', '',
$this->field_str);
-
+
return TRUE;
}
@@ -124,7 +124,7 @@
$keys = $values = '';
foreach ($this->values as $key => $value)
- $str .= urlencode($key) . '=' . urlencode($value) . ',';
+ $str .= urlencode($key) . '=' . urlencode($value) . ',';
$str = preg_replace('/,$/', '', $str) . '}';
} else {
=======================================
--- /trunk/base/config.php Tue Mar 31 18:50:16 2009
+++ /trunk/base/config.php Fri Apr 13 09:26:31 2012
@@ -30,7 +30,7 @@
define('DATA_FILE_NAME', "emt");
//How much time should a data point represent.
-define('DEFAULT_GATHER_TIME', 60);
+define('DEFAULT_GATHER_TIME', 60);
define('DEFAULT_CONF_FILE', '/etc/emt.cnf');
=======================================
--- /trunk/base/emt_read.php Mon Jan 9 20:17:52 2012
+++ /trunk/base/emt_read.php Fri Apr 13 09:26:31 2012
@@ -62,19 +62,19 @@
{
global $argv;
- print "usage: {$argv[0]} [hv] [n ndays]\n" .
- " -h prints this messages\n" .
- " -f 'field1,field2' custom output instead of using
predefined views\n" .
- " -l prints available fields for custom output (-f
flag)\n" .
+ print "usage: {$argv[0]} [hv] [n ndays]\n" .
+ " -h prints this messages\n" .
+ " -f 'field1,field2' custom output instead of using
predefined views\n" .
+ " -l prints available fields for custom output (-f
flag)\n" .
" -s view prints output using the selected view\n" .
" -v prints the available views\n" .
- " -V prints the version\n" .
+ " -V prints the version\n" .
" -n n_rec prints output starting back n_rec records\n" .
" -q date start of date range; YYYY-MM-DD HH:MM:SS\n" .
" -r date end of date range; YYYY-MM-DD HH:MM:SS\n" .
"\n";
- exit;
+ exit;
}
function print_version_and_exit()
@@ -92,7 +92,7 @@
$short_opt = 'd:n:s:f:q:r:lhvV';
$opt = getopt($short_opt);
$OPT_PRINT_FIELDS_AND_EXIT = FALSE;
-
+
foreach ($opt as $name => $value)
{
switch ($name)
@@ -118,7 +118,7 @@
break;
case 'r':
global $OUTPUT_END_RANGE;
- $OUTPUT_END_RANGE = $value;
+ $OUTPUT_END_RANGE = $value;
break;
case 'l':
$OPT_PRINT_FIELDS_AND_EXIT = TRUE;
@@ -148,7 +148,7 @@
}
/**
- * This function will pretty much always
+ * This function will pretty much always
* hit the loop safe flag but that's ok because
* it does so right before the correct timestamp
*/
@@ -258,7 +258,7 @@
if ($pos > 0)
{
- //the -1 is for the newline before timestamp.
+ //the -1 is for the newline before timestamp.
$pos = strlen($str) - $pos - 1;
fseek($fp, -$pos, SEEK_CUR);
}
=======================================
--- /trunk/base/field.php Mon Apr 2 11:34:40 2012
+++ /trunk/base/field.php Fri Apr 13 09:26:31 2012
@@ -34,7 +34,7 @@
var $name;
var $sub_name; //when using multi value this is the name of the sub
value.
var $description; //output from emt_view -l
- var $type; // set to avg,incr, percent, or tag. This is used to
control the display fields. Tag fields are not graphed or dispalyed.
+ var $type; // set to avg,incr, percent, or tag. This is used to
control the display fields. Tag fields are not graphed or dispalyed.
var $precision = 0; //Defines the precision for decimals
/**
* Can be set using one of the defines above
@@ -43,7 +43,7 @@
*
* field types of 'tag' don't use the display_format define.
*/
- var $display_format = DISPLAY_INT;
+ var $display_format = DISPLAY_INT;
var $command;
var $instance_name = FALSE;
var $data; //can be used when parsing fields
@@ -52,7 +52,7 @@
var $values;
var $value;
/**
- * display_function handles turning the raw numbers into a more human
friendly rate.
+ * display_function handles turning the raw numbers into a more human
friendly rate.
*/
//Parse and format a value
@@ -77,10 +77,10 @@
/**
* This function formats values for display.
* It attempts to do the right thing based on
- * field type and precision but feel free to
+ * field type and precision but feel free to
* override it.
*/
- function display_format($value)
+ function display_format($value)
{
if ($this->type == 'tag')
return $value;
@@ -122,20 +122,20 @@
function is_value_valid($value)
{
if ($this->type == 'incr' || $this->type == 'percent' ||
$this->type == 'avg')
- return is_numeric($value);
+ return is_numeric($value);
return true;
}
}
/**
- * If your plugin command outputs a single
+ * If your plugin command outputs a single
* line of csv use csv_field instead of
* field because it's parse method handles
* csv automagically
*/
-class csv_field extends field
+class csv_field extends field
{
function parse($str)
{
@@ -157,17 +157,17 @@
}
}
-
+
}
if ($key == $this->name)
return parent::parse($value);
- }
+ }
}
}
register_field('timestamp');
-class timestamp_field extends field
+class timestamp_field extends field
{
var $namespace='emt';
var $name='timestamp';
@@ -175,7 +175,7 @@
var $description='Timestamp that is part of each record';
var $type = 'tag';
var $command = 'timestamp';
-
+
function parse($str)
{
$this->value = date('Y-m-d H:i:s');
@@ -213,9 +213,9 @@
{
if (is_dir($src_dir))
{
- if ($dir = opendir($src_dir))
- {
- while (($file = readdir($dir)) !== FALSE)
+ if ($dir = opendir($src_dir))
+ {
+ while (($file = readdir($dir)) !== FALSE)
{
if (preg_match("/^\.+$/", $file) || !preg_match('/.php$/',
$file))
continue;
=======================================
--- /trunk/base/io_base.php Wed Feb 22 14:58:23 2012
+++ /trunk/base/io_base.php Fri Apr 13 09:26:31 2012
@@ -1,4 +1,4 @@
-<?php
+<?php
/***************************************************************************
* Copyright (C) 2007 by Eric Bergen *
* er...@provenscaling.com *
@@ -63,7 +63,7 @@
/**
* After setting up a read range with read_last_records
- * or read_date_range this function should return
+ * or read_date_range this function should return
* the next record until there are no more records left to
* read
*/
@@ -77,7 +77,7 @@
die("Output handler does not support having it's cursor reset\n");
}
- function line_into_field_objects($line)
+ function line_into_field_objects($line)
{
$fields = array();
$view = $this->view;
@@ -162,7 +162,7 @@
$fields[$name] = TRUE;
}
-function find_default_input_handler()
+function find_default_input_handler()
{
global $config;
=======================================
--- /trunk/base/log.php Mon Feb 6 13:38:39 2012
+++ /trunk/base/log.php Fri Apr 13 09:26:31 2012
@@ -26,4 +26,4 @@
{
require_once(INSTALL_PATH . "plugins/log/syslog.php");
}
-
+
=======================================
--- /trunk/base/semaphore.php Tue Mar 31 18:50:16 2009
+++ /trunk/base/semaphore.php Fri Apr 13 09:26:31 2012
@@ -24,7 +24,7 @@
declare(ticks = 1);
-/**
+/**
* Example usage$sem = new semaphore(__FILE__, 1, 3);
*
* $sem->lock();
@@ -33,7 +33,7 @@
$SEMAPHORE_TIMED_OUT = FALSE;
-function signal_handler($signal)
+function signal_handler($signal)
{
global $SEMAPHORE_TIMED_OUT;
@@ -48,7 +48,7 @@
var $lock_file;
var $project;
- function semaphore($lock_file, $instances, $timeout, $project = 'e')
+ function semaphore($lock_file, $instances, $timeout, $project = 'e')
{
$this->lock_file = $lock_file;
$this->instances = $instances;
@@ -57,7 +57,7 @@
}
- function lock()
+ function lock()
{
global $SEMAPHORE_TIMED_OUT;
if (!$this->sem_key)
@@ -65,7 +65,7 @@
$this->sem_key = ftok($this->lock_file, $this->project);
}
- if (!$this->sem_id)
+ if (!$this->sem_id)
{
$this->sem_id = sem_get($this->sem_key, $this->instances);
}
@@ -80,7 +80,7 @@
return $res;
}
- function release()
+ function release()
{
sem_release($this->sem_id);
}
=======================================
--- /trunk/base/view.php Thu Apr 12 12:56:04 2012
+++ /trunk/base/view.php Fri Apr 13 09:26:31 2012
@@ -21,7 +21,7 @@
/**
- * This setups up the view aliaes to field maps that aview uses to decide
how to group fields into classes.
+ * This setups up the view aliaes to field maps that aview uses to decide
how to group fields into classes.
*/
$views = array();
function register_view($name)
@@ -49,7 +49,7 @@
$view->fields[] = 'timestamp';
foreach ( $OPT_CUSTOM_VIEW_FIELDS as $fname)
- {
+ {
$view->parse_field_str($fname);
}
}
@@ -71,7 +71,7 @@
var $display_len = 0;
function copy_from_field($field, $sub_field = FALSE)
- {
+ {
$this->namespace = $field->namespace;
$this->name = $field->name;
$this->fname = $field->fname;
@@ -113,7 +113,7 @@
}
}
-class emt_view
+class emt_view
{
var $name = 'my_view';
var $fields = array();
@@ -127,10 +127,10 @@
* If you specify a group in a config
* file named after your view such as
* [mysql_view] it will be passed in to
- * the contructor so you can include view
+ * the contructor so you can include view
* specific options in config files
*/
- function emt_view($config)
+ function emt_view($config)
{
$this->config = $config;
}
@@ -167,10 +167,10 @@
//*/
/**
- * This loop handles greating all the display_field
+ * This loop handles greating all the display_field
* objects for different scenarios such as when
- * an instance is named but there are no fields
- * named and everything in between.
+ * an instance is named but there are no fields
+ * named and everything in between.
*
* Some of these statemnts could be combined
* but I think it's easier to read to isolate
@@ -193,11 +193,11 @@
}
/**
- * Grab the case where a field is set but there is no
+ * Grab the case where a field is set but there is no
* instance restriction or sub_field restriction
*/
- if (in_array($line_field->name, $this->fields) !== FALSE &&
+ if (in_array($line_field->name, $this->fields) !== FALSE &&
!isset($this->instances[$line_field->instance_name]) &&
!isset($this->sub_fields[$line_field->name]))
{
@@ -211,7 +211,7 @@
*/
if (in_array($line_field->name, $this->fields) !== FALSE &&
- isset($this->instances[$line_field->instance_name]) &&
+ isset($this->instances[$line_field->instance_name]) &&
in_array($line_field->name,
$this->instances[$line_field->instance_name]) !== FALSE &&
!isset($this->sub_fields[$line_field->name]))
{
@@ -220,10 +220,10 @@
}
/**
- * Grab the case where there is no instance restriction but
there
+ * Grab the case where there is no instance restriction but
there
* is a sub field restriction
*/
-
+
if (!isset($this->instances[$line_field->instance_name]) &&
isset($this->sub_fields[$line_field->name]))
{
@@ -236,7 +236,7 @@
}
/**
- * Grab the case where there are instance and sub field
+ * Grab the case where there are instance and sub field
* restrictions
*/
@@ -254,10 +254,10 @@
/**
* Make one pass across the field list and make sure that all
fields
- * in the view have a corresponding display_field object.
+ * in the view have a corresponding display_field object.
*
* This isn't as good as creating the the display field objects
- * based on the config but at least it solves the issue
+ * based on the config but at least it solves the issue
* of fields being silently dropped from the otuput. When they
don't exist.
*/
@@ -273,7 +273,7 @@
if (!$set)
{
$fname = $field . '_field';
-
+
if (class_exists($fname))
{
$f = new $fname;
@@ -291,7 +291,7 @@
$timestamp = array_shift($this->display_fields);
$this->sort_display_fields();
array_unshift($this->display_fields, $timestamp);
-
+
for ($i = 0; isset($this->display_fields[$i]); $i++)
$this->display_fields[$i]->display_len();
@@ -303,7 +303,7 @@
usort($this->display_fields, 'sort_callback');
}
-
+
function _display_objects_from_sub_fields($line_field)
{
$display_fields = array();
@@ -347,9 +347,9 @@
return $this->io_handler->read_date_range($start, $end);
}
- /**
+ /**
* Takes the full line returned from the input handler
- * and translates it into display_field objects
+ * and translates it into display_field objects
* for viewing by the client
*/
function next()
@@ -376,7 +376,7 @@
$this->display_fields[$i]->copy_from_field($lf);
}
}
- }
+ }
}
return $this->display_fields;
@@ -389,7 +389,7 @@
/**
* Takes a string in the format of
- * instance:field.sub_field
+ * instance:field.sub_field
* and assigns the appropriate variables in
* this->values, this->sub_values and this->instance
*
@@ -405,7 +405,7 @@
if (strstr($str, "."))
{
list ($field, $sub_field) = preg_split('/\./', $str, 2);
-
+
if (in_array($field, $this->fields) === FALSE)
$this->fields[] = $field;
@@ -436,7 +436,7 @@
* By default this will return the same list
* that was passed in.
*
- * If you decide to do expressions on fields in
+ * If you decide to do expressions on fields in
* next() then you should adjust the list
* of display fields being send back to match
* the data points next sends back.
@@ -447,9 +447,9 @@
* cpu_sys_field
*
* and I want to display timestamp, cpu_usr + cpu_sys
- * then this function should return two display_field
+ * then this function should return two display_field
* objects. One for the timestamp and one for the cpu.
- */
+ */
function display_field_list() {
}
}
=======================================
--- /trunk/bin/emt_gather Wed Feb 22 14:58:23 2012
+++ /trunk/bin/emt_gather Fri Apr 13 09:26:31 2012
@@ -66,7 +66,7 @@
$READ_TIMED_OUT = FALSE;
function plugin_timeout_handler()
-{
+{
global $READ_TIMED_OUT;
global $c;
global $plugin_timeout;
@@ -95,7 +95,7 @@
else
{
$output_handlers[] =
instantiate_output_handler($config['emt_gather']['output_handler']);
- }
+ }
}
@@ -162,7 +162,7 @@
$c->execute();
$commands[] = $c;
- }
+ }
}
$output = '';
@@ -175,7 +175,7 @@
{
$c =& $commands[$i];
- if (time() - $start_time > $gather_time)
+ if (time() - $start_time > $gather_time)
{
//print "time is $plugin_timeout\n";
pcntl_alarm($plugin_timeout);
@@ -244,7 +244,7 @@
$output_handlers[$o]->write($f);
}
- }
+ }
}
for ($i = 0; isset($output_handlers[$i]); $i++)
=======================================
--- /trunk/bin/emt_nsca Thu Jan 12 15:31:08 2012
+++ /trunk/bin/emt_nsca Fri Apr 13 09:26:31 2012
@@ -51,7 +51,7 @@
nsca_die(NAGIOS_WARN, $FIELD, $value);
nsca_die(NAGIOS_OK, $FIELD, $value);
-
+
}
}
@@ -77,7 +77,7 @@
$msg = 'OK ';
break;
}
-
+
if ($state == NAGIOS_OK)
$msg .= $field->fname . " value ($value)\n";
else
@@ -114,7 +114,7 @@
if (!is_numeric($value))
nsca_die(NAGIOS_UNKNOWN, "Critical value must be
numeric\n");
- $CRIT = $value;
+ $CRIT = $value;
break;
case 'f':
@@ -138,11 +138,11 @@
{
global $argv;
- print "usage: {$argv[0]} -f field -w warn -c crit\n" .
- " -h prints this messages\n" .
+ print "usage: {$argv[0]} -f field -w warn -c crit\n" .
+ " -h prints this messages\n" .
" -f [field] specify which field to check\n" .
- " -w value if above value return warning\n" .
- " -c value if above value return crit\n" .
+ " -w value if above value return warning\n" .
+ " -c value if above value return crit\n" .
"\n";
exit;
=======================================
--- /trunk/bin/emt_view Mon Aug 16 21:49:09 2010
+++ /trunk/bin/emt_view Fri Apr 13 09:26:31 2012
@@ -33,7 +33,7 @@
$OUTPUT_END_RANGE = 0;
$first_header = TRUE;
-if (isset($config['emt_view']['output_records'])
+if (isset($config['emt_view']['output_records'])
&& is_numeric($config['emt_view']['output_records']))
$OUTPUT_RECORDS = $config['emt_view']['output_records'];
@@ -49,7 +49,7 @@
$view = default_view_from_args($OPT_VIEW, $OPT_CUSTOM_VIEW_FIELDS);
$view->create(find_default_input_handler());
/**
- * Grab the last 10 records and use them to calculate the max width for
+ * Grab the last 10 records and use them to calculate the max width for
* column.
*/
@@ -61,7 +61,7 @@
$view->open();
-if (isset($OUTPUT_START_RANGE) && isset($OUTPUT_END_RANGE) &&
+if (isset($OUTPUT_START_RANGE) && isset($OUTPUT_END_RANGE) &&
$OUTPUT_START_RANGE > 0 && $OUTPUT_END_RANGE > 0)
{
$start_epoch = mysql_datetime_to_epoch($OUTPUT_START_RANGE);
@@ -165,9 +165,9 @@
for ($c = 0; $c < strlen($namespace); $c++) {
$header{$j++} = $namespace{$c};
}
-
+
print $header;
-
+
if (isset($disp_f[$i + 1]))
{
=======================================
--- /trunk/emt.spec.template Fri Aug 20 15:27:38 2010
+++ /trunk/emt.spec.template Fri Apr 13 09:26:31 2012
@@ -10,7 +10,7 @@
Requires: gmp >= 4.1.4 sysstat >= 5.0.5
Requires: /usr/bin/php
-%files
+%files
%defattr(-,root,root,0755)
/opt/emt
%attr(0644,root,root) /etc/cron.d/emt.cron
@@ -21,12 +21,12 @@
#make sure crond reloads
touch /etc/cron.d/emt.cron
mkdir -p /etc/emt.d
-if [ ! -e /usr/local/bin/emt_view ]; then
+if [ ! -e /usr/local/bin/emt_view ]; then
echo "Creating link to /usr/local/bin/emt_view"
ln -s /opt/emt/bin/emt_view /usr/local/bin/emt_view
fi
-if [ ! -e /usr/local/bin/emt_awk ]; then
+if [ ! -e /usr/local/bin/emt_awk ]; then
echo "Creating link to /usr/local/bin/emt_awk"
ln -s /opt/emt/bin/emt_awk /usr/local/bin/emt_awk
fi
=======================================
--- /trunk/plugins/bin/emt_apache_mod_status Sun Jun 13 17:29:04 2010
+++ /trunk/plugins/bin/emt_apache_mod_status Fri Apr 13 09:26:31 2012
@@ -97,7 +97,7 @@
if (!($status = @file_get_contents($url)))
log_error_and_exit("Unable to fetch url ($url)\n");
-
+
if (!($fp = fopen($log_file, 'a')))
log_error_and_exit("Unable to open log file ($log_file)");
@@ -125,7 +125,7 @@
$lines = preg_split('/\n/', $status);
$result = array();
-
+
$apache_to_emt = array(
'Total Accesses' => 'total_accesses',
'Total kBytes' => 'total_bytes',
=======================================
--- /trunk/plugins/bin/emt_memcached Fri Apr 29 13:01:59 2011
+++ /trunk/plugins/bin/emt_memcached Fri Apr 13 09:26:31 2012
@@ -137,7 +137,7 @@
fwrite($fp, "stats\r\n");
- $stats = array();
+ $stats = array();
while (!feof($fp))
{
$line = fgets($fp, 1024);
=======================================
--- /trunk/plugins/bin/mc_conn_tester.pl Mon Apr 2 10:31:14 2012
+++ /trunk/plugins/bin/mc_conn_tester.pl Fri Apr 13 09:26:31 2012
@@ -67,7 +67,7 @@
}
}
-sub keep_running
+sub keep_running
{
my ($run) = @_;
@@ -122,7 +122,7 @@
$|++;
my $run = 0;
-while (keep_running($run)) {
+while (keep_running($run)) {
$run++;
my $conn_time = 0;
my $set_time = 0;
@@ -257,4 +257,4 @@
This help.
-=cut
+=cut
=======================================
--- /trunk/plugins/bin/per_proc_mem Sun Feb 5 13:38:35 2012
+++ /trunk/plugins/bin/per_proc_mem Fri Apr 13 09:26:31 2012
@@ -46,19 +46,19 @@
if ($FILE)
$PID = trim(file_get_contents($FILE));
-if (!$PID && !$DAEMON)
+if (!$PID && !$DAEMON)
$args['h'] = TRUE;
if (!isset($args['t']))
log_error_and_exit("Time argument (-t) wasn't passed to
per_proc_mem.");
-
+
$GATHER_TIME = $args['t'];
if (isset($args['h'])) {
print "usage: {$argv[0]} [htpd]\n" .
- " -h prints this messages\n" .
- " -t time in seconds to poll process memory\n" .
+ " -h prints this messages\n" .
+ " -t time in seconds to poll process memory\n" .
" -p pid to collect stats for\n" .
" -d daemon to get pid to collect stats for
(regex)\n" .
" -f pid file to get pid to collect stats for\n" .
=======================================
--- /trunk/plugins/bin/proc_memory Sun Feb 5 13:38:35 2012
+++ /trunk/plugins/bin/proc_memory Fri Apr 13 09:26:31 2012
@@ -54,7 +54,7 @@
} while ((time() - $start_time) < $GATHER_TIME);
-print
+print
'mem_used_kb=' . (array_sum($mem_used) / count($mem_used)) . ',' .
'mem_used_percent=' . round(array_sum($mem_used) / count($mem_used) /
$values['MemTotal:'] * 100) . ',' .
'mem_cached=' . (array_sum($mem_cached) / count($mem_cached)) . "\n";
=======================================
--- /trunk/plugins/commands/emt_apache.php Sun Jun 13 17:29:04 2010
+++ /trunk/plugins/commands/emt_apache.php Fri Apr 13 09:26:31 2012
@@ -24,7 +24,7 @@
function command()
{
$this->cmd = INSTALL_PATH . 'plugins/bin/emt_apache_mod_status ' .
- '-t ' . $this->gather_time . " " .
+ '-t ' . $this->gather_time . " " .
'-u ' . $this->config['status_url'];
if (isset($this->config['dump_log_file']))
=======================================
--- /trunk/plugins/commands/emt_memcached.php Sun Jun 13 17:29:04 2010
+++ /trunk/plugins/commands/emt_memcached.php Fri Apr 13 09:26:31 2012
@@ -20,13 +20,13 @@
***************************************************************************/
-class emt_memcached extends gather_general
+class emt_memcached extends gather_general
{
function command()
{
- $this->cmd = INSTALL_PATH . 'plugins/bin/emt_memcached ' .
- "-t " . $this->gather_time . " " .
- "-h " . $this->config['host'] . " " .
+ $this->cmd = INSTALL_PATH . 'plugins/bin/emt_memcached ' .
+ "-t " . $this->gather_time . " " .
+ "-h " . $this->config['host'] . " " .
"-p " . $this->config['port'];
}
}
=======================================
--- /trunk/plugins/commands/emt_mysql.php Sun Jun 13 17:29:04 2010
+++ /trunk/plugins/commands/emt_mysql.php Fri Apr 13 09:26:31 2012
@@ -20,14 +20,14 @@
***************************************************************************/
-class emt_mysql extends gather_general
+class emt_mysql extends gather_general
{
function command()
{
- $this->cmd = INSTALL_PATH . 'plugins/bin/emt_mysql ' .
- "-t " . $this->gather_time . " " .
- "-h " . $this->config['host'] . " " .
- "-u " . $this->config['user'] . " " .
+ $this->cmd = INSTALL_PATH . 'plugins/bin/emt_mysql ' .
+ "-t " . $this->gather_time . " " .
+ "-h " . $this->config['host'] . " " .
+ "-u " . $this->config['user'] . " " .
"-p " . $this->config['password'];
}
}
=======================================
--- /trunk/plugins/commands/iostat.php Fri Jul 17 11:42:04 2009
+++ /trunk/plugins/commands/iostat.php Fri Apr 13 09:26:31 2012
@@ -76,4 +76,4 @@
$cols = preg_split('/\s+/', $this->lines[2]);
$this->col_offsets = array_flip($cols);
}
-}
+}
=======================================
--- /trunk/plugins/commands/mc_conn_tester.php Sun Apr 1 21:40:09 2012
+++ /trunk/plugins/commands/mc_conn_tester.php Fri Apr 13 09:26:31 2012
@@ -24,7 +24,7 @@
{
function command()
{
- $this->cmd = INSTALL_PATH .'plugins/bin/mc_conn_tester.pl --emt' .
+ $this->cmd = INSTALL_PATH .'plugins/bin/mc_conn_tester.pl --emt' .
' -t ' . $this->gather_time .
' -s ' . $this->config['host'] .
' -p ' . $this->config['port'];
=======================================
--- /trunk/plugins/commands/per_proc_mem.php Sun Jun 13 17:29:04 2010
+++ /trunk/plugins/commands/per_proc_mem.php Fri Apr 13 09:26:31 2012
@@ -23,7 +23,7 @@
{
function command()
{
- $this->cmd = INSTALL_PATH . 'plugins/bin/per_proc_mem ' .
+ $this->cmd = INSTALL_PATH . 'plugins/bin/per_proc_mem ' .
'-t ' . $this->gather_time . " ";
if (isset($this->config['pidfile']))
=======================================
--- /trunk/plugins/commands/proc_total.php Sun Jun 13 17:29:04 2010
+++ /trunk/plugins/commands/proc_total.php Fri Apr 13 09:26:31 2012
@@ -38,6 +38,6 @@
if ($key == $field)
return parent::parse($value);
- }
+ }
}
}
=======================================
--- /trunk/plugins/commands/swap_used.php Sun Jun 13 17:29:04 2010
+++ /trunk/plugins/commands/swap_used.php Fri Apr 13 09:26:31 2012
@@ -38,6 +38,6 @@
if ($key == $field)
return parent::parse($value);
- }
+ }
}
}
=======================================
--- /trunk/plugins/commands/vmstat.php Tue Feb 16 14:33:07 2010
+++ /trunk/plugins/commands/vmstat.php Fri Apr 13 09:26:31 2012
@@ -41,13 +41,13 @@
foreach ($this->lines as $line)
{
$fields = preg_split('/\s+/', trim($line));
-
+
if (count($fields) < 4)
continue;
-
+
$col_offset = $this->col_offsets[$col];
$field = $fields[$col_offset];
-
+
if (isset($field) && is_numeric($field))
$values[] = $field;
}
=======================================
--- /trunk/plugins/extra/Stomp.php Thu Feb 4 21:48:25 2010
+++ /trunk/plugins/extra/Stomp.php Fri Apr 13 09:26:31 2012
@@ -25,16 +25,16 @@
* @author Hiram Chirino <hi...@hiramchirino.com>
* @author Dejan Bosanac <de...@nighttale.net>
* @version $Revision$
- */
+ */
class StompFrame {
var $command;
var $headers = array();
var $body;
-
+
function StompFrame($command = null, $headers=null, $body=null) {
$this->init($command, $headers, $body);
}
-
+
function init($command = null, $headers=null, $body=null) {
$this->command = $command;
if ($headers != null)
@@ -49,13 +49,13 @@
* @package Stomp
* @author Dejan Bosanac <de...@nighttale.net>
* @version $Revision$
- */
+ */
class StompMessage extends StompFrame {
-
+
function StompMessage($body, $headers = null) {
$this->init("SEND", $headers, $body);
}
-
+
}
/**
@@ -64,7 +64,7 @@
* @package Stomp
* @author Dejan Bosanac <de...@nighttale.net>
* @version $Revision$
- */
+ */
class BytesMessage extends StompMessage {
function ByteMessage($body, $headers = null) {
$this->init("SEND", $headers, $body);
@@ -83,9 +83,9 @@
* @version $Revision$
*/
class MapMessage extends StompMessage {
-
+
var $map;
-
+
function MapMessage($msg, $headers = null) {
if (is_a($msg, "StompFrame")) {
$this->init($msg->command, $msg->headers, $msg->body);
@@ -101,7 +101,7 @@
$this->body = $json->encode($msg);
}
}
-
+
}
/**
@@ -110,7 +110,7 @@
*
* @package Stomp
* @author Hiram Chirino <hi...@hiramchirino.com>
- * @author Dejan Bosanac <de...@nighttale.net>
+ * @author Dejan Bosanac <de...@nighttale.net>
* @version $Revision$
*/
class StompConnection {
@@ -126,7 +126,7 @@
var $password = '';
function StompConnection($brokerUri) {
- $ereg
= "^(([a-zA-Z]+)://)+\(*([a-zA-Z0-9\.:/i,-]+)\)*\??([a-zA-Z0-9=]*)$";
+ $ereg
= "^(([a-zA-Z]+)://)+\(*([a-zA-Z0-9\.:/i,-]+)\)*\??([a-zA-Z0-9=]*)$";
if (eregi($ereg, $brokerUri, $regs)) {
$scheme = $regs[2];
$hosts = $regs[3];
@@ -139,18 +139,18 @@
$this->processUrl($url);
}
}
-
+
if ($params != null) {
parse_str($params, $this->params);
}
-
+
$this->makeConnection();
-
+
} else {
trigger_error("Bad Broker URL $brokerUri", E_USER_ERROR);
}
}
-
+
function processUrl($url) {
$parsed = parse_url($url);
if ($parsed) {
@@ -162,24 +162,24 @@
trigger_error("Bad Broker URL $url", E_USER_ERROR);
}
}
-
+
function makeConnection() {
if (count($this->hosts) == 0) {
trigger_error("No broker defined", E_USER_ERROR);
}
-
+
$i = $this->currentHost;
$att = 0;
$connected = false;
-
+
while (!$connected && $att++ < $this->attempts) {
- if ($this->params['randomize'] != null
+ if ($this->params['randomize'] != null
&& $this->params['randomize'] == 'true') {
- $i = rand(0, count($this->hosts) - 1);
+ $i = rand(0, count($this->hosts) - 1);
} else {
$i = ($i + 1) % count($this->hosts);
}
-
+
$broker = $this->hosts[$i];
$host = $broker[0];
@@ -189,30 +189,30 @@
if ($port == null) {
$port = $this->defaultPort;
}
-
+
if ($this->socket != null) {
trigger_error("Closing existing socket");
fclose($this->socket);
$this->socket = null;
- }
-
+ }
+
$this->socket = fsockopen($scheme.'://'.$host, $port);
-
+
if ($this->socket == null) {
- trigger_error("Could not connect to $host:$port
({$att}/{$this->attempts})", E_USER_WARNING);
+ trigger_error("Could not connect to $host:$port
({$att}/{$this->attempts})", E_USER_WARNING);
} else {
trigger_error("Connected");
$connected = true;
$this->currentHost = $i;
break;
}
-
- }
-
+
+ }
+
if (!$connected) {
trigger_error("Could not connect to a broker", E_USER_ERROR);
}
-
+
}
function connect($username="", $password="") {
@@ -220,9 +220,9 @@
$this->username = $username;
if ($password != "")
- $this->password = $password;
-
- $this->writeFrame( new StompFrame("CONNECT",
array("login"=>$this->username, "passcode"=> $this->password ) ) );
+ $this->password = $password;
+
+ $this->writeFrame( new StompFrame("CONNECT",
array("login"=>$this->username, "passcode"=> $this->password ) ) );
return $this->readFrame();
}
@@ -231,7 +231,7 @@
$msg->headers["destination"] = $destination;
$this->writeFrame($msg);
} else {
- trigger_error("sending '$msg' message to '$destination'");
+ trigger_error("sending '$msg' message to '$destination'");
$headers = array();
if( isset($properties) ) {
foreach ($properties as $name => $value) {
@@ -243,7 +243,7 @@
trigger_error("'$msg' message sent to '$destination'");
}
}
-
+
function subscribe($destination, $properties=null) {
$headers = array("ack"=>"client");
if( isset($properties) ) {
@@ -255,7 +255,7 @@
$this->writeFrame( new StompFrame("SUBSCRIBE", $headers) );
$this->subscriptions[$destination] = $properties;
}
-
+
function unsubscribe($destination, $properties=null) {
$headers = array();
if( isset($properties) ) {
@@ -275,7 +275,7 @@
}
$this->writeFrame( new StompFrame("BEGIN", $headers) );
}
-
+
function commit($transactionId=null) {
$headers = array();
if( isset($transactionId) ) {
@@ -291,7 +291,7 @@
}
$this->writeFrame( new StompFrame("ABORT", $headers) );
}
-
+
function ack($message, $transactionId=null) {
if (is_a($message, 'StompFrame')) {
$this->writeFrame( new StompFrame("ACK", $message->headers) );
@@ -304,15 +304,15 @@
$this->writeFrame( new StompFrame("ACK", $headers) );
}
}
-
+
function disconnect() {
$this->writeFrame( new StompFrame("DISCONNECT") );
fclose($this->socket);
}
-
+
function writeFrame($stompFrame) {
trigger_error($stompFrame->command);
- $data = $stompFrame->command . "\n";
+ $data = $stompFrame->command . "\n";
if( isset($stompFrame->headers) ) {
foreach ($stompFrame->headers as $name => $value) {
$data .= $name . ": " . $value . "\n";
@@ -325,10 +325,10 @@
$l1 = strlen($data);
$data .= "\x00\n";
$l2 = strlen($data);
-
+
$noop = "\x00\n";
fwrite($this->socket, $noop, strlen($noop));
-
+
$r = fwrite($this->socket, $data, strlen($data));
if ($r === false || $r == 0) {
trigger_error("Could not send stomp frame to server");
@@ -338,39 +338,39 @@
}
}
-
+
function readFrame() {
-
+
$rc = fread($this->socket, 1);
-
+
if($rc === false) {
$this->reconnect();
return $this->readFrame();
}
-
+
$data = $rc;
$prev = '';
// Read until end of frame.
while (!feof($this->socket)) {
$rc = fread($this->socket, 1);
-
+
if ($rc === false) {
$this->reconnect();
return $this->readFrame();
}
-
+
$data .= $rc;
-
+
if(ord($rc) == 10 && ord($prev) == 0) {
break;
}
$prev = $rc;
}
-
+
list($header, $body) = explode("\n\n", $data, 2);
$header = explode("\n", $header);
$headers = array();
-
+
$command = null;
foreach ($header as $v) {
if( isset($command) ) {
@@ -380,19 +380,19 @@
$command = $v;
}
}
-
+
$frame = new StompFrame($command, $headers, trim($body));
- if (isset($frame->headers['amq-msg-type'])
+ if (isset($frame->headers['amq-msg-type'])
&& $frame->headers['amq-msg-type'] == 'MapMessage') {
return new MapMessage($frame);
} else {
return $frame;
}
}
-
+
/**
* Reconnects and renews subscriptions (if there were any)
- * Call this method when you detect connection problems
+ * Call this method when you detect connection problems
*/
function reconnect() {
$this->makeConnection();
=======================================
--- /trunk/plugins/fields/disk.php Wed Feb 10 18:28:17 2010
+++ /trunk/plugins/fields/disk.php Fri Apr 13 09:26:31 2012
@@ -29,7 +29,7 @@
var $type = 'avg';
var $precision = 0;
var $command = 'vmstat';
-
+
function parse($str)
{
$this->data = $str;
@@ -47,7 +47,7 @@
var $type = 'avg';
var $precision = 0;
var $command = 'vmstat';
-
+
function parse($str)
{
$this->data = $str;
@@ -66,7 +66,7 @@
var $precision = 0;
var $command = 'iostat';
var $multi_value = TRUE;
-
+
function parse($str)
{
$this->data = $str;
@@ -116,7 +116,7 @@
var $precision = 0;
var $command = 'iostat';
var $multi_value = TRUE;
-
+
function parse($str)
{
$this->data = $str;
@@ -135,7 +135,7 @@
var $precision = 2;
var $command = 'iostat';
var $multi_value = TRUE;
-
+
function parse($str)
{
$this->data = $str;
=======================================
--- /trunk/plugins/fields/hostname.php Tue Mar 31 18:50:16 2009
+++ /trunk/plugins/fields/hostname.php Fri Apr 13 09:26:31 2012
@@ -28,7 +28,7 @@
var $description='Hidden field to tag records with the hostname so
they\'re easier to import';
var $type = 'tag';
var $command = 'hostname';
-
+
function parse($str)
{
$this->value = trim($str);
=======================================
--- /trunk/plugins/fields/mem.php Tue Mar 31 18:50:16 2009
+++ /trunk/plugins/fields/mem.php Fri Apr 13 09:26:31 2012
@@ -29,11 +29,11 @@
var $type = 'percent';
var $precision = 0;
var $command = 'proc_memory';
-
+
function parse($str)
{
$this->data = $str;
parent::parse('mem_used_percent');
}
-}
-
+}
+
=======================================
--- /trunk/plugins/fields/network.php Mon Aug 16 21:49:09 2010
+++ /trunk/plugins/fields/network.php Fri Apr 13 09:26:31 2012
@@ -41,7 +41,7 @@
var $command = 'proc_net';
var $multi_value = TRUE;
}
-
+
register_field('recv_bytes');
class recv_bytes_field extends proc_net_field_base
{
=======================================
--- /trunk/plugins/output/dateindex_text.php Tue Jul 13 16:08:06 2010
+++ /trunk/plugins/output/dateindex_text.php Fri Apr 13 09:26:31 2012
@@ -1,4 +1,4 @@
-<?php
+<?php
/***************************************************************************
* Copyright (C) 2007 by Eric Bergen *
* er...@provenscaling.com *
@@ -59,20 +59,20 @@
function get_text_file($time) {
return $this->config['output_dir'] . "/csv-" .
$this->get_tivodate($time);
}
-
+
function open()
- {
+ {
$this->reset();
-
+
if (!isset($this->config['output_dir']))
log_error_and_exit("dateindex_text output handler needs
output_dir specified under [dateindex_text] in emt.cnf");
if (! file_exists($this->config['output_dir'])) {
mkdir($this->config['output_dir'], 0755);
}
-
+
$out_file = $this->get_text_file(time());
-
+
$this->fp = @fopen($out_file, 'a');
if (!$this->fp) {
//try to open read only
@@ -93,7 +93,7 @@
if (!$field->is_value_valid($field->value))
log_error("Field $f_name tried to write an invalid value
of ({$field->value})");
else
- $this->output .= $f_name . '=' . $field->value . ',';
+ $this->output .= $f_name . '=' . $field->value . ',';
}
else
{
=======================================
--- /trunk/plugins/output/local_text.php Tue Sep 20 11:10:40 2011
+++ /trunk/plugins/output/local_text.php Fri Apr 13 09:26:31 2012
@@ -1,4 +1,4 @@
-<?php
+<?php
/***************************************************************************
* Copyright (C) 2007 by Eric Bergen *
* er...@provenscaling.com *
@@ -28,7 +28,7 @@
var $line_num = 0;
function open()
- {
+ {
$this->reset();
if (!isset($this->config['output_file']))
log_error_and_exit("local_text output handler needs
output_file specified under [local_text] in emt.cnf");
@@ -39,7 +39,7 @@
* that ran emt_view
*/
if (!($this->fp = @fopen($this->config['output_file'], 'r')))
- log_error("Unable to open csv file " .
$this->config['output_file']);
+ log_error("Unable to open csv file " .
$this->config['output_file']);
}
function write($field)
@@ -54,7 +54,7 @@
if (!$field->is_value_valid($field->value))
log_error("Field $f_name tried to write an invalid value
of ({$field->value})");
else
- $this->output .= $f_name . '=' . $field->value . ',';
+ $this->output .= $f_name . '=' . $field->value . ',';
}
else
{
=======================================
--- /trunk/plugins/output/sqlite3.php Thu Jan 12 15:31:08 2012
+++ /trunk/plugins/output/sqlite3.php Fri Apr 13 09:26:31 2012
@@ -28,16 +28,16 @@
var $dbh;
var $stmt;
- function sql_error()
+ function sql_error()
{
$array = $this->dbh->errorInfo();
return $array[2];
}
- function open()
- {
- if (!isset($this->config['data_file']))
- log_error_and_exit("sqlite output handler needs a data_file
specified under [sqlite3_io] in emt.cnf");
+ function open()
+ {
+ if (!isset($this->config['data_file']))
+ log_error_and_exit("sqlite output handler needs a data_file
specified under [sqlite3_io] in emt.cnf");
if (!($this->dbh = new PDO('sqlite:' .
$this->config['data_file'])))
log_error_and_exit('sqlite output handler cannot open data
file, error (' . $this->dbh->errorInfo());
@@ -46,11 +46,11 @@
/**
* This function is here because
* if not exists doesn't seem to
- * work correctly through the
+ * work correctly through the
* pdo driver
*/
- function table_exists($table)
+ function table_exists($table)
{
$query = "select 1 from sqlite_master where type='table' and
name='$table'";
$result = $this->dbh->query($query)
@@ -64,9 +64,9 @@
return $result;
}
- function write($field)
- {
- if ($field->name == 'timestamp')
+ function write($field)
+ {
+ if ($field->name == 'timestamp')
{
//sqlite doesn't support timestamps
$this->timestamp = strtotime($field->value);
@@ -74,16 +74,16 @@
$cf = new compact_field();
/**
- * This copy_from_field call comes from
+ * This copy_from_field call comes from
* base/compact_field.php which is different
* than the copy_from_field method from view.php
*/
$cf->copy_from_field($field);
/**
- * Instance name is copied off here because the
+ * Instance name is copied off here because the
* instance name is stripped off when parsing.
- * Copying instance in copy_from_field causes it
+ * Copying instance in copy_from_field causes it
* to get lost in emt_view.
*/
$cf->instance_name = $field->instance_name;
@@ -93,7 +93,7 @@
}
/**
- * This function needs to be converted from
+ * This function needs to be converted from
* using the emt_simple table over
* to the new per field tables
*/
@@ -110,12 +110,12 @@
}
/**
- * This function needs to be converted from
+ * This function needs to be converted from
* using the emt_simple table over
* to the new per field tables
*/
function read_last_records($count)
- {
+ {
$count++;
$this->query = "select data from (select data,ts from emt_simple
order by ts desc limit $count) order by ts";
return $this->read_based_on_query();
@@ -160,9 +160,9 @@
log_error_and_exit("Query {$this->query} failed with
error: " . $this->sql_error());
}
- function close()
- {
- if (!($this->table_exists('emt_simple')))
+ function close()
+ {
+ if (!($this->table_exists('emt_simple')))
{
$query = "create table emt_simple (ts integer, data text,
unique (ts))";
=======================================
--- /trunk/plugins/output/sqlite_old.php Tue Sep 20 11:10:40 2011
+++ /trunk/plugins/output/sqlite_old.php Fri Apr 13 09:26:31 2012
@@ -24,16 +24,16 @@
{
var $dbh;
- function sql_error()
+ function sql_error()
{
$array = $this->dbh->errorInfo();
return $array[2];
}
- function open()
- {
- if (!isset($this->config['data_file']))
- log_error_and_exit("sqlite output handler needs a data_file
specified under [sqlite_output] in emt.cnf");
+ function open()
+ {
+ if (!isset($this->config['data_file']))
+ log_error_and_exit("sqlite output handler needs a data_file
specified under [sqlite_output] in emt.cnf");
if (!($this->dbh = new PDO('sqlite:' .
$this->config['data_file'])))
log_error_and_exit('sqlite output handler cannot open data
file, error (' . $this->dbh->errorInfo());
@@ -42,11 +42,11 @@
/**
* This function is here because
* if not exists doesn't seem to
- * work correctly through the
+ * work correctly through the
* pdo driver
*/
- function table_exists($table)
+ function table_exists($table)
{
$query = "select 1 from sqlite_master where type='table' and
name='$table'";
$result = $this->dbh->query($query)
@@ -65,9 +65,9 @@
{
var $stmt;
- function write($field)
- {
- if ($field->name == 'timestamp')
+ function write($field)
+ {
+ if ($field->name == 'timestamp')
{
//sqlite doesn't support timestamps
$this->timestamp = strtotime($field->value);
@@ -83,7 +83,7 @@
if (!$field->is_value_valid($field->value))
log_error("Field {$f_name} tried to write an invalid value
of ({$field->value})");
else
- $this->output .= $f_name . '=' . $field->value . ',';
+ $this->output .= $f_name . '=' . $field->value . ',';
}
else
{
@@ -99,7 +99,7 @@
/**
* Writes out the more normalized field specific
* tables. Eventually the viewer methods should
- * be switched over to these tables and
+ * be switched over to these tables and
* the emt_simple table should be dropped.
*/
$this->write_complex($field);
@@ -111,9 +111,9 @@
{
if (!$this->table_exists($field->name))
{
- $query = "create table `{$field->name}` (ts integer, name
varchar, value int, unique (ts, name))";
-
- if ($this->dbh->exec($query) === FALSE)
+ $query = "create table `{$field->name}` (ts integer, name
varchar, value int, unique (ts, name))";
+
+ if ($this->dbh->exec($query) === FALSE)
{
log_error_and_exit("Query $query failed with
error: " . $this->sql_error());
}
@@ -135,7 +135,7 @@
}
else
{
- if (!$field->is_value_valid($field->value))
+ if (!$field->is_value_valid($field->value))
log_error("Field {$field->name} tried to write an invalid
value of ({$field->value})");
if (!$this->table_exists($field->name))
@@ -153,7 +153,7 @@
}
/**
- * This function needs to be converted from
+ * This function needs to be converted from
* using the emt_simple table over
* to the new per field tables
*/
@@ -170,7 +170,7 @@
}
/**
- * This function needs to be converted from
+ * This function needs to be converted from
* using the emt_simple table over
* to the new per field tables
*/
@@ -205,9 +205,9 @@
log_error_and_exit("Query {$this->query} failed with
error: " . $this->sql_error());
}
- function close()
- {
- if (!($this->table_exists('emt_simple')))
+ function close()
+ {
+ if (!($this->table_exists('emt_simple')))
{
$query = "create table emt_simple (ts integer, data text,
unique (ts))";
=======================================
--- /trunk/plugins/output/stomp.php Tue Mar 31 18:50:16 2009
+++ /trunk/plugins/output/stomp.php Fri Apr 13 09:26:31 2012
@@ -1,4 +1,4 @@
-<?php
+<?php
/***************************************************************************
* Copyright (C) 2007 by Eric Bergen *
* er...@provenscaling.com *
@@ -60,7 +60,7 @@
array(
"entry" => $this->output_packet
)
- );
+ );
$host = $this->config['host'];
$port = $this->config['port'];
=======================================
--- /trunk/plugins/views/all.php Thu Jun 17 14:00:27 2010
+++ /trunk/plugins/views/all.php Fri Apr 13 09:26:31 2012
@@ -20,10 +20,10 @@
***************************************************************************/
/**
- * This view takes a peek into the global
- * configuration and loads all available fields.
+ * This view takes a peek into the global
+ * configuration and loads all available fields.
*
- * Since this doesn't specify any sub fields any
+ * Since this doesn't specify any sub fields any
* field that is configured for multi_value
* will have all of it's sub fields loaded by
* emt_view
=======================================
--- /trunk/plugins/views/mc_conn_tester.php Sun Apr 1 21:40:09 2012
+++ /trunk/plugins/views/mc_conn_tester.php Fri Apr 13 09:26:31 2012
@@ -31,5 +31,5 @@
'memcached_test_max_get',
'memcached_test_max_set',
'memcached_test_max_con'
- );
-}
+ );
+}
=======================================
--- /trunk/plugins/views/mysql.php Fri Jun 25 15:47:47 2010
+++ /trunk/plugins/views/mysql.php Fri Apr 13 09:26:31 2012
@@ -39,7 +39,7 @@
'mysql_slow_queries'
);
- var $sub_fields = array ('mysql_com' =>
+ var $sub_fields = array ('mysql_com' =>
array(
'select',
'delete',
@@ -94,7 +94,7 @@
$duration = $this->line[$i]->value;
break;
}
-
+
$f->value = floor($f->value / $duration);
if ($f->value == 0)
=======================================
--- /trunk/plugins/views/swap.php Thu Jun 17 14:00:27 2010
+++ /trunk/plugins/views/swap.php Fri Apr 13 09:26:31 2012
@@ -24,7 +24,7 @@
{
var $name = 'swap';
var $fields = array(
- 'timestamp',
+ 'timestamp',
'swap_used',
'swap_blocks_in',
'swap_blocks_out'