Highlighted
Absent Member.
Absent Member.
2589 views

Concurrent License availability data

Jump to solution

Hello,

Is there any way to get a report or graph of our concurrent license availability/usage.  If not there is not report/graph is this data stored anywhere even in logs that I could try to ETL for a report. 

We are looking at licensing and we would like know how often we have available licenses. 

Brian

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

>>can I get to that data programmatically?

yes, you can write a small (java or c#) sdk script

take a look at the api's

/**

* Gets information about the licenses registered on this server.

*

* @return Information about the licenses registered on this server, or null

*         if the license information is not available.

*

* @see License

*/

public ServerAdministration.License ServerAdministration::getLicenseInformation() {

/**

* Gets the number of fixed (named-user) licenses currently available on

* the server.

*

* @return The number of fixed (named-user) licenses currently available

*         on the server.

*/

public int ServerAdministration.License::getAvailableFixedLicenses() {

/**

* Gets the number of floating (concurrent) licenses currently available

* on the server.

*

* @return The number of floating (concurrent) licenses currently

*         available on the server.

*/

public int ServerAdministration.License::getAvailableFloatingLicenses() {

etc...

in conjunction with

/**

* Determines whether this User has a fixed ( named-User ) license or a

* floating ( concurrent ) license.

*

* @return True if this User has a fixed ( named-User ) license; false if

*         this User has a floating ( concurrent ) license. Note that if the

*         StarTeam Server does not support floating licenses, then every

*         User has a fixed license.

* @see ServerAdministration.License#getAvailableFixedLicenses()

* @see ServerAdministration.License#getAvailableFloatingLicenses()

* @see ServerAdministration.License#getTotalFixedLicenses()

*/

public boolean User::getHasFixedLicense() {

take care

anil

View solution in original post

0 Likes
8 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

hi brian,

you could parse the server log to get an idea of who's logging in and out.

the server log is accessible in the server configuration folder and it's named server.en-US.log

you'll find repetitive entries of this nature

Client: ArtifactCacheTest.testTracesForAMovedItem; SDK 14.0.4.85; Java HotSpot(TM) 64-Bit Server VM, Oracle Corporation, 25.66-b18; Windows 7

79        00000001  2016-01-07 14:23:09  User Administrator logged on connection from workstation OOH-AnilP1 (CID:3534212486).

80        00000001  2016-01-07 14:27:38  User Administrator logged off connection from workstation OOH-AnilP1 (CID:3534212486).

81        00000001  2016-01-07 14:27:38  User Administrator logged off connection from workstation OOH-AnilP1 (CID:1454307061).

82        00000001  2016-01-07 14:27:41  User Administrator logged off connection from workstation OOH-AnilP1 (CID:2661535270).

shouldn;t be too hard to parse, i'd imagine.

0 Likes
Highlighted
Absent Member.
Absent Member.

Anil

Once parsed I would need to then reference this data against the user list to see if that user has a named or concurrent license.   From there would need to track their log on and off times to see how many concurrent licenses are available at a particular time.   Seems do-able but for sure not ideal.  

I am guessing that StarTeam is not storing concurrent license available at all, other then real time availability.  

Perplexing to me that StarTeam would not have this feature as it is hard to justify needed more concurrently licenses, when there is no data to back up claims than we are running out licenses a lot.  Or in our case, we have idle licenses all the time let's back off a license or two.  

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

I don;t disagree with your assessment. 🙂

You should raise an enhancement request

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

fwiw, i believe tech support already has a tool that parses the server log, and makes an attempt to analyze the number of users logged in over a period of time. i'd suggest getting in touch with david mcleish and andrew thomspon. they'll definitely provide you with the tool, and we can go from there, see if it needs to be beefed up a bit.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Hello Brian,

Within the StarTeam Server Administration tool (under Accounts | User Manager) there is a simplified 'license usage' display.

Admittedly it is not a 'report' in that it only reports current usage of licenses.

For example, it may state "0 of 10 named user licenses are available; 5 of 5 concurrent licenses are available" which means that you have 10 Named license (currently all assigned to different users), and there are 5 out of 5 Concurrent licenses available for use.

The 'concurrent' count will reduce as each user (with a concurrent license) logs in and consumes a license.

Also, just going back to what Anil explained, you would need to log in to the StarTeam Configuration/Project and from there (assuming sufficient access rights) able to determine the type of license each user has, by parsing the log file (which can be loaded directly via the SDK) and looking-up each user in turn.

By parsing the log file directly from the text file on disk you would not have access to the user information unfortunately.

If you are able to log a Support Incident (referencing this forum post) you could request an (unsupported as yet) application that has been developed to do just this. It can parse the log files directly, or by logging into StarTeam (as an Administrator) you can parse (in real-time) the log and also determine the type of license each user is using.

0 Likes
Highlighted
Absent Member.
Absent Member.

Andrew,

Thanks for the info, I do know about the real time available license status.  I was looking for a trending report much like ClearCase and Rational Team Concert where I can see over time where and when my licenses are in use and if there is any time of blocking going on.  This way I can figure just how many licenses we need.  

No worries, I'll have to take a different path.  

The real time concurrent license availability data shown in the Server Admin tool, can I get to that data programmatically?  If so, I could quickly write an app to ping every 5 minutes to load the count in a Database than report on that after a few days of running.  

Again thanks for you input.

Brian

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

>>can I get to that data programmatically?

yes, you can write a small (java or c#) sdk script

take a look at the api's

/**

* Gets information about the licenses registered on this server.

*

* @return Information about the licenses registered on this server, or null

*         if the license information is not available.

*

* @see License

*/

public ServerAdministration.License ServerAdministration::getLicenseInformation() {

/**

* Gets the number of fixed (named-user) licenses currently available on

* the server.

*

* @return The number of fixed (named-user) licenses currently available

*         on the server.

*/

public int ServerAdministration.License::getAvailableFixedLicenses() {

/**

* Gets the number of floating (concurrent) licenses currently available

* on the server.

*

* @return The number of floating (concurrent) licenses currently

*         available on the server.

*/

public int ServerAdministration.License::getAvailableFloatingLicenses() {

etc...

in conjunction with

/**

* Determines whether this User has a fixed ( named-User ) license or a

* floating ( concurrent ) license.

*

* @return True if this User has a fixed ( named-User ) license; false if

*         this User has a floating ( concurrent ) license. Note that if the

*         StarTeam Server does not support floating licenses, then every

*         User has a fixed license.

* @see ServerAdministration.License#getAvailableFixedLicenses()

* @see ServerAdministration.License#getAvailableFloatingLicenses()

* @see ServerAdministration.License#getTotalFixedLicenses()

*/

public boolean User::getHasFixedLicense() {

take care

anil

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Hello Brian,

Now sure if you have already completed this task, but the code below is an example you could use to query and output to a tab delimited text file the StarTeam License information. Please feel free to use/modify as you wish.

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.PrintWriter;

import java.util.Timer;

import java.util.TimerTask;

import com.starteam.Server;

import com.starteam.ServerAdministration.License;

import com.starteam.util.DateTime;

public class STLicenseReport extends TimerTask {

private static String serverName = "STSERVERNAME";

static int port = 49201;

static String userName = "Administrator";

static String password = "Administrator";

static Server serv = null;

private static String m_outputFile = "C:\\temp\\analyzed.txt";

int named_tot;

int conc_tot;

int named_avail;

int conc_avail;

public static void main(String[] args) throws IOException {

Timer myTimer = new Timer();

myTimer.scheduleAtFixedRate(new STLicenseReport(), 0, 500);

}

private static void logon() {

serv = new Server(serverName, port);

serv.logOn(userName, password);

}

private static void logoff() {

try {

serv.disconnect();

} catch (Exception e) { }

}

private void writeResults() throws FileNotFoundException {

DateTime now = new DateTime();

java.io.PrintWriter pw = new PrintWriter(new FileOutputStream(m_outputFile,  true));

pw.println(now + "\t" + named_tot + "\t" + named_avail + "\t" + conc_tot + "\t" + conc_avail);

System.out.println(now + "\t" + named_tot + "\t" + named_avail + "\t" + conc_tot + "\t" + conc_avail);

pw.flush();

if (pw != null)

pw.close();

}

@Override

public void run() {

logon();

License li = serv.getAdministration().getLicenseInformation();

named_tot = li.getTotalFixedLicenses();

conc_tot = li.getTotalFloatingLicenses();

named_avail = li.getAvailableFixedLicenses();

conc_avail = li.getAvailableFloatingLicenses();

try {

writeResults();

} catch (Exception e) { System.out.println(e.getMessage());}

logoff();

}

}

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.