Zsh Mailing List Archive
Messages sorted by:
Re: time builtin vs. time(1): difference in memory numbers
- X-seq: zsh-users 15606
- From: Anonymous <swell.k@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: time builtin vs. time(1): difference in memory numbers
- Date: Sun, 05 Dec 2010 14:38:47 +0300
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:message-id:user-agent:mime-version:content-type; bh=BgQJit2fjb1c19DYqJkNPCgppo0OCIwJW+Ws1776rc4=; b=ZySY4d4/tgKMifqDzeOX90a6nPgpwzPFNo9RiSLZBpEgbXOl/PLq0ZYj5ml4RHiT/a /XAwCEQeshSQMEQmAWyIB0kZ/aXbIAvv2eEFjZi/Guy4glDKCvqetLrIcyEPg8uEjPc+ LX9dCP9VBNEoTDCpjgQIdnKdudMOyWJtmyudw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type; b=WCHxpJhwYmHxp6UV/Ar27h3JicDcViWOLdetX1La+BqWXznIKyg0wLxZfUVjeFHsh5 jK8oFtkvsQYj1L0SkhSIoh8iD1AgGkR6N8KOixdw6D3YGj6ogdV6xfG5Vdw94Z34rAhI JmOVnRas9/PibTW1ycpL3E7ZdKhnhP8bXpT0s=
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <868w06l3cq.fsf@xxxxxxxxx> <101204102844.ZM5983@xxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> On Dec 4, 4:43am, Anonymous wrote:
> } Subject: time builtin vs. time(1): difference in memory numbers
> } zsh-4.3.10_4, FreeBSD 9.0-CURRENT r216095M amd64
> } I'm a bit puzzled by...
> } - numbers for shared/unshared space don't match those from `time -l'
> Zsh's %X and %D compute the average amount of shared/unshared space by
> using the ru_ixrss and (ru_idrss + ru_isrss) values from rusage,
> respectively, as the numerator, and (ru_utime + ru_stime) as the
> denominator. I don't know what the BSD time command uses for the
According to getrusage(2) on BSDs ixrss/idrss/isrss are "expressed in
units of kilobytes * ticks-of-execution". So, I've made a quick hack
a bit different from time(1) that uses stathz from kern.clockrate sysctl.
> Zsh also rounds down microseconds to perform all of its
> computations in seconds, which may lead to differences.
> } - zsh manual page claims that %M stands for memory in Kbytes while it
> } displays them in Mbytes
> Hm. %M stands for ru_maxrss / 1024. Zsh would only be displaying
> that in Mbytes if ru_maxrss is expressed in Gbytes internally. Has
> FreeBSD changed the base units of maxrss in rusage?
maxrss like ixrss/idrss/isrss is expressed "in kilobytes"
Messages sorted by: