From owner-freebsd-current@FreeBSD.ORG Thu Apr 7 10:59:45 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0984F106564A; Thu, 7 Apr 2011 10:59:45 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 195E98FC0C; Thu, 7 Apr 2011 10:59:43 +0000 (UTC) Received: by fxm11 with SMTP id 11so1993450fxm.13 for ; Thu, 07 Apr 2011 03:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=HZvitxj++kmXh6EhYe3lrjeLmG/TEMqnTxEAmWbihdo=; b=NQrHVTOpFo7JipM9CPNWDwVtKgLju5RCibXMAFPNi+ZChnwDwdcFxlyxjuoXwcHZnz HVvCWJK9GxoLvS+oMJFbJMdqAST4pmyBDzVLWg0aW28RS6YOL7h4OTjQlrBtjOOL6KnO g8QWx72fCS9ACARqm5WvdQK16N4RSL77LhiDw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=eQ9KYLmYJOFAH1sVy00KJKdYLvAjXUpwDuO34xwho0imz2wLlhDKon/Qkr3siHRRAH 9rz2jxtU9N2yF9J+fIYL7yOaqKq45mHTZCXaIvvunHlvMkqBuCK8If54CbpBuStesguI 51mt8rvmqCPGW44XAf9+vBZu/4ei/l+JFzu7U= Received: by 10.223.14.207 with SMTP id h15mr723256faa.50.1302173982878; Thu, 07 Apr 2011 03:59:42 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l4sm447370fan.38.2011.04.07.03.59.41 (version=SSLv3 cipher=OTHER); Thu, 07 Apr 2011 03:59:42 -0700 (PDT) Sender: Alexander Motin Message-ID: <4D9D9917.3030102@FreeBSD.org> Date: Thu, 07 Apr 2011 13:59:35 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Alexander Best References: <20110331223339.GA13682@freebsd.org> <201104010843.47367.jhb@freebsd.org> <20110404204316.GA11367@freebsd.org> In-Reply-To: <20110404204316.GA11367@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: multiple issues with devstat_*(9) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2011 10:59:45 -0000 Alexander Best wrote: > On Fri Apr 1 11, John Baldwin wrote: >> On Thursday, March 31, 2011 6:33:39 pm Alexander Best wrote: >>> i think there are multiple issues with devstat. i found the following in >>> devicestat.h: ... >>> funny thing is i found the following in scsi_pass.c: >>> >>> softc->device_stats = devstat_new_entry("pass", >>> periph->unit_number, 0, >>> DEVSTAT_NO_BLOCKSIZE >>> | (no_tags ? DEVSTAT_NO_ORDERED_TAGS : 0), >>> softc->pd_type | >>> DEVSTAT_TYPE_IF_SCSI | >>> DEVSTAT_TYPE_PASS, >>> DEVSTAT_PRIORITY_PASS); >>> >>> ...so pass* *should* show up under iostat -t scsi. As I can see, this is a bug (or feature) of the libdevstat / devstat_selectdevs(). If you specify any -t, then pass devices will be reported only if you request "pass" specifically. >> Hmm, pass devices for adaX should not be SCSI though, they should be ide I >> think. > > i think the situation with ATA_CAM should be discussed further. still besides > this issue there are many more with devstat(3). > > i'll try to track all the "devstat_new_entry()" occurrences and see if some > issues can be fixed. maybe only the proper DEVSTAT_* args were forgotten. Assuming that SCSI and IDE in -t option means transport type, and assuming that we count everything except ATA and SATA as SCSI, I've made following patch, that should fix issues from the CAM side: http://people.freebsd.org/~mav/cam.devstat.patch Any objections? Or SCSI/IDE there expected to mean command set? -- Alexander Motin