Re: [CentOS] Script consumes memory
>> >>> I have the following script that when executed, consumes memory and >>> makes the system inaccessible. All process are halted. >>> >> You can probably drastically simplify your script by using >> ncftpput >> >> http://www.ncftp.com/ncftp/doc/ncftpput.html >> > > and simplify it even more using scp, assuming the server at the other > end is unix or linux and supports ssh/scp. first, exchange ssh-keys, > then... > > scp $DataFile $VMID:$$vmu...@$vmdir > And rsync over ssh is even better, especially if you repeat copies of mostly the same content or there is a chance you will expand to sending a directory full of files. -- Les Mikesell lesmikes...@gmail.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Script consumes memory
nate wrote: > Frank M. Ramaekers wrote: > >> I have the following script that when executed, consumes memory and >> makes the system inaccessible. All process are halted. >> > > You can probably drastically simplify your script by using > ncftpput > > http://www.ncftp.com/ncftp/doc/ncftpput.html > and simplify it even more using scp, assuming the server at the other end is unix or linux and supports ssh/scp. first, exchange ssh-keys, then... scp $DataFile $VMID:$$vmu...@$vmdir btw, if [ $MYSCRIPTDIR != "." then cd $MYSCRIPTDIR fi is rather redundant. cd . is a no-op, so you might as well just say... cd $MYSCRIPTDIR ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Script consumes memory
Frank M. Ramaekers wrote: > I have the following script that when executed, consumes memory and > makes the system inaccessible. All process are halted. You can probably drastically simplify your script by using ncftpput http://www.ncftp.com/ncftp/doc/ncftpput.html nate ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Script consumes memory
Frank M. Ramaekers wrote: > I have the following script that when executed, consumes memory and > makes the system inaccessible. All process are halted. > > First, I don't understand what is wrong with the script > Secondly, I'm surprised that Linux allows this to run unchecked to the > detriment of the entire system. Linux allows what you've set with ulimit or the administrator sets in /etc/security/limits.conf. -- Les Mikesell lesmikes...@gmail.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Script consumes memory
Good catchnot sure how I missed that! (Too many things going on. THANKS! Frank M. Ramaekers Jr. Systems Programmer MCP, MCP+I, MCSE & RHCE American Income Life Insurance Co. Phone: (254)761-6649 1200 Wooded Acres Dr.Fax: (254)741-5777 Waco, Texas 76710 -Original Message- From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On Behalf Of Alan Sparks Sent: Tuesday, September 29, 2009 10:27 AM To: CentOS mailing list Subject: Re: [CentOS] Script consumes memory Perhaps I'm missing it, but where are your definitions of DIRNAME and BASENAME? Without them, you're probably re-executing the script in the bactick references. Basically a fork-bomb. -Alan Frank M. Ramaekers wrote: > I have the following script that when executed, consumes memory and > makes the system inaccessible. All process are halted. > > First, I don't understand what is wrong with the script > Secondly, I'm surprised that Linux allows this to run unchecked to the > detriment of the entire system. > > SCRIPT - > #!/bin/sh > FTP="/usr/bin/ftp" > # > VMID="asystem.ourcompany.com" > VMUser="STATDASD" > VMPass="STATDASD" > VMDir="VMSYSA:." > DataFile="data.txt" > VMFile="DS8100.DATA" > #--- Get some information about me > #--work from the same directory as the script > MYSCRIPT=`$BASENAME $0` > MYSCRIPTDIR=`$DIRNAME $0` > if [ $MYSCRIPTDIR != "." ] > then > cd $MYSCRIPTDIR > fi > #--- FTP to MAINT on mkmfvm > $FTP -vn <<$$EOD > open $VMID > user $VMUser $VMPass > cd $VMDir > ascii > put $DataFile $VMFile > bye > $$EOD > > Frank M. Ramaekers Jr. > Systems Programmer MCP, MCP+I, MCSE & RHCE > American Income Life Insurance Co. Phone: (254)761-6649 > 1200 Wooded Acres Dr.Fax: (254)741-5777 > Waco, Texas 76710 > > > > > > > _ > This message contains information which is privileged and confidential and is solely for the use of the > intended recipient. If you are not the intended recipient, be aware that any review, disclosure, > copying, distribution, or use of the contents of this message is strictly prohibited. If you have > received this in error, please destroy it immediately and notify us at privacy...@ailife.com. > ___ > CentOS mailing list > CentOS@centos.org > http://lists.centos.org/mailman/listinfo/centos > ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos _ This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at privacy...@ailife.com. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Script consumes memory
Perhaps I'm missing it, but where are your definitions of DIRNAME and BASENAME? Without them, you're probably re-executing the script in the bactick references. Basically a fork-bomb. -Alan Frank M. Ramaekers wrote: > I have the following script that when executed, consumes memory and > makes the system inaccessible. All process are halted. > > First, I don't understand what is wrong with the script > Secondly, I'm surprised that Linux allows this to run unchecked to the > detriment of the entire system. > > SCRIPT - > #!/bin/sh > FTP="/usr/bin/ftp" > # > VMID="asystem.ourcompany.com" > VMUser="STATDASD" > VMPass="STATDASD" > VMDir="VMSYSA:." > DataFile="data.txt" > VMFile="DS8100.DATA" > #--- Get some information about me > #--work from the same directory as the script > MYSCRIPT=`$BASENAME $0` > MYSCRIPTDIR=`$DIRNAME $0` > if [ $MYSCRIPTDIR != "." ] > then > cd $MYSCRIPTDIR > fi > #--- FTP to MAINT on mkmfvm > $FTP -vn <<$$EOD > open $VMID > user $VMUser $VMPass > cd $VMDir > ascii > put $DataFile $VMFile > bye > $$EOD > > Frank M. Ramaekers Jr. > Systems Programmer MCP, MCP+I, MCSE & RHCE > American Income Life Insurance Co. Phone: (254)761-6649 > 1200 Wooded Acres Dr.Fax: (254)741-5777 > Waco, Texas 76710 > > > > > > > _ > This message contains information which is privileged and confidential and is > solely for the use of the > intended recipient. If you are not the intended recipient, be aware that any > review, disclosure, > copying, distribution, or use of the contents of this message is strictly > prohibited. If you have > received this in error, please destroy it immediately and notify us at > privacy...@ailife.com. > ___ > CentOS mailing list > CentOS@centos.org > http://lists.centos.org/mailman/listinfo/centos > ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] Script consumes memory
I have the following script that when executed, consumes memory and makes the system inaccessible. All process are halted. First, I don't understand what is wrong with the script Secondly, I'm surprised that Linux allows this to run unchecked to the detriment of the entire system. SCRIPT - #!/bin/sh FTP="/usr/bin/ftp" # VMID="asystem.ourcompany.com" VMUser="STATDASD" VMPass="STATDASD" VMDir="VMSYSA:." DataFile="data.txt" VMFile="DS8100.DATA" #--- Get some information about me #--work from the same directory as the script MYSCRIPT=`$BASENAME $0` MYSCRIPTDIR=`$DIRNAME $0` if [ $MYSCRIPTDIR != "." ] then cd $MYSCRIPTDIR fi #--- FTP to MAINT on mkmfvm $FTP -vn <<$$EOD open $VMID user $VMUser $VMPass cd $VMDir ascii put $DataFile $VMFile bye $$EOD Frank M. Ramaekers Jr. Systems Programmer MCP, MCP+I, MCSE & RHCE American Income Life Insurance Co. Phone: (254)761-6649 1200 Wooded Acres Dr.Fax: (254)741-5777 Waco, Texas 76710 _ This message contains information which is privileged and confidential and is solely for the use of the intended recipient. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution, or use of the contents of this message is strictly prohibited. If you have received this in error, please destroy it immediately and notify us at privacy...@ailife.com. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos