Monday, December 23, 2013

Come On Tomcat...

Over the break I ran a 5K race with my son called the Jingle Bell dash, when I got home I decided to do a quick check of my e-mail to show some pictures to him. I then noticed a "system alert" that one of our servers that delivers library images was currently down.

Awesome a chance for me to show off that I can fix some systems problems. Hopped onto the server "lib-tomcat", where we have tomcat running a couple applications. Tried the usual service restart command, /usr/service/tomcat6 restart, but it would not start. Guess I was going to have to at the log to see what was causing the problem.

However, before I looked at the log I thought this would be a great chance to test out our new "System Alert Form", basically a php mail script that also includes all of our phone numbers to the systems folks. So along with an email we also get a text alert. I notified the other systems staff that I was having issues restarting Tomcat.

I then decided to go straight to the bin directory and stop and then start Tomcat. That did the trick and image server was back up and running. I then later got an email from my supervisor who thanked me for fixing the problem and also letting me know he got the text message. A nice "Systems" example for the Christmas break vacation.

Tuesday, December 17, 2013

Alma: Batch Patron Delete

This past summer we migrated from Innovative Interfaces (III) to ExLibris' Alma system. III had some great batch delete options for patron records. However with Alma those tools do not yet exist, we needed some way to batch delete a number of patron records.

It got me to thinking, what if I read an excel file of barcodes of patrons which we want to delete, and basically sent a deleteUser call based on the userID to the Alma user web service.

Below are the steps we used:

  1. First we installed PHPExcel 1.7.9. This lets us easily read through the spreadsheet.
  2. Using Alma Analytics we created a spreadsheet of the users that we wanted to delete.
  3. Next we set up a file to make the call to the UserWebServices wsdl.
  4. There are a number of functions available on from the web service and one is "deleteUser".
  5. So we basically read through the excel file and delete each patron record. If success, we report back the ID that was deleted. If the delete fails, books on loan, patron has fines, or the user id no longer exists the report lets you know who it could not delete and the reason why it failed.

    Here is a sample of the report:

    UserID 2044325 HAS been deleted
    UserID 2045274 HAS been deleted
    UserID 2046383 HAS been deleted
    UserID 2046389 HAS been deleted
    UserID 2046625 HAS been deleted
    UserID 2046757 HAS been deleted
    UserID 2046897 Could not be deleted because User not found
    UserID 2046918 Could not be deleted because User not found
    UserID 2048022 HAS been deleted
    UserID 2048028 Could not be deleted because User not found
    UserID 2048220 Could not be deleted because User not found
    UserID 2049102 Could not be deleted because User not found
    UserID 2049493 Could not be deleted because User not found
    UserID 2058282 Could not be deleted because User not found
    UserID 1694234 Could not be deleted because User not found
    UserID 1856181 Could not be deleted because User not found
    UserID 2114672 Could not be deleted because User not found
    944 Patrons records handled.    


Tracking My "Systems" Librarian Work

In need some method for tracking some of the "systems" related tasks that I do within my role as a systems librarian at Willamette University's Mark O. Hatfield Library, I have decided to try and maintain a blog on the topic. 

I tend to be someone who does not want to program all day, and I like to work with students more than a computer. However, I'm hoping I can occasionally capture some of what I believe are "system" related tasks in this blog.