delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/08/27/11:32:43

DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 47RFWhKZ2201093
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=DAZFjA5V
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 67E11385F032
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1724772761;
bh=GtIaIXnUBL0OYl4NrJMJTrznau2UJHUfRnv104eV7o8=;
h=Date:Subject:To:References:Cc:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=DAZFjA5VyYjW5g3XO5CCkUulWFYEB9/cZ52wjKGu1Z5CHt66GR5yqe6Jkxbfk2U+W
Gh1LHEaSGv/SAlRmDzHsRzVQtyCB0nBv7KkKhaJLnqnF+5sq8L9zQGJ+pgyn+VdWYK
xsCfj6+PypCuBME2XsVdAwvNtNpS1h579yaAVMpc=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 628B63858283
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 628B63858283
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724772706; cv=none;
b=JK/ZJK4eQ9tXynF5T97HIAx0I4d5Tnon+SyYvd85WqGIPFMjwzLkRrDeDtCn8iQOgbjmpquWqiXj1KawWsq0BbqL1O7yvU6thDmVFURt/V7uoV7F4PL9//SWHq+5AP5RMKfT4xdJuHuv8+nI6qtnsbzragzAvnnT8t+XLDvNvOY=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1724772706; c=relaxed/simple;
bh=kz5OlMGiSnHXXyCg7w02xjjRhdklUgZyjZz60fO0CMU=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=I8DmTpFZXKPiijbaJiUs+pIhu2pgRY1inRdRpep8MPhVao1+dQ74Pn+58DcAPp/8mvLV8Y3oC9mYgJpj7ZhKpeQP4Dq0rNyds7AYsExpLpwKeYRh5kVGMv51O9WEUASEkJZzfRSkUOGBAV/TUz3D9URXttBoQTG9DbUBr9y5PmA=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-SNCR-Rigid: 66944137053E4E3B
X-Originating-IP: [86.143.185.112]
X-OWM-Source-IP: 86.143.185.112
X-OWM-Env-Sender: jon DOT turney AT dronecode DOT org DOT uk
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeeftddrudeftddgkeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfevjggtgfesthejredttddvjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepleelleetfeekjedtgeetvefggefgueduvdevtdeuvdefjedvgfeiudeuudeifffgnecuffhomhgrihhnpegthihgfihinhdrtghomhdplhhorggurghvghdrtggtnecukfhppeekiedrudegfedrudekhedrudduvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtlegnpdhinhgvthepkeeirddugeefrddukeehrdduuddvpdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdpnhgspghrtghpthhtohepvddprhgtphhtthhopegsrhhofihnmhgrrhhklhhirghmsehgmhgrihhlrdgtohhmpdhrtghpthhtoheptgihghifihhnsegthihgfihinhdrtghomhdprhgvvhfkrfephhhoshhtkeeiqddugeefqddukeehqdduuddvrdhrrghnghgvkeeiqddugeefrdgsthgtvghnthhrrghlphhluhhsrdgtohhmpdgr
uhhthhgpuhhsvghrpehjohhnthhurhhnvgihsegsthhinhhtvghrnhgvthdrtghomhdpghgvohfkrfepifeupdfovfetjfhoshhtpegsthhprhgurhhgohdttddu
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-VadeSecure-score: verdict=clean score=0/300, class=clean
Message-ID: <be924247-c927-4fd7-8673-3cab4172aae7@dronecode.org.uk>
Date: Tue, 27 Aug 2024 16:31:39 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: BUG: /usr/bin/uptime always reports 0/0/0 average
To: Mark Liam Brown <brownmarkliam AT gmail DOT com>
References: <CAN0SSYxv9A8V6gGppEid0LnjHJtY4isDUFY-ey=nbM9PaDo_8g AT mail DOT gmail DOT com>
Cc: cygwin AT cygwin DOT com
In-Reply-To: <CAN0SSYxv9A8V6gGppEid0LnjHJtY4isDUFY-ey=nbM9PaDo_8g@mail.gmail.com>
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL,
KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,
SPF_HELO_PASS, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Jon Turney via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

On 27/08/2024 09:21, Mark Liam Brown via Cygwin wrote:
> Greetings!
> 
> /usr/bin/uptime always reports 0/0/0 average cpu load:
> $ uptime
>   10:09:01 up 15:59,  0 user,  load average: 0.00, 0.00, 0.00
> 
> is this a known bug?

Kind of.

Due to windows API limitations, the current implementation has the 
short-coming that a process's first call to getloadavg() does not update 
the globally-maintained loadavg data.

(Because the Windows API cannot provide instantaneous cpu load, only 
over the period between two calls)

(So e.g. if you run something like top in another terminal, you'll 
suddenly see uptime return more sensible values)

See the discussion [1] for more context, and discussion of various 
approaches to fixing this, which petered out without a patch to [2]...

[1] https://cygwin.com/pipermail/cygwin-developers/2022-May/012569.html
[2] https://cygwin.com/cgit/newlib-cygwin/tree/winsup/cygwin/loadavg.cc


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019