Device
The /device
endpoint provides information about the usage of your devices.
Get CPU Information
GET /device/cpu
Get CUDA Information
GET /device/cuda
Example
CPU
curl -XGET http://localhost:8882/device/cpu
results = mq.get_cpu_info()
Response: 200 OK
{
'cpu_usage_percent': '1.0 %',
'memory_used_percent': '70.0 %',
'memory_used_gb': '11.2'
}
CUDA
curl -XGET http://localhost:8882/device/cuda
results = mq.get_cuda_info()
Response: 200 OK
{
'cuda_devices': [{'device_id': 0,
'device_name': 'Tesla T4',
'memory_used': '1.7 GiB',
'total_memory': '14.6 GiB'}]
}