SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

Tracking Asset Utilization

Solved!
Go to solution

I am reading Tracking Asset Utilization section and its example. But I cannot understand clearly.

https://www.ni.com/documentation/en/systemlink/19.6/data/tracking-asset-utilization/
The example and the description is not easy to understand, comparing to other sections.
I have several questions about it.
1. Which utilization information is collected for each utilization category (Test, Configuration, and Maintenance)?
In the Tag Viewer, there are available information of all assets, such as:
- CPU.UsePercentage
- CPU.Count
- CPU.MeanUsePercentage
- Disk.Free
- Disk.Total
- Disk.Used
- Disk.UsePercentage
- Memory.Free
- Memory.Total
- Memory.Used
- Memory.UsePercentage
2. Is the collected utilization information similar to the available information or not? If not, can I create the information myself?
3. What is the update interval of utilization information using Asset Utilization API? Can I configure?
4. Is the Asset Utilization API used only when the asset(s) performing a test or measurement task? Can I use the API when the asset(s) not performing any test or measurement task?
5. There are only 02 APIs: Start Utilization and End Utilization. Why don't it have other APIs, such as Read Utilization?

 

I am sorry if the question meanings are overlapped, but I need to divide my doubt into small questions to understand easily.

Duy Nguyen
peritec.vn
0 Kudos
Message 1 of 5
(3,413 Views)
Solution
Accepted by topic author Duy_Nguyen

Asset utilization has its own API and isn't exposed as tags like CPU, Memory and Disk.  By default, the SystemLink tray application will automatically log the system as in use when a user logs in with the category set to configuration. 

 

The SystemLink TestStand reporting plugin will automatically log the system as in use with the category set to Test while a test is running.  In addition, you can use the LabVIEW, Python or .NET API to log the start and stop of a test, measurement, or any other use.  You can also set the category to anything you want if there are others that make sense for your application.  The category and task name are useful when running reports and trying to slice and dice the data in different dimensions.

 

The utilization has a heart beat every 5 minutes to ensure the process that started the utilization hasn't died, which would mark the end of it.  It is less about the update interval and more about the start and end time that is recorded.

 

We currently don't have a LabVIEW API for retrieving the utilization information from the server, but you can use the LV HTTP primitives to retrieve the utilization for a specific asset or system from the /niapm/v1/query-asset-utilization as percentage or /niapm/v1/query-asset-utilization-history will return the raw start and stop times if you want to do your own custom processing for shifts.  Note all of the documentation for the HTTP API is linked from the help button (?) in the Asset Manager application.

 

You can also download any of the asset utilization reports (Python Notebooks) that we ship by default and customize them as you see fit and upload them back as additional reports that others can use.

Message 2 of 5
(3,358 Views)

Thanks Joshua!

 

Generally, I can understand your answer and the current situation. My current application is to access directly to Systemlink Server using any available LabVIEW API. So, about LV HTTP primitives and Python Notebooks, I need to study them later.
I still have 02 questions that I need your confirmation.

 

Asset Utilization is not exposed as tags like CPU, Memory and Disk; and currently NI doesn't have a LabVIEW API for retrieving the utilization information from the server. So, practically I cannot see any data that is collected by Asset Utilization API on Systemlink server. Is it correct?

 

Furthermore, as I see the usage data of an asset is collected after using Start Utilization API, and is stopped collecting after using End Utilization API. Is it correct?

Duy Nguyen
peritec.vn
0 Kudos
Message 3 of 5
(3,307 Views)

I added an Asset Utilization example to my github examples.

 

https://github.com/joshuaprewitt/systemlink-labview-http-examples

 

You can have multiple utilization records being published at the same time for a system.  The tray application will create a start and stop utilization from the time you log in to the tester to the time you log out.  During the same time, you can run tests that will create their own utilization records.

 

You should be able to use the example above to see what is happening and you can play around with the filters to limit the scope of what is returned.

Message 4 of 5
(3,295 Views)

Thank you so much!

I check it.

Duy Nguyen
peritec.vn
0 Kudos
Message 5 of 5
(3,286 Views)