Archive for May, 2007

Tracing the Python Stack in GDB

Tuesday, May 22nd, 2007

Several times I have been confronted with this problem. The last time was some time ago, where my main project application would lockup, and we were unable to consistently reproduce the problem. It always seems to be an exercise in futility attempting to debug a hung Zope process using GDB. Since I’m […]

Varnish Cache

Thursday, May 10th, 2007

Not wanting to loose this, it’s worth jotting down to take a peek at soon. A cursory look over the site, it definately looks interesting - not to mention I’m just a little disenfranchised with Squid. I expect I’ll have a report on it soon enough.
Varnish Home Page

Printing Stack Trace

Wednesday, May 9th, 2007

Useful for printing out the stack trace when debugging calls within Zope code:

items = traceback.extract_stack()
for stackItem in items:
msg = ‘ %s:%s:’ % (os.path.basename(stackItem[0]), stackItem[1])
logger.warn(’%s:’ % msg)

The LSOF Quest

Thursday, May 3rd, 2007

In searching how to find only files listed in the kernel file table open by a process, most sites out there have the same old basic examples of lsof, i.e. listing open files for a specific port, for a given pid, or a particulary user. While these are interesting, there is little advanced […]