![]() |
Zentitle SDK and Library
|
NSATest is a command line tool built for cross-platform testing without the need for a UI or an application. We recommend NSATest testing for you initial, quick testing. It will help you to understand how analytics is collected and give you an idea of the resources used and the time required to do so.
The NSATest is built upon the Nilm framework. When run, it will display some information about the library then proceed to
NSATest will repeatedly collect the above data points for the number of loops specified. At the end of each loop information about the time spent collecting and sending the data to Nalpeiron will be reported. Addtionally, internal resource usage of the library will be displayed.
Command | Type | Description |
---|---|---|
Auth1, Auth2, Auth3 | uint | The authentication values you picked at lib creation |
noLoops | uint | Number of times to test loop (where applicable) |
Pause1 and Pause3 | uint | in seconds For testing (pause1 is after NalpLibOpen, |
pause2 is just before NalpLibClose) | ||
ApLang | string | Specify system language |
BuildEdition | string | Specify a build edition for analytics |
BuildNumber | string | Specify a build number for analytics |
BuildVersion | string | Specify a build version for analytics |
CustomerID | uint | Last 5 digits of your customer ID number |
Description | string | Specify a descriptive string for analytics |
ExceptionCode | string | Specify an exception code for analytics |
FeatureCode | string | A feature code OR udf code OR element pool code |
PoolAmount | uint | Element pool amount |
Library | string | /path/to/library.so |
LicenseCode | string | License code |
NSALicenseStatus | string | License status for analytics collection |
ProductID number | uint | Last 5 digits of your product ID number |
Username username | string | username |
Password password | string | password |
NSAPrivacy | 0, 1 | Analytics privacy setting |
NSLCertificate | string | An activation certificate or path to |
file containing certificate | ||
NSLRegistration | string | XML fragment containing registration information |
NSAClientData | string | XML fragment containing addition client data |
NalpErrorNo | int | Nalpeiron library error number |
TransactionID | uint | Used to group analytics informatio |
CacheQLen | uint | Length in bytes of analytics cache file |
DaemonIP | string | Daemon's ip address |
DaemonPort | uint | Daemon's port number |
DaemonUser username | string | Username for daemon contact |
DaemonPass password | string | Password for daemon contact |
LogSize | uint | Max size of log file in bytes |
WorkDir | string | /workdir/path |
LogLevel | 0,1,2,3,4 | 0 is off, 4 is full debug |
LogQLen | uint | length (in number of messages) of log queue |
OfflineMode | 0, 1 | Disable or Enable offline mode |
ProxyIP | string | IP address of intervening proxy |
ProxyPort | uint | Port number of intervening proxy |
ProxyPass | string | Password for intervening proxy |
ProxyUser | string | Username for intervening proxy |
SoapThMin | uint | Min number of threads for analytics data |
SoapThMax | uint | Max number of threads for analytics data |
WorkGroup | string | Group name for WorkDir ownership |
NSAEnable | 0, 1 | Disable or Enable Analytics library (NSA) |
NSLEnable | 0, 1 | Disable or Enable Licensing library (NSL) |
./nsaTest --
Library /tmp/test30.so --
LogLevel 4 --
WorkDir /tmp --
NSAEnable 1 --
CustomerID 12345 --
productID 12345 --
NSAPrivacy 0 --
LogQLen 300 --
CacheQLen 25 --
SoapThMin 10 --
SoapThMax 10 --
LogSize 0 --
Pause1 1 --
Pause2 3 --
Pause3 10 --
noLoops 10 --
Username nalpUser --
ApLang english --
BuildEdition 5 --
NSALicenseStatus statusString --
BuildVersion buildVerString --
BuildNumber buildNumString --
FeatureCode FEAT3 --
ExceptionCode division_by_zero --
Description an_error --
NSAClientData clientDataString
Let's break some of these parameters down:
Library, LogLevel, WorkDir, NSAEnable, and NSLEnable are all standard parts of the library's intialization routines. Library specifies the location of the Nalpeiron licensing and analytics library on your system. NSLEnable and NSAEnable enable the licensing and the analytics portions of the library respectively. You can enable one or the other or both when initialization the library. WorkDir specifies the location where the library will store the files it requires to operate.
CustomerID, ProductID, and NSAPrivacy are parameters that would normally be set by or hard coded into your program. Here they are passed in as paramters.
LogQLen, LogSize, CacheQLen, SoapThMin, and SoapThMax are parameters that affect the library's internal operations. LogSize specifies the maximum size of the library's log file in bytes. When this size is reached, log file rollover commences, with no more than the most recent four log files kept. A LogSize of 0 means that the log file size is unlimited, with no log file rollover. LogQLen is the size of the library's internal queue for log messages. Log files are stored in a queue until the library can write them to disk. If the log file is full then log messages are dropped. CacheQLen set the size of the cache queue length. Analytics information is temporarily stored in a file until the system has time to transmit it to Nalpeiron. If the cache file is full, the library will drop analytics information until room becomes available. SoapThMax, SoapThMin are the minimum number and maximum number of thread available in the thread pool for connections to Nalperion. The library will tune itself and normally these values do not need to be set as the defaults are usually acceptable.
Username, ApLang, BuildEdition, NSALicenseStatus, BuildVersion, BuildNumber, FeatureCode, ExceptionCode, NSAClientData, and Description are all parameter values used by NSATest to call various functions from the NSA library.
Pause1, Pause2, and Pause3 are used to cause pauses in the NSATest program. As the program performs no other actions than opening the library, calling NSA functions and then closing the library for small numbers of loops pauses are needed. For instance, the library will transmit no analytics information to Nalpeiron until the server has been contacted and geographical location information is received back at the client. If we run a single loop without pause, it is possible that the geographical location information will not have time to return to the client. In this case, the library will write all analytics information to disk rather than transmit the information to Nalpeiron. These pauses help to alleviate the problem. Similar problems may occur with the test program for large analytics caches are sent to nalpeiron. Pause1 occurs immediately after NalpLibOpen, Pause2 occurs at the end of each loop, and Pause3 occurs just before NalpLibClose.
The first output of the program is a statement indicating that the library has been validated using the customer ID and product ID passed in on the command line. The rest is NSAStats information.
The next information output by NSATest is various library information (computerID, Analytics hostname, version information, etc). The remaining statistics are from the end of its first loop through the NSA functions. The highlights
The library continues to loop, updating and outputing information as it goes.
The binary has completed all 10 loops. Note the total number of jobs is 73. This is 10 loops of 7 NSA call per loop. An eighth call, NSASysInfo, only occurs if the system information has changed, e.g. when you call NSASysInfo it will only send information to Nalpeiron if the system information has changed since the last call. In this case, that occurs in the first loop. So 70 calls + 1 NSASysInfo + 1 Location + 1 NSASendCache.