hello all,
I am trying to get memory usage stats out of /usr/bin/time, but it really
seems it is always reported as zero.
it is not a problem of the OS (kernel 2.4.7-10), since I can look under
/proc/<PID>/status and find the information.
Unfortunately, since I need to run hunderds of thousands of tests, I cannot
use that directory, which is destroyed when the process ends. It really
looks like "time" has a bug.
any ideas?
thanks,
Claudio
--
La costruzione del mio amore
mi piace guardarla salire
come un grattacielo di cento piani
o come un girasole.
(Ivano Fossati)
|
|
0
|
|
|
|
Reply
|
claudio.TOGLIMI.castellini (2)
|
6/21/2004 3:10:22 PM |
|
On Mon, 21 Jun 2004 17:10:22 +0200, Claudio Castellini staggered into
the Black Sun and said:
> I am trying to get memory usage stats out of /usr/bin/time
The man page for time(1) on my system doesn't say anything at all about
memory usage stats for the process that's being timed. Just timing
stats. Where did you hear that time(1) would provide memory usage
stats?
> it is not a problem of the OS (kernel 2.4.7-10), since I can look
> under /proc/<PID>/status and find the information.
Time to update that kernel; there were problems with the 2.4 series's
swap and memory handling up til 2.4.10.
> Unfortunately, since I need to run hunderds of thousands of tests, I
> cannot use that directory, which is destroyed when the process ends.
Get the PID of the process you're timing, poll the directory in /proc
every second while it exists, write the info to a file?
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
|
|
0
|
|
|
|
Reply
|
danSPANceswitTRAPhcrows2 (768)
|
6/21/2004 4:01:37 PM
|
|
Dances With Crows wrote:
>>I am trying to get memory usage stats out of /usr/bin/time
> The man page for time(1) on my system doesn't say anything at all about
> memory usage stats for the process that's being timed. Just timing
> stats. Where did you hear that time(1) would provide memory usage
> stats?
On my system, I get full capabilities. For instance, %K in the format
string will report (according to man time) "Average total (data+stack+text)
memory use of the process, in Kbytes." which would be just fine... but it
does not. It just reports zero, whatever I do.
(are you looking at the bash internal command's man, rather than
/usr/bin/time...?)
>>it is not a problem of the OS (kernel 2.4.7-10), since I can look
>>under /proc/<PID>/status and find the information.
> Time to update that kernel; there were problems with the 2.4 series's
> swap and memory handling up til 2.4.10.
unfortunately I am no root on this machine. The update process is decided,
if it is, intranet-wide.
>>Unfortunately, since I need to run hunderds of thousands of tests, I
>>cannot use that directory, which is destroyed when the process ends.
> Get the PID of the process you're timing, poll the directory in /proc
> every second while it exists, write the info to a file?
yes, this is a possibility. But getting /usr/bin/time to work would be
simpler and probably better...
thank you anyway
c.
--
La costruzione del mio amore
mi piace guardarla salire
come un grattacielo di cento piani
o come un girasole.
(Ivano Fossati)
|
|
0
|
|
|
|
Reply
|
claudio.TOGLIMI.castellini (2)
|
6/21/2004 4:14:29 PM
|
|
On Mon, 21 Jun 2004 18:14:29 +0200, Claudio Castellini staggered into
the Black Sun and said:
> Dances With Crows wrote:
>>>I am trying to get memory usage stats out of /usr/bin/time
>> The man page for time(1) on my system doesn't say anything at all
>> about memory usage stats for the process that's being timed.
> (are you looking at the bash internal command's man, rather than
> /usr/bin/time...?)
Yes, I was. /usr/bin/time wasn't installed... fixed that with "emerge
sys-apps/time" and I see what you saw.
> On my system, I get full capabilities. For instance, %K in the format
> string will report (according to man time) "Average total
> (data+stack+text) memory use of the process, in Kbytes." which would
> be just fine... but it does not. It just reports zero, whatever I do.
I looked at the source for /usr/bin/time and found that the memory usage
stats are only filled in for certain OSes. Linux isn't one of those
OSes, since /usr/include/sys/rusage.h isn't present on Linux.
>>>it is not a problem of the OS (kernel 2.4.7-10), since I can look
>> Time to update that kernel; there were problems with the 2.4 series's
>> swap and memory handling up til 2.4.10.
> unfortunately I am no root on this machine. The update process is
> decided, if it is, intranet-wide.
ping your sysadmin about this, then. The performance improvements I saw
when I updated to 2.4.10 a year or so back were substantial. You also
might want to mention the fact that any user can crash the system on an
old kernel by compiling and running a small C program...
http://slashdot.org/article.pl?sid=04/06/14/118209&tid=128 among other
places where this kernel bug was mentioned.
>> Get the PID of the process you're timing, poll the directory in /proc
>> every second while it exists, write the info to a file?
> yes, this is a possibility. But getting /usr/bin/time to work would be
> simpler and probably better...
I don't think so, now that I've had a look at the source of time. You'd
have to figure out some sort of hack to get the rusage stats, which
would certainly involve modifying time's source. Oh well, whatever you
think....
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
|
|
0
|
|
|
|
Reply
|
danSPANceswitTRAPhcrows2 (768)
|
6/21/2004 7:09:54 PM
|
|
|
3 Replies
83 Views
(page loaded in 0.071 seconds)
Similiar Articles: differences between /bin, /usr/bin and /usr/local/bin - comp.unix ...Hello, What are the differences between /bin, /usr/bin and /usr/local/bin? ... to work (like 'ls', 'rm', 'mkdir' etc.) which would be available at any time (for ... /usr/local/lib - ln or LD_LIBRARY_PATH - comp.unix.solaris ...My fading memory tells me that it's something ... ln -s" command - comp.sys.hp.hpux # cd /bin # ln -s /usr/local/bin/bash Usage ... Privacy Policy | All Times Are GMT(UTC) | ... How to findout the memory used by a process in HPUX - comp.sys.hp ...In Solaris, we can use pmap to find out memory utilization of a process ... 0000000100000000 52360K read/exec /ora/92/bin ... anon ]FFFFFFFF7D100000 16K read/exec /usr ... Shell script to monitor interface usage - comp.unix.admin ...#!/usr/bin/bash # interface=hme0 # # clear echo ... script that to monitor ... space, memory usage and free memory ... Privacy Policy | All Times Are GMT(UTC) | powered ... /usr/local/bin/stty: not found - comp.lang.tclI have searched and found this problem many times on the Internet, but without ... 1402: checking for gcc > configure:1418: found /usr/local/bin/gcc Try to use /usr/sfw/bin ... /usr/bin/file on Word Documents - comp.unix.solarisWanting to use the '/usr/bin/file' command to tell which files are MS Word Documents, MS ... Privacy Policy | All Times Are GMT(UTC) | powered by Optimizing ntpd memory usage? - comp.protocols.time.ntpPlease see http://ntp.isc.org/bin/view/Dev/NewNtpConfFormat#Memory_locking because on ... vsz and rss? - comp.unix.solaris Optimizing ntpd memory usage? - comp.protocols.time ... CDE to Java Desktop - comp.unix.solarisIsn't it time you learned how to use useradd(1M)? # useradd -c 'User's Name' -d /export/home/user -m -s /usr/bin/ksh user # passwd ... The invocation of a memory and ... Change process/command name? - comp.unix.solarisIf we use /usr/bin/ps or /bin/ps we get server server ... kernel patch could come along and break it big time ... will write at that area, so there is no memory lock ... show the number of thread of a process - comp.sys.hp.hpux ...... threads exists on system: For HP 11.00 : #!/usr/bin ... Is it possible to limit memory usage per process? - comp.sys ... Privacy Policy | All Times Are GMT(UTC) | powered by Monitoring Memory Usage - Scalable Computing Support Center - DukeWiki/usr/bin/time. On most Unix systems ... to run it within the /usr/bin/time program ... except that Linux (our the kernel we are currently using), does not show memory usage ... CPU & memory usage - LinuxQuestions.orgI'ld like to gather CPU & memory usage while a program is executing and print out ... time is a shell builtin with much simpler output so use /usr/bin/time This will give you ... 7/14/2012 7:19:55 AM
|