System-Info

 view release on metacpan or  search on metacpan

t/sysinfo_proc.t  view on Meta::CPAN

fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cm...
bogomips	: 4602.30
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

__EOINFO__

    $files{"s390x_sles11_sp2"} = <<'__EOINFO__';
vendor_id       : IBM/S390
# processors    : 3
bogomips per cpu: 1258.00
features        : esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs
processor 0: version = 00,  identification = 002623,  machine = 2064
processor 1: version = 00,  identification = 102623,  machine = 2064
processor 2: version = 00,  identification = 202623,  machine = 2064
__EOINFO__

    $files{"s390x_fedora"} = <<'__EOINFO__';
vendor_id       : IBM/S390
# processors    : 2
bogomips per cpu: 2913.00
max thread id   : 0
features        : esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te sie 
cache0          : level=1 type=Data scope=Private size=96K line_size=256 associativity=6
cache1          : level=1 type=Instruction scope=Private size=64K line_size=256 associativity=4
cache2          : level=2 type=Data scope=Private size=1024K line_size=256 associativity=8
cache3          : level=2 type=Instruction scope=Private size=1024K line_size=256 associativity=8
cache4          : level=3 type=Unified scope=Shared size=49152K line_size=256 associativity=12
cache5          : level=4 type=Unified scope=Shared size=393216K line_size=256 associativity=24
processor 0: version = FF,  identification = 35C047,  machine = 2827
processor 1: version = FF,  identification = 35C047,  machine = 2827
cpu number      : 0
cpu MHz dynamic : 5504
cpu MHz static  : 5504
cpu number      : 1
cpu MHz dynamic : 5504
cpu MHz static  : 5504
__EOINFO__
    }

package ReadProc;

sub TIEHANDLE {
    my $class = shift;
    my $data  = shift or die "No content for tied filehandle!";
    bless \$data, $class;
    }

sub READLINE {
    my $buffer = shift;
    length $$buffer or return;
    $$buffer =~ s/[ \t\r\xa0]+/ /g;
    $$buffer =~ s/ \n/\n/g;
    if (wantarray) {
	my @list = map "$_\n" => split m/\n/, $$buffer;
	$$buffer = "";
	return @list;
	}

    $$buffer =~ s/^(.*\n?)// and return $1;
    }

1;



( run in 1.470 second using v1.01-cache-2.11-cpan-5511b514fd6 )