User Count

This program will connect to one to many Remedy servers and collect summary license statistics regarding Fixed/Floating (Write)/Floating (Read)/Read licenses of those logged in. If used against multiple servers, it will give you a total of each server, and then a count of unique users across all servers that it connected to. If you want to use this in a script, you can provide the optional -csv parameter, which provides the output in a comma separated value format for use in spreadsheets.

java -jar APLUserCount.jar -x <server>:<port> -u <user> [-p <password> -sg -a <active hours> -csv -splunk -v -d]
-x: This is the server to connect to, if connecting to multiple servers, use multiple of this option, or specify multiple separated by ,’s. Optionally specify server:port
-u: User used to connect to the servers
-p: Password of the user being used to connect
-sg: If specified, it uses the server specified in -x and gets a list of the servers in the group from there and gets the stats for all servers in the group
-a: Number of hours to count someone as Active within, defaults to 1 if not specified
-csv: Provides alternate display for use in scripting
With csv output, you can specify which Application you want to provide output for (i.e. -sa “BMC:Change Mgmt”, if not specified, it defaults to “AR Server”
Column headers are Date/Time, [Total for each node specified to connect to], [If multiple, number of Unique users,] Active, Fixed, Float(W), Float(R), Read
You can just put these headings at the the top of your output log
-splunk Provides parameter=value type output for all of the results which is very compatible with splunk log reading
-v Verbose, this provides details of all users and their licenses instead of just counts
-d Provides debug output as collected from the servers for Users and license details

java -jar APLUserCount.jar -u Demo -p password -x server1 -x server2 >> output.log 2>&1
java -jar APLUserCount.jar -u Demo -p password -x server1:1234,server2:1234 >> output.log 2>&1
java -jar APLUserCount.jar -u Demo -p password -x server1:1234 -sg >> output.log 2>&1

Version History

4.5 – October 14th 2020

  • Cleaned up the output so that it’s appropriate for -csv and -splunk outputs

4.4 – February 19 2020

  • Removed -t parameter, opting instead to use server:port nomenclature
  • Added -sg parameter, allowing you to use it against a server group and only specify a single server
  • Modified -x parameter to accept multiple , separated server names/ports

4.3 – March 28 2019

  • Updated the debug output to include which server the record is coming out of to more easily identify duplicates

4.2 – May 9th 2018

  • Added support for floating license pools for applications
  • Fixed a bug where Float Read was being listed as being in the pool

4.1 – January 26th 2018

  • A code fix for some issues that came up regarding floating license pools

4.0 – October 6th 2017

  • A virtual re-write of most of the internal code to take advantage of better understanding of Java and underlying principals

3.6 – September 4th 2017

  • Updated program so that it no longer terminates on error, allowing it to still function in server group situations where one or more servers are down

3.5 – November 8th 2016

  • Enhanced error messages
  • Updated example batch file to better capture errors

3.4 – August 1st 2016

  • Found bug in Remedy server group that sometimes has the same user as Floating Read on one server and Floating Write on another, in that scenario, this tool will always report as Floating Write if it’s found that way on at least one server

3.3 – August 1st 2016

  • Fixed nullPointerException when using csv output

3.2 – July 29th 2016

  • Fixed bug introduced with 3.1 related to not capturing the other applications

3.1 – July 28th 2016

  • Fixed bug that caused inaccurate accounting of Read licenses
  • Extended the -sa command line to only show that application for all outputs, in 3.0 it was only relevant to the -csv output

3.0 – July 27th 2016

  • Added the ability to capture more than just AR Server licenses, now captures all license details
  • Added new -sa (Specified Application) to the -csv output. because of the limited control of information in the CSV format, if you want that output to specify something  other than AR Server you can specify which application you want, but csv will only report on a single application at a time, verbose, splunk, and un-altered will report  license info for all applications if wanting to get multiple applications for csv format, run it multiple times with different output redirection files, one for each application

2.0.4 – February 4th 2016

  • Added the Max count to Floating License Pool data, so when it shows you the count of how many users are using what float pool, it’ll tell you out of how many

2.0.3 – January 11th 2015

  • Fixed problem connecting to servers that don’t use Port Mapper

2.0.2 – November 24th 2014

  • Reconfigured some of the error handling to capture the error and report it cleanly

2.0.1 – November 24th 2014

  • Recompiled using Java 1.6 for better backwards compatibility

2.0 – August 8th 2014

  • Changed -cl command line to -csv, -cl still works, but it won’t be documented anywhere any more 🙂
  • Added a -splunk command line parameter, this provides output that is friendly to splunk for use with that tool (
  • Added a -v (verbose) command line parameter, that instead of giving you counts, provides you details of the users and their licenses
  • Added ‘Floating License Pool’ information. This output is available in all modes except -csv, as I couldn’t find a good way to present the data

1.0 – June 7th 2014

  • Initial public release

Leave a comment

Your email address will not be published. Required fields are marked *

13 thoughts on “User Count

  • Jean-Francois Houle

    Hi LJ,

    Would you mind sharing (or PM) your source code? I would like to run this on Linux and I would need to adapt it since it’s not working as is.

    Hope you don’t mind.
    Best regards

  • Jean-Francois Houle

    This would be extremely useful for us since we have 12 ARS instances on 4 different physical servers spread out on two geo-redundant locations.

    Thank you again

  • jyothi

    HI LJ

    I am getting this error

    C:\com\apl>java -cp .\lib\APLUserCount.jar;.\libarapi81_build001.jar;.\lib\log4j
    -1.2.14.jar com.apl.APLUserCount -u XXXX -p XXXX -x Server1 > output1.log
    Exception in thread “main” java.lang.UnsupportedClassVersionError: com/apl/APLUs
    erCount : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at Source)
    at Source)
    at$000(Unknown Source)
    at$ Source)
    at Method)
    at Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: com.apl.APLUserCount. Program will exit.

    Is this something to do with Java vesion .

    C:\com\apl>java -version
    java version “1.6.0_45”
    Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

    Can you help us in running this properly..


  • Ron Kuschmider

    When I run this in Task scheduler, every time it is run (with csv output) I get the following two lines plus a blank line before the actual output. Is there anyway to omit this information on each run so I can track license count over say 24 hours?
    A Programming Legacy –
    APLUserCount v4.3

    (Blank line above)

    • LJ LongWing Post author

      I checked the 4.4 and it wasn’t putting that stuff in there, but with the changes I made in 4.4, it was putting OTHER things in the output that you wouldn’t have wanted. I’ve updated the code in 4.5 so that -csv and -splunk outputs provide nothing other than the stuff you are going to be appending to your csv file 🙂