summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2014-09-10 19:18:25 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2014-09-10 19:18:25 +0000
commit30e1486803c3d003221e67422da02163523f1267 (patch)
treed8dddb4971b2446b9bffa9f089593b22a5440cfb
parentdd650f07f0770f7f8860e8ad377cee27f3b698be (diff)
downloadlm-sensors-30e1486803c3d003221e67422da02163523f1267.tar.gz
Print the kernel version and the processor information, to make user
support easier. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6254 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r--CHANGES1
-rwxr-xr-xprog/detect/sensors-detect13
2 files changed, 14 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index a16e7be3..a75dfa79 100644
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,7 @@ SVN HEAD
Add detection of TMP441, TMP442, LM95233, LM95234,
and LM95235
Add detection of NCT7802Y
+ Print kernel version and processor information
3.3.5 "Happy Birthday Beddy" (2014-01-22)
libsensors: Improve documentation of two functions
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
index 9ce0cf2e..95c2cee8 100755
--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -2731,6 +2731,11 @@ sub initialize_kernel_version
}
}
+sub print_kernel_version
+{
+ printf "# Kernel: \%d.\%d.\%d\%s \%s\n", @kernel_version, $kernel_arch;
+}
+
sub kernel_version_at_least
{
my ($vers, $plvl, $slvl) = @_;
@@ -2775,6 +2780,12 @@ sub initialize_cpu_list
push @cpu, $entry if scalar keys(%{$entry}); # Last entry
}
+sub print_cpu_info
+{
+ my $cpu = $cpu[0];
+ print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
+}
+
# @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus
# adapter present on the system. Each entry has the following keys: path,
# parent, name (directly taken from sysfs), driver and autoload.
@@ -7027,6 +7038,8 @@ sub main
print "# sensors-detect revision $revision\n";
initialize_dmi_data();
print_dmi_summary();
+ print_kernel_version();
+ print_cpu_info();
print "\n";
if ($opt{auto}) {