Wildcard Munin-plugin for process monitoring?

First of all; If you’re not familiar with Munin, and need to do monitoring (especially of hosts running Linux or any type of Unix), I recommend you check it out.

So, I’ve been pondering if there’s any plugins for Munin which monitors information of named processes. It seems that the only ones I could find, monitored the process count – which is fair enough, but we can do so much more, such as counting threads, memory usage, CPU usage, context switches, to name some things. If we have a server running five different services, and notice that it runs out of memory, you can easier figure out which service is the one leaking if you have historical graphs available, for instance.

You can achieve this by parsing the /proc-filesystem. A simple “grep processname /proc/*/stat” should give you a bunch of values which you can parse and use. Nice documentation of what the different values means are in the proc(5) man-file. And this is what I do.

You can get the plugin from muninexchange, or from my munin-plugins repository on github. Please note that the plugin hasn’t been thoroughly tested in a production environment, but I’m quite happy with what I can get so far :)

Posted in Munin | Tagged , | 3 Comments

PixelArt, take #1

So, I attempted something new. PixelArt. So I followed a tutorial, and created my first PixelArt. The image you see below is supposed to be a classic Norwegian phone booth “RIKS“.

… so, what am I to draw next?

Posted in Graphics | Tagged | Leave a comment

Accessing printers shared from CUPS on a Mac

Like many of you, we have a printer at home. We also have more than one computer. So, a natural thing would be to share the printer from one computer, or a server, so that the other computers in the network can use it to print. Well, this isn’t exactly rocket science – and I’m not gonna post a guide on how to do this step by step.

I hooked up the printer to my Ubuntu 10.04 workstation – where it was autodetected and everything worked nice out of the box. I chose to share the printer with my network. Then I headed to a Macbook Pro, and wanted to print something with it. Mac OS X runs CUPS, so accessing the printers shared from my workstation shouldn’t be a problem at all. I attempted browsing the network for printers, not finding anything. I checked the cups configuration, and it were configured to show shared printers. I asked the Internet for help – and after a while of googling I found out that running:

# cupsctl BrowseProtocols=cups

… pretty much fixes it. The printer suddenly shows up when you attempt to add printers, and everything works like it should. I have no idea why Mac OS X isn’t configured with browsing CUPS printers over the network as a default, since it’s already running CUPS, and Apple purchased CUPS back in 2007. One would assume that supporting its protocols was a part of their strategy.

Dear lazyweb; Can anyone help me understand what gives?

Posted in Mac OS X | Tagged , , | Leave a comment

An unproductive week.

Yep.

When it comes to Awesome Tower Defense, I’ve fixed three things; It’s now possible to upgrade towers. You can also pick towers with keyboard hotkeys. I also did some cleanup to get rid of the compiler warnings there was.

I wish I had made something more out of last week, but on the other hand – I spent more time doing recreational activities :)

Posted in Uninformal | Tagged | Leave a comment

What happened with Awesome Tower Defense since last time?

Not really an eventful week – most of the progress were made early in the week. No package this time, but I hope I’ll get around and create one next week!

Features:

  • Got a .spec-file from Ingvar for rpm-building! Thanks Ingvar!
  • It is now possible to lose the game.
  • One can now change the speed of the game (up and down arrow keys)
  • We use locale strings from the level files, if available.
  • Made the default (original.lvl) more amusing.
  • Waves can open with a message fetched from the level-files.

Bugfixes:

  • Levels placed in ~/.awesometd/levels are now also scanned for.
  • Improving the visibility of text.
  • Text is less now intrusive.

Cleanup:

  • Removed GLU as a dependency.

Please send me any issues or suggestions you might have on the projects issue tracker on github ! :)

Posted in Uncategorized | Tagged | Leave a comment

Awesome Tower Defense progress this week

If you don’t care what I did, and just want the latest:

  • Awesome Tower Defense WIN32 (2010-04-04) – i386
  • Awesome Tower Defense Ubuntu Karmic Deb (2010-04-04) – i386amd64
  • Awesome Tower Defense Ubuntu Lucid Deb (2010-04-04) – i386amd64
  • Awesome Tower Defense Source tarball (2010-04-04) – Source


Features:

  • Projectiles can now be poisenous.
  • You can now install the application and datafiles with the supplied scripts. (Good old ./configure && make && sudo make install)
  • We now supply .deb-packages! They’re available in the PPA for Ubuntu Karmic and Ubuntu Lucid.

Bugfixes:

  • Proper rendering of enemy health bars.
  • Projectiles don’t hit more enemies than they’re supposed to.
  • Enemy speeds above 100 are now working properly.

Cleanup:

  • Improved readability of the tower choice-algorithm functions.
  • Removed unused function ‘EnemyLoseHP’
  • Made sure that we check for files in the appropriate places when we want to load them.

Please send me any issues or suggestions you might have on the projects issue tracker on github ! :)

What did I learn?
For some reason, the poisonous-effect that go with the poison was a challenge. Well, not at first – I implemented rendering of GL_POINTS with GL_POINT_SMOOTH enabled and everything looked nice and worked superwell at my own computer. But when I asked some friends to test it out, they reported that it slowed down after a couple of enemies got poisoned. After attempting to optimize that particular code in any way I could, I asked for advice on IRC, and got a helpful tip; Rendering a textured quad would probably perform better than rendering GL_POINTS. I have no idea why, but it works better on some drivers/graphics cards. All of those who tested with NVidia got smooth graphics – but one Windows user with ATI, and one Linux user with Intel experienced choppy graphics with GL_POINTS. Seems like I’m gonna stay away from GL_POINTS if I want something smooth going on.

I hope I can give a better report next week, but I don’t think the last week have been all unproductive.

Posted in Uncategorized | Tagged | Leave a comment

Awesome Tower Defense – Latest News !

The last time I said anything about Awesome Tower Defense was back in April 2009. The project went on a halt for a variety of reasons, but things have picked up again as of late. Back in December I received emails from two different people – with no relation to each other as far as I know. One of them said he had rewritten the game in Lua, because he wanted a project to use for his “SDL-bindings for Lua”-project. He also implemented the Lee algorithm for pathfinding. This definitely made some sparks fly in my head. Then just a few hours later, I received an email from a guy saying that he had successfully made the game run on a Palm Pre. Both of these guys wanted to know if I were still developing the game.

So what am I doing with this? Well, I’ve started writing the game from scratch. First of all, because the old codebase is crap. Let’s say that it was just a test. What I’ve achieved so far that beats the latest stable version of the game, is;

  • OpenGL: Rendering is much faster than the SDL framebuffer graphics. Doing things like scaling/rotating are what I would call “nobrainer”. Something we’ve achieved with this is that the window isn’t locked to a size of 640×480 like the original is.
  • glib: Instead of locking myself into a bunch of arrays of structs and integers, I use glibs way of handling lists and hash tables. I also utilize the key/value-parser for storing game settings and level files.
  • SDL_ttf: I now use this library for handling fonts. We use true type fonts, and apply pretty anti aliasing.
  • SDL_image: I use this for loading textures. Giving us access to most relevant file formats. If I were to ditch this, I would change it to libpng only, as that’s the IMNSHO only sane choice.
  • Level files: All data for each level are now stored in a simple key/value-file format. Here one can set the strengths of each tower, enemy, the intervals between the different waves, the map layout, and much more. The map layout isn’t locked to being 18×12 anymore either. Which is a big improvement from before.

Using OpenGL and glib simplifies the codebase significantly, and I can focus much more of my energy of creating a great game than handling things that most people think should be trivial tasks – which also would perform pretty bad. So, this is the currently latest news. What I intend to do from now on, is to make a weekly writeup of what I’ve done with the game. This may be a subject of change, since I don’t know if I actually make changes every week – but with the progress as of late, it seems like the appropriate timespan for a blogpost. My plan is to do these posts every Monday.

Posted in Uncategorized | Tagged | Leave a comment

In the works for SortIt 2.0

Since the fairly recent release of SortIt, I’ve gotten a bunch of feedback. Feedback is good. So I’ve started working on the next release of SortIt. Here’s a list of stuff I want to get in this release:

  • Integrate the game with OpenFeint.
    • Twitter / Facebook-integration
    • Replaces the current leaderboard
    • Stores scores on the device until an internet connection is available
    • Achievements
  • Making the game friendly to the colorblind, by giving all the item types unique shapes.
  • Bugfixes
  • Graphical improvements
  • Gameplay improvements
  • New gameplay modes
  • Audio

I hope that this is something you all look forward to :)

Posted in Uncategorized | Tagged , | Leave a comment

SortIt 1.0 is released!

Last night, Apple approved SortIt 1.0. This morning, it was to be found in the Apple AppStore. It is one of my many pet-projects, which I hope some of you will enjoy. You can get it here.

Posted in Uncategorized | Tagged , | Leave a comment

Development blog up.

So, my development blog is up. I enjoy coding, and I needed a site for my projects. This is it. More stuff will come, stay tuned! :)

Posted in Uninformal | Tagged | Leave a comment