From owner-freebsd-questions@FreeBSD.ORG Tue May 13 20:20:19 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE77A1065670 for ; Tue, 13 May 2008 20:20:19 +0000 (UTC) (envelope-from jdowdy@ncircle.com) Received: from mail.ncircle.com (mail.ncircle.com [64.84.9.150]) by mx1.freebsd.org (Postfix) with ESMTP id C6AD68FC19 for ; Tue, 13 May 2008 20:20:19 +0000 (UTC) (envelope-from jdowdy@ncircle.com) Received: from CORP-MAIL.ad.ncircle.com (corpmail-01.ncircle.com [192.168.75.90]) by mail.ncircle.com (8.14.2/8.14.2) with ESMTP id m4DJlNDA073364 for ; Tue, 13 May 2008 12:47:23 -0700 (PDT) (envelope-from jdowdy@ncircle.com) Received: from 192.168.40.173 ([192.168.40.173]) by CORP-MAIL.ad.ncircle.com ([192.168.75.94]) with Microsoft Exchange Server HTTP-DAV ; Tue, 13 May 2008 19:47:23 +0000 User-Agent: Microsoft-Entourage/11.4.0.080122 Date: Tue, 13 May 2008 12:47:22 -0700 From: Johan Dowdy To: Iv Ray , FreeBSD Questions Message-ID: Thread-Topic: accessing iostat -x %b with a scripting language Thread-Index: Aci1MijyZ5MK5CElEd2/8gAKla5AwA== In-Reply-To: <4829EA76.7020806@verysmall.org> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Score: -3.895 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 64.84.9.150 Cc: Subject: Re: accessing iostat -x %b with a scripting language 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: Tue, 13 May 2008 20:20:20 -0000 What do you mean by "access"? A simple way to get the output would be(presuming the 8th column has the data you want): iostat -x | awk '{ print $8 }' This could be redirected to a file or processed ins a shell script etc. What is it that you want to "do' with the output? -J On 5/13/08 12:22 PM, "Iv Ray" wrote: > Is there a standard way to access, with a scripting language (php, perl, > etc.) the output of - > > iostat -x > > I am particularly interested in the %b column (HDD utilization). > > I am not sure if reading the output and regex-ing the Nth column is the > right approach, or there is a more intelligent one. > > Iv > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Johan Dowdy - CISSP Senior Systems Administrator nCircle Network Security 415.318.2880 "Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke