I’ve always been a big fan of having a customized .bashrc file. The one I distribute to all of my servers has aliases for quick commands to save me time on the command line, functions that get work done when aliases are too simplistic, reporting for the server for each cli login, and of course a formatted and colored prompt (for terms that support colors). I also change certain aspects and commands based on the operating system since I’m not always on a redhat box or linux at all. Here’s my bashrc file – maybe you have some fun additions that you’d like to share. What saves you time on the command line?
This month is a special month. It’s not because of Valentines day or even the exciting day where we see groundhogs. No, this month is special because I’m have a book contest where you, the reader, get to win something free for doing absolutely nothing more than posting a comment saying that you want one of the several books I have available in the contest.
So without getting into boring details I’ll keep this short. I’ve been reviewing a lot of books lately and I think it’s time to get some books into people’s hands to enjoy themselves. This month the giveaways are all Python oriented.
So, all you have to do is take a look at the following titles and post a comment here saying that you want one of them. At the end of the month two readers will be chosen via a random list sorting python script I’ve whipped up for just this purpose. You will then get an email from the publisher who will send a brand new e-copy of the …
[Read more]I’ve been playing around with some quick system automation scripts that are handy to use when you don’t want / need to setup a chef or puppet action. I like to keep all of my hostnames and login details in a MySQL database (a cmdb actually) but for this example we’ll just use a couple of nested lists. This script executes commands in parallel across the hosts you choose in the menu system via the “pdsh” command, so make sure you have that installed before running. Alternately you can change the command call to use ssh instead of pdsh for a serialized execution, but that’s not as fun or fast. With some customizations here and there you can expand this to operate parallelized jobs for simplifying daily work in database administration, usage reporting, log file parsing, or other system automation as you see fit. Here’s the code. Comments welcome as always!
#!/usr/bin/env python ## NAME: menu_parallel_execution.py ## DATE: …[Read more]
Check out this SlideShare Presentation: Linux performance tuning & stabilization tips (mysqlconf2010)View more presentations from Yoshinori Matsunobu.
[Read more]It was ready for a while already, but now it's part of the official FOSDEM schedule as well: I am very pleased to announce the presentations and speakers of the MySQL & Friends Developer Room, which will take place this coming Saturday (5th of February) in Brussels, Belgium.
This year, our DevRoom will be located in room H.2213 (in the H Building), which has a capacity of up to 100 people and will be available to us from 13:00-19:00 o'clock. We have 12 sessions lined up, each will last 25 minutes (incl. Q&A). Without further ado, here's our schedule:
Time | Speaker | Session Title |
---|---|---|
13:00-13:25 | … |
If you're already using an SNMP monitoring tool like OpenNMS, mysql-agent is a great way to add a number of
graphics using Net-SNMP. However mysql-agent has a small bug that
drove me crazy. I will try to highlight the process on how I
discovered it (and hence fix it) since it involved learning about
SNMP, how to diagnose it and eventually, once all the pieces came
together, how simple it is to write your own agents.
Although versions are not that important, just for the sake of
completeness we were using CentOS 5.5, MySQL 5.5.8 Community
RPMs, Net SNMP version 5.3.22 and OpenNMS Web Console
1.8.7.
The Problem
I …
Hudson developers vote for Jenkins. SugarCRM turns cash flow positive. And more.
Follow 451 CAOS Links live @caostheory on Twitter and
Identi.ca, and daily at Paper.li/caostheory
“Tracking the open source news wires, so you don’t have
to.”
# The Hudson developer community voted overwhelmingly to rename the project Jenkins, and will continue without Oracle.
# SugarCRM turned cash flow positive in 2010 as billings increased 52% year on year.
# BonitaSoft announced the release of version 5.4 of Bonita Open Solution.
# WANdisco …
[Read more]I’ve done this in the past, but thought this time I’ve got to take notes. It can be used as a crude check list in the future. Don’t underestimate the power of a practical, down-to-earth check list! Perhaps documents like this should be kept in a wiki page, for easy updating to avoid being stale, a proeblem with blog entries, it seems.
P in LAMP here stands for php, not Python or Perl. L is CentOS (I used CentOS 5.5) or Red Hat Linux. I am not covering moving all databases in a MySQL instance, just a select few or just one.
I’d appreciate your comments or suggestions.
Software install and configuration
MySQL:
MariaDB or Percona.
For Percona server and client tools, it’s best to have direct access to Percona’s repository:
yum install gpg rpm -Uhv …[Read more]
VMware grows 41%. Evidence of Java infringement disputed. And more.
Follow 451 CAOS Links live @caostheory on Twitter and
Identi.ca, and daily at Paper.li/caostheory
“Tracking the open source news wires, so you don’t have
to.”
# VMware announced full year revenue growth of 41% to $2.9bn.
# Alleged evidence of infringing Java code in Android disputed.
# Oracle nominated SouJava, the Brazilian Java User Group, to a seat in the JCP Executive Committee.
# The Document Foundation launched LibreOffice 3.3. …
[Read more]Every so often you need to use a queue to manage operations in an application. Python makes this very simple. Python also, as I’ve written about before, makes threading very easy to work with. So in this quick program I’ll describe via comments, how to make a simple queue where each job is processed by a thread. Integrating this code to read jobs from a mysql database would be trivial as well; simply replace the “jobs = [..." code with a database call to a row select query.
#!/usr/bin/env python ## DATE: 2011-01-20 ## FILE: queue.py ## AUTHOR: Matt Reid ## WEBSITE: http://themattreid.com from Queue import * from threading import Thread, Lock '''this function will process the items in the queue, in serial''' def processor(): if queue.empty() == True: print "the Queue is empty!" sys.exit(1) try: job = queue.get() print "I'm operating on job item: %s"%(job) queue.task_done() except: print …[Read more]