Is Hardware Outpacing Software Or Is It The Other Way Around?

Here’s an interesting experiment.

After hearing two strong players argue that the only real progress in chess engines in the last ten years was due to faster computers a special match was played to challenge this idea. Komodo 8 ran on a smartphone while a top engine of 2006 used a modern i7 computer that runs 50 times faster. This is the difference between Usain Bolt and the Concorde. Guess what happened?

 

 

Posted in Applications | Leave a comment



Fido 1.1.3

Your JoeDog had a requirements change. “Stupid requirements!” He had to ensure each file in a directory and all its sub-directories was less than eight days old. Unfortunately, Your Fido didn’t traverse directory trees. He stood watch only at the top of the tree.

That’s the problem with dogs: they have a mind of their own.

Without much effort, fido learned a new trick. It now recursively searches a directory for files. To leverage this feature, you’ll have to give it a command. “Recurse, boy, recurse!”

/export {
 rules = exceeds 7 days
 exclude = ^\.|CVS|Makefile
 action = /usr/local/bin/sendtrap.sh
 recurse = true
}

recurse takes one of two values, true or false. True means search the tree and false means remain at the top level. If you don’t set a recurse directive, then fido will treat it as false, i.e., it will remain in the top directory.

[Trending: Fido-1.1.3]

 

Posted in Applications, Fido, Release | Tagged | Leave a comment



Different Tasks

tasks Vis xkcd

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Posted in Uncategorized | Leave a comment



Hope And Change: Nerdblog Edition

Your JoeDog read that women marry a man hoping he’ll change. Men, on the other hand, hope she’ll remain the same. He’s also noticed that most of the denizens on this nerdblog are men. They don’t like change! Well change is coming.

No, we’re not taking art classes with young guys named Pierre.

Your JoeDog is ditching cvs for git. This is a good thing. He’s using github.com which means the repository will be available to you.

Unfortunately, the history is not. Your JoeDog tried and tried to port the history to git. He used all the tools, followed all the instructions and posted all the errors into the Google machine. Apparently his cvs repository is — how does he say this? — fscked up. It doesn’t seem fscked up but the Internets have spoken.

The commit history is important. A few years ago Your JoeDog was contacted by a heroic Patent Fighter. Some douche wanted to patent a rudimentary coding technique and Our Patent Fighter was searching for original art, stuff that was published before Patent Douche came up with his “orginal idea.” I believe that idea was, “I can’t believe nobody’s thought to patent this yet!”

Well sir, Your JoeDog was able to provide detailed publishing dates which were used as original art. Patent Douche was defeated and it was happy nice time for everyone but Patent Douche.

The point is, kids, don’t smoke cigarettes. Also, we’re moving the source to github.com

UPDATE: Siege was added to github.com; same deal, no history. You can check it out of version control with the following command:

git clone https://github.com/JoeDog/siege.git

 

[Trending: JoeDog’s source repository]

 

Posted in Uncategorized | Leave a comment



Link Spammers Are A Bag Of Dicks

This big, cruel world is filled with all sorts of social rifts. Some of you are liberal while others are conservative. Some believe in God while others like to sleep in on Sunday. We’re deeply divided but there’s one thing we can all agree on: link spammers are a bag of dicks!

Your JoeDog is up to his armpits in spam. And if you’re a link spammer spamming this post, go /sbin/fsck yourself.

Google created these monsters. It awards points to sites with incoming links. But here’s the thing: it can’t be just any link. Back in the day, link-weenies created link farms to bump their SEO. A few years ago, the search engine giant started penalizing those type of links. As a result, link spammers now work overtime to add links to your website.

So they’re shitheads. But here’s the thing about these shitheads: they’re nicer than the average Internet. Gawker once chronicled a nasty flame war on a comment thread about a cake recipe. People are nasty but link spammers are nice.

They post compliments! Seriously, they have nothing but nice things to say about you or your site. They appeal to your ego with the hope that your vanity preserves their links.

Frankly, this makes them easier to root out of the comment queue. When I see, “Best site on the ….” kerplunk! I don’t need another word to know that’s spam. But if a comment begins, “Hey, asshole …” well, I need to keep reading because it’s probably legitimate commentary.

To combat this scourge, Your JoeDog uses Akismet. As a C-List nerdblogger, he can’t afford to give them much money but he can give them a linky! Oh! That’s two linkies. Wait, what? You’d rather have money. I give you guys $12.00 a year how much more do you want??!!

Akismet works pretty darn well. For each spammer who manages to find his way onto the comment queue, Akismet deletes hundreds of others ones. The company claims it’s saved Your JoeDog 52 days in comment management since he started using their service. That sounds about right.

Your JoeDog highly recommends Akismet and if your site actually makes money he encourages you to slip them a little more than $12.00 a year.

Posted in Community | Leave a comment



How To Eliminate Unused Variable Warnings In GCC

Your JoeDog uses gcc v4.8.2 on his snazzy System 76 laptop. By default, that version uses this flag: -Wunused-but-set-variable If you’d like to see a lot of compiler warnings, then I suggest you use it, too.

Inside fido’s src directory you can find GNUs regex. The file names were changed to ereg.c, ereg.h and  ereg2.h to avoid potential naming collisions. Well, sir, that .c file cries like a whiney two-year-old when it’s compiled with -Wunused-but-set-variable. Here’s what you’ll see in the console:

gcc -DHAVE_CONFIG_H -I. -I. -I../include -W -Wall -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -g -O2 -c ereg.c
In file included from ereg.c:640:0:
ereg.c: In function ‘byte_re_match_2_internal’:
ereg.c:7145:27: warning: variable ‘sdummy’ set but not used [-Wunused-but-set-variable]
const CHAR_T *sdummy = NULL;
^
ereg.c:7144:22: warning: variable ‘pdummy’ set but not used [-Wunused-but-set-variable]
UCHAR_T *pdummy = NULL;

Let’s see the offending code, shall we?

UCHAR_T *pdummy = NULL;
const CHAR_T *sdummy = NULL;

POP_FAILURE_POINT (sdummy, pdummy, dummy_low_reg, dummy_high_reg, 
                   reg_dummy, reg_dummy, reg_info_dummy);

I don’t know about you, but Your JoeDog thinks those variables are pretty much used. POP_FAILURE_POINT is a macro but that shouldn’t matter. Since he doesn’t maintain this code, Your Nerdblogger decided to put a bandaid on the wound rather than stop its bleeding.

The Internets are loaded with bandaids! Here’s one from a discussion on this exact topic:

#define UNUSED(expr) do { (void)(expr); } while (0)

To silence that warning, pass the offending variables to the macro and “Presto!” no more bitching….

UNUSED(sdummy);
UNUSED(pdummy)
Posted in C, Programming | Leave a comment



All Aboard….

Your JoeDog is coding on the train right now. What’s he coding? He’s adding recursive directory searches to fido.

 

 

Posted in Uncategorized | Leave a comment



How To Prevent root’s mailbox From Filling With Cron Messages?

So one of your file systems is full and you traced it to a curious phenomena: root’s mailbox is loaded with messages. And you think to yourself, “Who the hell is sending mail to root?” Chances are, it’s you!

This recently happened to a friend who’s new to Linux. Root’s mailbox was full of messages that looked like this:

/bin/sh: ntpdate: not found

It turns out he had a cron job that ran ntpdate to sync his system time with a server at the National Institute of Standards. (Here’s a complete list of NIST time servers.)

The program ‘ntpdate’ was located in /usr/bin which was not in root’s PATH. So here is lesson number one: Always use the full path to a program in cron. In this case, he should have used /usr/bin/ntpdate.

Now about those mail messages. When a cron job fails, it captures the program’s output and mails it to the cron owner. If you set /bin/ls to run every five minutes in cron, you’re going to get a directory listing in your mailbox every five minutes. You can silence cron and stop mail messages by redirecting output to /dev/null. The ‘>’ character means ‘redirect’ Here’s the syntax: /bin/ls > /dev/null

Yet that wouldn’t have helped Your JoeDog’s friend. In his case, the offending message was an error message. Error messages are written to a different file descriptor.

The Linux/UNIX shell has three file descriptors: stdin, stdout and stderr. ‘/bin/sh: ntpdate: not found’ was written to stderr. In the shell, 1 represents stdout and 2 represents stderr. To capture both we need another character. ‘&’ means file descriptor. So 2>&1 means redirect stderr (2) to whatever stdout (1) points to. Here’s the syntax he should have used:

0 */6 * * * /usr/bin/ntpdate nist1-pa.ustiming.org > /dev/null 2>&1

Now Your JoeDog has been in this game for quite a while. In the day, to really silence the crontab we’d write the redirect like this:

0 */6 * * * /usr/bin/ntpdate nist1-pa.ustiming.org 1 >/dev/null 2>&1

That’s basically the same as the first one but it seemed to work around oddities and keep our mailboxes clean. The crontab man page still contains that syntax. Your JoeDog will continue to use that superfluous first 1 but your mileage may vary.

Posted in Environment, System | Leave a comment



When Customers Don’t Want Their App Purchases Tracked

  1. “I beg of you” please delete my name from the app purchase list.
  2. Wifi Wars or how to express your views with SSIDs
  3. Is your wifi SSID a security risk?
  4. Apple keeps Steve Jobs’ empty office untouched
  5. And now we wait: Net Neutrality Considered
  6. Before computers, people programmed looms

 

 

Posted in Uncategorized | Leave a comment



Linux Bare Metal Recovery With Rear

Your JoeDog loves rear! And who doesn’t, amirite?

Except it’s not that rear. It’s an acronym for Relax and Recover, a Linux bare metal recovery tool.

Your JoeDog has been using Mondo for cloning systems. It’s good software that served him well despite difficulties moving from one hardware set to another. If Your JoeDog archived sd disks and recovered to cciss, then he was knee deep in i-want-my-lvm hell.

Rear makes those type of migrations much easier. If you archive a server using one type of disk driver and recover it to one that requires another, rear reworks the disk layout for you. It’s also configured to ignore external disks. If you archive a server connected to a SAN, rear simply ignores those multipath devices.

Like Mondo, you can archive and recover from an NFS server. Here’s a suggested configuration for NFS archiving. Place these directives inside /etc/rear/local.conf

OUTPUT=ISO
BACKUP=NETFS
NETFS_URL=nfs://10.37.72.44/export
NETFS_OPTIONS=rw,nolock,noatime
OUTPUT_URL=file:///export

To archive the system, run ‘rear -v mkbackup’

This configuration creates an ISO image called ‘rear-hostname.iso’ inside 10.37.72.44/export/hostname. To recover the server, burn that ISO onto a CD and boot the system with it. Select the Recover option then run ‘rear recover’ at the command prompt.

“It’s that simple,” Your JoeDog said with the zeal of a recent convert. He’ll be back to bitch about rear in a couple weeks but for now it’s nothing but love….

Posted in Applications, Rear | Leave a comment



Recent Comments

  • Tim: For those who enjoy playing at home and are extra OCD … they’ll spot something wrong with this....
  • roshni: Hi jeff, I need your help regarding running urls in a file containing post directives. Could you please send...
  • Alle: In seige, what does the pink result mean?
  • Windows User: Nice collection of Perl modules. Thanks for sharing.
  • Jeff Fulmer: No idea. What do you see in the webserver’s logs?