[OPLINTECH] Telrenew Bandaid

Whetsel, Shawn swhetsel at akronlibrary.org
Tue Mar 3 09:31:24 EST 2015


Good morning OPLINTECH,

                Fair warning, this  may not apply to all of you, and may also require modification of parameters for it to work on your system.

We use III's telrenew for our telephone renewal system. Like most things III, we struggle with their software working reliably and can't get them to support it. For years, (and I really do mean years) we have been checking the telephone renewal hotline every morning as part of our morning routine in IT. Sometimes if it would die over the weekend, or right after close, it would be down till next business day when we checked it. We also had times that it would die out an hour after we checked it.

Before you start to ask why we don't just monitor it and reopen it when it closes, well it's not that simple. We run Nagios as monitoring software for all servers and critical applications. Nagios tells us when things are not responding and offline. The issue with telrenew though was not that it was crashing, but that it was locking up. You would log onto the server, and there it would be in all of its frozen glory. However windows did not see it as un-responsive. Patrons of course seem to know the second something is no longer working and would decide that this was something that the director of the library needed to know about, instead of just calling and letting us know it was down.

This gets me to the meat and potatoes part of this email. After hearing that the director was getting patron calls about this, I sat down and tried to come up with a way to "fix" the issue. I tore down the application code and tried to sift through anything useful.  There were no command line parameters you could send, and nothing I could see helpful in the code. (Admittedly I am NOT a programmer.) If you use telrenew you know that when it first opens, you then have to select the "renew" option to start the program, the other button is for settings. So we were stuck. Even more so because the app was not actually crashing or being non-responsive according to windows.

My next step was to spend some time watching the process on the computer and coming up with a way that I could get the program to lock up on demand so I could test my script. (BTW to lock it up, just open a second instance, worked every time.) After lots of tweaking, below (and attached) is what I came up with to band aid the program. This has been in place now for almost 5 months and we have not had any more issues. Sorry for the long winded email, but I hope that this script can help other people. Enjoy!

Explanation of Script:

Preface: Because this script implements keystrokes, you must have the computer\server logged on at all times for this to work. We set ours up with autologon, removed any session timeout options, and set up VNC so we could access the machines current session. This PC now stays logged in 24/7.


1.       Use Windows Scheduler to run the telrenew_restart.ps1 powershell script every 15min between the hours of 12:00am and 11:45pm.

2.       The script first checks to see if the memory usage is bloated by telrenew.exe and then if it is, it closes the app. This prevents the app from sitting frozen\not responding. (Seems to run at around 5000k of memory usage normally, and when it locks up it hits 14000k of memory used. The script closes the app when it goes over 12000k in use)

3.       After the script checks to make sure it's memory usage is not bloated, it then checks to see if it's even running. This is a two-step process involving checking if the program is just open, or if its open and running. If it is open and running then nothing happens. If it is just open but not running, it kills the process, reopens, and sends the "enter" keystroke to start the "renew" portion of the program. (Just open it uses under 4000k of memory, open and running it uses around 5000K) It also opens the program and sends "enter" if it's just not running at all.


Script:

# ***************************************************
# ASCPL Telrenew Restart Script Edited Last: 11-14-14
# ***************************************************
#
# This step checks to see if the memory is bloated above 12000k indicating that the app is most likely frozen. If true, it kills the process.
& taskkill /F /FI "IMAGENAME eq Telrenew.exe" /FI "MEMUSAGE gt 12000"
Sleep 5
# This step checks to see if the memory is below above 4000k indicating that the app is open but not running. If true, it kills the process.
& taskkill /F /FI "IMAGENAME eq Telrenew.exe" /FI "MEMUSAGE lt 4000"
Sleep 5
# This step checks to see if the application itself is running.
# If the application is running it does nothing. If the application is not running it opens that application then waits 5 before sending the "enter" keystroke.
$Running = Get-Process Telrenew -ErrorAction SilentlyContinue
Write-Host $Running
if (!$Running) {
Start-Process C:\Telrenew\Telrenew.exe
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('Telephone RenewalVersion 1.1')
Sleep 5
$wshell.SendKeys('~')
}



Shawn Whetsel
Network Services Coordinator
[cid:image001.jpg at 01CF6492.FFBD69C0]<www.akronlibrary.org>
Phone: 330-643-9161
E-mail: swhetsel at akronlibrary.org<mailto:swhetsel at akronlibrary.org>
Information Technology
60 S. High St.
Akron, OH 44326
[A+][Network+][Security_logo.1]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oplin.org/pipermail/oplintech/attachments/20150303/cb05cdf4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 7134 bytes
Desc: image001.jpg
URL: <http://lists.oplin.org/pipermail/oplintech/attachments/20150303/cb05cdf4/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 1127 bytes
Desc: image003.jpg
URL: <http://lists.oplin.org/pipermail/oplintech/attachments/20150303/cb05cdf4/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 1513 bytes
Desc: image005.jpg
URL: <http://lists.oplin.org/pipermail/oplintech/attachments/20150303/cb05cdf4/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 3876 bytes
Desc: image007.png
URL: <http://lists.oplin.org/pipermail/oplintech/attachments/20150303/cb05cdf4/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: telrenew_restart.zip
Type: application/x-zip-compressed
Size: 659 bytes
Desc: telrenew_restart.zip
URL: <http://lists.oplin.org/pipermail/oplintech/attachments/20150303/cb05cdf4/attachment-0001.bin>


More information about the OPLINTECH mailing list