ok perfect...'log readers' sounded a bit vague...there are
python functions that will parse a log...but are quite
different from ones that invoke shell commands.
What I'm looking for is something to replace all the damned
torsmo's on my screen...I dont use nearly as much as I have
here, but I still use the portage tracker and the process
monitor on the extreme left and right, respectively.
The portage tracker uses genlop and awk to parse
/var/log/emerge.log ...I've used a cron job to update
lastemerge.log, last unmerge.log, and nextsync.log and now
torsmo just cats those logfiles...so that just needs a log
parser. I get a few requests for the original script,
however, so it would probably be best to use the desklet to
parse /var/log/emerge.log directly. It's a big ugly file and
genlop parses it well...but genlop usually requires root or
at least sudo.
The process tracker is just a modified ps:
ps gaxo %cpu,%mem,comm,user| sort +0nr| head -n 9
This can obviously be coded into a desklet instead of using
it as a config option, but it would appeal to more people if
you could specify your own command in the config file instead
of rewriting the desklet everytime you wanted something
new.
I've been doing some work on a process monitor, but as I have
little to no Python experience, its rough work...basically
I'm cannibalizing existing desklets and seeing what does
what. Once I get myself familiar with the structure, I'll be
able to actually speak in python to explain what I'm looking
for.