Watching your Network Usage
I’m sure everyone else knows about the iftop tool, but it was new to me. I needed to confirm that traffic from DRBD was using a particular interface and iftop does the job by showing traffic sources, speed and culmulative data counts per interface.
Missing Network Interfaces in Ubuntu Under VMware ESXi
Every now and again I clone a VM and add it to another host. ESXi prompts you for a new UID when you start the VM and I always remove the virtual network card(s) from the machine and re-add them later. I do this to make sure I don’t have two machines with the same MAC addresses on the network. But if you do this with Ubuntu, the new NIC(s) don’t get picked up by the OS. This is almost certainly not specific to VMware or their ESXi product, it’s just the environment I’m using.
This problem seems to be caused by a lack of automatic hardware probing at boot, probably for a good reason but I’m no Linux kernel guru so won’t make a judgement there. The root of the issue is located in the file /etc/udev/rules.d/70-persistent-net.rules where you’ll see the old interfaces still listed alongside the new ones. Simply remove the old NIC(s) and ensure the new ones have the MAC addresses you expect and the correct ethx labels. Give the system a reboot and you should be happy.
Steps to resolve a missing network interface in Ubuntu 10.04 Lucid Lynx (and possibly earlier):
- sudo nano /etc/udev/rules.d/70-persistent-net.rules
- Delete the lines with the old interfaces after comparing with your VMs newly assigned MAC addresses.
- Confirm the interface names are what you expect at the end of each line.
- Ctrl-X to save and exit.
- sudo shutdown -r now
- Run ifconfig to confirm the interfaces are up with the correct IPs.
- If the interfaces are up, check your /etc/network/interfaces config to adjust IP settings as required.
Installing VMware Server 2.0.2 in Ubuntu 10.04
After updating my trusty old server to Ubuntu Lucid Lynx 10.04 the installation of VMware Server 2.0.1 started giving problems. Resinstalling VMware didn’t help as I was repeatedly getting compilation problems in vmmon and vmnet modules. Luckily I stumbled across the following process from one of the VMware forum pages which pointed to a great work-around from the radu cotescu site.
So I take no credit for this but simply repeat it here so that the search gods may recognise it’s usefulness and +1 it’s importance.
Start by downloading VMware Server 2.0.2 from the official VMware site. If you haven’t already got a few licenses, get one now. (They’re free so you might as well get a few) I’m going to assume the downloaded file is in your home directory.
You also need to update the header files for your current kernel so that the configuration scripts from VMware can build the appropriate modules.
sudo apt-get install linux-headers-`uname -r` build-essential
Now just run the following commands.
cd /usr/local/src sudo wget [http://codebin.cotescu.com/vmware/vmware-server-2.0.x-kernel-2.6.3x-install.sh] sudo tar xvzf raducotescu-vmware-server-linux-2.6.3x-kernel-592e882.tar.gz cd raducotescu-vmware-server-linux-2.6.3x-kernel-592e882/ sudo cp /home/<your_username>/VMware-server-2.0.2-203138.i386.tar.gz.sudo tar xvzf VMware-server-2.0.2-203138.i386.tar.gz sudo chmod +x vmware-server-2.0.x-kernel-2.6.3x-install.sh ./vmware-server-2.0.x-kernel-2.6.3x-install.sh
If you have a previous installation of VMware Server, you’ll be prompted that it’ll be removed as part of the install. Don’t worry, any guest VMs you had should still be there afterwards. The script will run through the usual prompts and you’ll see references to the patched files from Radu Cotescu. After a few minutes you should have a working install of VMware Server 2.0.2 on your Ubuntu 10.04 server.
Running WordPress & PHP Behind ISA Proxy
Some things work well on their own but when mixed make your life hard. Things like Linux and PHP work very well. Microsoft ISA proxy also does a good job in a corporate MS environment. But making the two work together in a controlled environment can be an exercise in frustration.
In this post I’ll pass on the methods I found to get PHP and your Linux boxes talking out through a corporate ISA proxy server. You can then bring in RSS feeds, updates and other things in WordPress and use apt-get to update Ubuntu. Read more >>
MySQL Replication on Ubuntu with DRBD
I’ve been looking around for some easy and open-source ways to handle database replication for a handful of small but important MySQL databases. A few options were viable but usually included too many config changes for things like creating a new database. DRDB on a Linux server seems to be one of the fastest and easiest methods to handle database synchronisation for DR purposes, so this is the subject of this post. The content is a combination of two main sources from Mark Schoonover and the Ubuntu server guide and the gotchas I found along the way.
This post will show you how to create two MySQL servers that automatically replicate all their databases using DRBD. With Heartbeat installed on a third machine you’ll have basic fail over protection as well (we’ll do this in another post). Only one of the database servers will be active at any one time. Read more >>
Enable WakeUp from PS2 Keyboard in Ubuntu 8.10
One of the annoying “missing features” I’ve struggled with under Ubuntu is that I was unable to wakeup the PC from suspend or hibernate with my keyboard. Of course, Windows just does it – tap the keyboard and the PC starts up again. I could press the power button on the front of the PC, but its down the side of the desk and not easily accessible.
I found an older post in the Ubuntu forums that had the fix for USB devices and it also works for PS2 with the simplest of changes. So follow these steps and you should be saving power and getting back to work faster.
Open a Terminal and type,
cat /proc/acpi/wakeup
Note the entries that come back and you should see a device called “PS2K” toward the top if you have a PS2 keyboard. For those with USB, it’ll be one of the USB items toward the bottom. The entry will probably also have “Disabled” on the same line, hence your problem.
To enable this entry, switch to a root session by typing,
sudo -s
and enter your password. Now type the following to update the acpi file and toggle “disabled” to “enabled”, (those with USB devices can try USB0, USB1, etc)
echo PS2K > /proc/acpi/wakeup
That should have now enabled your PS2 keyboard to wakeup your PC for this session. Give it a test by putting your machine to sleep and then tapping a key on your keyboard. Probably a good idea to save stuff first, just in case.
If you tried changing a USB device, it may take a few guesses until you find the KB. My mouse was USB0 and clicking any mouse button can also do the wakeup task.
To make this change permanant, you need to add that line to a script and run it when Ubuntu starts. So we create a file called wakeup.sh with the following contents,
#!/bin/bash echo PS2K > /proc/acpi/wakeup
Save it and from a Terminal make it executable so it runs properly as a script and not just a text file,
chmod +x wakeup.sh
Now to add it to the startup area go back to your Terminal that’s running as root. We need to copy the file to the correct location and add it to the startup processes. You’ll need to run the cp command in the same folder as where you saved your wakeup.sh file.
cp wakeup.sh /etc/init.d/wakeup.sh update-rc.d wakeup.sh defaults
Now when you reboot, the script will run and enable your PS2 keyboard in ACPI so you can wakeup your PC.
Installing VMware Server 1.06 on Linux
Installing the free VMware Server is a common but slightly tricky process on some newer Linux systems. Having had to go through it again recently I thought I’d write some of it down. Of course if you are using Ubuntu 7.10 then the simple option is to enable the Canonical Partner repository and just use Synaptic to select and install VMware Server.
For the others in the audience that are installing on Ubuntu 8.04 or another Linux system that doesn’t have packages, you should have a working VMware Server install with web interface and a client console by the bottom of the page. Read more >>
Blog Categories
Recent Stuff
Similar Posts
Twitter Updates
- RT @stevebiddle 'Why have a sign on your cafe saying "holiday surcharge applies"?' Or "we forgot holidays in our poorly planned business"
- Ahh that's right, this is the Harry Potter where the vampire gets killed at the end
- There's a problem being the social media guinea pig. Your friends aren't there when you sign up.
- @toxaq I thought he'd be taller. And be protected from people like you
- RT @timbray: âPiracy, copyright, profit, and kiss my ass.â http://t.co/Ky2Bi8n7 I think this one worth passing on.



