Showing entries 21 to 30 of 47
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: unix (reset)
zfs Snapshot Commands Example


As i have already discussed in my previous post zfs filesystem and MySQL about zfs overview and two most important command zpool and zfs. I am going to continue with usage of zfs snapshots. It includes create a pool, Create file system, Taking a snapshot, Renaming Snapshots, Listing all snapshots, restoring from snapshot and Moving the snapshot to other location.
snapshot is a read-only copy of a file system or volume. Snapshots can be created almost instantly, and initially consume no additional disk space within the pool. However, as data within the active dataset changes, the snapshot consumes disk space by continuing to reference the old data and …

[Read more]
GET SIZE OF DIRECTORY (EXCLUDE SUBDIRECTORY) IN UNIX

We all know du command to get the size of a directory. But the problem is when you use "du <directory name>" it will give you the list of all subdirectory including the directory you want with size.

Bt what if i only want the size of directory which i have passed as an argument and not all the subdirectory?

In that senario we can use:

du -sh <directory name>                              

Example 1:

du -h /home/mysql/admin/                             
   1K   …

[Read more]
451 CAOS Links 2011.04.12

Groklaw declares victory. Cloudera updates Hadoop distro. 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.”

# Groklaw claimed victory, will stop publishing new articles on May 16.

# Cloudera released version 3 of its Hadoop distribution.

# VoltDB released version 1.3 of its open source distributed in-memory database.

# Black Duck grew sales by 51% in Q1.

# eXo and Convertigo …

[Read more]
Python for Automation: using pdsh for a menu-driven command execution environment

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]
Not excited about paying for MySQL monitoring for your enterprise?

I think most people will agree that one of the biggest advantages of MySQL Community Server is that it’s free. Being free doesn’t get you a multi-million user community though; MySQL offers a great array of transactional engines, advanced high-availability features, robust I/O performance, and it powers many of the top-500 internet sites. When it […]

dbbenchmark.com – MySQL benchmarking now supports multiple threads!

We had a very successful weekend of Planet.mysql users submitting their database statistics so I’ve pushed some code into a new release today so that everyone can benefit from some new features. The biggest change is to the threading logic. Previously the benchmarking script was serializing MySQL operations and only making use of a secondary thread (not the invoking thread) to query the database. Now you have the option of running with “–threads=x” to make use of your multi-core server. A good example of this improvement was on my Macbook Pro; before the threading change it was inserting ~700/sec, after the code change I tried –threads=4 and saw an improvement to ~900/sec. Rather significant.

Download the new script now and see how your server compares to the ones in the …

[Read more]
How to get colored output from ‘ls’ on Solaris10

For all of those linux users out there that have moved over to, or tried out, Solaris10 or OpenSolaris because they heard the tales of how MySQL is faster on Solaris… or perhaps you wanted to learn how to use Sol10 for the great features of Zones or the ZFS filesystem? Regardless of why you’re on it you are probably wondering why Linux has colored output of filenames and directories but Solaris does not. The question of ‘why?’ isn’t important, but how to enable colors is. It’s very simple, and here’s how I fixed it. This is a result of digging through multiple semi-related links on Google.

  1. Download all packages from SunFreeware.com
    • dependency: libintl-3.4.0-sol10-x86-local
    • dependency: libiconv-1.13.1-sol10-x86-local
    • dependency: gmp-4.2.1-sol10-x86-local
    • dependency: gcc-3.4.6-sol10-x86-local or libgcc-3.4.6-sol10-x86-local depending on your …
[Read more]
Reviewed: Python Testing by Daniel Arbuckle

I’ve recently had the pleasure of reading “Python Testing: An easy and convenient approach to testing your python projects” from Packt Publishing. It’s been a quick read but a solid set of instructions on the different methods for the subject.

The book starts out very quickly with details about the various methods that are available, the means of automation for testing, and of course the environment you’d want to be in for working on the subjects that the book covers. It then, in the second chapter, moves into the guts of testing by describing the basics of doctest via syntax and some simple examples, and then moves on to a real world example via the AVL tree. It’s all very basic testing until chapter three where the author gets into unit testing, …

[Read more]
Kontrollkit – new backup script is partition space aware

I’ve been wanting to write a backup script for a while now that does the following: reads the partition information for the directory that you are backing up into and computes the used/available/percentage-available space. Then it reads the total data size from the MySQL tables and ensures that you have enough space on disk (for [...]

Kontrollcomm – remote database and system command execution webapp

I’m pleased to announce the first release of Kontrollcomm – “The Server Command Automation Interface” is a web-based application that automates remote command execution on linux and unix based servers. There are three main areas of the application: Hosts, Templates, and Commands. The use is very simple: all of your hosts are setup in the [...]

Showing entries 21 to 30 of 47
« 10 Newer Entries | 10 Older Entries »