Solved

how to verify number of Crystal Report license sessions

Posted on 2012-04-10
6
1,683 Views
Last Modified: 2013-05-21
Hi

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)?


crystalLicenseMonitor.exe.config:
==========================
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <!--millsecond-->
    <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" />    
  </appSettings>
  <system.diagnostics>
    <sources>
      <!-- This section defines the logging configuration for My.Application.Log -->
      <source name="DefaultSource" switchName="DefaultSwitch">
        <listeners>
          <add name="FileLog"/>
          <!-- Uncomment the below section to write to the Application Event Log -->
          <!--<add name="EventLog"/>-->
        </listeners>
      </source>
    </sources>
    <switches>
      <add name="DefaultSwitch" value="Information" />
    </switches>
    <sharedListeners>
      <add name="FileLog"
           type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0,

Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
           initializeData="FileLogWriter"/>
      <!-- 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"/> -->
    </sharedListeners>
  </system.diagnostics>
</configuration>


======== 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
do
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
Rem
sc start "all the above in any sequence"
endif


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
0
Comment
Question by:sunhux
  • 3
  • 2
6 Comments
 

Author Comment

by:sunhux
ID: 37827552
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:
  http://www.speedguide.net/port.php?port=6400
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
ID: 37828795
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.

mlmcc
0
 

Author Comment

by:sunhux
ID: 37830750
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?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 37830966
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.

mlmcc
0
 

Author Comment

by:sunhux
ID: 37838278
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
0
 

Expert Comment

by:sharepoint875
ID: 39185375
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"
else
      GetNLicensed = nLicensed
end if
end function

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

%>

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>RDC Runtime License Status</TITLE>
</HEAD>
<BODY>
<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
width="75%">
 
  <TR>
    <TD align=middle><FONT face="Courier New"
      size=2><STRONG>Server Activity</STRONG></FONT></TD>
    <TD align=middle><FONT face="Courier New"
      size=2>Licenced</FONT></TD>
    <TD align=middle><FONT face="Courier New"
      size=2>Active</FONT></TD></TR>
  <TR>
    <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>
<P>&nbsp;</P>
</BODY>
</HTML>
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now