From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C6ECA138359 for ; Thu, 30 Jul 2020 19:35:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 72B7BE0B0F; Thu, 30 Jul 2020 19:35:25 +0000 (UTC) Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 23D35E0952 for ; Thu, 30 Jul 2020 19:35:24 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id g6so17480035ljn.11 for ; Thu, 30 Jul 2020 12:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=3pi3EwJ+zA1Hv9yBi5yPgLiaimhho9S20+PtYWfcSxo=; b=FXC2g5KW9hsN8P+6aBb+YhCWwMoyTeQxDdRSuP6eLUoUljxXimWIdWC8N3d7x0LbTq 5uKecyeDiAm4IvjQmDG8k/xkaDjtCmaWddpCk5V9FdSSjDvSxaHLwR9i1q0VbCmC14yW +yrJVPdydWsIAex3goHJyoc+qWJ36sxNQINQIy9CxqfAwrHXXCF0+U8r3w27n4ONfRAV cB55QUX898zBFPV42INGf34b9cji4I9p8SiwhDqHUwqp8df58bDsluo/1P1/EC3e3x/J EwUX5DF93POPcw9w2shq3yLU8EUwFGJ/A8LFNuaVp28RH0HIbDvMoJmfHKvQCwjR8sOx loCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3pi3EwJ+zA1Hv9yBi5yPgLiaimhho9S20+PtYWfcSxo=; b=MGfzre/4UNOxzsjKdTGSJyMAPjdfipkaDsf8E1m1vTYgLTS2nvzQ/at4JYbOCzgHLy XPh9JvXtsdvu6Zy65rVwsGdNVh01z2vj/ug/lyYH9jCnQ4/rTuev4AQZEL6BknuwO6KH 8enP8mX2e5xWpPNJ9JykC3z74i03aZb073ijCwvjnC0nWinnK+FVdeA1hVnBaHZheOrr KjzR55jg4tM5fLb+Dl529AQeub9A21YxkiK5BO2IEjijUyq+pUNwfPp70TgQLB38BaDg evAhEu0dnIAXg0TDJQK0BtOmYfjEjXhad9LYUBu51NmIvjNfVnGmeiU2HoYo8wLFIoy3 i0cA== X-Gm-Message-State: AOAM5303iQ6gO68RZjlP+GgdNDHCHpFfAHOFmmw2GbIFT68f4FtA7TZ1 legZTfsBiuY08ZI65b/22Kg8+t/M0GNcIwxdiIy1/Qy/ X-Google-Smtp-Source: ABdhPJwmv9oy4RDQWRwgGsr5/H7rLxcCz9TCcNhYKVf4TNgszphh05CWLrtYe/aOUXnvn+e0o94//AhNLfuYAE+dh8M= X-Received: by 2002:a05:651c:21c:: with SMTP id y28mr290473ljn.139.1596137722853; Thu, 30 Jul 2020 12:35:22 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20200727033401.xr4dhyyx32zxjeer@ad-gentoo-main> In-Reply-To: From: Jeremi Piotrowski Date: Thu, 30 Jul 2020 21:36:09 +0200 Message-ID: Subject: Re: [gentoo-user] OT: Can a linux vmware guest tell if its host is CPU constrained? To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 6e45430a-fac4-4306-a1c9-399a7a21faaa X-Archives-Hash: 5736999430279ff9c9a023571195da8a On Thu, Jul 30, 2020 at 2:52 AM Adam Carter wrote: >> >> > So should I run something like: date ; time > > 100%CPU for a minute> ; date ? >> >> No, date will pull from your RTC, which is usually kept up to date with an asynchronous >> counter. >> >> First check GNU top(1) and look in the %Cpu line for "st." That is % CPU time stolen. If it is >> nonzero then the guest time's accounting is probably working. It's not typical for the >> hypervisor to hide this information. It's really important for load balancing. > > > Thanks for that. I haven't seen any non-zero stolen time yet, however. > > FWIW vmstat also shows stolen time. Stolen time reporting through vmstat/top only works on xen and kvm hypervisors, it wasn't implemented for vmware. It actually looks like it was finally submitted for linux v5.7 (https://lore.kernel.org/lkml/20200331100353.GA37509@gmail.com/). If you want those numbers for older kernels, fetch this repository: https://github.com/dagwieers/vmguestlib and run vmguest-stats. You'll also need open-vm-tools installed. Have used this many times in the past and the numbers are good.