Highlighted
Absent Member.
Absent Member.
1959 views

service manager 7.11 license utilisation reporting

Jump to solution

Hello,

I'd like to be able to see who is currently using a service manager 7 license (and how many each connected user is using).

 

I found that I could run "sm.exe -reportlic" which will report on overall license utilisation, but could not find anything more detailed than that. Is there any way to see this information?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Hmm... the "Rich Text" screwed all that up...

 

Let's try again.

 

Script Name: Status

function User(user){
 var Status = new SCFile("status")
 var getStatus = Status.doSelect(true)
 var SessionInfo=""
 var SessionCount = 0

 for (i=0;i<system.functions.lng(Status.processes);i++){
  if (Status.processes[i].user_name == user){
   SessionInfo+=Status.processes[i].user_name+" | "+Status.processes[i].starting_date+" | "+Status.processes[i].terminal_id+" | "+Status.processes[i].obsolete_2+"\n"
   SessionCount+=1
  }
 }
 if (SessionCount >0 ){
  print(SessionInfo)
  print("User "+user+" is logged on "+SessionCount+" time(s)")
 }
}

View solution in original post

6 Replies
Highlighted
Regular Contributor.
Regular Contributor.

Hi,

 

you can use  “stathistory” database table and create your own list or report.

Before, check following:

Sys Admin > Base Sys Config > Misc > Sys Info Record > Gen tab > Disable App Lic Tracking should be “unselected”.

Before version 7.11 there were some Crystal Reports templates to present licenses usage in time:

License_Usage_By_Module.rpt

License_Usage.rpt

 

Regards

Robert

 

Highlighted
Absent Member.
Absent Member.

Thankyou Robert,

that is useful info, and I'll be able to make use of it.

What I am really after, though, is to see how many concurrent sessions a given user  has. (I'm using the SOAP API and occasionally manage to exceed the max open sessions, so I want to keep an eye on a handful of users and the number of licenses they are consuming).

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Not sure if this will help you, but it's something I threw together.

 

Script Name: Status

function

 

     var getStatus = Status.doSelect(true);

     var SessionInfo="" ;

     var SessionCount = 0 ;

 

     for (i=0;i<system.functions.lng(Status.processes);i++){

          if (Status.processes[i].user_name == user){

               SessionInfo+=Status.processes[i].user_name+" | "+Status.processes[i].starting_date+" | "+Status.processes[i].terminal_id+" | "+Status.processes[i].obsolete_2+"\n" ;

               SessionCount+=1;

          }

     }

   

     if (SessionCount >0 ){

          print(SessionInfo)print("User "+user+" is logged on "+SessionCount+" time(s)")

     }

}

Run this using RAD Debugger and the user you're interested in

x $L.void=jscall("Status.User", "falcon")

 

and it will print out on screen the number of times the user falcon is logged in.

User(user){      var Status = new SCFile("status");

 

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Hmm... the "Rich Text" screwed all that up...

 

Let's try again.

 

Script Name: Status

function User(user){
 var Status = new SCFile("status")
 var getStatus = Status.doSelect(true)
 var SessionInfo=""
 var SessionCount = 0

 for (i=0;i<system.functions.lng(Status.processes);i++){
  if (Status.processes[i].user_name == user){
   SessionInfo+=Status.processes[i].user_name+" | "+Status.processes[i].starting_date+" | "+Status.processes[i].terminal_id+" | "+Status.processes[i].obsolete_2+"\n"
   SessionCount+=1
  }
 }
 if (SessionCount >0 ){
  print(SessionInfo)
  print("User "+user+" is logged on "+SessionCount+" time(s)")
 }
}

View solution in original post

Highlighted
Absent Member.
Absent Member.

I'm learning! As best I can tell, the status table is empty (and I've confirmed that the "Disable Application License Tracking" option is not checked). I think the "too hard" basket is beckoning on this one. Thanks for the responses, at least I now know where the information *should* be!

0 Likes
Highlighted
Absent Member.
Absent Member.

that was me, using a different login.

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.