Memory and CPU Usage Script

Kay C Lan lan.kc.macmail at
Fri Jun 6 20:19:10 EDT 2014

On Sat, Jun 7, 2014 at 2:21 AM, Mark Wieder <mwieder at> wrote:
> Nice, but top didn't give you what you were looking for?

I noticed in my search that people reported top as being quite CPU
intensive and in my own tests it went to No2, just below LC when I was
running my stacks; so a bit chicken and egg, I wanted to know what was
using my memory and CPU and using top was always going to place itself
in the list.  This is understandable as top is active whilst the id,
ps, and vm_stat are all static, but I notice that even Activity
Monitor with all it's bells and whistles uses significantly less CPU
than top.

Plus, it was more of an exercise to see if I could reinvent the wheel
and build something similar in LC that could be customised to report
exactly what I was interested in, when I was interested in it, no
more, no less. Hopefully it will provide a stepping off point for
others to adjust the output to exactly meet their needs.

More information about the Use-livecode mailing list