From owner-freebsd-questions@FreeBSD.ORG Fri Apr 10 21:07:02 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8698A106566C for ; Fri, 10 Apr 2009 21:07:02 +0000 (UTC) (envelope-from ml@infosec.pl) Received: from v027580.home.net.pl (v027580.home.net.pl [89.161.156.148]) by mx1.freebsd.org (Postfix) with SMTP id C98098FC1D for ; Fri, 10 Apr 2009 21:07:01 +0000 (UTC) (envelope-from ml@infosec.pl) Received: from localhost (HELO ?192.168.1.66?) (ml.freeside@home@127.0.0.1) by m094.home.net.pl with SMTP; Fri, 10 Apr 2009 20:40:26 -0000 Message-ID: <49DFAEA8.6060306@infosec.pl> Date: Fri, 10 Apr 2009 21:40:08 +0100 From: Michal User-Agent: Thunderbird 2.0.0.21 (X11/20090407) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: disk usage statistics X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2009 21:07:02 -0000 Hello. Could you suggest me how can I get my disk usage statistics in terms of percentage of the possible disk activity (like in gstat) or megabytes per second (like in iostat), please? I need something that gives actual usage statistics, not any averages. And something that prints what I want and quits (not like gstat in default mode). It have to be available for unprivileged user and I don't want to use any temporally files in the process. The closest I can get is (last column of): iostat -c 2 -d ad0 | tail -n 1 Problem is that it takes two seconds, which is not acceptable for me because I want it's output to be printed in status bar beside date and time. I'm using wmii window manager. Any suggestions and hints are very welcome. Michal -- "Never interrupt your enemy when he is making a mistake." -Napoleon Bonaparte