top 10 users facebook.com


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting top 10 users facebook.com
# 1  
Old 07-05-2010
Bug top 10 users facebook.com

is it possible from shell utility that we can track top 10 ipaddress from squid access.log who visit facebook.com.

Code:
cat /var1/log/squid/access.log | grep "192.168.1.13" | grep "facebook" | wc -l
777

above will find only one

Last edited by pludi; 07-05-2010 at 07:49 AM..
# 2  
Old 07-05-2010
You should rename yourself into learncodetags if you want to stay a member of this forum Smilie

Just the top 10 ie. first ten of the list of 777 IP addresses?
Code:
grep "192.168.1.13" /var1/log/squid/access.log| grep "facebook"| head

This User Gave Thanks to zaxxon For This Post:
# 3  
Old 07-05-2010
It will be better to paste some sample logs to us.

Guess you need find out top 10 IP addresses (not only 192.168.1.13) which access facebook, and the IP address is in first column in log file.

Code:
awk '/facebook/ {print $1}' /var1/log/squid/access.log |sort |uniq -c |sort -n |tail -10

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Top 10 Users in mount level

Hi Members, I'm new to unix. Could you help me in solving my issue. My requirement is I need to pull Top 15 users in every mount. I could able to get the mount level information but I couldn't able to pull the top users in every mount. I see in every mount I could see a lot of nested... (3 Replies)
Discussion started by: UBEE
3 Replies

2. Shell Programming and Scripting

Space usage by top 5 users in a filesystem

I want to see top 5 users,who have occupied most amount of disk space in a filesystem. But not sure how to do it. I can get the usage for a particular user find . -user user -type f exec df -h {} \;|awk '{ s = s+$1 } END { print "Total used: ",s }' But how to get without specifying any user... (6 Replies)
Discussion started by: rka
6 Replies

3. Shell Programming and Scripting

Top utilization of the users through script

I am trying for a shell script like, if the ram utilization is less than 300M and the load average is more then 4.00 , should take all the top users of memory and CPU utilization through "top" and "ps " command and put under one path. (6 Replies)
Discussion started by: gsiva
6 Replies

4. Red Hat

Showing all users in 'users' and 'top' commands

Hi All, I work in a multi user environment where my school uses Red Hat Linux server. When I issue commands such as "top" or "users", I get to see what others are doing and what kinds of applications they are running (even ps -aux will give such information). "users" will let me know who else is... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

5. UNIX for Dummies Questions & Answers

how to find top 3 users currently logged on

For the first 3 users only that are currently logged in output their effective user id. thank you. (6 Replies)
Discussion started by: whyatepies
6 Replies

6. Shell Programming and Scripting

find top 4 users currently logged on can i use grep

For the first 4 users only that are currently logged in output their effective user id. It's not important the order in which each logged in i just want to have the top 4. Same question as here...... (0 Replies)
Discussion started by: whyatepies
0 Replies

7. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

8. Shell Programming and Scripting

Script to check top 5 biggest disk space users

Hi all, I am needing a bash shell script to generate a list of the top 5 users using the most disk space. I am thinking that the du command would be used somehow but I am at a loss. Can anyone help? Thanks! (3 Replies)
Discussion started by: sytemx
3 Replies

9. AIX

How to find the top 6 users (which consume most space)?

Hi everybody, I want to know if there is any posibility to find out - on an AIX system - which are the the users who consume most space or at least a posibility to obtain a list with all the users and how much space are they consuming ? Trying to use du command was useless. Any idea?... (5 Replies)
Discussion started by: RebelDac
5 Replies
Login or Register to Ask a Question