Results 1 to 5 of 5
  1. #1

    How to check connections to my server?

    There use to be a thread on here but because of the wht hack, it didn't get saved...so now I can't go back to it.

    It was a command in ssh that printed out a number of connections. Like 12,000 or something. Anyone know the command?

  2. #2
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    5,473
    try: netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1
    Respectfully,
    Mr. Terrence

  3. #3
    nope that wasn't the one. It just prints out the total connections instead of individual ip's.

  4. #4
    Join Date
    Feb 2006
    Location
    Melbourne, Australia
    Posts
    141
    I think you're looking for this one.

    Code:
    netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

  5. #5
    Join Date
    May 2009
    Location
    SLASH ROOT
    Posts
    867
    netstat -anp |grep "tcp\|udp"|wc -l ; will print the total number of TCP/UDP connections to your server.

    Say, if you want to know the no: of connections to any particular service like 'http' use:

    netstat -apn | grep :80 |wc -l
    █ WebHostRepo.com
    █ Linux | Windows
    | VPS | Cloud
    █ Outsourced Technical Support since 2009
    █ sales@webhostrepo.com

Similar Threads

  1. how to check ethernet connections in debian??
    By Mishkin in forum Dedicated Server
    Replies: 1
    Last Post: 12-19-2008, 05:11 PM
  2. How to check the max connections allowed in mysql?
    By macareno in forum Dedicated Server
    Replies: 1
    Last Post: 03-30-2005, 11:39 PM
  3. Replies: 4
    Last Post: 07-21-2004, 10:11 AM
  4. Server connections?
    By opanime in forum Dedicated Server
    Replies: 5
    Last Post: 05-27-2004, 09:33 AM
  5. Replies: 17
    Last Post: 07-09-2003, 02:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •