| Newsgroups |
gmane.comp.log.logwatch.devel |
| Message-ID |
<[email protected]> |
Revision: 161
http://sourceforge.net/p/logwatch/code/161
Author: stefjakobs
Date: 2013-08-19 10:12:10 +0000 (Mon, 19 Aug 2013)
Log Message:
-----------
new service: zz-lm_sensors (thanks gulikoza)
Added Paths:
-----------
conf/services/zz-lm_sensors.conf
scripts/services/zz-lm_sensors
Added: conf/services/zz-lm_sensors.conf
===================================================================
--- conf/services/zz-lm_sensors.conf (rev 0)
+++ conf/services/zz-lm_sensors.conf 2013-08-19 10:12:10 UTC (rev 161)
@@ -0,0 +1,31 @@
+###########################################################################
+# $Id$
+###########################################################################
+
+# You can put comments anywhere you want to. They are effective for the
+# rest of the line.
+
+# this is in the format of <name> = <value>. Whitespace at the beginning
+# and end of the lines is removed. Whitespace before and after the = sign
+# is removed. Everything is case *insensitive*.
+
+# Yes = True = On = 1
+# No = False = Off = 0
+
+Title = "lm_sensors output"
+
+# Which logfile group...
+LogFile = NONE
+
+# The following variables may be set. They are commented-out because these
+# are the same defaults in the zz-lm_sensors script
+# $pathto_sensors = '/usr/bin/sensors';
+# $query_hddtemp = '/usr/bin/nc 127.0.0.1 7634';
+# $get_kvm_status = 'cat /proc/cpuinfo | grep -c "QEMU Virtual CPU"
+
+########################################################
+# Please send all comments, suggestions, bug reports,
+# etc, to [email protected]
+########################################################
+
+# vi: shiftwidth=3 tabstop=3 et
Added: scripts/services/zz-lm_sensors
===================================================================
--- scripts/services/zz-lm_sensors (rev 0)
+++ scripts/services/zz-lm_sensors 2013-08-19 10:12:10 UTC (rev 161)
@@ -0,0 +1,47 @@
+##########################################################################
+# $Id$
+##########################################################################
+# Copyright (c) 2013 gulikoza
+# Covered under the included MIT/X-Consortium License:
+# http://www.opensource.org/licenses/mit-license.php
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+###########################################################################
+#Main
+
+#Output sensors stats
+
+my $pathto_sensors = $ENV{'pathto_sensors'} || '/usr/bin/sensors';
+my $query_hddtemp = $ENV{'query_hddtemp'} || '/usr/bin/nc 127.0.0.1 7634';
+my $get_kvm_status = $ENV{'get_kvm_status'} || 'cat /proc/cpuinfo | grep -c "QEMU Virtual CPU"';
+
+my $sensors = qx($pathto_sensors);
+my $hdd = qx($query_hddtemp);
+my $kvm = qx($get_kvm_status);
+
+if ($kvm == 0) {
+ if ($sensors) {
+ print $sensors;
+ }
+ if ($hdd) {
+ print $hdd;
+ print "\n";
+ }
+}
+
+# vi: shiftwidth=3 tabstop=3 syntax=perl et
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk