Re: memory usage

Alexis <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <[email protected]>
Ray Andrews <[email protected]> writes:

> Is there some way of measuring zsh's entire footprint in 
> memory?  I
> mean at creation of a shell, not while running anything.

You could use ps(1). Inside the shell, you could run:

  $ ps -q $$ -o comm,rss,vsize

where `$$` is a reference to the `$` variable, which contains the 
PID of that shell. Outside that shell, replace `$$` by the PID of 
the relevant shell as found by other means (e.g. via pgrep(1)):

  $ ps -q 1234 -o comm,rss,vsize

Here's an article explaining 'memory usage' as represented by 
vsize/vsz and rss:

  https://linuxconfig.org/ps-output-difference-between-vsz-vs-rss-memory-usage


Alexis.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.