GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Processors(3) User Contributed Perl Documentation Processors(3)

Unix::Processors - Interface to processor (CPU) information

  use Unix::Processors;
  my $procs = new Unix::Processors;
  print "There are ", $procs->max_online, " CPUs at ", $procs->max_clock, "\n";
  if ($procs->max_online != $procs->max_physical) {
      print "Hyperthreading between ",$procs->max_physical," physical CPUs.\n";
  }
  (my $FORMAT =   "%2s  %-8s     %4s    \n") =~ s/\s\s+/ /g;
  printf($FORMAT, "#", "STATE", "CLOCK",  "TYPE", );
  foreach my $proc (@{$procs->processors}) {
      printf ($FORMAT, $proc->id, $proc->state, $proc->clock, $proc->type);
  }

This package provides accessors to per-processor (CPU) information. The object is obtained with the Unix::Processors::processors call. the operating system in a OS independent manner.

Return number of threading processors currently online. On hyperthreaded Linux systems, this indicates the maximum number of simultaneous threads that may execute; see max_physical for the real physical CPU count.
Return number of physical processor cores currently online. For example, a single chip quad-core processor returns four.
Returns the number of populated CPU sockets, if known, else the same number as max_physical. For example, a single chip quad-core processor returns one.
Return the maximum clock speed across all online processors. Not all OSes support this call.
Return an array of processor references. See the Unix::Processors::Info manual page. Not all OSes support this call.

The latest version is available from CPAN and from <http://www.veripool.org/>.

Copyright 1999-2017 by Wilson Snyder. This package is free software; you you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.

Wilson Snyder <wsnyder@wsnyder.org>

Unix::Processors::Info, Sys::Sysconf

2017-09-04 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.