Wednesday, October 6, 2010

EasyTether

I recently upgraded my phone from a 4 year old flip phone to the HTC Evo. One of the selling points for me was the Android operating system and tethering. While taking my turn on call, I have wanted the ability to go mobile and have an Internet connection anywhere I go. The built in Sprint tethering costs $30 per month. That's too expensive so I looked at other options. I found a program called EasyTether.

This program is free for HTTP use or a one-time cost of $10 for all other ports. I installed the app and have been able to get it working for Windows 7 and Ubuntu. I duel boot my work machine but use Ubuntu 90% of the time. Here is my instruction sheet for making EasyTether work

On Phone
EVO should be set to charge only and connected to the machine
Go to Applications -> Development -> Make sure USB debugging is enabled
Go to EasyTetherPro -> Enabled USB Tethering

On Computer (Ubuntu)
sudo easytether connect - keep the terminal open and open another terminal window
sudo dhclient easytether0

On Computer (Windows)
Open the app and connect

This is great for road trips or during a thunderstorm and the power is out at home and its the middle of the night and somebody from India is calling to tell you a site is down and they need help. That's a killer run-on sentence but it's true.

And keep these instructions on your local computer because you will need them at 2AM when you can't think straight.

Patching

A big difference between Windows and Linux in an enterprise environment is how each operating system handles patching. Microsoft has a month patch day on the second Tuesday of each month. We update development machines on Friday or 3 days after they are released. If patches go well and there are no reported issues during the next 7 days, patches are applied to production systems on the following Friday.

I have heard many horror stories about Windows patching and the problems it has caused. There are also hundreds of third party solutions available to perform Windows patching. We use WSUS and proper group policy. A member of our security team approves the patches and the boxes automatically restart during a maintenance window. The GPO makes sure domain controllers do not reboot at the same time. This solution takes about 30 minutes twice a week. It is dependable, reliable, consistent, and easy.

CentOS patching is more complicated. We utilized Spacewalk to manage our Linux servers. Spacewalk has the capability to push patches, but we have had little success making it work. Spacewalk controls the repos and which patches each server should receive. We do utilize a handy app that is essential to managing more than 1 Linux server, ClusterSSH. To update boxes, we do a yum update on each box. Then Spacewalk is able to schedule a restart of the systems in necessary for a kernel update.

The process is not consistent. Linux takes 2-4 hours for development and 6-8 hours for production. There is the potential for package conflicts, access issues, or a variety of other errors. Problems have to be investigated and fixed during each patching cycle. Also, CentOS does not have an established patching scheduled. So a patch could be potentially applied to production before development unless precautions are taken.

The cost of patching Linux should be factored into the decision to choose Linux as an operating system. System administrator time going to a mundane patching task could be used elsewhere.

Friday, September 10, 2010

Enterprise IT

My place of employment is in a transition from start-up to an established small/medium business. The transition impacts all levels of the organization. I experience the good and bad of this change from my position as a system administrator in the IT department.

We manage around 300 pieces of hardware and approximately 50 virtual machines not including desktops. Management of this equipment is a big part of my day. How does the company's growth coincide with management of our IT infrastructure? What about the pros and cons between Windows and Linux? Or open source versus closed source? I have introduced many big topics in two paragraphs. I think about these big picture items quite a bit but I never write down my thoughts.

Wednesday, August 18, 2010

iTunes

I'm quite particular about my iTunes/iPod setup. I want it organized. I choose the setting to have iTunes organize the drive.

For example, I do not like to search an iPod and find an artist I like and discover there is only 1 or 2 songs. This also makes the artist list quite long and hard to traverse. I created an artist called 'Singles' and put all of my one-offs into a single artist. To do this, click on 'Get Info' and change the song title to Artist-Song_Title. Then change the artist to 'Singles'. Then you can sort by artists and you have a collection of singles in one place. This is also an excellent place to hide songs people might poke fun of. We all have those songs and it's nice to not have them exposed so easily.

Another iTunes organization tip is to be mindful of the iTunes organization and the phsyical folder/file structure. I discovered I had artists in multiple physical folders. I had folders for The Smashing Pumpkins and Smashing Pumpkins. The band is officially called The Smashing Pumpkins but often MP3 rips or naming conventions are not properly filed. iTunes does a good job of keeping things organized and will put it all together on a device, but this was not enough for me. If I want to share The Smashing Pumpkins with a friend or do a backup of the physical files, I want them all in a single folder. To fix this, select 'Get Info' and change the Artist name. iTunes will then move the albums/songs to the proper file. iTunes will typically leave empty folders that need to be manually deleted.

The artist naming problem can also occur with the field 'Album Artist'. Make sure sure to edit the album titles to keep them properly named.

Tuesday, August 17, 2010

SSH to Netapp Device

To connect via ssh to a Netapp device that is joined to a Windows Domain

ssh domain\\username@devicename

I always forget which direction the slashes go. And logging in as root is never a good idea.

Friday, August 13, 2010

CIFS Mount

On Ubuntu or most Linux distributions, this is a command to connect to a Windows share

Make sure samba, smbclient, and smbfs are installed

sudo mount -t cifs //share /mounts/localshare -o username=jsmickey,domain=domainName

This will prompt for a local password and then the domain password

RDP Alias

Compliments of my good buddy Coobachey

From a Linux terminal, I run Ubuntu, type rdp machinename and this will automatically log me in to a Windows box. This is a big time saver. Just remember to not use this on a public machine and to update the alias file when your password changes.

Edit /home/username/.bashrc

Add this line

alias rdp='rdesktop -g 1280x1024 -u domain\\username -p password'

-g = screen resolution
-u = username
-p = password

source ~/.bashrc in a command line to reload the .bashrc and activate the alias'

Another tidbit from Coob, always remember to install vim on your local machine for easy editing of files in terminal.

Tuesday, August 10, 2010

Wireshark

This is an essential tool for troubleshooting problems.

I did get stuck on creating a filter for the command line and finally figured out I needed quotes

tethereal -i eth2 -f "host 8.8.8.8" -w /mounts/logs/mycapture.pcap

-i = interface
-f = filter - use the same filters as the GUI, but put them in quotes
-w = output

For analysis, the GUI is the only way to go.

gnome/xorg Removal

By default, CentOS will install a base set of packages on any box whether it is a server or workstation. But many of the default packages are useless on a web server. These packages are not used but are frequently updated and hog resources during patching. After testing on development equipment, the following commands were issued via cluster SSH in production

runlevel
yum remove gnome*
yum remove xorg*
yum -y remove joystick cdparanoia wireless-tools flac audiofile cdrecord saba* openoffice* bluez* gimp* inews* gphoto* hicolor-icon-theme* gstreamer* cups* gnome* xorg*

Make sure the runlevel is '3' before removing gnome and xorg.

I experimented with yum groupremove, but found during a cluster SSH session of 10 servers, at least 1 of them would not recognize the "X Windows Server" group. To keep the cluster SSH session synchronized as possible, removing one layer at a time worked the best. In the third line, we remove gnome and xorg again because CentOS was leaving a few packages behind.

Nested Tables in Mediawiki

I like the wiki concept because it keeps history, it is fast to edit, and it controls the version.  A spreadsheet being edited by 10 different people inevitably leads to version conflicts and bad data.  Mediawiki is hard for the average end user to edit, but for an infrastructure team it does the job.

The team was using a spreadsheet to track the contents of blade chassis.  I converted it to Mediawiki with the help of Nested Tables.  I kept it simple but did add some HTML Color for the backgrounds to make it visually pleasing.
  
Code:

= Environment =
{|
|
{| style="color:black; background-color:#FAF8CC;" border="2" cellpadding="5" cellspacing="0"
|+ align="top" style="color:red;" |'''chassis'''
|-
|1
|server1
|-
|2
|server2
|-
|3
|server3
|}
|
{| style="color:black; background-color:#FAF8CC;" border="2" cellpadding="5" cellspacing="0"
|+ align="top" style="color:red;" |'''chassis'''
|-
|1
|server1
|-
|2
|server2
|-
|3
|server3
|}
|}

Result: