#1  
Old 28th May 2013, 18:07
admins admins is offline
Senior Member
 
Join Date: Apr 2009
Location: Switzerland
Posts: 210
Thanks: 6
Thanked 3 Times in 3 Posts
Default Website load time test

Hi all
I want to monitor my loadtime of an website. If the loadtime is bigger than 30s the apache2 should restart.

For the loadtime found this:
Code:
(time wget -p --no-cache --delete-after www.linuxweblog.com -q ) 2>&1 | awk '/real/ {print $2}'
output
Code:
0m0.207s
How could I do the rest?
Thanks
admins
Reply With Quote
Sponsored Links
  #2  
Old 13th June 2013, 22:03
moegeler moegeler is offline
Junior Member
 
Join Date: Jun 2013
Location: Iserlohn, Germany
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
Default

I don't know wich Linux Distri do you have but try some like this:

Code:
#!/bin/sh
VAR_TIME="$( TIMEFORMAT='%R';time (wget -p --no-cache --delete-after www.linuxweblog.com -q) 2>&1 1>/dev/null )"

float_test() {
     echo | awk 'END { exit ( !( '"$1"')); }'
}

float_test "$VAR_TIME > 30.000" && /etc/init.d/apache2 restart
save this as a shell file like monitor.sh an then make a cronjob for this...

I don't have tried it, so i don't know if it works...

Last edited by moegeler; 13th June 2013 at 22:05.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
possible bug? or problem of my server? enzolarosa General 22 9th January 2013 10:25
ubuntu and nginx delgado2061 Installation/Configuration 0 27th November 2011 23:36
libWand.so.10 error Taxick Installation/Configuration 8 3rd May 2009 01:27
software based link speed load balancing nonameuser Server Operation 8 12th May 2008 20:02
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 13:29


All times are GMT +2. The time now is 10:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.