Home > Computers, Software testing > A quick shot of syrup

A quick shot of syrup

July 27th, 2010

So yesterday I needed an easy, quick way to track and log the memory use of an application remotely, in (near) real-time, as I performed various actions.

I could SSH in and run something like top, but that doesn’t get me the logging. There are several graphic “activity monitor” like utilities including, well, Activity Monitor and Big Top, but those don’t work remotely and I didn’t want to graphically control the remote machine since that performance was part of what I was measuring.

Apple’ Instruments would have been really great, but it doesn’t work remotely, at least in any way that was quick or obvious.

After some brief searching, I found a great too, written in Python, called Syrupy, written by a guy named Jeet Sukumaran. It was tiny, simple, lightweight and does only one thing – records the state of a process over time. You tell it which process(es) you want to monitor, and how often to sample them, and it will log the results to a file or the console.

If you choose the latter, you can even make quick and dirty test notes “in line” which makes it really easy to go back later and remember what you did/see the effect of what you did on memory or processor use. You can also control the output format with a few arguments when you invoke Syrupy, which can be useful if you have some graphing app that is picky about formatting.

You run it on the remote machine via an SSH session (obviously you can use it locally too).

Default output looks like this:

SYRUPY: Writing raw process resource usage logs to 'syrupy_20100726160016.ps.raw'
SYRUPY: sampling process 169
169 2010-07-26 16:00:16 02:08 0.0 0.1 4932 409880
169 2010-07-26 16:00:26 02:18 0.0 0.1 4924 409360

Anyway, Syrupy can be found here if you need it.

Categories: Computers, Software testing Tags:
Comments are closed.