Saturday, November 17, 2012
free web stress test tools
Since LoadRunner is somewhat expensive and I am interested to find out if there is any free tools available that can be similar job, so far I have read a few good reviews and articles, it seems the combination of Fiddler + WCat and Badboy+Jmeter might be a good way to go, will try to do some test soon.
Monday, September 24, 2012
automated backup of mysql and web site content to dropbox under text mode
I used to run a personal web site on a linux VPS, below is how I backup my sites and database content to dropbox.
(please note, not all these ideas came from me, I came across a few sources from internet and just put it together and make it work for me)
1. install dropbox on linux, see http://www.dropboxwiki.com/Text_Based_Linux_Install#Post-installation, I use folder /var/backup/Dropbox as dropbox folder.
2. use crontab to backup mysql and web content to dropbox folder, use compression to reduce bandwidth usage.
3. you can also you crontab to remove old backup files automatically.
purgeDropbox.sh:
(please note, not all these ideas came from me, I came across a few sources from internet and just put it together and make it work for me)
1. install dropbox on linux, see http://www.dropboxwiki.com/Text_Based_Linux_Install#Post-installation, I use folder /var/backup/Dropbox as dropbox folder.
2. use crontab to backup mysql and web content to dropbox folder, use compression to reduce bandwidth usage.
3. you can also you crontab to remove old backup files automatically.
purgeDropbox.sh:
crontab entries:#!/bin/bash# limit on the size (in KB) of the directorylimit=1572864adminmail=webmaster@yourdomain.com# if directory exists, find out it's sizeif [ -d /var/backup/Dropbox ]thensize=$(/usr/bin/du -sk /var/backup/Dropbox | cut -f1)elseecho "/var/backup/Dropbox is invalid !!!" | /bin/mail -s "Invalid directory" $adminmailexitfi# if directory size is greater than limit, alert the userif [ $size -gt $limit ]thenecho "Data volume in your user home dir /var/backup/Dropbox with a total size of ${size} kB exceeds the maximum limit of $limit kB (1.5 GB) ! Please take action!" |/bin/mail -s "user home dir exceeds max limit" $adminmailfind /var/backup/Dropbox/redmine -name "*.gz" -mtime +30 -exec rm {} \; >> /root/purge.log 2>&1fi
30 20 * * * mysqldump -u root -pPASSWORD --databases db1 db2 |gzip >/var/backup/Dropbox/database_$(date +\%Y\%m\%d__\%H:\%M:\%S\%z).sql.gz
00 19 * * * /root/purgeDropbox.sh
00 22 * * * /bin/tar czfv /var/backup/Dropbox/web_$(date +\%Y\%m\%d__\%H:\%M:\%S\%z).tar.gz /var/www
Tuesday, August 28, 2012
Saturday, August 25, 2012
AJAX call web service behind ISA / TMG firewall with authentication
To be able to call web service behind ISA / TMG firewall, a few conditions need to be met:
1. use beforeSend when making the service call:
$.ajax({
url: weburl,
beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", "Basic xxx"); },
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processResult,
contentType: "text/xml; charset=\"utf-8\""
});
2. Basic authentication needs to be enabled on both ISA / TMG and IIS.
3. Enable keberos authentication for the published web app.
4. disable loopback check on the web server.
1. use beforeSend when making the service call:
$.ajax({
url: weburl,
beforeSend: function (xhr) { xhr.setRequestHeader ("Authorization", "Basic xxx"); },
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processResult,
contentType: "text/xml; charset=\"utf-8\""
});
2. Basic authentication needs to be enabled on both ISA / TMG and IIS.
3. Enable keberos authentication for the published web app.
4. disable loopback check on the web server.
Friday, August 17, 2012
Subscribe to:
Posts (Atom)
Disable Microsoft Defender for Cloud for Visual Studio Subscription (MSDN)
I use a visual studio pro subscription which comes with $150 azure cloud credit, for some reason Microsoft Defender for Cloud was turned on ...
-
Error 15401: Windows NT user or group '%s' not found. Check the name again. SELECT name FROM syslogins WHERE sid = SUSER_SID ('Y...
-
/etc/ipsec.config conn ios keyexchange=ikev1 authby=xauthrsasig xauth=server lef...
-
Ever since I installed VMWare ESX server on my HP ML110 G4, I haven't got much chance playing it and it has been lying on the floor for ...