Re: [Ssh-sftp-perl-users] Weird processor usage, when redirecing IO to /dev/null
Brought to you by:
dbrobins
From: Nigel R. <ni...@sy...> - 2009-03-03 15:57:22
|
I had a similar issue. Doing a search, there was another module that should be installed to speed things up. It was either Math::BigInt and/or Math::BigInt::GMP Try installing those and see if it makes a difference. Regards Nigel Thomas Lorenzen wrote: > > Hi' > > > > I am targeting a simple perl loop, in which I with ssh->cmd will > execute a command on a remote host. This code should run in the back > ground on the mother host. > > > > The following simple code shows my observation. > > > > ##### > > use Net::SSH::Perl; > > > > $host = Net::SSH::Perl->new("remotehost"); > > $host->login(); > > > > while (1) { > > print `date`; > > ($out, $err, $exit) = $host->cmd("sleep 10"); > > } > > ##### > > > > Now, call the code test.pl and run "./test.pl". Command "top" running > in another shell on the mother host does not show anything suspicious. > Now I would like to have the code running in the background and thus I > do "./test.pl </dev/null 1>/dev/null 2>/dev/null &". Now > the "top" command shows my little program eating up one full processor. > This puzzles me very much indeed and I am speculating, if this is a bug > or a feature. > > > > Thanks for any help in advance. > > > > Best regards. > > > > Thomas. > > > ___________________________________________________________ > Skal du købe ny bil? Sammenlign priser på brugte biler med Kelkoo og find > et godt tilbud! - Se mere her > http://dk.yahoo.com/r/pat/mmb------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H_______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > -- Nigel Reed Candidate for Lieutenant Governor of Marketing 2009-2010 President & CEO Sysadmin, Inc 972 673 4199 http://www.sysadmininc.com Toastmasters District 50 Vista Division Governor 2008-2009 Awareness, Attitude and Action bring Achievement! |