Year: 2013

  • procps-ng 3.3.7 Released

    procps-ng version 3.3.7 was released today.  It has some new and interesting features in the top program that Jim has been busy working on.  There is a new filter feature which can exclude fields that match a value for example. The remainder of the changes are small bug fixes and getting the compile warnings count down with -Wall enabled. The library revision was updated but this did not involve an API or ABI change.

    procps-ng can be downloaded off the sourceforge page which has the current and previous releases stored there. Alternatively you can visit our gitorious page if git fetch is more your thing. Debian packages will be going into experimental until the freeze is over and we get things unblocked.

  • python and rrdtool

    RRDTool is a neat utility for collecting and graphing statistics such as server loads or network traffic. There are two main modules for interfacing with RRDTool files within python; rrdpython and pyrrd.

    rrdpython is the basic bindings of the rrdtool library within python. The API is very familiar for people who program in C or use the command line tools which for me is both so it works well. However if you were expecting a “pythonic” API you will be disappointed. As there is the direct binding, you have to have either a pre-compiled module or compile it yourself with librrd-dev package installed. Depending on your setup this could be trivial or a real pain.

    pyrrd initially looks good as it is a object-orientated style and (supposedly) a pure python code, so no trying to compile things… but!

    Well, the problem is its not pure python. The hooks are there for it (in backend.py) for it to be implemented in python but it falls back to using the external method, and external method is a bunch of Popen calls. pyrrd also does not
    support the full set of rrdtool commands.

    My intention is to keep using rrdpython despite the compile hassle and possibly even use a fancier graph setup such as High Charts though there is a problem with their license for me.

  • What I learnt from LCA 2013

    Well I’m back from LCA 2013 and what a great week it was. I learnt plenty of things over the week, including:

    • Cloud computing into the government will be coming but will be hard to do in a significant way
    • It wasn’t just me that found the GTK 2 to 3 API change hard going
    • OpenStack is the next cool kid on the block and there is a lot going on here
    • Try out novaprova for testing C programs
    • SELinux shouldnt slow my computer down and yes ill try it soon
    • git-annex looks very interesting, I’m just trying to find a use-case for it for me
    • The development methods for Free Software have come a long way since a decade ago
    • Test and release processes are important on large software projects
    • Pretty much everyone I knew has changed companies, at least once.
    • For multi-process communication, 0mq looks interesting

    It was great to actually meet people who I’ve known for years (over 10 for some) only as emails or irc chats as well. I’ve not been to Mount Stromlo for almost as long and its somewhere I’d like to visit again.

    Argh, the wordpress editor is still not fixed 🙁

  • Off to LCA2013

    While I’ve been involve in Linux and Debian for many (15 or more) years, I’ve only ever been to one “major Linux thing” in all that time and that was manning some stall for Debian about 10 years ago.

    Well, let’s call it two because next week I’m off to the Linux.conf.au 2013 conference. I can’t get too terribly excited about the location because its… Canberra, yep my (now) home town and about 4 blocks from my workplace; so no exotic locales for me!

    I’m hoping to catch up with some Debian folk while the conference is on. There is at the very least a keysigning party where there are some others from Debian on Wednesday.

    PS WordPress update broke the visual editing, I hope it looks ok.

  • Bootstrap – The hidden gem in Turbogears

    I’ve been trying to tidy up my Mako templates within my Turbogears 2 project.  As part of that I was looking at some of them that are quickstarted including one which is the About page.

    What was curious was there was all this CSS work all done already for you, including icons.  Digging further I found out that one of the many projects Turbogears takes in, is Bootstrap.  It’s website describes Bootstrap as “Sleek, intuitive, and powerful front-end framework for faster and easier web development.”  but what it means to me is a bunch of guys who understand HTML and CSS way better than me have made it easy for me to build a decent web application.

    While the framework won’t suit everyone’s tastes, it makes a lot of the formatting decisions so much easier.  The thing is, in all the Turbogears documentation I have read I’ve not heard it mentioned. Not sure why, its pretty awesome (not SQLAlchemy awesome but not many things are).

    Enhanced by Zemanta
  • Pre-selecting ToscaWidgets jqgrid values in TurboGears

    My Turbogears project has recently reached an important milestone; one of the back-end processes now runs pretty much continuously and the plugins it use (or at least the ones I can see) are also working.  That means I can turn to the front-end which displays the data the back-end collected.

    For some of the data I am using a ToscaWidgets (or TW2) widget called a jqGridWidget which is a very nice jquery device that separates the presentation and data using a json query.  I’ve mentioned previously about how to get a jqGridWidget working but left the pre-filtering out until now.  This meant that my grid showed all the items in the database, not just the ones I wanted to see, but it was a start.

    Now this widget displays things called Attributes which are basically children of another model called Hosts. Basically, Attributes are things you want to check or track about a Host.  My widget used to show all Attributes but often on a Host screen, I want to see its hosts only. So, this is how I got my widget to behave; I’m not sure this is THE CORRECT way of doing it, but it does work.

    First, in the Hosts controller you need to create the widget and pass along the host_id that the controller has obtained.  I was not able to use the sub-classing trick you see in some TW2 documentation but actually make a widget instance.

    class HostsController(BaseController):
        # other stuff here
        class por2(portlets.Portlet):
            title = 'Host Attributes'
            widget = AttributeGrid()
            widget.host_id = host_id

    Next, the prepare() method in the Widget needs to get hold of the host_id and put it into the postData list.  I needed to do it before calling super() because the options become one long string in the sub-class.

    class AttributeGrid(jqgrid.jqGridWidget):
        def prepare(self, **kw):
            if self.host_id is not None:
                self.options['postData'] = {'hostid': self.host_id}
            super(AttributeGrid, self).prepare()

    This means the jqgrid when it asks for its JSON data will include the hostid parameter as well.  We need that method to “see” the host ID so we can filter the database access.

    Finally in the JSON method for the Attribute we pick up and filter on the hostid.

        @expose('json')
        @validate(validators={'hostid':validators.Int()})
        def jqsumdata(self, hostid=0, page=1, rows=1, *args, **kw):
            conditions = []
            if hostid > 0:
                conditions.append(model.Attribute.host_id == hostid)
            attributes =model.DBSession.query(model.Attribute).filter(and_(*conditions))

    From there you run through the attributes variable and build your JSON reply.

     

    Enhanced by Zemanta
  • procps 3.3.6 and Mudlet 2.0

    Mudlet - Graphical MUD clientYesterday was a busy Debian day for me with the release of not one but two packages.

    procps

    procps version 3.3.6 was released both as an upstream and a Debian package.  While there were many bug fixes in this release, the main new feature for it was the top inspect feature.

    The top inspect feature allows you to run top in the normal way then you can inspect a specific process you have selected within top for more information.  Examples of this include fuser or lsof type output to see what files or libraries are open but really the limit is how clever the operator is and how often you would need this information.  Even scripts can be run off this feature if you have some customised or cooked output you need to see.  Once the output is there, you can search for text.

    There will be a small hold-up with the Debian packages as the section for the  library has been moved to libs, where it should be. At least I think that’s why there is a delay.

    procps infrastructure

    procps currently has only an email list and a gitorious git repository.  While this works most of the time, there are two main problems with this setup.

    The first is that the only two ways you can report bugs is send an email to the list or create a git merge request. The email has the problem with tracking and gathering history while the git sets the bar pretty high for reporting something has gone wrong.

    Second problem is there is no tarball file repository.  gitorious does have the feature of downloading tarballs of the tag checkpoints, but this is the raw repository.  When you make a tarball with “make dist” there are some generated files included in the tarball that don’t appear in the gitorious ones, which means its not a simple for some as you expect.

    So I’ll be creating a project for these two features soon.  Not sure where they will be but I use sourceforge for both these for a few other projects so that might be where they end up.

     

    Mudlet

    Mudlet, the multi-user dungeon or MUD client, has finally made it to version 2.0!  It looks a lot more stable and polished at least from the scripting side than the previous RC versions but has all the features that we’ve come to expect with it.  The most important thing is that the developers have finally put a line in the sand and said “this is version 2.0”.  The Debian package was uploaded yesterday and should be on its way to your local mirror soon.

     

    Enhanced by Zemanta