A new command to get detailed information about licenses

It’s sometimes helpful to monitor 4D licenses on your server. That’s why with 4D v19 R4, we decided to provide you with a new command giving all the information about your license usage: Get License Usage. Let me introduce you to this new tool.

Get License Usage is a brand new command available in v19R4. It gives a list of all the 4D Client licenses used on your server with a lot of information on each of them. Here is an example of the result of this command on a server with a single user:

[
  {
    "token":1,
    "reason":"CLIENT",
    "time":"2021-12-01T15:36:42+01:00",
    "productId":808464441,
    "productName":"4D Client",
    "productUsedCount":1,
    "productBalance":9,
    "session":
    {
      "type":"remote",
      "userName":"DESIGNER",
      "machineName":"OPT9010",
      "systemUserName":"HenryDupont",
      "IPAddress":"192.168.1.2",
      "hostType":"windows",
      "creationDateTime":"2021-12-01T15:36+01:00",
      "state":"postponed",
      "ID":"1DB9C18F85CB2C458CEA348563969DFF",
      "persistentID":"486A2FFB26031740A0DABB5AABE18341",
      "licenseToken":1
    }
  }
]

This example gives a lot of information. First, we see that the 4D license has been retained at 15:36, thanks to the time field. And at that time, no other license was retained, as the ProductUsedCount field is equal to 1. It also gives us information about the user (HenryDupont), the machine he logged from, and its system. The token is a unique id for each retaining of licenses that we can follow across multiple calls to Get License Usage.

We have also expanded our diagnostic logs. If you activate them, you’ll see that every time a license is retained or released a line appears in the logs:

29 2021-12-14T14:40:26.191 [LICUSAGE] INFO - License 4D Client retained (current use 1) by user HenryDupont with IP 192.168.1.2 with token 1: CLIENT ()
96 2021-12-14T14:41:06.004 [LICUSAGE] INFO - License 4D Client released (current use 0) by user HenryDupont with IP 192.168.1.2 with token 1: CLIENT ()

More importantly, an error will appear if a license is refused to a user.

By getting the license usage and these extra log lines, you’ll be able to follow the license consumption on your server, optimize your usage and plan ahead for your future needs.

We hope this new command will answer your needs, and if you have any comments, feel free to share them with us on the official 4D forum.

Nicolas Brachfogel
• Product Owner & Senior Developer • Nicolas Brachfogel joined 4D in 2017 as a Senior Developer (4D Server and networking). As Product Owner to manage the release of Apple Silicon, he's in charge of writing user stories and translating them into functional specifications, as well as making sure that feature implementations meet customer needs. A graduate of the Institut Supérieur d'Informatique Appliquée (INSIA), Nicolas began his career as a software developer in 2001. Following several years coding in Java and C++, he went on to specialize in client-server development for video game companies. As a server developer/architect, he successfully worked on the server architectures of many games (Dofus Arena, Drakerz, Trivial Pursuit Go!).