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: