From nobody Mon Apr 22 19:15:15 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VNZhM4FbDz5HjPq for ; Mon, 22 Apr 2024 19:15:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNZhM31C1z4gg5 for ; Mon, 22 Apr 2024 19:15:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713813315; a=rsa-sha256; cv=none; b=P9+hEDg+hEL743LgdlLFfMQH8mF1re0w5LBFXGOB/IoHEWbL9SMT6OgXfi536efX+zV9H4 C9Z9R7UeKoXIP8oBSSAKSrCfR3rk7lq+7A+wF6n5K0GsjRLl6bZAv5Ar7nFbG9z2BpIv9f XdMJ+JA0TGGotRv+8UdLD175BNlIrjw9A7bZxS0LEHc4E5JKQ72d+jVqtsGsTQxyv3VLPj Yi/oH+wwDUa2aRm9wOCwU6Dt4RO/zx+jz2EaQtymj6ZXuGbiJZkTyqx0grv5HyI962vUjU rJIuhvhUuYz7mEl8OirIXkVbDtOtX3TAwdHKX2oEd3Pi/pjqnKuZaPpWJ+SaVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713813315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r/ty6g3ePTbpvzz6WBa7/Rr6HKhUIOWG3IP8xcW1aXU=; b=PUAewank7X7ma57UwI5cq+7z8Tc55H1HB5gQO4ruZbWE3ZtLaN5GEly+HOFvcuWgAt26Kf ExvBUVTPFjWQxo06ocfRx8YgTEGFXGfQ+RC6UfH+OJ5GGyURiG0l0tKBbaCQnKH64Y7mt/ cYzh61ymQPbsQZD94avW1odggF+mL2BGuJJBggQghbtyBUbqlKNmx4Yh4lPHFPQRirr+O9 e564C9P6AvFmIuDD7OP/i27AOO7YJg19pa5qbxZDsC9POJ+xAWqUajepwQ3F+Fv3bjM7BO 1YdaCbImlrwME5ebVeTEfvKs98E/wcw/1eT3x9x5X2fptRHme7LKXyD5DsXe9w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VNZhM2QJ9z10sf for ; Mon, 22 Apr 2024 19:15:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 43MJFFW2007436 for ; Mon, 22 Apr 2024 19:15:15 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43MJFFT3007435 for bugs@FreeBSD.org; Mon, 22 Apr 2024 19:15:15 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 278532] vmstat percentages wrong on 32 bit systems Date: Mon, 22 Apr 2024 19:15:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jfc@mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278532 Bug ID: 278532 Summary: vmstat percentages wrong on 32 bit systems Product: Base System Version: 14.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jfc@mit.edu Created attachment 250161 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D250161&action= =3Dedit Fix xo_emit format string for percentages When (long) and (long long) are different sizes vmstat reports garbage for = the CPU percentage columns. From arm.armv7 running FreeBSD 14: # vmstat procs memory page disks faults cpu r b w avm fre flt re pi po fr sr mmc0 da0 in sy cs us s= y id 4 0 0 494M 1.2G 278 0 1 0 351 22 0 0 1.7k 603 279 3499= 288 538751558161 538751558161 The call to xo_emit in usr.bin/vmstat/vmstat.c function percent() passes " {:user/%2lld/%lld}" as the format string but (long) as the argument type.=20 Changing "lld" to "ld" fixes the bug. --=20 You are receiving this mail because: You are the assignee for the bug.=