Hi All,
Does anyone know how I can check the license usage on NAV 2013R2 service. We have multiple service tiers , and we have some issues with certain users getting license issues.
When we check the "Active Session" table, it seems to be less sessions than the license . Job Queue is running - so its possible that some jobs are taking sessions at the exact time etc.
My question is how do I count the [Active Session] table to get "licenses used" ?
Read this...
http://mibuso.com/blogs/kine/2015/04/30 ... -counting/ and makes sense...but I want to find out the count of licenses used rather:
I am "guessing" that it may be 1 per user per client type per client host name ? or is it per username ?
Also.. is there a counter that we can query somehow ? Looked in perfmon.... I can see active session... but that mathces the [Active Session] table... and can have more than the license count.
Any tips would be appreciated.
Thanks,
Steve
Comments
Client types that do not consume licenses
A few client types do not consume licenses (anymore). For instance the service account starting a NST does not consume a license for it's own session. Neither for NAS services, even if the NAS is executing jobs from the jobqueue. Background processes do not consume licenses too. You get the idea.
Client types that do consume licenses
A few client types do consume licenses. For instance the Windows RTC, Web RTC, Tablet client, SOAP/ODATA calls, etc. A license will be consumed if an unique user makes a connection with NAV with one of the above client types. If this user on the other hand makes another connection with NAV with the same or an other client type, this won't consume another license. NAV counts unique users.
Example
For example if one user starts an session with a windows RTC client from a desktop machine, a session from his tablet with the app and start a job manually (creates a background process) the user will still consume 1 license.
What i do not understand from your post is that you say that you see less sessions in the active session overview than licenses available in the license and that you've issues with it... that is something I haven't seen before.
Query to view current consumed licenses
With the following query you can view the current consumed licenses. I'm not sure if it's waterproof, I just wrote it and did not test it. Feedback is welcome.
/*
Current consumed licenses NAV 2016
Client Types:
0 = Windows RTC
1 = Sharepoint Client
2 = Webservices (SOAP & ODATA)
3 = Client Service
4 = NAV application service (NAS)
5 = Background
6 = Management Client
7 = Web RTC
8 = Unknown
9 = Tablet RTC
10 = Desktop RTC
*/
SELECT COUNT(DISTINCT [User ID]) AS 'Current consumed licenses'
FROM [dbo].[Active Session]
WHERE [Client Type] IN (0,1,2,7,9,10)
I'm using powersheel, but I don't have 100% sure if its correct.
the $countType
cls
$tenants = Get-NAVTenant -ServerInstance dynamicsnav90
$totalSessions=0
$counters = New-Object System.Collections.Hashtable
$countType = New-Object System.Collections.Hashtable
foreach ($tenant in $tenants)
{
$sessions =Get-NAVServerSession -ServerInstance dynamicsnav90 -Tenant $tenant.Id
foreach ($session in $sessions)
{
$counters[$session.UserID]++
$totalSessions+=1
$countType[$session.ClientType]++
Write-Host ("{0}`t{1}`t{2}" -f $tenant.Id,$session.UserID,$session.ClientType)
}
}
Write-Host ("Total Sessions`t {0}" -f $totalSessions )
$counters| Format-Table
$countType | Format-Table
xStepa
Note that if the amount of consumed limited user licenses exceeds the amount of limited users in your NAV license, then you have to subtract the difference from the limited user count and add it to the full user count.
I haven't tested the query thoroughly, so feedback from anyone using this is welcome.