HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

script for killing all ftpd sessions

 
Deepu Chakravarty
Regular Advisor

script for killing all ftpd sessions

I have many ftp sessions in my server (rp7420 HPUX 11.11). I need to kill all these ftpd sessions periodically. I am using following command to kill these sessions:
kill -9 ` ps -ef|grep ftpd|awk '{print $2}'`
. This line I have added in one file and running the file with a cron job. But the cron job is itself killing the first ftpd job it is finding and not the other ftp sessions.
How it can be achieved? Thanks in advance.
3 REPLIES

Re: script for killing all ftpd sessions

Add -9 if it fails:
kill $(UNIX95=EXTENDED_PS ps -C ftpd -opid=)
Deepu Chakravarty
Regular Advisor

Re: script for killing all ftpd sessions

I have able to done. Thanks.

Re: script for killing all ftpd sessions

If you are happy with the answers, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33