The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to check how many ftp users is on our server?

Discussion in 'General Discussion' started by Ghansham, Aug 16, 2011.

  1. Ghansham

    Ghansham Member

    Joined:
    Aug 16, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    How to check how many ftp users is on our server?
    and how to monitor ftp users on our server?

    Please give me an idea to manage server.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    FTP activity is logged to:

    Code:
    /var/log/messages
    To see the active FTP connections to your server, you can use a netstat command such as:

    Code:
    # netstat -n | grep :21
    Thank you.
     
  3. Ghansham

    Ghansham Member

    Joined:
    Aug 16, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I know about this command thanks but I want to command which display current ftp user name?

    # netstat -n | grep :21
    display how many user is working now on ftp but I want with username name? please help me.

    Thanks.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Simply ps aux the process:

    Code:
    ps aux | grep ftp
    If you just want the users, change this to the following:

    Code:
    ps aux | grep ftp |awk {'print $1'}|sort|uniq -c
    This returns something like the following with the number of connections:

    Code:
    root@host [/scripts]# ps aux | grep ftp |awk {'print $1'}|sort|uniq -c
          4 root
          1 tristan
     
  5. Ghansham

    Ghansham Member

    Joined:
    Aug 16, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hello Guys and Girls,

    Thanks cpanel Team to give me help
     
  6. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    This is really helpful
     
Loading...

Share This Page