<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: rogue ftp processes in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811341#M84348</link>
    <description>Not that Im aware of ... I guess you could get into the obscure options on lsof to look for open sockets, but it would not be able to show useage.&lt;BR /&gt;&lt;BR /&gt;The biggest problem I see in this case is that there is no real way of knowing if an FTP is live or not.. that is why time is a guestimate.&lt;BR /&gt;&lt;BR /&gt;I have 5 ftp servers, 3 HP-UX and 2 solaris.  All these systems would have hung processes.  I switched from built in FTPD to wu_ftpd long before supported on HP-UX.  Same problems.  &lt;BR /&gt;I found in Solaris that proftpd does not hang, and use that now on solaris.  I have not been able to get a good working compile on HP-UX though to see if it fixes the issue there.&lt;BR /&gt;&lt;BR /&gt;Shannon</description>
    <pubDate>Tue, 24 Sep 2002 19:17:06 GMT</pubDate>
    <dc:creator>Shannon Petry</dc:creator>
    <dc:date>2002-09-24T19:17:06Z</dc:date>
    <item>
      <title>rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811334#M84341</link>
      <description>Hi All,&lt;BR /&gt;I am trying to monitor for rogue and idle ftpd processes on a hpux box......can any one suggest how to script this so it can be run using cron....&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;R..</description>
      <pubDate>Mon, 23 Sep 2002 11:53:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811334#M84341</guid>
      <dc:creator>RAKESH_12</dc:creator>
      <dc:date>2002-09-23T11:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811335#M84342</link>
      <description>&lt;BR /&gt;How is ftp defined in /etc/inetd.conf ??&lt;BR /&gt;&lt;BR /&gt;And what do you mean when you say "rogue" ftpd processes?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 23 Sep 2002 12:35:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811335#M84342</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-09-23T12:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811336#M84343</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Logically the ftpd is the standard inetd startup so just check the parameters&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ftpd(1M)                                                           ftpd(1M)&lt;BR /&gt;&lt;BR /&gt; NAME&lt;BR /&gt;      ftpd - DARPA Internet File Transfer Protocol server&lt;BR /&gt;&lt;BR /&gt; SYNOPSIS&lt;BR /&gt;      /usr/lbin/ftpd [-l] [-p] [-v] [-t timeout] [-T maxtimeout] [-u umask]&lt;BR /&gt;      [-B size]&lt;BR /&gt;&lt;BR /&gt; DESCRIPTION&lt;BR /&gt;      ftpd is the DARPA Internet File Transfer Protocol server.  It expects&lt;BR /&gt;      to be run by the Internet daemon (see inetd(1M) and inetd.conf(4)).&lt;BR /&gt;      inetd runs ftpd when a service request is received at the port&lt;BR /&gt;      indicated in the ftp service specification in /etc/services (see&lt;BR /&gt;      services(4)).  ftpd recognizes the following options and command-line&lt;BR /&gt;      arguments.&lt;BR /&gt;&lt;BR /&gt;           -l             Causes each FTP session to be logged in the syslog&lt;BR /&gt;                          file.  For anonymous FTP sessions, other&lt;BR /&gt;                          information is also logged in the syslog file.&lt;BR /&gt;                          This information includes what files are stored&lt;BR /&gt;                          and retrieved and what directories are created.&lt;BR /&gt;Standard input&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If -l -s added in /etc/inetd.conf you can &lt;BR /&gt;see all ftp processes on the machine logged in the syslog.log&lt;BR /&gt;&lt;BR /&gt;Could not be easier.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;                     Steve Steel</description>
      <pubDate>Mon, 23 Sep 2002 12:47:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811336#M84343</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-09-23T12:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811337#M84344</link>
      <description>it is defined in the inetd.conf as:&lt;BR /&gt;&lt;BR /&gt;ftp          stream tcp nowait root /usr/lbin/ftpd      ftpd -u 002 -l -a&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I some times have phantom ftp processes which never close for some reason - I want to monitor for these using some type of script.........if you require any more info let me know - im stuck as where to progress from here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;R..</description>
      <pubDate>Mon, 23 Sep 2002 12:49:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811337#M84344</guid>
      <dc:creator>RAKESH_12</dc:creator>
      <dc:date>2002-09-23T12:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811338#M84345</link>
      <description>All of our FTP stuff is recored in syslog. &lt;BR /&gt;&lt;BR /&gt;The first entry is at login is:&lt;BR /&gt;Sep 23 08:13:27 hostname ftpd[328]: USER username&lt;BR /&gt;&lt;BR /&gt;The last entry is:&lt;BR /&gt;Sep 23 08:13:40 lvmax ftpd[328]: FTP session closed&lt;BR /&gt;&lt;BR /&gt;The following few lines will match begins and ends.  leaving the open entries. &lt;BR /&gt;&lt;BR /&gt;SYSLOG=/var/adm/syslog/syslog.log&lt;BR /&gt;(&lt;BR /&gt;grep ftpd ${SYSLOG}|grep -e USER| cut -c 22-|cut -f1 -d:&lt;BR /&gt;grep ftpd ${SYSLOG}|grep -e "session closed"| cut -c 22-|cut -f1 -d:&lt;BR /&gt;)|sort|uniq -u&lt;BR /&gt;&lt;BR /&gt;You should be able to add logic to grep the open entries  and check the times to see if they need to be looked at. Be aware that if you regularly trim syslog files.  This script will catch ftps that have closed. because the start entry was trimmed. But that also should be a easily fixed.&lt;BR /&gt;&lt;BR /&gt;Hope this helps get  you going.&lt;BR /&gt;Ror</description>
      <pubDate>Tue, 24 Sep 2002 16:10:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811338#M84345</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2002-09-24T16:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811339#M84346</link>
      <description>Not an easy chore, as the idle process are caused by abnormal terminations (notorious in lots of windows based ftp clients).&lt;BR /&gt;&lt;BR /&gt;While you can sort through syslog.log, this can be rough depending on the uptime of the server.&lt;BR /&gt;&lt;BR /&gt;If I were in your shoes....&lt;BR /&gt;snapshot the system with ps -ef | grep ftp&lt;BR /&gt;&lt;BR /&gt;pluck out the time.  If it's older than what you think is to old kill it?&lt;BR /&gt;I.E.&lt;BR /&gt;touch /tmp/.ftpsessions.txt&lt;BR /&gt;ps -ef | grep ftp | grep -v grep &amp;gt;&amp;gt;/tmp/.ftpsessions.txt&lt;BR /&gt;#check to see if file is empty&lt;BR /&gt;if [ -s /tmp/.ftpsessions.txt ] ; then&lt;BR /&gt;#Not empty, so process stuff&lt;BR /&gt;for TIME in `cat /tmp/.ftpsessions.txt` ; do&lt;BR /&gt;typeset -i&lt;BR /&gt;TEST=`echo $TIME | awk '{print $8}' | awk -F: '{print $1}'`&lt;BR /&gt;PID=`echo $TIME|awk '{print $2}'`&lt;BR /&gt;if [ $TIME -ge 4 ] ; then&lt;BR /&gt;  kill $PID&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Hope it helps!&lt;BR /&gt;Shannon</description>
      <pubDate>Tue, 24 Sep 2002 16:50:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811339#M84346</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-09-24T16:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811340#M84347</link>
      <description>Shannon,&lt;BR /&gt;&lt;BR /&gt;Would lsof help in these cases?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 24 Sep 2002 17:38:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811340#M84347</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-09-24T17:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811341#M84348</link>
      <description>Not that Im aware of ... I guess you could get into the obscure options on lsof to look for open sockets, but it would not be able to show useage.&lt;BR /&gt;&lt;BR /&gt;The biggest problem I see in this case is that there is no real way of knowing if an FTP is live or not.. that is why time is a guestimate.&lt;BR /&gt;&lt;BR /&gt;I have 5 ftp servers, 3 HP-UX and 2 solaris.  All these systems would have hung processes.  I switched from built in FTPD to wu_ftpd long before supported on HP-UX.  Same problems.  &lt;BR /&gt;I found in Solaris that proftpd does not hang, and use that now on solaris.  I have not been able to get a good working compile on HP-UX though to see if it fixes the issue there.&lt;BR /&gt;&lt;BR /&gt;Shannon</description>
      <pubDate>Tue, 24 Sep 2002 19:17:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811341#M84348</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-09-24T19:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811342#M84349</link>
      <description>Rakesh,&lt;BR /&gt;&lt;BR /&gt;Instead of writing a script and setting up a cron, you can enable the timeout value by setting -t parameter in /etc/inetd.conf. By default ftp will timeout in 15mins. The following will close all ftpd sessions after 5 mins of idle time.&lt;BR /&gt;&lt;BR /&gt;ftp stream tcp nowait root /usr/lbin/ftpd ftpd -t 300&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Tue, 24 Sep 2002 19:24:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811342#M84349</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-09-24T19:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811343#M84350</link>
      <description>Sridhar ,&lt;BR /&gt;&lt;BR /&gt;The problem is that the timeout does not work properly.  If it did, then no need for the thread ;)&lt;BR /&gt;&lt;BR /&gt;Shannon</description>
      <pubDate>Tue, 24 Sep 2002 19:39:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811343#M84350</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-09-24T19:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811344#M84351</link>
      <description>Shannon,&lt;BR /&gt;&lt;BR /&gt;I did read the mail. Unfortunately I never encountered problem with ftp sessions being frozen. We did have other problems with the windows clients though.&lt;BR /&gt;&lt;BR /&gt;If ftpd is in "IDLE" state (as you see in ps -ef output), it will disconnect itself out.&lt;BR /&gt;&lt;BR /&gt;If the windows client closed the connection abruptly, then you should atleast see it in netstat -an with CLOSE_WAIT state and that shouldn't last longer either.&lt;BR /&gt;&lt;BR /&gt;If the ghose ftp sessions are found, I would interrogate more by doing a netstat -an and see what is happening.&lt;BR /&gt;&lt;BR /&gt;-Sri &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Sep 2002 20:09:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811344#M84351</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-09-24T20:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811345#M84352</link>
      <description>Shannon,&lt;BR /&gt;&lt;BR /&gt;This is the output (ATTACHED as a TEXT document) I got from ftp'ing from a windows pc (192.168.1.100)  to an hpux server (11.00 A180 - called wildone):&lt;BR /&gt;&lt;BR /&gt;From the attached text file, you'll see that socket size offsets actually change. A perl program could use the data to look for the changes.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 24 Sep 2002 21:33:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811345#M84352</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-09-24T21:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: rogue ftp processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811346#M84353</link>
      <description>Harry, the attachment does not work ;(  &lt;BR /&gt;&lt;BR /&gt;That's okay, not being the perl guru I'll agree then that LSOF could look at the socket somehow and do the same thing.  I'll let you write that example though!  hehe&lt;BR /&gt;&lt;BR /&gt;It has been a while since I did the testing, and I think the client left the server in a FIN_WAIT state which would not drop.&lt;BR /&gt;&lt;BR /&gt;Like I said though, the problem was pretty common, in fact so common that I changed FTP servers 2 times.&lt;BR /&gt;&lt;BR /&gt;I will say that in HP-UX 11 I have not had any problems like this though!  Not sure what version of HP-UX nor what ftp daemon the poster is running.&lt;BR /&gt;&lt;BR /&gt;Shannon</description>
      <pubDate>Wed, 25 Sep 2002 13:37:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rogue-ftp-processes/m-p/2811346#M84353</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-09-25T13:37:10Z</dc:date>
    </item>
  </channel>
</rss>

