From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 18 07:19:02 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCE8C106566B; Sun, 18 Mar 2012 07:19:02 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 102EE8FC0C; Sun, 18 Mar 2012 07:19:01 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so5108024bkc.13 for ; Sun, 18 Mar 2012 00:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=lAFMcUrqi76gEZ3wnfpa3J4DkYTsq8QeIFAathh8EJk=; b=JGMVcpHzw4gENjmx8M7DpldnGpEmisUs/h6BYebnO+zfI9LQ+BPegU7mdwdHX/MxSt E4j/iRsz4R0pOhFV6wshxqaw/xAcUbPU5RLhhA9JmiCV6MvvJBOgxfsrTsPEMW2V3V1D N9N3nNEasf3mInFd7DHPEYvJahMIoeeboOJvOlJh/0loSpCTxp6dlilZ09keHP+MWW+V q6nkyS/BL+kSjG9ztHrp3nZeAuIusMTCtazvdv8ujyqVSvf2U6ObHyBU+kmq5izpNTH/ MLYZO9cugHEZDSY5Tj0jbpXF82EldrW7j55AK5c2wQxsvyPMxgm8HnT3TsliRWXji8FW XM/A== Received: by 10.204.13.72 with SMTP id b8mr3059552bka.105.1332055140842; Sun, 18 Mar 2012 00:19:00 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id bw9sm18648408bkb.8.2012.03.18.00.18.58 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Mar 2012 00:18:59 -0700 (PDT) From: Mikolaj Golub To: Jilles Tjoelker References: <8662e3m3eq.fsf@kopusha.home.net> <20120317212901.GA44534@stack.nl> X-Comment-To: Jilles Tjoelker Sender: Mikolaj Golub Date: Sun, 18 Mar 2012 09:18:57 +0200 In-Reply-To: <20120317212901.GA44534@stack.nl> (Jilles Tjoelker's message of "Sat, 17 Mar 2012 22:29:01 +0100") Message-ID: <86d38apeam.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Kostik Belousov , freebsd-hackers@freebsd.org, Robert Watson Subject: Re: a sysctl for process binary osreldate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2012 07:19:03 -0000 On Sat, 17 Mar 2012 22:29:01 +0100 Jilles Tjoelker wrote: JT> On Sat, Mar 17, 2012 at 09:30:05PM +0200, Mikolaj Golub wrote: >> I added osrel output to procstat -b option: >> kopusha:~% procstat -b 2975 >> PID COMM OSREL PATH >> 2975 emacs 1000001 /usr/local/bin/emacs-23.3 >> Would this be ok or someone see a better way? JT> Hmm, this means that procstat is not supposed to be used from scripts as JT> it is apparently OK to change its output format like this? Yes, breaking output compatibility worries me too. Although I already broke it recently for '-s' option, adding umask output. Let me cite Robert (taken from our then discussion about procstat umask output): > if we add too many arguments we'll start looking like ps(1), whereas the > point of procstat(1) is that it's *not* ps(1) :-). That is why I decided to not introduce yet another option here too at the cost of breaking compatibility. But I am open for any suggestions. JT> In some ways, querying via ps would be better for scripts since it JT> allows things like JT> ps -p PID -o KEYWORD= JT> which do not need additional parsing except that many of the newer JT> things in procstat do not have ps keywords. JT> -- JT> Jilles Tjoelker -- Mikolaj Golub