Pages: 1 ... 4 5 6 ...7 ... 9 ...11 ...12 13 14 ... 18


  01:09:01 pm, by   , 22 words  
Categories: C++

Piet - beautiful and interesting graphical language

I came across this very interesting project:

Makes for some interesting debuggin I bet :)

  01:05:49 pm, by   , 121 words  
Categories: Gentoo Linux

gentoo grub update

Sometimes Gentoo could do better in helping out with simple upgrades:

After upgrading to a new grub (linux hard drive bootloader) I saw this message:

* Messages for package sys-boot/grub-0.97-r5:

* *** IMPORTANT NOTE: you must run grub and install
* the new version's stage1 to your MBR. Until you do,
* stage1 and stage2 will still be the old version, but
* later stages will be the new version, which could
* cause problems such as an unbootable system.

I found this explanation:

to do this:

# grub-install hd0

I wish there was some way to get an Gentoo package upgrade automatically have a forum entry - with a helpful hint or two by the maintainer even better.

  12:25:10 pm, by   , 175 words  
Categories: Gentoo Linux

gentoo dnsmasq issues

I keep getting these errors in my dnsmasq.log file:

Jun 22 21:34:48 fire dnsmasq[28990]: DHCPACK(eth1) 192.168.333.100 00:13:8f:c7:b7:31 gamer5
Jun 22 21:34:48 fire dnsmasq[28990]: not giving name gamer1 to the DHCP lease of 192.168.333.126 because the name exists in /etc/hosts with address 192.168.333.67
Jun 22 21:34:48 fire dnsmasq[28990]: not giving name gamer2 to the DHCP lease of 192.168.333.43 because the name exists in /etc/hosts with address 192.168.333.94

Very annoying, because it means that the IPs I've assigned to these machines aren't making it somehow.

After researching it looks like I may have put too much info into the /etc/dnsmasq.conf file:


I will remove the host name from this and see if that fixes it.

Update - this works great - guess too much info can be an issue.

Solution looks likes this:



Also: to delete the current dnsmasq DHCP leases:

# /etc/init.d/dnsmasq stop
# nano /var/lib/misc/dnsmasq.leases - remove offending entries
# /etc/init.d/dnsmasq start

  11:57:23 am, by   , 61 words  
Categories: Gentoo Linux

monitoring gentoo server hard drive status

Following most of this how-to:

I've set it up to email the various Gmail account for my servers. So now hopefully I'll get some advance warning if a hard drive is thinking about failing (which thankfully hasn't happened yet, thanks mostly to a once-every-two-years-or-so hard drive upgrade for these machines).


  11:06:08 pm, by   , 668 words  
Categories: Gentoo Linux

automated MySQL table check

after having some MySQL issues, I found an excellent script here:

I've set this to go off once a day to let me know about possible MySQL issues:

# This is a small bash script that checks all mysql databases for errors
# and mails a log file to a specified email address. All variables are
# hardcoded for ease of use with cron. Any databases you wish not to check
# should be added to the DBEXCLUDE list, with a space in between each name.
# Note that DBEXCLUDE will only work with GNU sed, as BSD regular expressions
# on Darwin seem to have some trouble with word boundary anchors.
# original version by, UVic Fine Arts 2004
# modified by eyechart AT and Mickael Sundberg at and Jake Carr jake-+AT+-websitesource-+DOT+-com
# (see Change Log for details)
# Some of this code was inspired from
# Change Log
# VER 1.3 - (2006-12-02)
# Added --host=$DBHOST in mysql commands, so it's useful for non-localhost situations
# Jake Carr
# VER 1.2 - (2006-10-29)
# Added "\`" arround the tables in $DBTABLES, otherwise it'll create
# errors if tablenames containt characters like -.
# Modified by Mickael Sundberg
# VER 1.1 - (2005-02-22)
# Named script
# Added PATH variable to make this script more CRON friendly
# Removed the $DBTABLES loop and replaced it with single command
# that executes the CHECK TABLE command on all tables in a given DB
# Changed code to only check MyISAM and InnoDB tables
# Cleaned up output to make the email prettier
# Modified script to skip databases that have no tables
# Modified by eyechart
# VER 1 - (2004-09-24)
# Initial release by

# system variables (change these according to your system)
TYPE1= # extra params to CHECK_TABLE e.g. FAST
CORRUPT=no # start by assuming no corruption
DBNAMES="all" # or a list delimited by space
DBEXCLUDE="" # or a list delimited by space

# I/O redirection...
touch $LOGFILE
exec 6[gt][amp]1
exec [gt] $LOGFILE # stdout redirected to $LOGFILE

echo -n "AutoMySQLCheck: "
echo "---------------------------------------------------------"; echo; echo

# Get our list of databases to check...
# NOTE: the DBEXCLUDE feature seemed to only work with Linux regex, GNU sed
if test $DBNAMES = "all" ; then
DBNAMES="`mysql --host=$DBHOST --user=$USER --password=$PASSWORD --batch -N -e "show databases"`"
for i in $DBEXCLUDE
DBNAMES=`echo $DBNAMES | sed "s/\b$i\b//g"`

# Run through each database and execute our CHECK TABLE command for all tables
# in a single pass - eyechart
for i in $DBNAMES
# echo the database we are working on
echo "Database being checked:"
echo -n "SHOW DATABASES LIKE '$i'" | mysql -t --host=$DBHOST -u$USER -p$PASSWORD $i; echo

# Check all tables in one pass, instead of a loop
# Use GAWK to put in comma separators, use SED to remove trailing comma
# Modified to only check MyISAM or InnoDB tables - eyechart
DBTABLES="`mysql --host=$DBHOST --user=$USER --password=$PASSWORD $i --batch -N -e "show table status;" | gawk 'BEGIN {ORS=", " } $2 == "MyISAM" || $2 == "InnoDB"{print "\`" $1 "\`"}' | sed 's/, $//'`"

# Output in table form using -t option
if [ ! "$DBTABLES" ]
echo "NOTE: There are no tables to check in the $i database - skipping..."; echo; echo
echo "CHECK TABLE $DBTABLES $TYPE1 $TYPE2" | mysql --host=$DBHOST -t -u$USER -p$PASSWORD $i; echo; echo

exec 1[gt][amp]6 6[gt][amp]- # Restore stdout and close file descriptor #6

# test our logfile for corruption in the database...
for i in `cat $LOGFILE`
if test $i = "warning" ; then
elif test $i = "error" ; then

# Send off our results...
if test $CORRUPT = "yes" ; then
cat $LOGFILE | mail -s "MySQL CHECK Log [ERROR FOUND] for $DBHOST-`date`" $MAILTO
cat $LOGFILE | mail -s "MySQL CHECK Log [PASSED OK] for $DBHOST-`date`" $MAILTO

1 ... 4 5 6 ...7 ... 9 ...11 ...12 13 14 ... 18

July 2024
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
 << <   > >> Blogs

This blog contains all the posts from the other blogs areas.


  XML Feeds

blog software