Running a report on all Sametime Buddy Lists
Someone hight enough in your food chain wants to know how many users are in the Sametime buddy lists of your users. To my best knowledge that number isn't stored anywhere. So what to do? The buddy list is a piece of XML that gets stored in then vpuserinfo.nsf on your Sametime server. There is a view "Storage" with one document per user. The buddy list is stored in an item with the name 8193. Latest here you start smelling rat. A standard Notes form doesn't allow an item to have a "numeric looking" name. Inspecting the item you will find the data type stated as "Arbitrary Data". This is a great testimony to Domino's flexibility but unfortunately neither the LotusScript nor Java API allows us to process this item type. So the back door is closed, let's try the front door. The Sametime API allows to retrieve the buddy list. To save myself the hassle to program all this I just use a free tool from Epilio to extract the buddy list as XML (Sametime without Epilio is like Sushi without Wasabi - something is missing). To get all my buddy lists I wrote a small agent that creates 2 files: one cmd file that will call the Epilio tool for every user and one XML file that allows to associate the file name to the user name. (The code is a hack, don't expect error handling).
Once you run the CMD file you end up with a directory full of BudyList[a-number].xml files. To combine them and produce a report you use
As usual YMMV.
Update: I stand corrected (thx Carl): You can get access to custom data using
Once you run the CMD file you end up with a directory full of BudyList[a-number].xml files. To combine them and produce a report you use
java -jar BuddyListReport.jar
. You need a command combine|report
, the directory (with an ending / ) and the name of the report file. Best is to have all in the same directory together. "combine" will combine the files and run the report "report" will only run the report (e.g. after you created a new stylesheet with a different layout or to report on different things). So a sample command could look like
java -jar BuddyListReport.jar combine C:\export\ report.xslt
. The Java code has no dependency on any Domino or Sametime classes. All you need to get started can be downloaded including the source code.
As usual YMMV.
Update: I stand corrected (thx Carl): You can get access to custom data using
byteArray = notesDocument.GetItemValueCustomDataBytes( itemName$ , dataTypeNam$)
. It's in the help. Introduced in R8.5 Never looked at it before.Posted by Stephan H Wissel on 30 June 2010 | Comments (2) | categories: Sametime