From owner-freebsd-hackers@freebsd.org Fri Oct 23 11:03:41 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FEFE443517 for ; Fri, 23 Oct 2020 11:03:41 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CHhDX2K6wz40W3 for ; Fri, 23 Oct 2020 11:03:39 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.16.1) with ESMTPS id 09NB3Uh0012919 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 23 Oct 2020 13:03:31 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puchar.net; s=default; t=1603451011; bh=0hjxX79k5efcyjjjziQHHZ8AmGKLtJf3TbmGhCwGLhA=; h=Date:From:To:Subject; b=ul5tcLk5dfeIiIkLd9bOthY5yenOJ0y3FrslZ3Hi3YZRUj50XxQ5rwS8NjnDK6aRa YlxXgi5Z41UPZkxNwZ4CZWXcnaVynmB/Jv5viSTLr3Vih45jBLo4Y+PQ7J6UT3bQl2 p6BwQDsM5GfXhmVc4lnX3GCfbbuXBh3ibAezO9Ec= Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.16.1/8.16.1/Submit) with ESMTP id 09NB3U1q012916 for ; Fri, 23 Oct 2020 13:03:30 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Date: Fri, 23 Oct 2020 13:03:30 +0200 (CEST) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Subject: displaying total CPU usage Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Rspamd-Queue-Id: 4CHhDX2K6wz40W3 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=fail (headers rsa verify failed) header.d=puchar.net header.s=default header.b=ul5tcLk5; dmarc=none; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-1.64 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.946]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.78)[-0.780]; DMARC_NA(0.00)[puchar.net]; R_DKIM_REJECT(1.00)[puchar.net:s=default]; DKIM_TRACE(0.00)[puchar.net:-]; NEURAL_HAM_SHORT(-0.61)[-0.611]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2020 11:03:41 -0000 how to do it in batch - something like this line CPU: 0.8% user, 0.0% nice, 1.3% system, 0.0% interrupt, 97.9% idle from top but produced in non terminal/batch mode all my attempts to do it with top failed - this line is missing