Jump to content

Listar IPs conectado ao servidor centos


quintanilha

Recommended Posts

Boa tarde desculpe abrir este tópico.

Mas aqui foi o único lugar que achei que alguém poderia me ajudar.  Eu preciso listar todos os ips conectado ao meu servidor centos instalado com cpanel/whm, eu utiliza o seguinte comando 

netstat -plan|grep :80|awk {‘print $5’}|cut -d: -f 1|sort|uniq -c|sort -nk 1

 Mas depois que a cpanel lançou a atualização do painel o mesmo parou de funcionar, queria saber se alguém poderia me ajudar, desde já agradeço a todos.  

 

 

 

Link to comment
Share on other sites

Olá,

O que ocorre é um erro de sintaxe no seu comando
Assim netstat -plan|grep :80|awk {‘print $5’}|cut -d: -f 1|sort|uniq -c|sort -nk 1
Vai dar isso 
awk: cmd. line:1: {‘print
awk: cmd. line:1:  ^ invalid char '�' in expression
awk: cmd. line:1: {‘print
awk: cmd. line:1:  ^ syntax error


E assim funciona
netstat -plan|grep :80|awk '{print $5}'|cut -d: -f 1|sort|uniq -c|sort -nk 1
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...

Important Information

Do you agree with our terms?