Solved

How to extract concurrent users checking access_log file

Posted on 2004-08-05
8
327 Views
Last Modified: 2012-06-27
I was wondering, how can I  find out how many concurrent users are accesing my webserver?
I've been checking around some log analyzers, but even the better ones dont give me thi stats. Any advice?
Thanks.
0
Comment
Question by:gmartelli
  • 4
  • 4
8 Comments
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
> .. how many concurrent users ..
how do you define a "user"?
i.g. this is impossible, or in paricular: there is no 99.999% reliable method to do it.
0
 

Author Comment

by:gmartelli
Comment Utility
Ok, how many Different IP addresses would do :).
Lets say, which is the top distincts IPs in a 1 minute period.
The point is, I need to figure out a concurrence, ANY measure of concurrence will help...and I only have the access log file to do it.
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
awk '($5~/GET$/){print $3" "$4}' /var/log/httpd/access_log | awk -F: '($1=="16"&&$2=="15"){print}'

# replace 16 by your hour, and 15 by your minute
# to be improved in many ways (and adapted to you logfile format
0
 

Author Comment

by:gmartelli
Comment Utility
Hum, how about in ANY minute? I mean, I want to find the top one, if I knew it, It would be quite easy to find out the total count of users in it :)
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
Comment Utility
what is "ANY" minute? 1 or 17 or 42 or ..
or do you mean somthing like:
 awk '($5~/GET$/){print $3" :"$4}' /var/log/httpd/access_log | awk -F: '{print $1":"$2" "$NF}'|sort -u
0
 

Author Comment

by:gmartelli
Comment Utility
You get the points, I realized  getting into the realm of analytical SQL (which is what I'm checking now). I meant "the most user accesses in any given minute", meaning I dont know which minute i'm checking, its like a window aggregate (yah, deep magic but seems like Oracle will make things a bit easier for me :)


Thanks
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
Oracle? hmm, sounds like breaking a fly on the wheel ;-)
Anyway, thanks for grading, hope it helps you anyway
KISS - keep it stupid simple
0
 

Author Comment

by:gmartelli
Comment Utility
The problem is not the answer, but the question :)
Thanks for the help
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now