summaryrefslogtreecommitdiff
path: root/scripts/vyatta-cpu-summary.pl
diff options
context:
space:
mode:
authorDmytro Aleksandrov <alkersan@gmail.com>2019-08-30 18:43:01 +0300
committerDmytro Aleksandrov <alkersan@gmail.com>2019-08-30 18:43:01 +0300
commiteea95c8980a290d753777da173935f39f1589b9b (patch)
treee2d8f866b38be9dbe35973bb632df8e7a90d256c /scripts/vyatta-cpu-summary.pl
parent8efa92beebfbeb70dd834b568365eda161271d38 (diff)
downloadvyatta-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-xscripts/vyatta-cpu-summary.pl41
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";