Memory and CPU Usage Script

Richard Gaskin ambassador at fourthworld.com
Thu Jun 12 18:45:55 EDT 2014


J. Landman Gay wrote:

> On 6/6/2014, 7:33 PM, Richard Gaskin wrote:
>>
>> But even more fun, you can take a trip back to 1997 to read Scott
>> Raney's article in Linux Journal about using LiveCode (back then called
>> "MetaCard") to build a GUI for top:
>> <http://porky.linuxjournal.com:8080/LJ/043/2110.html>
>
> This looked pretty cool so I recreated his stack. I think Mavericks
> stores the file somewhere else because the scripts ran just fine but I
> got no data back.
>
> If anyone knows where Mavericks put the file, I'd like to try it. As-is,
> it's looking for "/proc/stat" and there is no proc folder in OS X.

One nice thing about Unix/Linux is that everything is setup to appear as 
a file, so piping and other goodies work together nicely.

One tricky thing about Unix/Linux is that not everything that appears to 
be a file is actually a file. :)

/proc is a virtual file system containing system info ("processes"). 
It's more akin to an associative array than a directory tree.

Handy as it is, not all *nixes support it - this site explains more, 
with some suggestions of OS X alternatives to some /proc info:

<http://osxbook.com/book/bonus/ancient/procfs/>

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list