UNIX

You are currently browsing the archive for the UNIX category.

There have been many times I have needed to run NTOP on a Debian host and got it working, but never set it up 100% correctly. Usually I’d get NTOP working and configured and by that time I was too anxious to wrap it up. I’d modify /etc/rc.local and bring up the interface with a simple ifconfig eth1 up.

Today I had to reboot an NTOP host and ifconfig wasn’t already in rc.local so I decided to do it correctly. I found a blog post here. I wouldn’t have re-written another blog post, but he doesn’t allow comments on his.

Modify the file /etc/network/interfaces with the following content:

# For NTOP
auto eth1
iface eth1 inet manual
up ifconfig eth1 up

 

This is about my experience with OS X from my perspective — don’t forget, everyone’s different. This all took place over a little more than a year.

Chapter 1 – Introduction to Mac

About a year ago I purchased a MacBook Air and was excited to get it up and running and learn everything Mac. It was awesome at first. I was learning shortcuts, command line tricks, brew packages, and Xcode. I was installing menu bar tweaks, dynamic backgrounds …it was FUN!

Then I got into the applications like iPhoto, Aperture, Mail, Microsoft Office 2011, Illustrator, FaceTime, Adium, etc.

Then work came and I started adapting my work environment into Outlook 2011 and MS Office. Some programs I couldn’t find right away, I started poking around for alternatives such as Visio. Meanwhile, a few programs that are CRM and management tools we have at work only run on Windows which begged the question, “do I RDP into a Windows machine and run these or do I run them in Parallels?” I didn’t want to clutter my shiny Mac with Parallels so I decided to use RDP. RDP on the Mac turned out to be painful. The two or three RDP clients I used were either slow, buggy, or finicky with the keyboard.

Welcome Parallels!! I don’t want to run “WINDOWS!” so I ran Parallels in Coherence mode. I thought it was amazing until I started trying to use Windows keyboard shortcuts and key combinations that didn’t exist because the keys weren’t on the keyboard. I hacked around with the keyboard mapping, settings, it was painful.

Welcome LION!! (and Parallels 7). I found a solution — run Windows full screen and use the three finger swipe to switch between Windows and Mac, perfect! Now I have the best of all worlds.

…whew. I can finally use Remote Desktop. (as a side note, do you see where this is going? Windows. It gets better).

Chapter 2 – My First Serious Problem

Outlook 2011. Yup, I hate it — curse it up and down. You see, I live by my iPhone, multiple computers, and a world of effortless syncing. Enter Outlook 2011 into the equation on an Exchange 2010 server and it “appears” to work great, but guess what? Calendar appointments start acting up, duplicates, triplicates. I started trying to get a handle on it contacting Microsoft, verifying patches and service packs were installed. I finally stopped using it and stuck with Outlook in Windows and the pains continued as I now discovered about 75% of my 500+ contacts that I’ve meticulously entered data for had birthdays now off by one day. Who was off by one day? When did it happen? How do you fix it when it’s only 75% of the contacts? I had no answers to these questions so every time a birthday shows up (a year later), I still have to double-check if it’s correct or not.

Chapter 3 – Cruise Control

I finally figured it out. Run MS applications in Windows/Parallels and run Mac Applications in the Mac. Life went on, switching between Windows and OS X effortlessly thanks to the three finger swipe. Adobe Apps ran in the Mac so when I opened PDFs they opened in one world, Word ran in Windows, and so on. Things were fine but I started to realize, I didn’t really need OS X! I needed Windows — it has all the critical and main programs I use. Yea, OS X had toys and was fun to play in sometimes, but it wasn’t going to get my work done.

Chapter 4 – Divorce and Closing

It’s over. As of this past Sunday, I formatted my MacBook Air’s SSD with NTFS deleting all partitions and installed Windows 7 with Boot Camp drivers.

Here is a summary of Pros and Cons of OS X that I experienced, they are not weighted equally:

Pros Cons
  • FaceTime
  • Adium
  • Unix shell
  • Browsing the web
  • Xcode
  • Everything MS Office (Outlook, etc.)
  • Visio
  • RDP clients
  • Business Apps (CRM, etc)

The Pros have been replaced with Skype, Pidgin, Putty, and VMware. The short list of Cons makes me money. I’ll have to have fun without OS X.

Oh, and the thing about Viruses and Stability: OS X is not more stable than Windows 7. I’ve seen it crash many times over the past year. Viruses? I haven’t had a virus on any of my computers in…. well, I can’t remember it’s been that long (AND I don’t run Antivirus software).

Not so fast folks!

 

As always, we’re trying different things. I recently used some older parts and created a Server with 2.6.39 (Debian) that has a 3ware card and a Btrfs filesystem. LVM was placed on top of the 3ware partition and then Btrfs was put on top of that. The storage was shared out via NFS for an ESXi host.

I was expecting the system to work okay and it did for about a month. Eventually the volume needed more space, so the Btrfs volume was resized and life continued. About a week ago the system performance became unacceptable. VERY slow, high load averages, 80+% IO wait, etc. In addition, the VM would no longer boot because ESXi was complaining about disk IO timeouts! I was definitely experiencing some major performance issues. All of the hardware I was using was pretty much old, but tried and true. Being Btrfs was new on the scene and the strange behavior the kernel was displaying, I suspected the shiny Btrfs. I created a new Reiserfs (v3) volume, which in the past (and apparently still is) was my file-system of choice. I copied the VMDK and associated goodies to the new volume, shared it out, and ESXi was in heaven again.

So, what I have learned is:

1. Btrfs has some issues with NFS. The performance appeared perfecetly fine coping the data from Btrfs to Reiserfs, but accessing the data via NFS was awful.

2. Btrfs performance degrades over time. Initially the VM worked great. Over time, performance degraded until it was basically no longer usable.

I haven’t yet determined exactly why I experienced these issues with Btrfs, but Reiserfs seems to have solved it for now. I’ll definitely be looking for clues in the coming months.

Lastly, some data on backup times the VM logs. (The VM is responsible for backing up other servers. These times are for one small server that is backed up to the VM’s storage). The last 1 minute time is after switching to Reiserfs.

Duration: 1 min.
Duration: 1 min.
Duration: 1 min.
Duration: 0 min.
Duration: 1 min.
Duration: 1 min.
Duration: 1 min.
Duration: 3 min.
Duration: 1 min.
Duration: 8 min.
Duration: 10 min.
Duration: 39 min.
Duration: 12 min.
Duration: 59 min.
Duration: 109 min.
Duration: 66 min.
Duration: 3 min.
Duration: 240 min.
Duration: 297 min.
Duration: 298 min.
Duration: 657 min.
Duration: 375 min.
Duration: 2140 min.
Duration: 1 min.

Update: This has been updated for 2.2.x. Follow this link.

Original Posting and Script

This is an updated script to install Zabbix 1.8.x on CentOS/Red Hat 5. I have tested it on CentOS 5.4. The script was made for Zabbix 1.8.0, but if you modify the ZBX_VER variable in the script, it should work on any version in the 1.8 series.

Basically, the script tries to do a few things and assumes some things:

  • Only run this for NEW installations, you will lose data if you run on an existing installation
  • Run at your own risk
  • Installs Zabbix 1.8.x on CentOS 5
  • Do not corrupt an existing system
  • Be able to run the script over and over in the event that it errors
  • Be somewhat flexible
  • The database server, web server, and zabbix server all run on one box

Click here to download it

Update: This has been updated for 1.8.x. Follow this link.

I was following the Zabbix forums and people are constantly having problems installing Zabbix.

To make things easier, I wrote a magic install script for CentOS/Red Hat 5. I have tested it on CentOS 5.2.

Basically, the script tries to do a few things and assumes some things:

  • Only run this for NEW installations, you will lose data if you run on an existing installation
  • Run at your own risk
  • Installs Zabbix 1.6.1 on CentOS 5.2
  • Do not corrupt an existing system
  • Be able to run the script over and over in the event that it errors
  • Be somewhat flexible
  • The database server, web server, and zabbix server all run on one box

One final note, I did peruse a few other CentOS install guides, all of which will probably work, but all of them follow many bad practices. The magic script does a far better job and requires less effort, go figure.

Click here to download it

As of this writing, Etch is the current “stable” version of Debian.

This is how to install Zabbix!

  1. Add an unstable deb-src repository to your sources.list. If you have problems later, make sure the following deb-src line is the only deb-src line in your sources.list file.
    echo "deb-src http://ftp.us.debian.org/debian/ unstable main contrib non-free" >> /etc/apt/sources.list
  2. Update your package repository
    apt-get update
  3. Install necessary packages for this compiling project
    apt-get install libcurl3-dev build-essential automake1.9  libsnmp9-dev libiksemel-dev libopenipmi-dev libpq-dev
  4. Download source
    cd /tmp
    apt-get source zabbix
    cd zabbix-1.6.1
  5. Modify source because etch doesn’t have libcurl4. Modify the control file (line 6) where it says “libcurl4-gnutls-dev” with “libcurl3-dev”
    vi debian/control
  6. Compile source. If you’re missing packages, this command will tell you what other packages you need to install before this command works properly.
    dpkg-buildpackage -rfakeroot
  7. Install fresh packages
    cd ..
    ls -l *deb
    dpkg -i ./<zabbix package of your choice>.deb

All done. Remember, this guide doesn’t tell you how to use Zabbix. I suggest you look in the /usr/share/doc/zabbix* directories that the packages created. Also, read the documentation, forums, wiki, etc.

Enjoy.