Category: Uncategorized

  • Resetting USB devices

    I’m not sure if it is just a bad motherboard, cable, USB device or just bad luck, but when I reboot the computer the UPS doesn’t appear. It’s not even seen in lsusb and of course that makes nut-server fail which makes nut-client complain that it cannot work out the UPS status.The solution was to unplug and plug the cable in then reset nut-server and all was good. But playing with cables seems so last century, surely there was a better way?

    Some Googling showed up a way to Reset USB without a reboot but the directories the entry mentioned didn’t exist on my computer; though there was something very close to it. Perhaps that would work? A few tweaks later and I had a working UPS monitoring cable!

    The changed script is below:

    I’m not sure if it is just a bad motherboard, cable, USB device or just bad luck, but when I reboot the computer the UPS doesn’t appear. It’s not even seen in lsusb and of course that makes nut-server fail which makes nut-client complain that it cannot work out the UPS status.The solution was to unplug and plug the cable in then reset nut-server and all was good. But playing with cables seems so last century, surely there was a better way?

    Some Googling showed up a way to Reset USB without a reboot but the directories the entry mentioned didn’t exist on my computer; though there was something very close to it. Perhaps that would work? A few tweaks later and I had a working UPS monitoring cable!

    The changed script is below:

    #!/bin/sh
    
    SYSXHCI=/sys/bus/pci/drivers/xhci_hcd
    
    if [ "$(id -u)" != 0 ] ; then
     echo This must be run as root!
     exit 1
    fi
    
    if ! cd $SYSXHCI ; then
     echo Weird error. Failed to change directory to $SYSXHCI
     exit 1
    fi
    
    for dev_id in ????:??:??.? ; do
     printf "${dev_id}" > unbind
     printf "${dev_id}" > bind
    done

    Thanks to Eli for the original idea which got me onto the right path.

     

     

     

  • First Look at RoseNMS screens

    More work has gone into the various GUI screens for RoseNMS. While still early days, these screenshots give an idea of the final program.

    Host Map

    The maps have been updated and now just use CSS for layout, rather than hard calculating the coordinates using javascript. This gives a cleaner and more fluid look to the maps. Hovering over the map item will show more details about the item. There are maps for hosts (shown) as well as attributes.

    Attribute View with information, graph and events
    Attribute View with information, graph and events

    Attribute details show some information about the attribute, the default graph and the events. Clicking on the more button above the graph takes you to the graph page for that attribute.

    Graphs

    Finally the graph handling is completely re-written with the concept of graph templates. These are basic types of graphs. The one shown is the basic “lines” template that shows… lines! Only things required are the RRD data source, the multiplier, the legend and how you want the units shown. From that the program builds all the required VDEFs and CDEFs.

  • 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 🙁