pixiAdminGetCULStatistics
Returns the peak number of concurrent licensed users (CULs) per hour or per day since a start date, broken down by Pixi client application.
Evaluates the session snapshots in UsersLoggedIn and returns how many licence-relevant users were logged in concurrently.
Period
- If
StartDateis empty, it is set to the earliestTagof all desktop/web sessions (UserActiveSessionTypeId1 or 2). - A calendar grid is built from today back to
StartDate: one row per day and hour 0–23 ifHourly= 1, or one row per day (hour 0) ifHourly= 0.
Which sessions count
- Session type 1 (desktop) or 2 (web) with
Taglater thanStartDate. - The application (
AppName) must be registered inExeClientVersionwithLicenceNeeded= 1, and the licence manager for its session type must be enabled: settingpixiLicencesManagerfor desktop clients,pixiLicencesManagerWebfor the web client. - Computers listed in
MasterUsersand the Pixi usermasterare excluded.
Calculation
- Sessions are counted per snapshot (
Tag); one session perTag/SessionId/Pixi user. - Per hour, the maximum snapshot count is taken as
CULs. - Per day, the highest hourly value is stored as
CULsPerDayon the hour in which it was first reached. - Days without any usage get a row with
CULs= 0 andCULsPerDay= 0. - The per-application columns count the sessions of the peak snapshot of the hour, mapped by executable name (e.g.
PPOS2.exe→POS,pixi.Presentation.Web→Web).
Output
Hourly= 1: one row per day and hour;CULsPerDayis filled only in the peak hour of the day, otherwiseNULL.Hourly= 0: one row per day with the daily peak inCULsandCULsPerDay;Houris always 0.- Sorted by
Dateascending, then by the hour of the usage data.
Notes
- Read-only; all tables are read
WITH (NOLOCK), so results may include uncommitted data. - If neither
pixiLicencesManagernorpixiLicencesManagerWebis1, no sessions qualify and all values are 0. - If
UsersLoggedIncontains no qualifying sessions and noStartDateis passed, the period cannot be determined and the result is empty. - The filter
Tag > StartDateis strict: with the default start date, the very first snapshot is not counted. Dateis derived from the current date and time, so it carries the current time of day, not midnight.- The secondary sort uses the hour of the usage data, which is
NULLfor hours without usage; within a day these rows come first in undefined order. Sort byHouron the client if needed. - The per-application columns do not necessarily add up to
CULs: sessions ofRepairs.exeand of applications not in the internal mapping are counted inCULsbut have no own column. - The calendar grid relies on the helper table
Numbers; it must contain at least as many rows as days in the period. - For long periods with hourly output the result can become large (24 rows per day).
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
StartDate
|
datetime dateTime |
NULL |
Start of the evaluation period. Only sessions with a later Example: |
Hourly
|
bit boolean |
1 |
Selects hourly or daily output. Allowed values
Example: |
Response
Result set 1 · Always (empty if no start date can be determined)
Concurrent licensed user statistics per day and hour (or per day), with a breakdown by client application.
| Column | Type | Description |
|---|---|---|
Date
|
smalldatetime dateTime |
Day of the row (current date minus n days, including the current time of day). |
Hour
|
int |
Hour of the day (0–23); always 0 in daily mode. |
Day
|
int |
Day of month of |
Month
|
int |
Month of |
POS
|
int |
Sessions of |
SupplOrders
|
int |
Sessions of |
Payments
|
int |
Sessions of |
CustomerService
|
int |
Sessions of |
Shipping
|
int |
Sessions of |
Reports
|
int |
Sessions of |
Bin
|
int |
Sessions of |
Invoices
|
int |
Sessions of |
ControlCenter
|
int |
Sessions of |
Web
|
int |
Sessions of |
CULs
|
int |
Maximum number of concurrent licensed users in this hour (daily mode: daily peak); 0 without usage. |
CULsPerDay
Nullable |
int |
Daily peak of concurrent licensed users; in hourly mode only filled in the hour where the peak was first reached, otherwise NULL. 0 for days without usage. |
Response example
<SqlRowSet1>
<row>
<Date>2024-05-13T14:37:00</Date>
<Hour>9</Hour>
<Day>13</Day>
<Month>5</Month>
<POS>0</POS>
<SupplOrders>2</SupplOrders>
<Payments>1</Payments>
<CustomerService>3</CustomerService>
<Shipping>4</Shipping>
<Reports>0</Reports>
<Bin>1</Bin>
<Invoices>1</Invoices>
<ControlCenter>2</ControlCenter>
<Web>1</Web>
<CULs>15</CULs>
<CULsPerDay>15</CULsPerDay>
</row>
<row>
<Date>2024-05-13T14:37:00</Date>
<Hour>10</Hour>
<Day>13</Day>
<Month>5</Month>
<POS>0</POS>
<SupplOrders>1</SupplOrders>
<Payments>1</Payments>
<CustomerService>3</CustomerService>
<Shipping>3</Shipping>
<Reports>1</Reports>
<Bin>1</Bin>
<Invoices>0</Invoices>
<ControlCenter>1</ControlCenter>
<Web>1</Web>
<CULs>12</CULs>
</row>
</SqlRowSet1>
Examples
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiAdminGetCULStatistics>
<!-- <StartDate>2024-05-01T00:00:00</StartDate> -->
<!-- <Hourly>1</Hourly> -->
</ns1:pixiAdminGetCULStatistics>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiAdminGetCULStatistics>
<!-- <StartDate>2024-05-01T00:00:00</StartDate> -->
<!-- <Hourly>1</Hourly> -->
</ns1:pixiAdminGetCULStatistics>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'StartDate' => '2024-05-01T00:00:00',
// 'Hourly' => '1',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiAdminGetCULStatistics', $soapArguments);
Tables used
- SQL object:
- dbo.pipiAdminGetCULStatistics