X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.9 required=5.0	tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL
X-Spam-Check-By: sourceware.org
From: <Ulrich.Herbst@t-systems.com>
To: <cygwin@cygwin.com>
Date: Thu, 14 Feb 2013 19:22:00 +0100
Subject: WG: Strange output from Win32::PerfLib
Message-ID: <634CFD657E419946BD70654E385A708F233288E523@HE111508.emea1.cds.t-internal.com>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id r1EIMJHW000364

Hi,

we do CPU load reporting with Win32::PerfLib - and we assume some problems with cygwins Win32::PerfLib.

1. As Demo script, I used 
http://www.jkrb.de/jmk/showsource.asp?f=data/scripts/processor.pl

2. We can reproduce this on Windows2008R2 and XP (no other Windows versions available for testing).

3. What is our problem:
With cygwin-perl, we always see 100% cpu load on all cores.

If running processor.pl, this looks like:

ActiveState-Perl:
>EigeneProgramme\Perl\bin\perl.exe tmp/processor.pl
Instance 4: 2.19%
Instance 1: 0.63%
Instance 3: 0.63%
Instance 2: 3.44%

Cygwin:
$ perl processor.pl 
Instance 4: 100.00%
Instance 1: 100.00%
Instance 3: 100.00%
Instance 2: 100.00%

(the values on ActiveState-Perl seems reasonable).

I looked through the output of Win32::PerfLib::GetObjectList and I see for some counters differences:

ActiveState:
'8' => {
                                                                                       'DefaultScale' => 0,
                                                                                       'Display' => '%',
                                                                                       'CounterType' => 542180608,
                                                                                       'Counter' => '6478914531250',
                                                                                       'CounterNameTitleIndex' => 1746,
                                                                                       'CounterSize' => 8,
                                                                                       'CounterHelpTitleIndex' => 1747,
                                                                                       'DetailLevel' => 400
                                                                                     },

Cygwin:
                                                                             '8' => {
                                                                                       'DefaultScale' => 0,
                                                                                       'Display' => '%',
                                                                                       'CounterType' => 542180608,
                                                                                       'Counter' => 'I64d',
                                                                                       'CounterNameTitleIndex' => 1746,
                                                                                       'CounterSize' => 8,
                                                                                       'CounterHelpTitleIndex' => 1747,
                                                                                       'DetailLevel' => 400
                                                                                     },

Look at "Counter => I64d" on cygwin. Maybe we have some issue with 64bit values (this is just a guess...)

Any ideas about that ?

Uli

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


