I just uploaded a new version of ePing.py. Version is now at v0.06. You can find it of course at code.google.com/p/epingpy.
After passing several logfile excerpts from the ePing.py that
I installed at work, the application that runs our websites has been reworked
by the company who created that application. The websites run fine now most of
the time. So making this little program has already proved it's purpose, even if nobody else uses it... :)
However I do have lost a playground of extreme situations. Ah well, guess the
program should be tailored for normal situations anyway.
I do get some visitors to the Google Code website, and it also shows that at least some people download it. Up till now I have had no feedback form anyone. I kind of hoped putting it online would give me feedback about improvements in features, code-structure en maybe fix bugs.
Sunday, February 7, 2010
Friday, November 6, 2009
Threads suck a lot less
Well, I suck less at threading, but who would ever admit to sucking at anything? Anyway, after carefully reading, rereading, trying, testing and reading again both Well House Consultants threading course as this excellent PDF on Python Threading, I managed to get it working properly. I did break the extended timeout functionality, but thought it worth it to have threading. So making extended timeout available will be planned for version v0.06!
http://code.google.com/p/epingpy/
http://code.google.com/p/epingpy/
Monday, October 26, 2009
Threads suck!
Well, not really of course. But the thing is, my ePing.py release with threaded support is probably not really threaded.... It didn't work, so I just put up a revised version which does work, but I fear I broke the Threaded part. Well, first I have to work, but I will try to look into. Maybe I should first read about the basics...
Thursday, October 22, 2009
Net result from ePing.py
The company that creates and maintains our web applications apparently seemed to be able to "optimize"their code.
Last week my director asked me to mail an excerpt from the log to them, showing how many timeouts out sites have. They of course give no feedback to me, but the amount of e-mail notifications has been down drastically. And since yesterday, when I put the last version to work with a higher default-timeout of 10 seconds (instead of 5 seconds), I haven't received any notifications at all. Actually, as of now, nothing has been written to the log. So I guess their code optimizations, and the higher timeout value, made this possible.
I started the basic idea actually already in March this year, but started on a completely new code around July, and under a different name. And it seems that it has already paid of for my employer... Since it's a e-tailer, any downtime is possible missed orders...
Last week my director asked me to mail an excerpt from the log to them, showing how many timeouts out sites have. They of course give no feedback to me, but the amount of e-mail notifications has been down drastically. And since yesterday, when I put the last version to work with a higher default-timeout of 10 seconds (instead of 5 seconds), I haven't received any notifications at all. Actually, as of now, nothing has been written to the log. So I guess their code optimizations, and the higher timeout value, made this possible.
I started the basic idea actually already in March this year, but started on a completely new code around July, and under a different name. And it seems that it has already paid of for my employer... Since it's a e-tailer, any downtime is possible missed orders...
Wednesday, October 21, 2009
Progress on ePing.py going slowly but surely
I just put the source of v0.04 online on Google Code. Main new thing in this version is that the UrlChecker class now runs threaded. This means that one run of ePing.py will not last longer if more URL's are to be checked (previously one check lasted more then 8 minutes when several of my employers website where unreachable).
Thursday, July 23, 2009
First release of ePing.py!
Today, not even 5 minutes ago, I released the first public version of my first Python project. I called it ePing.py, kind of being an 'enhanced' ping-tool written in Python.
The project can be found on code.google.com/p/epingpy.
It basically checks whether a specified URL returns a HTTP-error or gives an timeout within a specified period.
Please download, try and give me feedback. This would also be my first public attempt at OOP (without alot of oopz I hope... :-) )
The project can be found on code.google.com/p/epingpy.
It basically checks whether a specified URL returns a HTTP-error or gives an timeout within a specified period.
Please download, try and give me feedback. This would also be my first public attempt at OOP (without alot of oopz I hope... :-) )
Labels:
monitor,
online,
python,
servermonitor,
status,
website monitor
Friday, May 29, 2009
Userscript to change links
Why I set out to create this very short script doesn't really matter. Sometimes it is just handy to change a link on a website, but you don't have control over the source code. In a broader perspective, this method actually changes a specified attribute for each specified HTML element, and in that perspective is actually more generally useful.
Well okay, this is the situation. Our CMS gives us the option to change the configuration options for systems we sell. However, for certain systems our Sales department asked us to only use options we have in stock, so delivery times can stay as short as possible. Of course this information is not displayed in the page itself. It is however returned from the database. We are not allowed to make changes to the source of our CMS, but what my colleague did, is copy the specific JSP file, and change the output as to show whether a product is a stockproduct or not. This new file we have to access manually for each component change. This is bothersome in my eyes, and that's why I set out to create a small userscript for IE7Pro.
On a side note, we use a lot of different userscripts for both Internet Explorer (through IE7Pro) and FireFox (through GreaseMonkey) to enhance efficiency or fix annoying inefficiencies (small but relevant difference).
So I basically needed to change every link on pageA.jsp that linked to pageB.jsp?value=someID to pageB2.jsp?value=someID.
Well okay, this is the situation. Our CMS gives us the option to change the configuration options for systems we sell. However, for certain systems our Sales department asked us to only use options we have in stock, so delivery times can stay as short as possible. Of course this information is not displayed in the page itself. It is however returned from the database. We are not allowed to make changes to the source of our CMS, but what my colleague did, is copy the specific JSP file, and change the output as to show whether a product is a stockproduct or not. This new file we have to access manually for each component change. This is bothersome in my eyes, and that's why I set out to create a small userscript for IE7Pro.
On a side note, we use a lot of different userscripts for both Internet Explorer (through IE7Pro) and FireFox (through GreaseMonkey) to enhance efficiency or fix annoying inefficiencies (small but relevant difference).
So I basically needed to change every link on pageA.jsp that linked to pageB.jsp?value=someID to pageB2.jsp?value=someID.
// ==UserScript==
// @name Show external status
// @namespace qrazi.blogspot.com
// @description Replace an attribute of specified element
// @include http://pages.where.this.should.apply*
// @exclude http://pages.where.this.absolutely.shouldnt.apply(optional)
// @version 1.0
// ==/UserScript==
var elm = document.getElementsByTagName("a");//or any other kind of element
for(i = 0; i<elm.length;i++){
attr = elm[i].getAttribute("href");//or any other kind of attribute
if(check whether should be changed){
attr = attr.replace("to be replaced", "with this");
elm[i].setAttribute("href", attr);//change the href attribute to attr
}
}
Subscribe to:
Posts (Atom)