diff options
author | Dmytro Aleksandrov <alkersan@gmail.com> | 2019-08-30 18:43:01 +0300 |
---|---|---|
committer | Dmytro Aleksandrov <alkersan@gmail.com> | 2019-08-30 18:43:01 +0300 |
commit | eea95c8980a290d753777da173935f39f1589b9b (patch) | |
tree | e2d8f866b38be9dbe35973bb632df8e7a90d256c /scripts/vyatta-cpu-summary.pl | |
parent | 8efa92beebfbeb70dd834b568365eda161271d38 (diff) | |
download | vyatta-op-eea95c8980a290d753777da173935f39f1589b9b.tar.gz vyatta-op-eea95c8980a290d753777da173935f39f1589b9b.zip |
T1621 remove misc ops after python/xml rewrite
Diffstat (limited to 'scripts/vyatta-cpu-summary.pl')
-rwxr-xr-x | scripts/vyatta-cpu-summary.pl | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/scripts/vyatta-cpu-summary.pl b/scripts/vyatta-cpu-summary.pl deleted file mode 100755 index b3e0331..0000000 --- a/scripts/vyatta-cpu-summary.pl +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/perl -# implement "show cpu-info" - -use strict; - -open my $cpuinfo, '<', '/proc/cpuinfo' - or die "Can't open /proc/cpuinfo : $!"; - -my %models; -my %packages; -my %cores; - -my %map = ( - 'model name' => \%models, - 'physical id' => \%packages, - 'core id' => \%cores -); - -my $cpu = 0; -while (<$cpuinfo>) { - chomp; - my ( $tag, $val ) = split /:/; - if ( !$tag ) { - ++$cpu; - next; - } - - $tag =~ s/\s+$//; - $val =~ s/^\s+//; - - my $ref = $map{$tag}; - $ref->{$val} = $cpu if ($ref); -} -close $cpuinfo; - -print "Processors ", $cpu, "\n"; -print "Packages ", scalar keys %packages, "\n" if (%packages); -print "Cores ", scalar keys %cores, "\n" if (%cores); - -# Handle any attempt to run different CPU models -print "Model ", join( " \n", keys %models ), "\n"; |