From owner-freebsd-dtrace@freebsd.org Fri Dec 7 13:09:48 2018 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BFA3130D2DB for ; Fri, 7 Dec 2018 13:09:48 +0000 (UTC) (envelope-from eugene@zhegan.in) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C439A8A77A for ; Fri, 7 Dec 2018 13:09:47 +0000 (UTC) (envelope-from eugene@zhegan.in) Received: by mailman.ysv.freebsd.org (Postfix) id 882F7130D2DA; Fri, 7 Dec 2018 13:09:47 +0000 (UTC) Delivered-To: dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76A0B130D2D8 for ; Fri, 7 Dec 2018 13:09:47 +0000 (UTC) (envelope-from eugene@zhegan.in) Received: from elf.hq.norma.perm.ru (mail.norma.perm.ru [IPv6:2a00:7540:1::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.norma.perm.ru", Issuer "Vivat-Trade UNIX Root CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EF638A778 for ; Fri, 7 Dec 2018 13:09:43 +0000 (UTC) (envelope-from eugene@zhegan.in) Received: from bsdrookie.norma.com. (asterisk.enaza.ru [91.237.76.254] (may be forged)) by elf.hq.norma.perm.ru (8.15.2/8.15.2) with ESMTPS id wB7D9b1n071178 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 7 Dec 2018 18:09:38 +0500 (+05) (envelope-from eugene@zhegan.in) To: dtrace@freebsd.org From: "Eugene M. Zheganin" Subject: iotop for iSCSI or zfs datasets Message-ID: <67bc8f0a-8702-c6ee-9d37-3a5064709126@zhegan.in> Date: Fri, 7 Dec 2018 18:09:37 +0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Scan-Time: 0.76 X-Rspamd-Queue-Id: C439A8A77A X-Spamd-Result: default: False [-6.72 / 15.00]; ARC_NA(0.00)[]; R_SPF_FAIL(0.00)[-all]; RCVD_COUNT_FIVE(0.00)[5]; FORGED_RECIPIENTS_FORWARDING(0.00)[]; FROM_HAS_DN(0.00)[]; FORWARDED(0.00)[dtrace@mailman.ysv.freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[zhegan.in]; SPF_FAIL_FORWARDING(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_MED(-0.20)[5.0.0.0.0.5.0.0.0.0.0.0.0.0.0.0.a.6.0.2.4.5.2.2.0.0.9.1.1.0.0.2.list.dnswl.org : 127.0.9.2]; MX_GOOD(-0.01)[cached: mail-backup.zhegan.in]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-3.55)[ip: (-9.87), ipnet: 2001:1900:2254::/48(-4.53), asn: 10310(-3.25), country: US(-0.09)]; ASN(0.00)[asn:10310, ipnet:2001:1900:2254::/48, country:US]; FORGED_RECIPIENTS(0.00)[dtrace@freebsd.org,freebsd-dtrace@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2018 13:09:48 -0000 Hello, I have several iSCSI SAN systems running FreeBSD, and I need a tool to quickly determine which target/targets (and thus which initiator) are consuming most of iops. I can see that there are cfiscsi/iscsi probes in the FDT provider, and lots of zfs probes. Since my targets are using zvols as backends, both types will fir. I have some basic skills with dtrace, but in this case I totally lack documentation, so could you please point me to a direction (I'm not quite good at reading sources, but if that's the only way - you could point me to a specific part of the FreeBSD source tree I guess) to find the answer to a question "where can I find which probes/functions can I use to gather this data, including the argument list/types for them?" I was made aware that there's a ctlstat(8) utility, but it's not handy when it comes to hundreds of LUNs. I also can see the iotop in the context of network data transferred using trafshow, but this doesn't scale well to iops, and I would see reads/writes per second in terms that block devices use. Thanks. Eugene. From owner-freebsd-dtrace@freebsd.org Fri Dec 7 15:25:57 2018 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23FA81310A8B for ; Fri, 7 Dec 2018 15:25:57 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6CDAF8F64F for ; Fri, 7 Dec 2018 15:25:56 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 2D12F1310A85; Fri, 7 Dec 2018 15:25:56 +0000 (UTC) Delivered-To: dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A6971310A84 for ; Fri, 7 Dec 2018 15:25:56 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 413188F64E for ; Fri, 7 Dec 2018 15:25:55 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f53.google.com with SMTP id p6so3325556lfc.1 for ; Fri, 07 Dec 2018 07:25:55 -0800 (PST) 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:cc; bh=VsRJyIGjsUxlg6B2pat+fUT4ZhJSgIRz5tvhxumGtfo=; b=df7mmhN+ZKF/nExVm9iHKJVdGfnn2U2oNwufln8wCzWNVivX5m0KSOMK7qZ/J8o8yb zgtXPyM8bHs1kJNjNDX5mQhPgTjXvPB1xeyTbNJXw4Gc1zF5ReCC0XWo6ah9n4kpFtYx QsGh76VVvW8j86a8U5xW6jhX/2UyUNuu7SXeeMO/h/cdCWCcNDM6JT2wLNqVTaIOoAHI oQ7KimU8uxLsK9T263E+CoeaPMkmdUxGybj8sumx848ZAmvLyVnMGHWAke7KYpOA6jcu zo+6FViRo35Oo7AtKPdiey8hkD7b01Q7RYz7PAG3lQrrczmHxKdNm9lo8XQbXNQf19vr HrvQ== X-Gm-Message-State: AA+aEWbta2tAplJrHHRel+vJR1I1D2qKi2W6Fc0Vz8v7QLUp+W/MOOBc fiVqPmBFfR0Qbpofju2tzFhSHKj85NVQy6UsDhID6A== X-Google-Smtp-Source: AFSGD/VzlTYjqxZ9aPPVg4Y1Yls+MlQgCx0bqEyIrwF3gh9WilqGrdMPTe8yokozUX7wwrBWEYrDNngrqkPa/LMOHew= X-Received: by 2002:a19:200b:: with SMTP id g11mr1553445lfg.58.1544196348359; Fri, 07 Dec 2018 07:25:48 -0800 (PST) MIME-Version: 1.0 References: <67bc8f0a-8702-c6ee-9d37-3a5064709126@zhegan.in> In-Reply-To: <67bc8f0a-8702-c6ee-9d37-3a5064709126@zhegan.in> From: Alan Somers Date: Fri, 7 Dec 2018 08:25:36 -0700 Message-ID: Subject: Re: iotop for iSCSI or zfs datasets To: "Eugene M. Zheganin" Cc: dtrace@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 6CDAF8F64F X-Spamd-Result: default: False [-6.72 / 15.00]; ARC_NA(0.00)[]; FORGED_RECIPIENTS_FORWARDING(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; FORWARDED(0.00)[dtrace@mailman.ysv.freebsd.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; SPF_FAIL_FORWARDING(0.00)[]; FORGED_SENDER_FORWARDING(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[5.0.0.0.0.5.0.0.0.0.0.0.0.0.0.0.a.6.0.2.4.5.2.2.0.0.9.1.1.0.0.2.list.dnswl.org : 127.0.9.2]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; IP_SCORE(-3.55)[ip: (-9.87), ipnet: 2001:1900:2254::/48(-4.52), asn: 10310(-3.25), country: US(-0.09)]; FORGED_SENDER(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:10310, ipnet:2001:1900:2254::/48, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FORGED_RECIPIENTS(0.00)[eugene@zhegan.in ..,freebsd-dtrace@freebsd.org] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2018 15:25:57 -0000 On Fri, Dec 7, 2018 at 6:09 AM Eugene M. Zheganin wrote: > > Hello, > > > I have several iSCSI SAN systems running FreeBSD, and I need a tool to > quickly determine which target/targets (and thus which initiator) are > consuming most of iops. I can see that there are cfiscsi/iscsi probes in > the FDT provider, and lots of zfs probes. Since my targets are using > zvols as backends, both types will fir. I have some basic skills with > dtrace, but in this case I totally lack documentation, so could you > please point me to a direction (I'm not quite good at reading sources, > but if that's the only way - you could point me to a specific part of > the FreeBSD source tree I guess) to find the answer to a question "where > can I find which probes/functions can I use to gather this data, > including the argument list/types for them?" > > I was made aware that there's a ctlstat(8) utility, but it's not handy > when it comes to hundreds of LUNs. > > I also can see the iotop in the context of network data transferred > using trafshow, but this doesn't scale well to iops, and I would see > reads/writes per second in terms that block devices use. > > > Thanks. > > Eugene. What's wrong with gstat? Use "gstat -a" to suppress idle devices. -Alan