Notices


Reply
Thread Tools
Posts: 8 | Thanked: 17 times | Joined on Apr 2012
#1
Long time lurker (even before I made this account), finally glad to be able to make a contribution.

Serverstatuswidget is a desktop widget for Maemo 5. It allows you to monitor the status of servers by pinging them periodically.

Here's a screenshot.



The status of the servers is updated after every user specified interval, or you can click the button corresponding to a server to update the status of the server immediately instead of waiting for the next scheduled update.

Incase you're wondering, it seems maemo.org doesn't respond to pings, which is why it is shown offline in the screenshot.

More information is on the wiki here

Please post bugs and feature requests on the wiki. I have applied to have the widget uploaded to extras-devel. I'll update this post when that happens. In the meantime, a deb file is attached below.
Attached Files
File Type: deb serverstatuswidget_1.0-1_armel.deb (18.7 KB, 193 views)
 

The Following 11 Users Say Thank You to briggers For This Useful Post:
Posts: 2,239 | Thanked: 3,982 times | Joined on Apr 2010 @ England
#2
This looks a very useful widget.
Question does it run while the screen is off?

I think these would cover most bases as regards refresh rates (update policies) for your widget.

Also thanks for adding a wiki page.
__________________
The stable-beast currently runs...
21.2011.38-1Smaemo8 (CSSU Stable)
2.6.28.10power53 (125-600Mhz SR VDD1&2)

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
Posts: 466 | Thanked: 416 times | Joined on Jan 2010
#3
That's pretty handy. They have the Nagios one already (Maegios, I think). But then of course that requires a full on Nagios server to be set up. This is a good basic way for checking if the server(s) are up.

slaapliedje
__________________
I have figured out the reason 'smartphones' were invented. They are for reading the internet while pooping. This means the best smartphone ever created is the N9. It is the only one that works so well single-handed.
 

The Following User Says Thank You to slaapliedje For This Useful Post:
Posts: 244 | Thanked: 354 times | Joined on Jul 2010 @ Scotland
#4
You could improve this a little by not simply looking for a ping ; e.g. specify a port and check for a response.
  • Port 80 - Web Services
  • Port 22 - Secure Shell
  • Port 1521 - Oracle

Here's a quickly knocked up perl script as an example:

Code:
#!/usr/bin/perl -w

use LWP::UserAgent;

my $l_hostname = shift @ARGV or die "Pass an IP or hostname, ya muppet\n";
my $l_port = shift @ARGV || 80;
my $l_timeout =shift @ARGV || 5;

my $ua = LWP::UserAgent->new;
$ua->timeout($l_timeout);
my $response = $ua->get('http://' . $l_hostname . ':' . $l_port . '/');

exit 0 if $response->is_success;

# No response ...

exit 1;
It'll return true or false back to the shell based on the service ; e.g. to check sshd running on a machine on my lan:

Code:
gregor@sauzee:~$ if $(./checkService.pl eck.local 22) ; then echo "alive" ; fi
alive
gregor@sauzee:~$
or checking the ftp server is running (which it isn't - do I look mad to you?)

Code:
gregor@sauzee:~$ if ! $(./checkService.pl eck.local 23) ; then echo "FTP is pure deid man" ; fi
FTP is pure deid man
gregor@sauzee:~$
Hope that offers you a few ideas.
 

The Following 5 Users Say Thank You to gregoranderson For This Useful Post:
Posts: 8 | Thanked: 17 times | Joined on Apr 2012
#5
Originally Posted by sixwheeledbeast View Post
Question does it run while the screen is off?
I'm not entirely sure. The widget itself doesn't do anything to ensure that it's not running when the screen is off. I don't know anything about the internals of hildon-home or hildon-desktop and whether it suspends widget activity when the screen is off. If you do know how I can implement this, please let me know, I'd be happy to implement it.


@gregoranderson

Thanks for the ideas. In the roadmap on the wiki page I've listed a similar idea. I have the backend written and I'm currently testing it. All that remains is to expose the functionality through a nice GUI. As a newbie to pymaemo and pygtk, writing a nice GUI takes quite a bit of time.
I have entered the widget into the 2012 Coding Competition which requires a feature freeze during the voting stages. I dont think I'll be able to have the new features ready by the start of the voting stage, but I'll definitely have a release out as soon as the competition ends.


In the meantime, does anyone know how I can make the phone vibrate or play the default alert sound using pymaemo? I've looked at the wiki and other documentation but I can't find anything. I may have missed something, so any pointers are welcome.
 

The Following 2 Users Say Thank You to briggers For This Useful Post:
Posts: 262 | Thanked: 204 times | Joined on May 2010
#6
this will consume battery
have a look at my thread http://talk.maemo.org/showthread.php?p=1288518
i code re-write for this app would be great !
 
Posts: 138 | Thanked: 90 times | Joined on Mar 2012
#7
@briggers, in the future there will be port Server Status Widget for N9 Harmattan???
 
Posts: 8 | Thanked: 17 times | Joined on Apr 2012
#8
First off, my apologies for being inactive for so long. I started a new job and had to move to a new city. I've been very very busy.

I'm going to resume work on the is widget in a couple of days.

@teamer,

Why do you think this widget will consume a lot of battery? I'm not familiar with internals of Maemo or PyMaemo but if you have some ideas on how to make the widget more efficient I'll happily take a look.

@Tiran,
I dont have a N9 Harmattan to test on so I don't know if I'll be able to. The code is open source and written in python so someone more able and willing than me could do it.

Apologies for the delay in releasing the code, I'll upload it to github soon. Deb files are basically compressed archives, so if you want to take a look at the code just extract the deb file.
 

The Following User Says Thank You to briggers For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:23.