Harsh but fair

Open source chicanery and the battle with my inner geek

2014 in review

Posted by raetsel on December 30, 2014

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 20,000 times in 2014. If it were a concert at Sydney Opera House, it would take about 7 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in Uncategorized | Leave a Comment »

2013 in review

Posted by raetsel on January 1, 2014

The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 33,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 12 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in Uncategorized | Leave a Comment »

The Valley of Rivendell

Posted by raetsel on November 23, 2013

The Valley of Rivendell

Posted in Uncategorized | Tagged: | Leave a Comment »

2012 in review

Posted by raetsel on December 31, 2012

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 37,000 views in 2012. If each view were a film, this blog would power 9 Film Festivals

Click here to see the complete report.

Posted in Uncategorized | Leave a Comment »

2010 in review

Posted by raetsel on January 2, 2011

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Fresher than ever.

Crunchy numbers

Featured image

About 3 million people visit the Taj Mahal every year. This blog was viewed about 29,000 times in 2010. If it were the Taj Mahal, it would take about 4 days for that many people to see it.

In 2010, there were 2 new posts, growing the total archive of this blog to 61 posts.

The busiest day of the year was March 9th with 150 views. The most popular post that day was Snmpd filling up /var/log/messages.

Where did they come from?

The top referring sites in 2010 were experts-exchange.com, google.com, ifreestores.com, linuxquestions.org, and forosdelweb.com.

Some visitors came searching, mostly for cisco anyconnect mac, rsync exclude file, snmpd logging, telnet escape, and kde dbus-send save session.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

Snmpd filling up /var/log/messages February 2008
27 comments

2

Mac OS X Snow Leopard & Cisco AnyConnect VPN August 2009
16 comments

3

KDE4 Save Current Session – DBUS to the Rescue April 2008
11 comments

4

Escape from Telnet August 2007
2 comments

5

Using Exclude Files in rsync – watch those spaces! May 2008
3 comments

Posted in Reviews | Leave a Comment »

Embedded codes in the echo command \c etc

Posted by raetsel on July 26, 2010

Following on from a post a long time ago about migrating from HP-UX to RHEL I have found another “gotcha” in relation to the use of the echo command.

In HP-UX you can use terminal codes like \c for continue on same line and \n for new line etc.

In RHEL by default these codes are not interpreted. To get them to be interpreted you need to use “echo -e”

Here is a before and after

echo “Here is\t some\b \n\nembedded code”
Here is\t some\b \n\nembedded code
echo -e “Here is\t some\b \n\nembedded code”
Here is  som
embedded code
If you are only use \c codes you could consider removing them and just using echo -n to suppress the new line but I think echo -e is more flexible

Posted in Technical | Leave a Comment »

Script Naming for run-parts for /etc/cron.daily

Posted by raetsel on January 19, 2010

I recently added in a new script to the directory /etc/cron.daily so it would be run once a day along with the other scripts in there but for some reason it wasn’t being run. After much messing about I discovered it was the because the name of the script had a . in it.

Specifically the script was called get_xferlog.sh as is common with shell scripts. I changed this to be just get_xferlog and that is now working ok.

The files in /etc/cron.daily are executed as part of an entry in /etc/crontab:-

25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts -v /etc/cron.daily )

So it uses the default settings of run-parts to execute all scripts in the directory /etc/cron.daily and the man page for run-parts says.

If neither the –lsbsysinit option nor the –regex option is given then the names must consist entirely of upper and lower case  letters,  digits, underscores, and hyphens.

If you want to check what run parts will do you can use the –test flag which just lists the scripts that will be executed without actually executing them. Thus

run-parts -v –test /etc/cron.daily

This proved very handy in debugging the issue I was having without having to wait a day between tests for the cron job to run.

I should add that the above applies to Ubuntu based servers,  Red Hat servers using run-parts don’t seem to care about a dot in the filename

Posted in Misc, Technical | 7 Comments »

Mac OS X Snow Leopard & Cisco AnyConnect VPN

Posted by raetsel on August 29, 2009

I’ve just upgraded to Mac OS X version 10.6 Snow Leopard. The results are impressive with increases in speed and reduction in memory usage.

However to connect to work I use Cisco AnyConnect VPN and that wouldn’t run, it just instantly quit.

I uninstalled it using the uninstaller in the Application folder and  then connected to our web portal at work via Safari and downloaded the AnyConnect installer. This installed fine and I can now run the local application like I used to.

The version of AnyConnect we run on is 2.3.0185

Posted in Max OS/X, Technical | Tagged: , | 20 Comments »

Some Logic

Posted by raetsel on May 1, 2009

Recently on #logic via twitter Pete Lewis asked:-

a || b -> !(!a || !b)) ? #logic makes my brain hurt

I  did a quick truth table on paper and said yes but turns out I was wrong as I had  looked at the wrong columns. Doh! Here’s the truth table and you can see for yourself

 

A B A || B !A !B (!A || !B) !(!A || !B)
FALSE FALSE FALSE TRUE TRUE TRUE FALSE
FALSE TRUE TRUE TRUE FALSE TRUE FALSE
TRUE FALSE TRUE FALSE TRUE TRUE FALSE
TRUE TRUE TRUE FALSE FALSE FALSE TRUE

The colums A || B and !(!A || !B) are not equivalent.

Posted in Technical | 1 Comment »

Using Exclude Files in rsync – watch those spaces!

Posted by raetsel on May 15, 2008

Summary

When using filter or exclude files ensure each entry has no spaces at the end of it or it will not match correctly e.g.

- Music/
- downloads/

and not

- Music/[space]
- downloads/[space]

Use two -v options on the command line to get output about what was skipped or included and why.

Use the -n option to simulate what rsync will do without actually copying any files.

Detail

I’ve recently started using rsync to copy files to an online backup server (rsync.net – the name is co-incidental).

Initially I started by using exclude options on the command line for the big directories that I didn’t want uploaded, things like my Music files etc. The command line ended up something like:-

rsync -n -v -a -z --exclude=Music/ --exclude=downloads/ --exclude=".*" --exclude=macky/ --exclude=XBMC/ -r /home/simon/ blah@rsync.net:blahblah

I decided it would make more sense to use an exclude file or filter file rather than an ever expanding command line so the I changed the command to be

rsync -v -a -z --filter='merge /home/simon/rsync_exclude' /home/simon/ blah@rsync.net:blahblah

I then created the file /home/simon/rsync_exclude by cutting and pasting from the old command line and editing the file to put one entry per line with the – sign in front to indicate it should not be included:-

- downloads/
- Music/
- macky/
- XBMC/
- ktorrent/
- /.*

However when I ran the rsync command with the filter file it started to copy up all my Music etc. after much fiddling and use of the very helpful -n option to just simulate what happening and -v -v to show what was being selected I discovered the problem.

In spliting the lines in my exclude file I had left a space at the end of each line and rsync was doing a literal match and so looking for something that matched “Music/[space]” and not finding anything.

So make sure any filter or exclude files don’t have any spaces at the end of the line.

The -n option for rsync is very useful it just simulates what rsync would do if you ran it for real. Also if you run rsync with -v -v ( yes two -v options ) you get detailed output about what is skipped etc.

rsync -n -v -v blah blah
building file list ...
[sender] hiding directory .Skype because of pattern /.*
[sender] hiding directory .kchmviewer because of pattern /.*
[sender] hiding directory .gnupg because of pattern /.*
[sender] hiding file .gtk-bookmarks because of pattern /.*
[sender] hiding file .profile because of pattern /.*
[sender] hiding file .dmrc because of pattern /.*
.......

Posted in Uncategorized | 6 Comments »

 
Follow

Get every new post delivered to your Inbox.