I’ve configured awstats to provide statistics on visitors of the websites on the server. I’ve also configured xymon to notify me when the website is not accessible. xymon uses a bot to check every 5 minutes to make sure the site is still up. As you can imagine, this generates a lot of hits, that aren’t really people.

So, since I don’t want to disable monitoring, I thought I should at least configure my stats so that they reflect people, and this bot.

awstats has an excellent robot detecting feature, but they do not yet detect xymon. So, in order to make the change, you need to dive into the robots.pm file, normally saved in /usr/local/awstats/wwwroot/cgi-bin/lib/

You will need to make two changes for it to detect this new robot (it tells you this at the top of the file). So, at the end of the @RobotsSearchIDOrder_list1 = ( array, I added:

  • ‘Hobbit[_+ ]bbtest-net/4.2.3′

And then at the top of Other robots reported by users in %RobotsHashIDLib = (, I added:

  • ‘Hobbit[_+ ]bbtest-net/4.2.3′,’xymon’,

Once I deleted the files in /var/lib/awstats/ and reprocessed my logs, the statistics better reflected my visitors. Beware that if you delete files from /var/lib/awstats/ and don’t have the original log files around, you will lose the history for that period of time. Also, this change should be reflected on all sites that you have running on this server and using awstats.

My webserver only had logs for August, so I only deleted the file for August, and left the file for July with the missed detections since I cannot rebuild it. I’ve since changed the configuration of the log rotater.

Later I’ll be posting a more in depth tutorial on installing awstats, and also on modifying the robots.pm file, since I couldn’t find much about it online.

UPDATE: As promised, here is a more detailed how-to on updating the robots file: http://wiki.cornempire.net/doku.php?id=awstats:awstatsrobots

 

I just noticed this today. I monitor a number of sites and servers using the great Xymon system monitoring tool (Linky). It is based on early Big Brother code. Anyway, today I noticed that the graphs were all blue. Something like this:

Bad Xymon Graph

Bad Xymon Graph

I’m using Xymon 4.2.3 on the servers, and both servers show the graph like this using Firefox 3.5 on Linux. Google Chrome development version, SeaMonkey 1.1.5, Epiphany and Galeon all display the graph correctly.

I have no solution, but I thought I’d post my experience.

 

I recently updated my server and I store a good number of passwords in my pwman database. It is a great little command line program for storing passwords in a secure manner. I do this so that I can log into my machine from anywhere in the world to retrieve passwords if needed, and I’m not tied to a thumb drive that I could lose/break, or a computer that may not have the necessary OS/ports for me to use.

If you need to migrate your database, you can follow these steps:

  1. Grab a copy of your old database. It is usually called pwman.db and is stored in your /home/yourname/.pwman/ If you can’t find it, there is a config file in this directory that will tell you where it is.
  2. Install pwman3 on your new server. (command for Debian based Linux OSes)
    apt-get install pwman3
  3. Run pwman3 and configure the same master password as your old database. (Not sure if this is required, but I thought it was a good idea)
  4. Make a copy of your database, and then put your old one in your new /home/yourname/.pwman/ folder.

The next time you run pwman3, you will have all your old passwords!

 

In my last few attempts at configuring my mythtv installation (my most recent being today when I replaced the hard drive), I’ve gotten this error when I log into my box through SSH:

MythTV status for localhost
===========================
Status...........: Wed Feb 18 2009, 8:30 PM
Total Disk Space.: Total space is 548,770 MB, with 158,049 MB used (28.8%)
Next Recording In: 2 Hours, 59 Minutes
 
Encoders:
mythbox (1) - Idle
 
Scheduled Recordings:
2009-02-18 23:30:00 - CSI: NY (WBZ)
2009-02-19 00:30:00 - Stargate SG-1 (Space: The Imagination Station)
2009-02-19 10:30:00 - Stargate SG-1 (Space: The Imagination Station)
2009-02-19 12:30:00 - First Wave (Space: The Imagination Station)
2009-02-19 19:30:00 - Coronation Street (CBNT CBC St. John's)
2009-02-19 22:30:00 - CSI: Crime Scene Investigation (WBZ)
 
Schedule Conflicts:
Unable to access MythTV Perl API. Try with --verbose to find out why.

I get most of the status for the server, but I don’t get the read outs of the conflicts because of the error.

What happens (as far as I understand it) is that when the cronjob generates the motd, it runs as root, and root does not have a link to the mythtv config, so it can’t get the data from the database.  So, to get around this, we need to create a link in /root/.mythtv/ to the config.xml file for the server.  For me, this runs from my home directory /home/thomas/.mythtv/config.xml so:

sudo ln -s /home/thomas/.mythtv/config.xml /root/config.xml

Once you make this change, the next time the cronjob runs it should populate the motd correctly.

Notes: I’m running this server on Ubuntu 8.04.02 64-bit.

You can find more information on this issue here.

 

I’ve recently come across a game that I’m becoming quite a fan of.  CS2D is an overhead shooter that is modeled after the popular Counter Strike mod of Half Life.  Back in the day, I used to play the 3D mod of Half Life, but I have not played it recently.

I’m a big fan of this game because of its simple and fun game play.  If you have some non-hardcore gamers, they will probably get a kick out of the quick and addictive gameplay. It is also seamlessly cross platform with all of my Windows and Mac friends playing along too.  And it also has a simple to use map editor that allows the creative juices to flow.  This will be a brief tutorial on how to use triggers to create doors that open, and breakable glass.

Using the in game editor to make a map is a piece of cake.  Some of the more advanced stuff can be a bit tricky though.  I’m working on a map where the Counter Terriorists must escort a VIP from a brick residence to a boat anchored just off shore.  However, a group of Terrorists have found the location first, and are able to begin some fortifications of the ship with the goal of preventing the VIPs escape.  I wanted to make the building a little more realistic by adding a window, and a door or two.

  1. Create the map
  2. Place your floor terrain where you want the door to be
  3. Go to the Entity menu, (the bulb with the points coming out of it) and select ‘Func_DynWall’
  4. Place it, and edit the entry by right clicking or double clicking.
  5. Change the Tile/Frame # to the number of the tile that you want to appear when the door is closed.
  6. Give the DynWall a unique name
  7. Elsewhere on your map, you want to create the button to open the door. From the entity menu, place a ‘Trigger_Use’ entity and edit it.
  8. Select the button type, and where you want it to appear, and who should be allowed to use it.
  9. Then, for the Trigger box, type in the name of your door (if you have multiple doors opened by a single trigger, separate them with commas)

Once you test this map out, you should now have open-able and close-able doors.

To create breakable glass, do the following:

  1. Place some terrain that looks like a window
  2. Add an entity that is ‘Env_Breakable’
  3. Edit this entity, and give the wall/glass some health, and determine which material you want to make it of.

You can test the map, and you should now be able to break the glass and walk through it once it is broken.

I may post some other map tricks in the future.

NOTE: Bots don’t handle glass/doors well.  If the is no clear path between their start and their objective, they will not realize that doors/glass is a viable alternative and will NOT actually move.  Keep this in mind if designing offline maps.

Attachment: Bridge Test map for Fiid who commented below.

 

ASCII Sector is a space trading game written completely using ASCII graphics. It is available from www.asciisector.net. There are Windows and Linux versions. This is a post I made on the forum over there explaining how I got this to run in a 64bit environment.

Hello All, I thought I would tell you a story of how I got this running on my 64bit Ubuntu (since I didn’t at a glance see anything tho help me out with this).

First, I’m running a 64bit install of Mythbuntu that I converted to a regular Ubuntu desktop a few months after the install.

I downloaded and installed ASCII Sector as described in the instructions. When I ran the file, I would get the error:
bash: ./asciisec: No such file or directory

Of course, this made no sense since I was at the location of the file. I made sure I had libsdl and libsdl mixer installed, but that didn’t help. So I went browsing around, and found a post that said that this error was common when running 32bit apps on a 64bit install, and than installing the 32bit libraries would help. So I ran this command:
sudo apt-get install ia32-libs

This installed the libraries for me, and when I ran it, I no longer got that error (Yah!) I got this one instead (boo):
./asciisec: error while loading shared libraries: libsmpeg-0.4.so.0: cannot open shared object file: No such file or directory

So, I used Synaptic to ensure that I had libsmpeg installed and I did. So, I did an strace on the process to see where it was looking for the file. Then I ran the find command to see where it was:
sudo find / -name "libsmpeg*"
And it wasn’t looking where it was located. So I tried to create a symlink to a path it was looking in, but that didn’t work either. I got this error:
./asciisec: error while loading shared libraries: libsmpeg-0.4.so.0: wrong ELF class: ELFCLASS64

So I was back to the drawing board.

I did more searching, and came across a ubuntu 64bit gaming post referring to the getlibs application that installs 32bit compatible libs on 64 bit system. Here is that post: http://ubuntuforums.org/showthread.php?t=662770&page=6 I downloaded getlibs from here: http://ubuntuforums.org/showthread.php?t=474790 installed it, and then ran this command:
getlibs -l libsmpeg-0.4.so.0
The program works similar to apt-get and downloaded the library and installed it. Then I ran asciisec and I was in the game. (real Yah!) I didn’t actually get to play it yet, but I imagine it will work fine now that it is all loaded up.

I’ve played a little bit, and it is a pretty fun game. I hope to make some quests for it in the future.

© 2011 CornEmpire Software Suffusion theme by Sayontan Sinha