From: Mark W. A. <sl...@do...> - 2004-09-22 16:27:00
|
Anybody else here? On Tue, Sep 21, 2004 at 05:43:50PM -0400, Mark W. Alexander wrote: > Oh, what the heck, I like it, so: > > http://dotnetslash.net/static/pyssh.zip > > Changes: > * restructured as a python package > * added setup.py for Distutils > * added debian control directory for producing .debs > There's no Distutils support for Debian, yet. debian/rules > creates a package matching the version of python specified by > the PYTHON variable. The version number is extracted from setup,py. > The only time anything should need to be modified is if packages > are needed for multiple versions of python. If so, they can be > created by changing the PYTHON variable (i.e. PYTHON=python2.2) > and re-run `debian/rules binary` to make a python2.2-pyssh .deb > * added module fssa (Find Secure Shell Agent) to allow > batch jobs to connect to a previously authenticated > ssh-agent and run without intervention (posix only) I used a pyssh batch job last night to monitor a box that has been seemingly going to "sleep" on us. The first symptom is that ssh logins take forever, so pyssh was perfect for the job, and it worked well. Except.... When I came in this a.m., my workstation (where I was running the pyssh "probe" script) was dog slow. There were hundreds of zombie ssh processes that pyssh apparently was not reaping. I've added signal handling to the Ssh class to trap SIGCHLD. The signal handler retains any previously user specified signal handler, does an os.waitpid on the sshpid, then calls the original user specified handler. This eliminates the zombies. Note that I have not actually tested with a previously set signal handler. Although it should work, if it doesn't I suspect anyone who's doing signal handling can deal with any problems it exposes. The zip file at the above location has been updated. I also want to note that fssa.py is a direct port from Steve Allen's fsa.sh shell version discussed at http://www.ucolick.org/~sla/ssh/sshcron.html Direct link to script: http://www.ucolick.org/~sla/ssh/fsa It could be improved by using walk instead of getoutput(`find`), but this way was quick and It Works For Me(TM) ;) Thanks again on your work on this. It came in very handy. mwa -- Mark W. Alexander sl...@do... |