Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752082AbbBQQJv (ORCPT ); Tue, 17 Feb 2015 11:09:51 -0500 Received: from mail-ig0-f181.google.com ([209.85.213.181]:56454 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758AbbBQQJt (ORCPT ); Tue, 17 Feb 2015 11:09:49 -0500 Message-ID: <54E367CB.9030309@gmail.com> Date: Tue, 17 Feb 2015 09:09:47 -0700 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Andrey Vagin , linux-kernel@vger.kernel.org CC: linux-api@vger.kernel.org, Oleg Nesterov , Andrew Morton , Cyrill Gorcunov , Pavel Emelyanov , Roger Luethi Subject: Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes References: <1424161226-15176-1-git-send-email-avagin@openvz.org> In-Reply-To: <1424161226-15176-1-git-send-email-avagin@openvz.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1999 Lines: 39 On 2/17/15 1:20 AM, Andrey Vagin wrote: > And here are statistics about syscalls which were called by each > command. > $ perf stat -e syscalls:sys_exit* -- ps ax -o pid,ppid 2>&1 | grep syscalls | sort -n -r | head -n 5 > 20,713 syscalls:sys_exit_open > 20,710 syscalls:sys_exit_close > 20,708 syscalls:sys_exit_read > 10,348 syscalls:sys_exit_newstat > 31 syscalls:sys_exit_write > > $ perf stat -e syscalls:sys_exit* -- ./task_diag_all 2>&1 | grep syscalls | sort -n -r | head -n 5 > 114 syscalls:sys_exit_recvfrom > 49 syscalls:sys_exit_write > 8 syscalls:sys_exit_mmap > 4 syscalls:sys_exit_mprotect > 3 syscalls:sys_exit_newfstat 'perf trace -s' gives the summary with stats. e.g., perf trace -s -- ps ax -o pid,ppid ps (23850), 3117 events, 99.3%, 0.000 msec syscall calls min avg max stddev (msec) (msec) (msec) (%) --------------- -------- --------- --------- --------- ------ read 353 0.000 0.010 0.035 3.14% write 166 0.006 0.012 0.045 3.03% open 365 0.002 0.005 0.178 11.29% close 354 0.001 0.002 0.024 3.57% stat 170 0.002 0.007 0.662 52.99% fstat 19 0.002 0.003 0.003 2.31% lseek 2 0.003 0.003 0.003 6.49% mmap 50 0.004 0.006 0.013 3.40% ... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/