Hi,

On Sun, Feb 17, 2002 at 01:20:40PM +0200, Dan Kenigsberg wrote:
> Hi
> 
> I bet it is a stupid question with a simple answer, but I failed to find it, so:
> 
> Is there a utility to measure memory usage of a process, preferably proken into
> static/stack/heap? The man page of GNU `time' suggests that it should do the
> trick, but running
>       /usr/bin/time myprog
> always reports 0 memory usage.

In addition to Nadav's reply, and not a direct answer to yours:
In VMS, and some BSDs, you can press <Ctrl><T> and get a status line
about the current process. I started implementing this for Linux,
but didn't continue very much due to lack of interest (only 2-3
people replied to mails to lkml, linux-serial, linuxconsole-dev).
'started' means it works, and caused no problems to me (yet?),
but you can't e.g. control it with stty. If interested, look at
<http://www.cs.tau.ac.il/~didi/ctrl-t>. It does work with 2.4.7,
but I didn't check newer kernels.
If I see interest in this forum, maybe I'll invest more time in this.

> 
> And another question - is there a portable way of doing it using system calls?

As I have written to lkml, this Ctrl-T is working and well-documented
in *BSD and in 'info libc' (glibc), including a 'SIGINFO' I didn't
implement (yet). It's also mentioned in linux's 'man termios' recent
versions. Still, I got the feeling that people mentally rejected it
as being 'Other people's OS toys'.

> 
> Thanks,
> 
>       Dan.
> 
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]

Enjoy,
        Didi


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to