Restore Close Button to Right in Ubuntu 10.04

Posted by Chief on Jun 13, 2010 in Reference, System Administration
No Comments

gconftool-2 --set "/apps/metacity/general/button_layout" --type string "menu:minimize,maximize,close"

Ref: LaunchPad » Ubuntu » Questions » Question #108951

Tags: , , , ,

Performance Problems on an MD1000 with PERC/6 Disk Array

Posted by Chief on Apr 19, 2010 in System Administration
No Comments

One of the machines that I use at work was exhibiting severely slow disk I/O performance. I noticed that any directory I traversed to for the first time took 30-50 seconds to `cd` into. After that first time, however, the response was speedy. I suspected hardware problems, since caching would explain the quick re-traversal. This is my story.

  1. Check the lights. All green, now what?
  2. Check the load. Normal.
  3. Try hdparm. What? man hdparm
    // normal machine 1:
    $ sudo /sbin/hdparm -Tt /dev/md0:
     Timing cached reads:   15348 MB in  2.00 seconds = 7688.21 MB/sec
     Timing buffered disk reads:  808 MB in  3.19 seconds = 253.58 MB/sec
    
    // normal machine 2:
    $ sudo /sbin/hdparm -Tt /dev/md0:
     Timing cached reads:   18448 MB in  1.99 seconds = 9254.38 MB/sec
     Timing buffered disk reads:  1654 MB in  3.00 seconds = 551.33 MB/sec
    
    // problem machine:
    $ sudo /sbin/hdparm -Tt /dev/sdc:
     Timing cached reads:   27660 MB in  1.99 seconds = 13883.97 MB/sec
     Timing buffered disk reads:    8 MB in 14.64 seconds = 559.51 kB/sec

    Yes, we definitively have a problem. 500 kB/sec is cable modem speed, and I know my hard drive can store data faster than that… ok, now what?

  4. Check the logs.
    1. Reboot into bios
    2. Check the event history
    3. Reboot into PERC bios
    4. Check the event history.
    5. Call Dell, the ones with all the answers and none of the obligation to share. They know the track-record of the hardware they sell, so when you call them up, they just sent you replacement parts for whatever everyone else’s problem was. This time, it worked.
  5. The phone call to Dell went through the obvious: Reboot? Logs? Firmware? blah blah… Dell says they saw errors with disk 9. Ok, that’s something we didn’t see the first time around. Anyway…
  6. Dell decided to send a new PERC card, new PERC cable, and because of the disk error, a new disk.

We decided to only replace the PERC card first, to see if that would solve the problem. It worked!

// problem machine after new PERC card:
$ sudo /sbin/hdparm -Tt /dev/sdc
 Timing cached reads:   25368 MB in  1.99 seconds = 12727.72 MB/sec
 Timing buffered disk reads:  256 MB in  3.00 seconds =  85.33 MB/sec

That’s 2 orders of magnitude improvement, but it’s not good enough. The other machines are doing better. Let’s change the look-ahead cache size.

// Set lookahead to 8192 blocks:
$ sudo /sbin/blockdev --setra 8192 /dev/sdc
$ sudo /sbin/hdparm -Tt /dev/sdc
/dev/sdc:
 Timing cached reads:   23988 MB in  1.99 seconds = 12035.05 MB/sec
 Timing buffered disk reads:  1202 MB in  3.00 seconds = 400.48 MB/sec

Now that’s what I’m talkin’ about!! Yes, 400 MB/sec is what we’re expecting for local disks. Call it a day, grab me a beer, celebrate — disaster thwarted.

When all was said and done, we double-checked the logs and didn’t find anything having to do with disk 9, so we figured it was all probably the card. It’s better not to rebuild the array in this case because we don’t use striping or mirroring… we need the space, and the “data” is regenerable (it’s processed output, not source data). I would have replaced the cable too, since there’s no penalty for doing so, but I wasn’t the tinkerer today.

So that’s it: bad PERC/6 card. It’s not the first bad enterprise part we’ve received from Dell. They need to work on that.

Tags: , , , , , , , , ,

Static IP with DHCP-Assigned DNS on Ubuntu 9.10

Posted by Chief on Dec 3, 2009 in Reference, System Administration
No Comments

There is a ton of bug reports regarding the Network-Manager’s nm-applet not properly configuring static ips. There are, and always have been, bugs in the nm-applet, in each of its versions. In short, getting a static ip with dhcp assigned DNS parameters requires editing the /etc/dhcp3/dhclient.conf file. Here we go.

  1. sudo vi /etc/dhcp3/dhclient.conf
    >>
    alias {
      interface "eth0";
      fixed-address 192.168.1.101;
      option subnet-mask 255.255.255.255;
    }
    <<
  2. sudo dhclient -r
  3. sudo dhclient

Tags: , , , , , ,

Installing GDAL via FWTools

Posted by Chief on Dec 1, 2009 in System Administration
No Comments
wget http://home.gdal.org/fwtools/FWTools-linux-2.0.6.tar.gz
sudo tar xzf FWTools-linux-2.0.6.tar.gz -C /usr/local
sudo /usr/local/FWTools-2.0.6/install.sh
sudo vi /etc/profile
# Add /usr/local/FWTools-2.0.6/bin_safe to the global $PATH 
pathmunge /usr/local/FWTools-2.0.6/bin_safe
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
sudo cp /usr/local/FWTools-2.0.6/man/man1/* /usr/local/man/man1/
sudo cp /usr/local/FWTools-2.0.6/man/man3/* /usr/local/man/man3/
sudo cp /usr/local/FWTools-2.0.6/share/man/man1/* /usr/local/share/man/man1/
sudo cp /usr/local/FWTools-2.0.6/share/man/man3/* /usr/local/share/man/man3/
logout

Warning: You may break PHP!

The fwtools_env.* files could be copied to /etc/profile.d/, but if you’re running PHP, you’ll break the mechanism that loads php extensions. I don’t know why.

Reference:

FWTools: Open Source GIS Binary Kit for Windows and Linux

Tags: , , , , , ,

Configuring MySQL

Posted by Chief on Nov 12, 2009 in System Administration
No Comments

The following is how I set up MySQL on wharf.

  1. First, ensure mysql is installed: ls /etc/init.d/my*
  2. Now, make mysql start on boot: sudo /sbin/chkconfig --level 35 mysqld on
  3. Start the mysql server: sudo /etc/init.d/mysqld start
  4. Make MySQL more secure: sudo /usr/bin/mysql_secure_installation
  5. Log into mysql as root: mysql -u root -p [to be entered by prompt]
  6. Add another mysql user:
    mysql> CREATE USER 'newuser'@'%' IDENTIFIED BY 'newuserpass';
    mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON *.* TO 'newuser'@'%';
    mysql> FLUSH PRIVILEGES;
  7. Exit mysql: mysql> exit
  8. Test: mysql -u <newuser> -p <newuserpass>

Tags: , , , , ,

Git – Install and Configure

Posted by Chief on Nov 4, 2009 in System Administration
No Comments

Git is a code revision system not much unlike subversion and CVS.  One of the best features of git is that it is a distributed revision system, so you can check-in, check-out, commit, revert, etc without ever needing direct access to the central repository.  You can work with your repository as if it were a centralized system if need be found. Read more …

Tags: , , , , , , , ,

Copyright © 2010 cat brain.log | less All rights reserved.
Shades v1.2 theme from BuyNowShop.com.