1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Whitespace cleanup

* remove trailing whitespace
* remove empty lines at the end of files
This commit is contained in:
Lars Kruse 2018-08-02 02:03:42 +02:00
parent ef851f0c34
commit 17f784270a
604 changed files with 2927 additions and 2945 deletions

View file

@ -8,13 +8,13 @@
amd_gpu_ - Wildcard plugin to monitor AMD GPUs. Uses aticonfig utility,
usually bundled with AMD GPU driver, to obtain information. To use this
plugin you have to make sure aticonfig will run without an active X
server (i.e. without anyone being logged in via the GUI). For more
information about this issue visit the link below:
server (i.e. without anyone being logged in via the GUI). For more
information about this issue visit the link below:
http://www.mayankdaga.com/running-opencl-applications-remotely-on-amd-gpus/
=head1 CONFIGURATION
This is a wildcard plugin. The wildcard prefix link name should be the
This is a wildcard plugin. The wildcard prefix link name should be the
value to monitor.
This plugin uses the following configuration variables:
@ -54,7 +54,7 @@ faken@fakenmc.com
=head1 LICENSE
GNU General Public License, version 2
http://www.gnu.org/licenses/gpl-2.0.html
http://www.gnu.org/licenses/gpl-2.0.html
=head1 MAGIC MARKERS
@ -71,7 +71,7 @@ atiConfigExec=${aticonfexec:-'/usr/bin/aticonfig'}
# Check if autoconf was requested
if [ "$1" = "autoconf" ]; then
# Autoconf only returns yes if aticonfig exists and is executable
# Autoconf only returns yes if aticonfig exists and is executable
if [ -x $atiConfigExec ]; then
echo yes
exit 0
@ -122,7 +122,7 @@ if [ "$1" = "config" ]; then
echo "temp${nGpusCounter}.info Temperature information for $gpuName"
echo "temp${nGpusCounter}.label Temperature ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
clocks)
# First determine max clock for each GPU...
@ -149,7 +149,7 @@ if [ "$1" = "config" ]; then
echo "coreclock${nGpusCounter}.info Core clock information for $gpuName"
echo "coreclock${nGpusCounter}.label Core clock ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
fan)
echo 'graph_title GPU fan speed'
@ -164,14 +164,14 @@ if [ "$1" = "config" ]; then
echo "fan${nGpusCounter}.info Fan speed information for $gpuName"
echo "fan${nGpusCounter}.label Fan speed ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
load)
echo 'graph_title GPU load'
echo 'graph_args -l 0 -u 100'
echo 'graph_vlabel Percentage'
echo 'graph_category htc'
echo "graph_info GPU load"
echo "graph_info GPU load"
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]
do
@ -179,7 +179,7 @@ if [ "$1" = "config" ]; then
echo "load${nGpusCounter}.info Load information for $gpuName"
echo "load${nGpusCounter}.label Load ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
vcore)
echo 'graph_title GPU core voltage'
@ -193,7 +193,7 @@ if [ "$1" = "config" ]; then
echo "vcore${nGpusCounter}.info Vcore information for $gpuName"
echo "vcore${nGpusCounter}.label Core voltage ($gpuName)"
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
done
;;
*)
echo "Can't run without a proper symlink. Exiting."

View file

@ -10,7 +10,7 @@ usually bundled with NVIDIA GPU driver, to obtain information.
=head1 CONFIGURATION
This is a wildcard plugin. The wildcard prefix link name should be the
This is a wildcard plugin. The wildcard prefix link name should be the
value to monitor.
This plugin uses the following configuration variables:
@ -53,7 +53,7 @@ faken@fakenmc.com
=head1 LICENSE
GNU General Public License, version 2
http://www.gnu.org/licenses/gpl-2.0.html
http://www.gnu.org/licenses/gpl-2.0.html
=head1 MAGIC MARKERS
@ -70,7 +70,7 @@ nvSmiExec=${smiexec:-'/usr/bin/nvidia-smi'}
# Check if autoconf was requested
if [ "$1" = "autoconf" ]; then
# Autoconf only returns yes if nvidia-smi exists and is executable
# Autoconf only returns yes if nvidia-smi exists and is executable
if [ -x "$nvSmiExec" ]; then
echo yes
exit 0
@ -188,7 +188,7 @@ if [ "$1" = "config" ]; then
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
echo "${name}${nGpusCounter}.info GPU utilization information for $gpuName"
: $((nGpusCounter=nGpusCounter+1))
done
done
;;
*)
echo "Can't run without a proper symlink. Exiting."

View file

@ -38,7 +38,7 @@ my $runType = "normal";
my @runTypes = qw( normal config autoconf );
if ($#ARGV + 1 == 1)
{
if (grep $_ eq $ARGV[0], @runTypes)
if (grep $_ eq $ARGV[0], @runTypes)
{
$runType = $ARGV[0];
}
@ -63,10 +63,10 @@ for (my $i = 0; $i < $gpuCount; $i++)
{
($ret, my $handle) = nvmlDeviceGetHandleByIndex($i);
next if $ret != $NVML_SUCCESS;
($ret, my $pciInfo) = nvmlDeviceGetPciInfo($handle);
my $gpuName = $pciInfo->{'busId'} if $ret == $NVML_SUCCESS;
if ($runType eq "config")
{
# only print the graph information once
@ -78,7 +78,7 @@ for (my $i = 0; $i < $gpuCount; $i++)
print "graph_category sensors\n";
print "graph_info Information for NVIDIA GPUs using driver version $driverVersion\n";
}
# metrics are collected for all the GPUs to a single graph
print "GPU_UTIL_$i.label GPU$i - $gpuName : GPU utilization\n";
print "GPU_FANSPEED_$i.label GPU$i - $gpuName : fan speed\n";