This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cpu and partition info


It took me about an hour to change/add enough to the perl GPL "hinv" port to
get it to work with cygwin ( hinv v 1.4pre2).

example code:
#!/usr/bin/perl

#open (FD,
"/proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProces
sor");
 if (-e
"/proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProces
sor/3") {
                $cpu = '4';
        }  elsif (-e
"/proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProces
sor/1") {
  $cpu = '2';
 }  else {
  $cpu = '1';
 }


if (-e
"/proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProces
sor/0/ProcessorNameString") {
  $cpus=`cat
/proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcess
or/0/ProcessorNameString`;
 } else {
  $cpus=`cat
'/proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProces
sor/0/VendorIdentifier' << cat
'/proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProces
sor/0/Identifier'`;  }
print "$cpu  $cpus\n";


----- Original Message -----
From: "Robert Citek" <rwcitek at alum dot calberkeley dot org>
To: <cygwin at cygwin dot com>
Sent: Monday, February 24, 2003 3:35 PM
Subject: cpu and partition info


>
> Hello all,
>
> Is there a /proc/partitions or a /proc/cpuinfo in newer versions of
Cygwin?
>  I'm looking for a way to determine cpu info and drive info from the
> command line.  I'm using v1.3.14.
>
> Thanks in advance,
> - Robert
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]