Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-07-2012, 04:00 AM
Intermediate Member
 
Posts: 24
Question How to calculate http connections peak per second

According to Performance Tuning Guidelines for Large Deployments (HTTP) you should be able to calculate the number of http connections peak per second by taking a look at:

access_log files (The ones found at /opt/zimbra/log/ I suppose).

I suppose that it is a matter of a bash script with some of awk so that after taking out the day+hour I just leave the lines that have repeated hour+second string and just leave the ones that have more lines so that I get the peak by tunneling it to wc -l command.

Is the algorithm idea right?

Has anyone written this such a parser script? It would be nice if you could share it. Thank you.
__________________
Adrian Gibanel, IT Manager

"be free, be innovative, bTactic"

Complex La Caparrella-European Center of Enterprises and Innovation 3.9 | Lleida, Spain 25192

www.btactic.com
Reply With Quote
  #2 (permalink)  
Old 02-07-2012, 09:23 AM
Intermediate Member
 
Posts: 24
Post Awk script finished

I have managed to code the script.

I am having troubles creating wiki account (not Zimbra fault but mine). When I'm able to create it I will update the page's discussion so that someone hopefully includes the script in the official page.

Here there is how you run the script:

Code:
cat access_log.2012-02-06 | awk -F ' ' '{print $4}' | awk -f access_log.awk
.

And here there is the access_log.awk file contents:
Code:
BEGIN {
    FS=":"
    Peak = 1
    CurrentPeak = 0
    oldVar=""

}

{
  #printf ("Linea: %s\n", $0)
  hour = $2
  minute = $3
  second = $4 
  #printf("hour: %s, minute: %s, second: %s\n",hour,minute,second)
  currentVar = hour minute second
  #printf ("currentVar definido: %s\n", currentVar)
  #printf ("oldVar definido: %s\n", oldVar)
  if ( currentVar == oldVar ) 
    {
      #printf ("1Current var vale: %s\n",currentVar)
      #print "CurrentVar es igual que oldVar"
      CurrentPeak ++
      if ( CurrentPeak > Peak) 
	{
	  Peak = CurrentPeak
	  PeakLine = $0
	}
    } else 

    {
      #printf ("2Current var vale: %s\n",currentVar)
      #print "CurrentVar es DIFERENTE de oldVar"
      CurrentPeak = 1
    }
  oldVar=currentVar
}

END {

print "Peak per second is: " Peak
print "Latest Peak line is: " PeakLine

}
__________________
Adrian Gibanel, IT Manager

"be free, be innovative, bTactic"

Complex La Caparrella-European Center of Enterprises and Innovation 3.9 | Lleida, Spain 25192

www.btactic.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.