找出我的代理有谁在用
我想找出我的代理里面哪些IP在用,而且用户名是neupioneer的。
今天整了半天,才整出来。awk好长时间没用,有点手生了。
[root@MyLinux squid]# cat access.log | awk '{print $3"\t"$8}' | grep 'neupioneer' | awk '{print $1}' | sort | uniq -c
2600 117.15.170.191
1509 117.15.173.19
374 121.236.45.138
13 192.168.1.210
5 202.113.179.42
242 58.154.199.218
[root@MyLinux squid]# cat access.log | awk '{print $3"\t"$8}' | grep 'neupioneer' | awk '{print $1}' | sort | uniq -c | sort -nr
2600 117.15.170.191
1509 117.15.173.19
374 121.236.45.138
288 202.106.38.21
242 58.154.199.218
13 192.168.1.210
5 202.113.179.42
[root@MyLinux squid]# cat access.log |awk '{print $3}'|sort|uniq -c|sort -nr
15860 58.154.198.89
13584 58.154.163.196
10585 202.118.17.183
10434 58.154.168.51
6242 117.15.170.17
6228 58.154.167.89
5818 202.118.17.186
5406 58.154.169.128
3285 117.15.155.112
2941 58.154.251.224
2640 61.189.61.30
1385 119.98.125.89
811 202.108.130.138
794 221.10.242.45
747 58.154.198.222
720 119.5.128.90
713 117.15.159.217
659 121.236.42.108
645 60.16.104.214
642 58.211.144.50
505 58.240.206.5
263 202.205.15.208
168 120.7.139.96
153 58.154.251.221
112 219.216.100.100
58 58.154.198.243
41 202.118.17.212
6 58.154.226.89
6 119.118.237.147
5 58.154.226.185
5 58.154.166.199
3 119.108.178.114
2 60.190.216.89
2 60.164.126.165
2 202.118.17.182
1 91.212.127.100
1 61.136.93.11
1 222.23.98.224
1 202.201.35.243
1 125.87.0.104
今天整了半天,才整出来。awk好长时间没用,有点手生了。
2600 117.15.170.191
1509 117.15.173.19
374 121.236.45.138
13 192.168.1.210
5 202.113.179.42
242 58.154.199.218
[root@MyLinux squid]# cat access.log | awk '{print $3"\t"$8}' | grep 'neupioneer' | awk '{print $1}' | sort | uniq -c | sort -nr
2600 117.15.170.191
1509 117.15.173.19
374 121.236.45.138
288 202.106.38.21
242 58.154.199.218
13 192.168.1.210
5 202.113.179.42
[root@MyLinux squid]# cat access.log |awk '{print $3}'|sort|uniq -c|sort -nr
15860 58.154.198.89
13584 58.154.163.196
10585 202.118.17.183
10434 58.154.168.51
6242 117.15.170.17
6228 58.154.167.89
5818 202.118.17.186
5406 58.154.169.128
3285 117.15.155.112
2941 58.154.251.224
2640 61.189.61.30
1385 119.98.125.89
811 202.108.130.138
794 221.10.242.45
747 58.154.198.222
720 119.5.128.90
713 117.15.159.217
659 121.236.42.108
645 60.16.104.214
642 58.211.144.50
505 58.240.206.5
263 202.205.15.208
168 120.7.139.96
153 58.154.251.221
112 219.216.100.100
58 58.154.198.243
41 202.118.17.212
6 58.154.226.89
6 119.118.237.147
5 58.154.226.185
5 58.154.166.199
3 119.108.178.114
2 60.190.216.89
2 60.164.126.165
2 202.118.17.182
1 91.212.127.100
1 61.136.93.11
1 222.23.98.224
1 202.201.35.243
1 125.87.0.104