Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Track license usage

4 REPLIES 4
Reply
Message 1 of 5
Carl_mgfx
599 Views, 4 Replies

Track license usage

Hi all

 

I have been doing a lot of reading when it comes to Vault and licensing, but I have not found a solution to my problem.

 

The situation is as follows:

 

We have 18 designers and 25 Vault Pro licenses, this leaves 7 "floating" licenses for use around the plant.

 

The problem comes in when more than 7 users around the plant pull vault licenses, leaving designers without licenses and resulting in the loss of work in the design office.

 

Is there a way to track the use of the Vault licenses?  I know the Vault log can be viewed but this takes too long to pin point who has licenses at any given time.  Is there a program similar to Sam report, JTB FlexReport or OpenLM that can track the Vault license usage, or read from the Vaults log file and give an easy to understand output?

 

Is there a way to reserve Vault licenses for a set group of users?  I already know that the NLM options file doesn't work, but is there something similar for Vault licensing?  Or should Vault be setup in a different way to accomodate for this?

 

Any input will be greatly appreciated!


Kind Regards
Carl van Rooyen
Application Engineer

Inventor 2019, Vault 2019,
HP ZBook 15u G4, Win 10 64Bit (ver 1709), i7-7500U, 16 GB Ram
Intel HD Graphics 620 with AMD Firepro W4190M
4 REPLIES 4
Message 2 of 5
eric.mathews
in reply to: Carl_mgfx

Carl,

       I had to write my own program to read the log file and report the current users.

Message 3 of 5
Carl_mgfx
in reply to: Carl_mgfx

Thats what I'm starting to realise.

 

Did it take long to get something useable?  We are thinking of taking that route.


Kind Regards
Carl van Rooyen
Application Engineer

Inventor 2019, Vault 2019,
HP ZBook 15u G4, Win 10 64Bit (ver 1709), i7-7500U, 16 GB Ram
Intel HD Graphics 620 with AMD Firepro W4190M
Message 4 of 5
eric.mathews
in reply to: Carl_mgfx

The following works for most instances. It's something I had to throw together quickly because the licensing abuse was rampant.

 

HelpRichTextBox.Clear()
        Dim _completeList As New List(Of String)

        Dim I As Integer
        Dim _line As String = Nothing
        Dim _lineTot As Integer
        Dim _lineList As New List(Of String)
        Dim _loggedInList As New List(Of String)
        Dim _loggedOutList As New List(Of String)
        Dim _tempList As New List(Of String)
        Dim _userName As String = String.Empty
        Dim _userId As String = String.Empty

        ' Get the log text file.
        With OpenFileDialog1
            .InitialDirectory = "C:\"
            .Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
            .FilterIndex = 2
            .RestoreDirectory = True

            If .ShowDialog = Windows.Forms.DialogResult.OK Then
                Try
                    ' Get the total number of lines
                    Dim _lineTotal As Integer = GetNumberOfLines(.FileName)
                    _lineTot = _lineTotal

                    Dim _buffer As Array = File.ReadAllLines(.FileName)

                    For I = 1 To _lineTotal - 1
                        _line = _buffer(I)
                        If _line.Contains("Acquired license") Then
                            _lineList.Add(_line)
                        ElseIf _line.Contains("Releasing license") Then
                            _lineList.Add(_line)
                        ElseIf _line.Contains("Releasing inactive license") Then
                            _lineList.Add(_line)
                        End If
                    Next I

                    For I = 0 To _lineList.Count - 1
                        _userId = _lineList(I).Substring(_lineList(I).IndexOf("userId("))

                        If _lineList(I).Contains("username(") Then
                            _userName = _lineList(I).Substring(_lineList(I).IndexOf("username("))
                        End If

                        If _loggedInList.Contains(_userName) Then Continue For
                        If _loggedOutList.Contains(_userName) Then Continue For

                        ' Get a list the current user name.
                        _tempList = _lineList.FindAll(Function(S As String) S.Contains(_userId))

                        ' Add current user to either the logged in or logged out list based upon the last item in the _tempList.
                        If _tempList.Last.Contains("Releasing license") Or _tempList.Last.Contains("Releasing inactive license") Then
                            _loggedOutList.Add(_userName)
                        Else
                            If _loggedInList.Contains(_userName) = False Then
                                _loggedInList.Add(_userName)
                                _completeList.Add(_tempList.Last & " {" & _tempList.Count & "}")
                            End If
                        End If
                    Next I
                Catch ex As Exception
                    MessageBox.Show("Cannot read file from disk. Original error: " & ex.Message)
                Finally
                    HelpRichTextBox.AppendText("Total Licenses: " & _completeList.Count & vbCr & vbCr)
                    For I = 0 To _completeList.Count - 1
                        HelpRichTextBox.AppendText(_completeList(I) & vbCr)
                    Next
                    UpdateStatusStrip("Finished auditing the liceneses.")
                End Try
            End If
        End With

 

Message 5 of 5
minkd
in reply to: eric.mathews

FYI - that program doesn't take into account a server restart, after which there are no licenses out. The vlog entry written when the server is starting up indicates that licensing is initialized.

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report