This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: cpu and partition info
- From: "Bruce Dobrin" <dobrin at imageworks dot com>
- To: <cygwin at cygwin dot com>, "Robert Citek" <rwcitek at alum dot calberkeley dot org>
- Date: Wed, 26 Feb 2003 12:02:06 -0800
- Subject: Re: cpu and partition info
- References: <3.0.5.32.20030224173519.00f8fbc0@mail.earthlink.net>
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/