Thursday, March 26, 2009

APC UPS Monitoring using SNMP

I just finished configuring IPSentry to monitor our APC UPS (via SNMP).

Currently, IPSentry will send email alerts to us when the UPS batteries need replacing, etc. But if the main power is out and the battery run time remaining is under certain threshold, it will send us alerts to our cell phones instead. We also tested using it to call a script which automate the shutdown of our servers and it works. We may decide to implement it eventually, but I feel we need more observations to verify the reliability of the monitoring before doing so (since that script is so powerful and any false alarm can cause our entire shop to be shutdown).

Anyway, here are the OIDs we are now monitoring:

OIDDescription
Date Type
.1.3.6.1.4.1.318.1.1.1.2.1.2
The elapsed time since the UPS has switched to battery power.timeticks
n mins = n*6000 timeticks
.1.3.6.1.4.1.318.1.1.1.2.2.1The remaining battery capacity expressed in percent of full capacity.gauge
.1.3.6.1.4.1.318.1.1.1.2.2.2The current internal UPS temperature expressed in Celsius.gauge
.1.3.6.1.4.1.318.1.1.1.2.2.3
The UPS battery run time remaining before battery exhaustion.
timeticks
n mins = n*6000 timeticks
.1.3.6.1.4.1.318.1.1.1.2.2.4
Indicates whether the UPS batteries need replacing.
integer
noBatteryNeedsReplacing (1)
batteryNeedsReplacing (2)


Tuesday, March 24, 2009

More eLearning User Penetration Numbers

In December 2007, I wrote a script to determine the user penetration rate of eLearning, our online Learning Management System (powered by Blackboard Learning System CE6). We have subsequently upgraded the system to CE8 with all the latest service packs. Fortunately, the script continues to work.

Here are the numbers for the main Pullman campus:

Semester Undergraduate Students Graduate Students Undergraduate + Graduate Students
Total LMS % Total LMS % Total LMS
%
2007 Fall 15441 12862 83.30 1981 749 37.81 17422 13611 78.13
2008 Spring 14383 12079 83.98 1874 747 39.86 16257 12826 78.90
2008 Fall 15571 14521 93.26 1998 1165 58.31 17569 15686 89.28
2009 Spring 14650 12968 88.52 1939 936 48.27 16589 13904 83.81

Friday, March 13, 2009

Using rsync on Windows

I posted an article on an issue of SQL Memory Paged Out During Large File Copy last month, which documented my effort in finding a way to solve the issue. Yes, rsync (from Cygwin) is still our final choice.

Today I'm going to post some tips on using rsync on Windows.

To install rsync, run the Cygwin setup.exe installer and install rsync package. After that, I would recommend adding Cygwin's bin folder into your environment path. This way, you can call rsync directly from the command line.
  • Right click on My Computer. Choose Properties.
  • Click on Advanced tab.
  • Click on Environment Variables button. (The Environment Variables window will be opened)
  • Under System variables, highlight Path. Click Edit.
  • At the end of the Variable value, append ;c:\cygwin\bin (or wherever your installation path is. Don't forget the semi-colon in front).
  • Click OK | OK | OK to finish.
Now you can use rsync to copy file in the command window, like the followings:
rsync.exe \\fromserver\share\filename d:\backupfolder\filename
But there is another issue. The destination file (copied via rsync) is owned by the user account running rsync. One may prefer to have the file permissions inherited from the parent folder instead. To fix that, I use the setacl utility from SourceForge.

The following commands first change the file ownership to local Administrators group of the backup server, clear the discretionary and security access control lists (DACL, SACL) of the file, and finally set the ACLs to be inherited from the parent folder.
setacl.exe -on filename -ot file -actn setowner -ownr "n:backupserver\Administrators;s:n"
setacl.exe -on filename -ot file -actn clear -clr dacl,sacl
setacl.exe -on filename -ot file -actn setprot -op "dacl:np;sacl:np"
Put them all into a batch file, and you have a simple script to perform nightly backup using rsync.