Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
measuring memory usage with time(1)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
iandow
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jul 2004
Posts: 135
Location: Washington, DC

PostPosted: Thu Feb 02, 2006 3:46 pm    Post subject: measuring memory usage with time(1) Reply with quote

The unix time utility includes an option for measuring the amount of memory a process consumes while running (see time(1) man page, options %M, %t, %K, %D). But, whenever I run time with any of those options, they always end up giving me _zero_.

The time(1) man page's BUG section states that "Not all resources are measured by all versions of Unix, so some of the values might be reported as zero."

Does anyone know how to fix this bug for gentoo?

Here's a good test:

Code:
 /usr/bin/time -f '%S %M %t %K ' gimp

To which I get the following output:
    0.21 0 0 0


Or, does anyone know of another utility I can use to get a measurement of a process's memory usage? The problem with ps and top is that they don't *add* up the total memory usage, they just show current usage.

Thanks.

-ian
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum