Network 28th July 2009 at 9:32 am

It’s at the core of any computer system. If you use any computer in the world, it is 99.9% likely to be connected to a network of some kind.
The internet is the biggest network. If you want to communicate with anyone or anything then you will certainly be doing it across a network.
The technology has been around for decades and even now, with the latest layer 3 network switches, your network can be exposed to traffic jams. Keeping an eye on the traffic on your network is vital to keeping your PCs or servers working how they should.
A network monitoring tool is a must. There are numerous ways of setting about monitoring your network and I shall lay out some basics here.
A sudden drop in internet performance or commumication with another machine on your network indicates a network traffic issue of some kind. Take a look at your network device activity lights, PC, hub/switch, router, anything where the data activity lights are flashing like crazy when you’re not actually doing anything indicates high network activity. Try to isolate the source or target machine by eliminating potential machines, one at a time, by unpluging the network cable from each machine in turn. When the lights stop flashing you know you have just found a machine involved.
The next step is to try and identify the cause on the machine you have identified.
Identifying the process that is sending or receiving large quantities of data will get you 75% of the way to the solution.
MS Windows has the Task Manager. Processes taking up most memory and CPU are the give aways.
Linux has the “top” command which runs in a terminal session and provides similar information.

If you do not have access to other machines on your network, you are going to need a network monitoring tool, to try and identify where the problems are coming from. There are many such tools available for download. Nmap for Linux and Zenmap for Windows are free analysis tools which allow you to identify which port numbers are in use by each machine on your network.
Network.

Mobile Broadband 11th July 2009 at 11:43 am

As always with mobile use, signal quality is everything.
I lost my land line for a day just recently and thought, why hadn’t I already sorted out a mobile broadband option?
I recently found that my area had fantastic reception with O2, so I have switched my mobile from Virgin to O2 – great, signal is always strong and I can now hold a clear conversation.
Right, I then mistakenly assumed that O2 broadband was my obvious mobile broadband choice. Well thank goodness for each mobile company’s postcode service check facility.
It turns out that O2 mobile broadband just doesn’t work in my area. However “3″ gives brilliant coverage.
See below
Sponsored Links




I am now just taking a look at their scheme options.

Here are the mobile network test sites:-

3
O2
Orange
T-Mobile
Virgin Media
Vodafone

Turbo Tweeting 6th July 2009 at 1:00 pm

This is the easiest way to schedule tweets to Twitter. If you want to seriously start building traffic to your web site then regular tweets are essential.
First, make sure you have curl installed. cURL is often already present in Linux distros but Windows users will need to locate and install it.
The command is very simple which can be placed in a shell script (Linux) or a batch file (Windows). This can then be scheduled as you wish – I suggest you don’t over do it, the same message every minute will not be posted as it will be identical to your previous one and Twitter will reject it. Keep repeated messages a few minutes apart.
Right, down to the nitty gritty.

The command is fundamentally straight forward:

curl -u username:password -d status="Lets's have a good old tweet. http://goodoldtweet.twt" http://twitter.com/statuses/update.xml

The username:password is fairly obvious – just replace it with your own Twitter account login details.
The text following -d status= is your tweet message (I included my blog url).

See below
Sponsored Links




Now, this produces output to the screen and is helpful when you want to know that the command has worked and what it did. However, this is no good if you want to automate the command. Screen output will cause an error in scheduled running of scripts and applications. Fortunately there is a way around this.
I shall show you how to do this in Linux as I currently don’t know the equivalent in Windows (it may be the same in Windows but don’t count on it).

curl -u username:password -d status="Lets have a good old tweet. http://goodoldtweet.twt" http://twitter.com/statuses/update.xml > /dev/null 2>&1

This makes sure that all output is cleanly dealt with without causing errors.

The shell script in which you place the command can now be scheduled as you wish.

Computer Breakthrough 1st July 2009 at 6:56 am

It’s happened. Well almost.
Supersonic performance.

The race to petaflop supercomputers is heating up, with the latest entry coming from NASA, Intel and SGI. The trio announced plans to build what will be a petaflop-capable supercomputer by next year, and up to 10 petaflops (define) by 2012.

Supercomputers have been in a constant game of oneupsmanship and bragging rights. The definitive list of the fastest supercomputers, called Top500, is released twice a year, and for the last few years, IBM (NYSE: IBM) has dominated with its Blue Gene/L supercomputer at the Lawrence Livermore Laboratories.

With each update to the list, the number of teraflops (define) goes up because no matter how much processing power you give these machines, there’s still more demand for them. These massive systems aren’t just doing one job at a time. They are rented out to other agencies or researchers who have a massive computing task they need done.
See below
Sponsored Links




At any given time, a supercomputer likely has hundreds of computational tasks running on it. So there are never enough teraflops to go around. A teraflop is a trillion operations per second. As of last November, Blue Gene/L topped out at 600 teraflops and ran at a sustained rate of 478 teraflops. By contrast, a Core 2 Duo E6700 processor performs around 12-13 gigaflops, or billions of operations per second.

See the whole story at http://www.internetnews.com/hardware/article.php/3745856.

My favourite TV advert of all time 22nd June 2009 at 7:00 am

I just find this one of the funniest TV adverts ever…

Sponsored Links




I just find it hilarious.

Booting from a Linux CD and wiping an operating system 7th June 2009 at 7:26 pm

Some times it is very useful to boot from a Linux installation CD or DVD in order to use tools straight from the CD/DVD. You are not necessarily looking to install Linux but simply to make use of its low level software tools.
There are a number of ways to do this but I shall list just two as they are the most familiar to me.
1) Using the first CD or DVD from RedHat/Fedora/CentOS media :-
Set your BIOS to boot from your CD-ROM drive
When the boot process reaches the boot> prompt, enter “linux rescue” and hit return, this will provide you with a number of boot options, choose the most basic as we don’t need any networking functionality.
This will load linux into memory and provide access to the programs held on the CD/DVD.
The following command will allow you to wipe the beginning of your hard drive thus removing key information about anything held on the drive.
See below
Sponsored Links




dd if=/dev/zero of=/dev/sda bs=512 count=50000

or

dd if=/dev/zero of=/dev/hda bs=512 count=50000

depending on whether you have a SATA drive or an IDE drive respectively.

2) Boot from a Puppy Linux CD, start a terminal window then follow the same dd commands described above.

Upon begining an operating system installation it will appear that the hard drive is brand new and completely blank.

Installing Windows on a blank hard drive 5th June 2009 at 7:27 am

This is the best way to achieve a clean and uncluttered install of any Windows operating system.
If you have a badly corrupted Windows operating system then first of all you will want to blank the hard drive first. This can be easily achieved by booting from a Linux boot disk then using the “dd” command to write directly to the hard drive. I shall cover the Linux boot in another post. Place your Windows install CD into the CD-ROM drive and restart the computer. As the BIOS starts, hit DEL or F2 or whatever your BIOS requires to enter the setup and set it to boot from the CD-ROM drive first, followed by the hard drive you wish to install Windows on. Save your settings and restart the computer. This should now begin the Windows installation procedure.
See below
Sponsored Links




Choosing a partition size is completely at your discretion, personally if I am only installing Windows on the computer then I choose the whole of the hard drive. From XP onward only a quick format is required.
The vital thing is that you have or obtain any required drivers for your hardware. This is not always provided if you have an “off the shelf” computer. The main thing is that Windows recognises your network interface. If you have this working then you can get back on the internet and download those missing drivers. I shall cover this matter in another post.

Postfix smtpd_client_restrictions 21st May 2009 at 8:37 am

Keeping known email abusers out is always desired. Postfix has a parameter which is specified in the main.cf file that allows you to refer to these lists.
The script I use is as follows…

smtpd_client_restrictions =
	permit_mynetworks
	permit_sasl_authenticated
	reject_unauth_pipelining
	reject_rbl_client cbl.abuseat.org
	reject_rbl_client dnsbl.ahbl.org
	reject_rbl_client dnsbl.sorbs.net
	reject_rbl_client list.dsbl.org
	reject_rbl_client sbl-xbl.spamhaus.org
	#reject_rhsbl_client blackhole.securitysage.com
	reject_rhsbl_client rhsbl.sorbs.net
	permit

Note the commented out line

	#reject_rhsbl_client blackhole.securitysage.com

See below
Sponsored Links




This is a list that was not properly administered. A friend of mine tried to email me who uses the mac.com domain and was being rejected as an abuser which, of course, is rediculous.
I keep the entry as a future reference. There are others out there so if you know of them please let me know.
mta.

Bandwidth Conversion 19th May 2009 at 10:28 am

See below
Sponsored Links




Bandwidth Conversion

Mbit K/s
100 12,800
20 2,560
16 2,048
8 1,024
4 512
2 256
1 128
0.5 64

Backup your Linux Server Apps 18th May 2009 at 7:18 am

So you have your linux server up and running. A lot of time and effort went into this so lets get it backed up. You don’t need to invest in any fancy backup system. A bit of shell script and some use of crontab will do the trick.

Here are the two scripts I use…

    Email backup

Create an executable file e.g. mailserver_backup.sh containing the following

cd /
dt=`date +%Y%m%d_%s`
/bin/tar -czf mailserver_$dt.tar.gz etc/postfix etc/dovecot.conf usr/bin/null.sh usr/local/bin/safilter.sh usr/local/bin/backup_mailprogs.sh etc/mail/spamassassin home/mailfilt/.spamassassin var/spool/mail
    Web backup

Create an executable file e.g. web_sql_backup.sh containing the following

cd /
dt=`date +%Y%m%d_%s`
rm -f mysqlall.sql
mysqldump -uroot -ppassword --all-databases > /mysqlall.sql
/bin/tar -czf mailserver_web_sql_$dt.tar.gz etc/httpd var/www/html mysqlall.sql usr/local/bin/backup_web_sql.sh

Now use crontab to schedule the running of the scripts…

crontab -e

and enter the following
See below
Sponsored Links




15	3	*	*	*	/usr/local/bin/mailserver_backup.sh
45	3	*	*	*	/usr/local/bin/web_sql_backup.sh

This will backup mail server apps at 3:15am and web backup at 3:45am.

I would also suggest you copy the backed up files to other media in case your server completely crumbles.