Articles

Software - Sub Categories

Spammers are here

Like clockwork, these pests are able to locate new sites on the web, to infect with their spam postings!

For the past two years, I've not updated these pages much, so had escaped the attention of spammers. But just a month ago, when I got back to updating this site regularly, the spammers have woken up and now I've to keep a closer watch on the new posting activity here.... sigh...

Currently just using the spam module in drupal, which is working fine - though may need to change the configuration so that it marks things as spam as soon as a single URL is found in the post.

Yahoo still no good

I used to use Yahoo a lot, and now go there only for news and email - not for search, and will probably switch over for those old legacy uses as soon as I find something else.

In Firefox, if I go to the Yahoo search page, it would tell me:

Use Yahoo! to search from Firefox

which is something I am never going to do - for a long time now, Yahoo search results have always excluded mention of any aczoom.com link, other than somewhere way below in the search results. Given this, no way am I going to switch my Firefox search box to Yahoo - Google is much better.

This is why I presume there are so many pages on the web related to "SEO" - trying to figure out what search engines do, and how - it is too complex. For example - how come a search engine can list 100s of pages that all link-back or refer to the main page on a topic, but never have that main page show up higher on the search results?

aczoom.com uses Drupal and I suspect this issue is related to that, and URL re-writing is confusing the Yahoo bots. But there are also static pages at this site, and Yahoo does not show them either. And both Google as well as Microsoft MSN search get it right - for all Drupal hosted pages here, as well as the static pages.

So, Yahoo shall remain unused in the Firefox browsers that I use. Hopefully, this should have Yahoo engineers all concerned and rush to fix their search engine :-)!!! Until then, I'll stick with Google Search.

Older blog entry related to same topic: search engine fun

Updating kernel and consequences

On a Fedora FC5 system, it is very easy to update the software using yum update.

This also updates the kernel, which is good, but given the number of "non-standard" items installed on my system (VMWare Server, NVidia Display, PVR-150 TV Tuner/MPEG Encoder), it requires a lot of fixing up after every yum update. [So I have automatic update disabled, do the update only when time permits to do all the fixups.]

After a kernel update:

  • Check to see that the matching kmod-nvidia-* module also made it in, otherwise the display won't work well. In some cases, the kmod-nvidia module site is down, so may have to build module by hand.
  • yum install ivtv ivtv-kmdl-`uname -r`
    to get the driver for the PVR-150 TV-Tuner/MPEG Encoder card.
    This should also install the firmware, if it does not, visit the ivtvdriver pages to do the firmware install manually.
  • If mplayer has problems with audio, check alsa-lib. I have the atrpms site listed for updates, and that is considered risky, packages may not match the other sites. In Sep 2006, started to get this error when using mplayer:
    alsa-lib: pcm_direct.c:1632:(snd_pcm_direct_parse_open_conf) Unknown field ipc_sem
    The fix is to remove alsa-lib:
    yum erase alsa-lib.i386
    (which may uninstall packages like firstboot, and control-center,m which I don't use )
    and then re-install it using this:
    yum --disablerepo=atrpms install alsa-lib
    (and if needed, reinstall firstboot, control-center, etc).
  • Rerun vmware-config.pl

blog vs story in drupal

Why have a blog in Drupal? After all, the story node is generic enough, and for single-user sites, good enough to use story for all postings.

Still, I added the blog module to my site.

The blog is useful for dated articles - some postings only apply for a limited duration, and may not be valid after a few days or months.
Those kind of articles are better posted in a blog.

So, will be using the "story" node - article is probably a better description - for tools, travel tips, recipes, etc - things that may still be valid for months or even an year or more.
Will use the blog to post items that may be relevant only for a short while.

letter-spacing and devanagari

My Drupal theme, based on friendselectric, was messing up all the Devanagari text in headlines, and on the left-sidebar, while the postings themselves worked fine.

Turned out - the css letter-spacing changes mess up all Devanagari fonts.

Best way to handle this would be to use the :lang pseudo-class, and let the English words have modified letter-spacing, but leave Devanagari alone. But this does not yet work on all browsers - works on Mozilla (yea!), not on Microsoft Internet Explorer.

So, the fix for now, is to disable all letter-spacing changes in the theme, deleted all those lines from the friendselectric theme.

Copy video for given duration

Needed a simple script to copy video data for a fixed amount of time.

A shell script is available on ivtv driver page at Example script to schedule recordings, but wanted to do something without sending kill signals, so here's a script using the alarm signal.

Here's a perl script: timed-copy that uses an alarm signal instead of kill.

To use this, save the contents of the timed-copy link as text file, make it executable, and fix the perl path in line 1 if needed, and it is then ready to run.

I use this for capturing PVR-150 MPEG2 encoded video, by running something like this:
  timed-copy -v -m 30 < /dev/video0 > `date +%b%d-%H%M`.mpg
and scheduling this with the at command, for example:
  at -v 1:30AM Sep 14

which will end up creating a file named Sep14-0130.mpg.

Simple! Beats installing large, complex packages to do simple recordings.

Run as timed-copy -h to get help on all arguments, use -v to get verbose messages, and -v -v to get debug messages also.
Version 1.2 added a --clock option to use elapsed wall clock instead of alarm(), if needed.
Version 1.3 fixed the problem with alarm() - Time::HiRes has issues with alarm times, if the conversion to microseconds is greater than 2^32. Fix is to eliminate use of Time::HiRes, since the higher time resolution is not needed for this script, and a resolution in seconds is fine. Script now uses the default alarm() which works fine. So, the --clock option should no longer be needed.

Tested on a Fedora FC5 Linux system.

Network Monitoring - Nagios

Given the need to keep tabs on atleast three web sites, my simple scripts for handling a single site were no longer sufficient, so installed Nagios on my Linux box.

Fedora FC5 was the system, and getting the Nagios bits was pretty easy - use yum to install the following packages:
nagios.i386 2.5-2.fc5
nagios-plugins.i386 1.4.3-18.fc5
nagios-plugins-all.i386 1.4.3-18.fc5

Nagios is a pretty complex package to install, at least based on all the writeups on the web, so I made a short detour to try to install and use Zabbix. That is certainly easier to get up and running, but I am not too comfortable with UI management screens, and got stuck for too long on the configuring part - add to this the incorrect use of MBytes instead of GBytes in the disk space rows, I went back to trying to get Nagios configured.

Nagios is not too bad - in fact, for anyone comfortable with editing text config files, it is downright easy.

Within a few hours, I had all config files set right, and email notifications working.

Mainly followed the documentation that came with Nagios, and on Fedora, using the pre-packaged yum kits, here are the additional things I had to do:

Intrusion source and location mashup

From Kenneth Kline, a script to show intrusion attempts against a site, based on the contents of hosts.deny.

Uses the following:
Deny Hosts
Google Maps
GeoIP

[Sep 2007: links below not accessible for a long time - here's another link to a copy of the archive: hacker2loc.tar.gz ]

[Old links and info: For an example, see security.kennethkline.com/mashup/
Here is a build of hackers2loc script:
hacker2loc.tar.gz. Additionally, to view the source (PHP) on-line: PHP source ]

It requires a little work to install properly. The README provides all the information that is necessary to get the additional pieces and to get it up and running.

The GeoLiteCity.dat file is updated from time to time, it may be useful to setp a cron script, to download it, untar it, then overwrite the existing DAT file to get updates from GeoIP resulting in more accurate plots.

CGI Reporter

Perl script and the shtml file that create a report of blocked and watched hosts taken from the hosts.allow file, created by Steve Hammond.

Here's a screenshot of the reporter utility

Here are the files that can be used to create the report displayed above, bh-reporter.cgi and bh-reporter.shtml, in a ZIP archive.

This is a version that includes the changes listed in the comment I've made some changes below:
bh-reporter2.zip

Previous version:
bh-reporter1.zip

Contributed Utilities

This section contains pointers to tools and utilities developed by others for use with BlockHosts.

For any questions or comments on these utilities, please contact the original author of each of these tools.