"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Ocsinventory/Agent/Backend/OS/Linux/Archs/i386/CPU.pm" between
Ocsinventory-Unix-Agent-2.8.0.tar.gz and Ocsinventory-Unix-Agent-2.8.1.tar.gz

About: Ocsinventory-Agent is a Linux agent for OCS Inventory NG.

CPU.pm  (Ocsinventory-Unix-Agent-2.8.0):CPU.pm  (Ocsinventory-Unix-Agent-2.8.1)
skipping to change at line 25 skipping to change at line 25
my $params = shift; my $params = shift;
my $common = $params->{common}; my $common = $params->{common};
my @cpuinfos=`LANG=C lscpu`; my @cpuinfos=`LANG=C lscpu`;
my $cpu; my $cpu;
my $nbcpus; my $nbcpus;
foreach my $info (@cpuinfos){ foreach my $info (@cpuinfos){
chomp $info; chomp $info;
$cpu->{CPUARCH}=$1 if ($info =~ /Architecture:\s*(.*)/i); $cpu->{CPUARCH}=$1 if ($info =~ /Architecture:\s*(.*)/i);
$cpu->{NBCPUS}=$1 if ($info =~ /^CPU\(s\):\s*(\d)/i); $cpu->{NBCPUS}=$1 if ($info =~ /^CPU\(s\):\s*(\d+)/i);
$cpu->{THREADS}=$1 if ($info =~ /Thread\(s\)\sper\score:\s*(\d)/i); $cpu->{THREADS}=$1 if ($info =~ /Thread\(s\)\sper\score:\s*(\d+)/i);
$cpu->{CORES}=$1 if ($info =~ /Core\(s\)\sper\ssocket:\s*(\d)/i); $cpu->{CORES}=$1 if ($info =~ /Core\(s\)\sper\ssocket:\s*(\d+)/i);
$cpu->{NBSOCKET}=$1 if ($info =~ /Socket\(s\):\s*(\d)/i); $cpu->{NBSOCKET}=$1 if ($info =~ /Socket\(s\):\s*(\d+)/i);
$cpu->{TYPE}=$1 if ($info =~ /Model\sname:\s*(.*)/i); $cpu->{TYPE}=$1 if ($info =~ /Model\sname:\s*(.*)/i);
if ($info =~ /Vendor ID:\s*(Authentic|Genuine|)(.+)/i){ if ($info =~ /Vendor ID:\s*(Authentic|Genuine|)(.+)/i){
$cpu->{MANUFACTURER} = $2; $cpu->{MANUFACTURER} = $2;
$cpu->{MANUFACTURER} =~ s/(TMx86|TransmetaCPU)/Transmeta/; $cpu->{MANUFACTURER} =~ s/(TMx86|TransmetaCPU)/Transmeta/;
$cpu->{MANUFACTURER} =~ s/CyrixInstead/Cyrix/; $cpu->{MANUFACTURER} =~ s/CyrixInstead/Cyrix/;
$cpu->{MANUFACTURER} =~ s/CentaurHauls/VIA/; $cpu->{MANUFACTURER} =~ s/CentaurHauls/VIA/;
} }
$cpu->{CURRENT_SPEED} = $1 if ($info =~ /CPU\sMHz:\s*(\d+)(|\.\d+)$/i); $cpu->{CURRENT_SPEED} = $1 if ($info =~ /CPU\sMHz:\s*(\d+)(|\.\d+)$/i);
$cpu->{L2CACHESIZE} = $1 if ($info =~ /L2\scache:\s*(.*)/i); $cpu->{L2CACHESIZE} = $1 if ($info =~ /L2\scache:\s*(.*)/i);
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)