Renice 2: Even Nicer With Arrays

September 1st, 2009 by tburns

I put an entry out here that detailed how to find the process ID of a running process and then how to re-nice it from within a bash shell script. This first script referenced processes that could be identified by a single pid. But what about processes that spawn multiple pids, or multiple processes that are all named the same but are, in fact, separate instances?

Here is a small bash script segment that identifies process PIDs; puts them into an array; then uses that array to renice the processes. In this case, the processes are VoIP applications that use RTP (real time protocol), and, in particular SIP (Session Initiation Protocol) to put voice traffic on the wire and usually need immediate CPU access.

This script does many things before it gets to this point… we pick it up here at the renice process… Note that some of the variables you see here were instantiated early in the script. Also, to get the code to fit neatly on the page here, I took out a lot of the formatting of the echo statements that allows for clear logging…
Read more »

Increasing a virtual machine's disk space

August 17th, 2009 by tburns

I run linux, primarily. When I need access to a Windows workstation, I use a virtual machine on VmWare-Server v.2.0. I have an XP build that, originally, had a single, 10 GB C:\ partition. I have installed lots of stuff on it including some pretty hefty Cisco and Windows applications and I was running out of space. I needed to increase the size of the partition without breaking anything, so I used a couple of nifty tools to do it.

First of all, be sure to backup your virtual machine files. You should do that anyway… I have multiple, pocket-sized external hard drives that I use for on-the-fly backups. I also have some larger, powered drives that I use at home for mega backups. Disk space is cheap. Why skimp?
Read more »

Installing and configuring a wireless card

August 15th, 2009 by tburns

Installing a wireless card in linux is a breeze these days. I have a Fedora 10 build. Here’s how I did it (Most of these tasks need to be done as root):

1. Find out how your machine recognizes your wireless card. Do a simple lspci to be sure you can see the card:

[root@localserver ~]#lspci
...
09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express (rev 02)
0c:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)
...

I got a lot more output than that, but the only thing I am concerned with here are my network cards. In particular, the BCM4312 entry.
Read more »

iTunes, VmWare, and Samba

July 5th, 2009 by tburns

I have multiple machines that have multiple purposes but I only have one iPhone. I’ve put all my iTunes files/mp3s on a network samba share to avoid having them limited to one local, bare-metal Windows build. It’s just too tough to get to when your primary machines all run some flavor of linux. I have used external hard drives to manage these files before, but I found that to be a lot more work than simply configuring a virtual machine to manage the iTunes application and a network share to manage its content. I keep the virtual machine on an external hard drive that I back up regularly and that is available to every laptop/desktop that I have that runs VmWare.

To install this on a virtual machine, I had to move my iTunes build. I wanted also to preserve all my iTunes Playlists. I’d put together all these collections and I wasn’t willing to give them up. Here are the details on moving it all while keeping your playlists. Make note that this doesn’t result in an exact one-for-one cloned copy of iTunes. You lose several key features/elements:

– You lose the time/date stamps on the files within iTunes. This means, when you open it up, all the files have the same ‘Date Added’ date. This is a problem if you have a Recently Added folder because, when you’re done, that folder will hold everything;
- You lose all your column formatting. So, if you have a specific way you like to view/browse your collection, you’ll have to re-organize it manually; and
- You lose all the data in your iPhone Apps. The Apps themselves are able to be salvaged and re-sync’d, but the data will be gone.
Read more »

Avoid Duplicate Content – Consistent URLs, Link Element & Mod Rewrite

July 3rd, 2009 by Joyce Johnston

Duplicate content is a misleading term. When you first happen upon it, it seems to imply that your site has the same content on more than one page. Or that your site is duplicating (or has stolen) content that’s already on someone else’s site. But in most cases, when someone says your site has duplicate content, they mean that more than one url pointing to your website serves up the same content. For example, it’s not uncommon for the following url patterns to return the same page:

www.mysite.com/mystuff/
mysite.mystuff
www.mysite.com/mystuff/index.php
mysite.stuff/index.php?some-parameter=some-value

The confusion is compounded when you have more than one domain name pointing to the same site.

Read more »