Python help...

Mitch Anderson mitch at
Wed Oct 5 13:56:55 MDT 2005

I'm trying to learn python and what better way than with a project that
will be somewhat useful.

Currently I'm wanting to gather data from sar, and dump it to mysql, but
I'm getting an error and I don't know where its coming from...

My code is simple:

import commands
print commands.getoutput("/usr/bin/sar 0 | grep all | awk '{ print
$4\"#\"$5\"#\"$6\"#\"$7\"#\"$8 }'")

problem is the results:
Cannot write data to system activity file: Broken pipe

I'm not sure where its trying to write anything... as the command
executed on the command line produces no errors..


More information about the PLUG mailing list