how to verify number of Crystal Report license sessions


I need to monitor the current number of Crystal report (licensed )
session via a script & if this number of session hit 17, I'll restart
(using another script, see further below) Crystal report services.

Increasing the Crystal licence is not an option.

Anyone knows what's the TCP destination port number when a
user runs Crystal report generation?

Our licence is 18 & when this limit of concurrent sessions is hit,
users' report generation will fail (though I've never been able
to get from the users what's the error message)

From the config file below, I noticed that the executable utility
crystalLicenseMonitor.exe could do this but this utility runs only
once every 5-10 minutes & is quite slow to report.

On Crystal Management console (browser-based), I would click
"Home", Metrics & see "Concurrent Logged On" to verify this
& I suppose this is reported by crystalLicenseMonitor.exe.

Is there any way to check this at Windows command prompt, say,
using "netstat -an | find/i "TCP_port#" or any other commands
(say 'sc queryex' or the likes)?

<?xml version="1.0" encoding="utf-8" ?>
    <add key ="Institutions" value="DC1 and DC2" />  
    <add key ="Interval" value="300000" />  <!--Time interval is 5 mins,300000-->
    <add key ="SMSSwitch" value="8"/>
    <add key ="ServiceSwitch" value="100"/>
    <add key ="SMSContent" value=">=8"/>
    <add key ="LOG_FILE_DIR" value="D:\SCN\SSS_MonitorCrystalLicense_DC2\bin" />
    <!-- Crystal Enterprise Logon -->
    <add key="CE_SERVERNAME" value="SSSDC2prn001" />
    <add key="CE_ADMIN_USERNAME" value="Administrator" />
    <add key="CE_ADMIN_PASSWORD" value="passwordXX" />
    <add key="CE_AUTHENTICATION_TYPE" value="secEnterprise" />

    <add key="SMS" value="True"/>
    <!--add key="SMSNumber" value="99998888:99998887:99998886:99998885" -->
    <add key="SMSNumber" value="99998888:99998887:99998886:99998885:98989898:90008989" />
    <add key="SMSPort" value ="COM1" />    
      <!-- This section defines the logging configuration for My.Application.Log -->
      <source name="DefaultSource" switchName="DefaultSwitch">
          <add name="FileLog"/>
          <!-- Uncomment the below section to write to the Application Event Log -->
          <!--<add name="EventLog"/>-->
      <add name="DefaultSwitch" value="Information" />
      <add name="FileLog"
           type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=,

Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
      <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to

the Application Event Log -->
      <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener"

initializeData="APPLICATION_NAME"/> -->

======== script to restart if # of Crystal sessions hit 17 ============
REM netstat -ano | find/i "9180" | find/i ":4568" | find/V "ESTAB"
if 'number_of_sessions >= 17' then
sc stop "CacheServer" = Crystal Cache Server
sc stop "CrystalMS" = Crystal Management Server : stop 1st
sc stop "CrystalInputFileServer" - skip as takes too long to restart
sc stop "CrystalOutputFileServer" - skip as takes too long
sc stop "JobServer_Report" - Cryst Rp Job Svr : this is the licence session?
sc stop "pageserver" = Crystal Page Svr
sc stop "WebCompServer" = Cryst Web Component Svr
sc start "all the above in any sequence"

We don't really have that many users logged on, just that we believe
some sessions were not dropped, resulting in the licence utilized
exceeding the licensed limit.  

Any suggestions are most welcome
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sunhuxAuthor Commented:
I also found that there's a screen to detect the cms port# to get the
number of sessions as given below but somehow Tcp 6400 doesn't
appear to be the port used in our environment's Crystal report:
How did you arrive at 18 as the limit?

Licenses and connections are usually bundled in groups of 5.

It would be better to figure out why connections are not being released.

sunhuxAuthor Commented:
I'm not familiar with Crystal report & just joined that team &
was told that when the concurrent licence sessions hit 18, users
can't generate reports.

Ok, I will appreciate if you can provide a fix to solve or if this is
not possible, then the next best option is to monitor the # of
sessions & restart those services.  Any idea?
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

WHat tools are you using to run the reports?

Did your team write the applications or do you have commercial report viewing tools?
If commercial which ones?

I am aware of tools that only use a session or connection for as long as it takes to read the data and then the session or connection is freed.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sunhuxAuthor Commented:
I'll go down to the site tomorrow to find out what's that
tool but I recall it's just a browser session which I login
to some sort of Crystal report management page

I'll get the html source code of that page : maybe it
will help & give a clue on how it obtain the number of
licenced sessions
mlmcc is correct. Concurrent licenses are sold in batches of 5 as far as I know. We have a web page to monitor licenses on each of our web servers.

Response.ExpiresAbsolute = now()-1
dim oApp
dim nLicensed
dim nActive
dim bIsActive
Set oApp = Server.CreateObject("CrystalRuntime.Application")
bIsActive = oApp.GetLicenseStatus (nLicensed, nActive)
set oApp = nothing

Function GetNLicensed
if nLicensed = 2147483647 then
      GetNLicensed = "Unlimited"
      GetNLicensed = nLicensed
end if
end function

Function GetNActive
if bIsActive = True then
      GetNActive = nActive-1
      GetNActive = nActive
end if
end function


<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>RDC Runtime License Status</TITLE>
<P align=center><STRONG><FONT size=4 face="Courier New">RDC Runtime License Status
</FONT></STRONG>     </P>
<TABLE align=center border=1 borderColor=blue cellPadding=1 cellSpacing=1
    <TD align=middle><FONT face="Courier New"
      size=2><STRONG>Server Activity</STRONG></FONT></TD>
    <TD align=middle><FONT face="Courier New"
    <TD align=middle><FONT face="Courier New"
    <TD align=middle><FONT face="Courier New"
      size=2><STRONG>Concurrent Users</STRONG></FONT></TD>
    <TD align=middle><FONT face="Courier New"
      size=2 color=red><%=GetNLicensed%></TD>
    <TD align=middle><FONT face="Courier New"
      size=2 color=red><%=GetNActive%></TD></TR></TABLE>
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.