Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: time builtin vs. time(1): difference in memory numbers



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
denominator.  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?

-- 



Messages sorted by: Reverse Date, Date, Thread, Author