|
add comment
( 299 views )
| 0 trackbacks
| permalink
|
|
Wednesday, June 27, 2007, 14:47 - Technology
There are many reasons why a human beings cannot pick a truely ramdom number.I've being doing some testing involving a management information system that does number crunching in order to generate reports.
www.random.org
.... has been proving very useful when generating random test data.
Ask a sample of people for a random number between 1 and 20 - you'll be suppries at their lack of randomness!
Of course a computer program can never be truely random either - however they're better than humans.
|
|
Wednesday, June 6, 2007, 11:27 - Technology
Since I moved this webserver from Fedora Core 2 to Mandriva 2007 the stats page (produced by Webalizer) has been showing the country graph as "100% Unresoved/Unknown".
Webalizer will take your apache logs and do a reverse DNS look up on the IP addresses in order to determine which top level domains (no countries really, since a .com could be anywhere in the world).
According to the DNS.README file there are three ways to do this:
1. Use Webazolver which is a symbolic link to webalizer (ln -s /usr/bin/webalizer /usr/bin/webazolver) it runs in the same way as Webalizer, but ignores 90% of the config settings. Basically it swaps IP addresses for hostname in your (configured) Apache log file. Then you just run Webalizer as normal.
2. Turn on reverse DNS loggin in Apache - DON'T DO THIS, IT WILL SLOW EVERY SINGLE REQUEST FOR WEB PAGES!
3. Configure a DNSCache file path in the webalizer config file, then run webalizer and it will do the reverse DNS look ups whilst producing the stats.
Option 2 wasn't really an option since it would slow things down too much (1 to 2 seconds I guess). I tried options 1 and 3 - but no way would it populate the data in the graph.
I found a twist on option 2 which is an Apache program called Logresolve - it has a simple interface and will create a log file based on an Apache log file - but will resolve the IP addresses to hostnames. Simply run this before webalizer and problem solved - remember to tweak your webalizer conf to use the new log file produced by logresolve.
I'm now begining to see the June data:
| Top 5 of 5 Total Countries | |||||||
|---|---|---|---|---|---|---|---|
| # | Hits | Files | KBytes | Country | |||
| 1 | 7539 | 99.80% | 6960 | 100.46% | 86612 | 99.77% | Unresolved/Unknown |
| 2 | 10 | 0.13% | 9 | 0.13% | 156 | 0.18% | US Commercial |
| 3 | 3 | 0.04% | 3 | 0.04% | 15 | 0.02% | Network |
| 4 | 1 | 0.01% | 1 | 0.01% | 19 | 0.02% | Italy |
| 5 | 1 | 0.01% | 1 | 0.01% | 9 | 0.01% | Lithuania |
One thing to consider when tweaking an rerunning webalizer is that the "Incramental yes" config option - you should probably change it to "no" whilst trying new settings out. Here's my June data after a rerun with "Incramental no":
| Top 30 of 53 Total Countries | |||||||
|---|---|---|---|---|---|---|---|
| # | Hits | Files | KBytes | Country | |||
| 1 | 3230 | 43.48% | 2989 | 43.86% | 35146 | 41.10% | Unresolved/Unknown |
| 2 | 2156 | 29.02% | 2018 | 29.61% | 27659 | 32.35% | US Commercial |
| 3 | 1237 | 16.65% | 1172 | 17.20% | 12380 | 14.48% | Network |
| 4 | 138 | 1.86% | 74 | 1.09% | 1586 | 1.85% | Sweden |
| 5 | 102 | 1.37% | 91 | 1.34% | 702 | 0.82% | United Kingdom |
| 6 | 96 | 1.29% | 95 | 1.39% | 931 | 1.09% | Germany |
| 7 | 61 | 0.82% | 31 | 0.45% | 704 | 0.82% | Argentina |
| 8 | 39 | 0.52% | 39 | 0.57% | 966 | 1.13% | US Educational |
| 9 | 37 | 0.50% | 36 | 0.53% | 744 | 0.87% | France |
| 10 | 33 | 0.44% | 30 | 0.44% | 276 | 0.32% | Malaysia |
| 11 | 32 | 0.43% | 31 | 0.45% | 468 | 0.55% | Brazil |
| 12 | 28 | 0.38% | 28 | 0.41% | 393 | 0.46% | Russian Federation |
| 13 | 27 | 0.36% | 27 | 0.40% | 206 | 0.24% | Poland |
| 14 | 24 | 0.32% | 24 | 0.35% | 208 | 0.24% | Japan |
| 15 | 20 | 0.27% | 17 | 0.25% | 212 | 0.25% | Czech Republic |
| 16 | 20 | 0.27% | 20 | 0.29% | 145 | 0.17% | India |
| 17 | 15 | 0.20% | 15 | 0.22% | 244 | 0.29% | Turkey |
| 18 | 13 | 0.17% | 13 | 0.19% | 71 | 0.08% | Spain |
| 19 | 13 | 0.17% | 13 | 0.19% | 130 | 0.15% | Italy |
| 20 | 9 | 0.12% | 9 | 0.13% | 166 | 0.19% | Canada |
| 21 | 9 | 0.12% | 9 | 0.13% | 82 | 0.10% | Lithuania |
| 22 | 9 | 0.12% | 2 | 0.03% | 7 | 0.01% | Singapore |
| 23 | 7 | 0.09% | 7 | 0.10% | 60 | 0.07% | Old style Arpanet (arpa) |
| 24 | 7 | 0.09% | 7 | 0.10% | 1260 | 1.47% | Netherlands |
| 25 | 6 | 0.08% | 5 | 0.07% | 125 | 0.15% | Chile |
| 26 | 6 | 0.08% | 6 | 0.09% | 74 | 0.09% | Romania |
| 27 | 5 | 0.07% | 4 | 0.06% | 57 | 0.07% | Australia |
| 28 | 5 | 0.07% | 5 | 0.07% | 14 | 0.02% | Saudi Arabia |
| 29 | 4 | 0.05% | 4 | 0.06% | 48 | 0.06% | Bulgaria |
| 30 | 4 | 0.05% | 4 | 0.06% | 36 | 0.04% | China |
My cronjob for this task looks like this:
[root@milhouse webalizer]# crontab -l
# min(0-59) hours(0-23) day(1-31) month(1-12) dow(0-7) command
30 03 * * * /home/xxxmexxx/webalizer/go.shAnd the "go.sh" script it calls:
for i in /var/log/httpd/www*access_log; do
/usr/sbin/logresolve < $i > $i.resolved
done
/usr/bin/webalizer -c /home/sreadman/webalizer/webalizer-ktmack-com.conf;
/usr/bin/webalizer -c /home/sreadman/webalizer/webalizer-sar-cx.conf;
/usr/bin/webalizer -c /home/sreadman/webalizer/webalizer-izabel-la.conf;
|
|
Tuesday, June 5, 2007, 10:22 - Technology
A while a go I was up on tht kitchen roof aligning my sky dish - this was in order to pick up Sky transmissions on the Astra 28.2 satellite.I'm aware that there are many other satellites and with the right set up you can pick up all sorts of channels. I'm specifically looking for Polish ones since I know they have programs with English subtitles and I think this will help me learn Polish.
I picked a receiver on Ebay, Silver Crest SL65 free to air (FTA) digital satellite receiver.
First of all - you don't need to move the Sky dish at all! It's pointing at Astra 28.2 (Sky) and that works just fine. Because I upgraded from Sky to Sky+ I had a spare LNB - I just needed to figure out how to position that LNB in order to pick up a second satellite.

This (fantastic) diagram shows how my dish/lnb is facing and picking up Astra 28.2 (circled in red) - my SL65 came preprogrammed with Hotbird (circled in green) channels - so I thought I would start with hotbird.
Hotbird is to the right of Astra - this means that my spare LNB needs to be positioned to the left of the Astra LNB. This is shown by the green line reflecting off my satellite dish.
Here are some pictures of the 2nd LNB in place:


How did I know where to position the 2nd LNB?
This was the difficult bit - I couldn't just slacken the bolts on Sky dish because that would lose Astra 28.2.
1. Set the SL65 to Hotbird and turned on the satellite locator/finder which is audible (Press Info>1 on the remote)
2. Held the (bottom of) 2nd LNB and by hand slowly moved it around until the SL65 locked on Hotbird and beeped loudly.
3. I visually noted where the LNB was in relation to the arm on the dish.
4. Attached the 2nd LNB to the (new) mounting bracket.
5. Held the mounting bracket and by hand slowly moved it around until the SL65 locked on Hotbird and beeped loudly.
6. Noted visually where to drill the arm on the dish to bolt the 2nd LNB bracket to.
Here's what it looked like in the end:

A keen eye will note that the 2nd LNB bracket is upside down - it should be curving towards the dish not away - but this didn't matter since I made adjustments befor attaching it.
It took me about an hour to locate Hotbird, this was because of a few misconceptions I had:
1. The 2nd LNB should be level with the first - wrong.
2. The 2nd LNB should be the same distance from the dish as the 1st - wrong.
3. The SL65's satellite locator would find *all* satellites and give a signal strength and quality readout - wrong it only finds the satellite for the currently selected channel.
4. You can't hold the LNB in your hand and find a satellite - wrong the SL65 beeps the instant you've got the LNB in the right position.
What will I do differently next time?
1. Use the LNB holders that came with the bracket and mount *both* LNB's on the new bracket. This means moving the dish and finding Astra again, but Sky supplied LNB's had holds which meant you couldn't swap on for the other without moving the dish. With both LNBs in the same holder I believe that finding the second satellite would have been a matter of sliding the 2nd LNB along the bracket.
What channels can I now pickup?
http://www.lyngsat.com/hotbird.html
... I'll have a try with some of the other satellites when I've used Hotbird for a while.
#### Update ####
I've joined the www.digitalspy.co.uk forum and just put my my first post on a thread about multiple LNBs on Sky dishes
|
|
Thursday, May 31, 2007, 13:03 - Technology
Posted by Administrator
I ported some old shell scripts over to PHP - they send various emails to a group each week.Posted by Administrator
The emails went out to everyone, but all of the @hotmail.com address bounced back with this (from my Postfix log):
May 31 12:13:03 milhouse postfix/smtp[3195]: DEC6B97001: to=<xxxxxxxx@hotmail.com>, relay=mx3.hotmail.com[65.54.245.72]:25, delay=1.3, delays=0.06/0.04/1/0.23, dsn=5.0.0, status=bounced (host mx3.hotmail.com[65.54.245.72] said: 550 Your e-mail was rejected for policy reasons on this gateway. Reasons for rejection may be related to content such as obscene language, graphics, or spam-like characteristics (or) other reputation problems. For sender troubleshooting information, please go to http://postmaster.msn.com. Please note: if you are an end-user please contact your E-mail/Internet Service Provider for assistance. (in reply to MAIL FROM command))
After some googling, it appears that hotmail (unlike the rest of the world) aren't accepting emails originating from a dynamic range. When my "generate game and email everyone" php script runs, the mail is sent directly from my mandriva server machine to each of the mail exchangers for every address in the mailing list.
I had to edit /etc/postfix/main.cf and add this line:
relayhost = smtp.sky.comSky is my ISP - now they are relaying my servers email. Hotmail is happy since the Sky SMTP server is on a fix ip address. See the log:
May 31 12:45:22 milhouse postfix/smtp[3788]: 17575D6609: to=<xxxxxxxx@hotmail.com>, relay=smtp.sky.com[87.86.189.12]:25, delay=21, delays=0.05/0.02/20/0.27, dsn=2.0.0, status=sent (250 OK id=1Htj1T-0007FI-J6)
|

IM Status





