Rogue Wolves is the professional website of freelance software consultant Scott Langevin.
Articles
Swap On, Swap Off
My server has been acting up lately. It would periodically slow to a crawl and stop responding. Checking the server log files I would always see an entry about mysql running out of memory. I assumed it was a mysql performance tuning issue and was reading up on the plethora of performance settings you could tweak. This lead me down various wild goose chases. I should have started with the obvious: What is consuming all the memory on my machine? I did do a "top" of my system and nothing appeared to be using more memory than it should, but I didn't look at the overall memory usage until today. Here is what I saw:
Look at that carefully. First of all 84% of the memory is being used, but that's not a big deal. Linux caches as much as it can into RAM and then swaps out what it doesn't need to the virtual memory on demand. Virtual memory....swap....look at that picture again. 0 bytes of swap!!! There is NO virtual ram available! According to my system it doesn't exist! That's trouble. Looking over my /etc/fstab file (the file that specifies all of your partitions that you are mounting) it looked like it was loading my swap partition.
But executing:
cat /proc/meminfo
Showed that there was 0 bytes of swap.
There is a command in Linux to enabled/disable the swap (virtual memory). The commands are swapon and swapoff. I gave swapon a try:
/sbin/swapon /dev/sda3
Then looked at my memory usage. Ahhhh there is my swap.
No wonder my machine was locking up, it was running out of physical ram and then crashing hard because it had nothing else to do. But the question is why was the swap partition not being mounted? Well that's my stupidity. I was restructuring my partitions the other day and created a new swap partition but never gave it a label. The label is basically a name you can give your partition such as "backup" or "work". In my fstab file I was mounting my swap file using the label rather than specifying what device it is (/dev/hda3 in my case). So to fix this I just needed to update my fstab file to mount my swap using the device name rather than the label name.
Moral of the story: When you have insomnia, don't screw with your partitions late in the evening...compile your kernel instead. ;)
More on iFolder
I have been playing around with iFolder for several days now and until recently it's been a frustrating experience. As I pointed out in my last post I was able to get the iFolder server up and running after a few snags and it seems to be working well...but the client has been a complete pain in the a$$.
My plan was to install the client on both my Windows box and my OS X ibook. At first it looked like it was working great. I created a folder on my windows box and put a few files in it and it synchronized with the server. Then I watched as my ibook synchronized and the folder and files were pulled down to it. GREAT! However a few more experiments fell flat. I decided to try and add some files to that folder on my ibook and see what happens. Nothing! Hmm. So I forced a manual sync operation and still nothing. I restarted the client and this time it picked up the changes and sync'd successfully but came up with a wierd status message "1 item out of sync". After that nothing would synchronize anymore. To make a long story short I tried everything I could but could not get the OS X client to consistently synchronize files. So I decided to see how well the latest development build of the iFolder client would work: 3.5. It was an even worse situation. The client would not connect to the server no matter what I did. Next I decided to give the 3.4 build a go.
Now we are talking! It seems to be working. Files are synchronizing as expected.
Here are the versions of iFolder software I am currently using:
ifolder3 server: 3.5.6112.1-1
ifolder3 client: 3.4.6112.1
Here are some of my test cases to check that iFolder is working...
HowTo: Install iFolder on Fedora Core 4
Now that my Fedora install is upgraded to FC4 I decided to give iFolder a shot. It's actually "fairly" easy to install, but I ran into a couple of snags trying to get it configured and running.
Installation on Fedora is simplest if you use Yum. To do this you need to add repositories for mono and iFolder. Here is a super fast way to get the repositories setup:
For Mono:
wget http://www.go-mono.com/download/fedora-4-i386/mono.repo
cp mono.repo /etc/yum.repos.d/
For iFolder:
wget http://forgeftp.novell.com/ifolder/server/3.5/iFolderServer-Fedora.repo
cp iFolderServer-Fedora.repo /etc/yum.repos.d/
Now the repositories are setup, you should execute yum upgrade to update your repository lists.
To install now is a piece of cake:
yum install ifolder3-server
Yum rules! If you are familiar with Apt-Get you will appreciate Yum. It will download and install all the dependencies...no messing around with tar balls for me!
So now iFolder is installed but it needs to be configured. I read through this wiki page to get some details on configuring iFolder...
More on Synchronized File Store
I may have found a solution to my synch issue I posted previously.
iFolder looks promising. It basically meets most of my criteria. Here are some of the highlights:
- Cross-platform: runs on OSX, Windows, Linux, etc.
- Auto-syncs files to server and propagates to all client machines.
- Has a web-front end so you can access your files anywhere using a web-browser.
- Open Source!
- User/Group Security
iFolder is a simple and secure storage solution that can increase your productivity by enabling you to back up, access and manage your personal files-from anywhere, at any time. Once you have installed iFolder, you simply save your files locally-as you have always done-and iFolder automatically updates the files on a network server and delivers them to the other machines you use.
Now it's just a matter of finding some free time to test it out and see how well it works...









