Announcing Sun MySQL!
January 16, 2008 | Leave a Comment
Sun has officially acquired MySQL! As a huge fan and supporter of MySQL, I have personal commitment and obvious concerns about this. In my experience most things Sun does are bloated and slow to develop (Solaris, Java, Open Office). Yet, I remain hopeful because they do seem to respect and work positively with open source initiatives.
The most positive things can come out of this are improved marketing, better name recognition, and funds injected into a project. Maybe they can compete with Oracle now? Hey, maybe Sun will stop using Berkeley DB to back most it’s existing products. I’ll admit that upon first reading this my heart skipped a few beats, but as the pains subsided I think its all going to be OK.
Tags: database, java, lamp, mysql, openoffice, oracle, solaris, Sun, sun microsystems
Password-less SSH Login
May 8, 2006 | 14 Comments
On occasion I have the need to establish trust relationships between Unix boxes so that I can script file transfers. In short, here’s how you leverage SSH to do that. Using the example of trying to connect from server ‘ender’ to get a file on ‘bean’ follow this example:
- Connect to ender
- type:
ssh-keygen -t rsa- default directory for keyfiles will be ~/.ssh/
- if you do not want to be prompted, leave passphrase blank
- copy the contents of .ssh/id_rsa.pub (there should only be one line)
- place this line on bean, in ~/.ssh/authorized_keys
- that’s it, you should now be able to ssh/sftp/scp from ender to bean without being prompted for a password!
For further detail and a more complete example check this site out.
Update: You must have "RSAAuthentication yes" in your /etc/ssh/sshd_config file. On many Linux installations this setting is commented out in a default install
Tags: authentication, keygen, linux, pass phrase, password, scp, sftp, solaris, ssh, system administration, unix
Definition: Code Turd
April 7, 2006 | 22 Comments
In a major enterprise system we pay a lot of money for, a recent patch threw us an error based on the following line of code in a shell script:
echo "I am what is running, this is linux" >> /home/ban7/jobsub/for_whatever_purpose.txt
This line was not conditional and was ironically being run on a Solaris system, not Linux. Our DBA Jon Graton defines these little gems of “production” code as “code turds”.
Tags: code, dba, definition, disk turd, jon graton, linux, programming, shell script, solaris, unix
Defining Unix Load Average
November 7, 2005 | 5 Comments
Went looking for a simple definition of load average in Unix, but alas, simplicity is not in the nature of load. I read UNIX® Load Average Part 1: How It Works by Dr. Neil Gunther who breaks load down into much appreciated, yet excruciating detail.
In short it is the average sum of the number of processes waiting in the run-queue plus the number currently executing over 1, 5, and 15 minute time periods.
It’s calculated like this: load(t) = load(t - 1) e^(-5/60m) + n (1 - e^(-5/60m))
(at least in Linux)
From Gunther’s PDF Guide:
Most sys admins tend to refer to and use the m = 1 minute load average For queueing models we want the steady-state average [...] that suggests the m = 15 minute load average is more useful for capacity planning
So load is useful but complex.
Casey experienced some pretty sever load numbers recently…
Tags: definition, dr. neil gunther, gunther, LA triplets, linux top, load, load average, monitoring, performance, performance monitoring, solaris, unix
Installing mytop
July 15, 2005 | 3 Comments
Anyone who’s done much MySQL administration probably knows about mytop. mytop is basically a top clone for MySQL. Hugely useful if you want info about what your database is up to, but don’t necessarily have pr want MySQL Administrator installed.
I decided to install this on my FreeBSD box, though I’m sure the instructions would be similar on OSX, Solaris, or any other unix flavor. Sometimes the installation can be cumbersome and everytime I do it I find myself fumbling around trying to remember what I did last time. Unfortunately my systems administration skills aren’t always as solid as I like. So here goes.
1) Get mytop
2) unpack it in some directory (tar xvf mytop-1.4.tar.gz)
3) add in the necessary perl modules (assuming you don’t already have them)
perl -MCPAN -e shell
then at the cpan prompt:
install DBI
install DBD::mysql (this one may fail if your root password for localhost is set. in this case do `force install DBD::mysql`)
install Term::ReadKey
install Term::ANSIColor
install Time::HiRes
4) In the directory where you extracted mytop execute:
perl Makefile.PL
make
make test
make install
5) You can then execute it like:
./mytop -u<user> -prompt -h<hostname>
6) For additional options see: perldoc mytop. Also try hitting ‘?’ when running mytop for runtime options.
Tags: cpan, database, database administration, freebsd, install instructions, mysql, osx, perl, perl cpan, solaris, sql, systems administration, unix
