A Linux server that tweets power changes


Twitter has been used for lots of experiments, both useful and just for fun. [FIRESTORM_v1] sent in his project that falls under the useful category. When he wanted a way to monitor his server’s power statistics, Twitter was a logical choice. Similar to the Tweet-a-Watt, he wrote a script that posts messages from APCUPSd to a Twitter account that he follows, and gets the updates on his phone. [FIRESTORM_v1] documents all of the scripts he used and the steps to get your server up and tweeting.


  1. anon says:

    Correct me if I’m wrong here, but is there anything twitter can do that doesn’t already exist? I just mean, what was ever wrong with all email/usenet/IM/etc protocols that already exist and work perfectly well?

    Please can someone tell me what I can do with twitter that I can’t do already?

  2. Tom says:

    I agree, why couldn’t his scripts send a SMS directly to his phone? Why involve Twitter and add an extra layer of complication and possible failure?

  3. Tom Parker says:

    Like this my nas currently tweets it uptime I got loads of things to add to it I like the idea of this too http://twitter.com/freenas_tomnas

  4. sly says:

    my linux server has apcupsd installed and it has a cgi-script that apache can use to display the capacity/runtime/load graphically and show recent events and all the info from the ups. Why not take out the middle man (twitter) and just use that?

  5. D says:

    “…add an extra layer of complication and possible failure”

    This is twitter we’re talking about. It’s an extra layer of complication, and _guaranteed_ failure at some point.

  6. t3rcio says:

    This is very useful: it can send report about your own behaviors, changes, and a lot informations…cool!

  7. AndrewNeo says:

    Upon reading this article I spend about 15 minutes and added the same functionality to my NUT installation. It was sending emails to my phone before, but doing it via twitter to SMS is much more direct.

  8. error404 says:

    So something that can be replicated with a 10-line shell script counts as a hack now?

    I guess I’m a hardcore hacker, then.

  9. Tim says:

    Indeed. Can we stop the “Simple thing…. on Twitter!!!” stories please?

    Please don’t feel like you need to keep up a certain volume of stories. I’m sure everyone appreciates you guys filtering out some of the not-so-amazing ‘hacks’.

  10. f0rt says:

    I agree with tim — I’d be content with one solid hack per day, rather than numerous blinking, twittering dilduinos.

    Then again…why am I bitching? I’m not paying to read the content of the site…

    I suppose I can suck it up and just not read articles that don’t interest me ;)

  11. Mikey C says:

    twitter is lame, but this is actually a half decent use for it.

  12. falkon says:

    I’ve been receiving apcupsd alerts from my home server via email for 2 years now. Pretty simple shell scripts, and this one is no different… But mine also graphs the battery load over the day/week/month/year with mrtg, and actually speaks aloud a cool alert through festival text-to-speech when the main power fails. That’s the fun of shell scripting.

  13. MrX says:


    Indeed. But notice that you would need a crapload of scripting to do the same on windows. So this may count as a hack for them ;)

    I think I’m going to tweet my mouse movement milestone or kph (keystrokes per hour).

  14. draebkcen says:

    There is no Arduino this does not qualify as a hack.

  15. absolutezero says:

    it’s sad to see all this animosity that’s been prevalent lately.

    if you’re too 1337 to read twitter and arduino posts, then you should be quite capable of filtering them from your rss feeds.

  16. MrX says:


    I totally agree. But I think the best thing we can do is to just *ignore* them.

  17. fsphil says:

    I’m sure someone can hack an Arduino to filter out the… oh wait.

  18. Travis aka cheeto4493 says:

    I don’t mind some of the “simple” hacks. If not just for ideas.

  19. Oneiroi says:

    Twitter just seems to get used for everything, it’s just micro blogging,

    I have even had requests from clients to have their server alerts published to twitter, and if they want to pay for it why not?

    At least some people are taking the right stance on this and publishing their findings for others to use.

    I have submitted two twitter uses which I had completely forgotten to write up until I saw this, (even though my code has been in subversion for over 3 months) to hackaday, using twitter for Nagios alerts and Subversion commit messages.

    Cheers for sharing this one for gather APC data.

  20. MrX says:


    > I have submitted two twitter uses which I
    > had completely forgotten to write up until I
    > saw this
    > using twitter for Nagios alerts and Subversion
    > commit messages.

    Actually twitter for svn commit messages is a very good idea. I feel it is easier to keep track of development by watching tweeter history than by mailing lists.
    I think I’m going to tweet git commits on a few projects of mine. git allows script hooks, so it will be simple.

  21. Mayur says:

    visit http://hacking26.blogspot.com/ for mare info.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,401 other followers