Name: ~parafin/linux/vstatusftp
Summary: displays vsftpd status
Author: parafin
Created: Tue, 18 Aug 2009 20:02:27 GMT
Last update: Fri, 30 Oct 2009 16:38:59 GMT by parafin
Atom feed
Modify access level: moderator

vstatusftp

This one-line script displays current activity on vsftpd server. It's output isn't that useful, because usually there will be only file names, without full path to them, but it's better than nothing. Probably it can be modified to use sys-process/lsof to fix this problem. I personally use it in pair with x11-misc/gxmessage to look what's going on on remote server: ssh server ./vstatusftp|gxmessage -file -.

Dependencies

  • net-ftp/vsftpd

You have to enable following option in vsftpd config:

/etc/vsftpd/vsftpd.conf
setproctitle_enable=YES

Code listing

vstatusftp
#!/bin/bash
ps -C vsftpd h o args|grep -v LISTENER|grep -v connected|sed -r 's/.{8}//'|sed -r 's|([^/]*)/ftp|\1|'|sort