2004-06-22 06:37:04 +08:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use Sigar;
|
|
|
|
|
|
|
|
my $sigar = new Sigar;
|
|
|
|
|
2004-07-10 12:44:45 +08:00
|
|
|
my $infos = $sigar->cpu_info_list;
|
2004-06-22 06:37:04 +08:00
|
|
|
|
|
|
|
my $num = scalar @$infos;
|
|
|
|
|
|
|
|
print "$num total CPUs..\n";
|
|
|
|
|
|
|
|
for my $info (@$infos) {
|
|
|
|
print "Vendor........" . $info->vendor . "\n";
|
|
|
|
print "Model........." . $info->model . "\n";
|
|
|
|
print "Mhz..........." . $info->mhz . "\n";
|
|
|
|
print "Cache size...." . $info->cache_size . "\n";
|
|
|
|
}
|