System Methods

class netlab.api.SystemApiMixin
system_status_get(**kwargs)

This method allows you to query NETLAB+ system information.

Returns

Returns a system status object with the following properties:

Return type

dict

Properties

cpu_n

Number of CPUs detected by the virtual appliance.

uptime_sec

System uptime in seconds.

hostname

NETLAB+ domain name

sys_lic_exp_date

License expiration date

sys_lic_op_state

License operation stsate

sys_logins_enabled

User logins status

sys_maint_ends

Mainenance end date

sys_mode

System mode

sys_name

System name

sys_product_id

Product identifier

sys_sdn_release_date

Software distribution date

sys_sdn_release_type

Software distribution release type

sys_sdn_version

Software distribution version

sys_serial

System serial number

system_time_timezone_get(*, tz_id, **kwargs)

Match a netlab timezone id to the timezone iana.

Returns

Returns an object that represents a timezone.

Return type

dict

Properties

tz_id

The id of timezone (specific to netlab).

tz_iana

The iana identifier of the timezone.

tz_name

The name of the timezone.

tz_sort

The sort order of the timezone.

system_time_timezone_list(**kwargs)

Match a netlab timezone id to the timezone iana.

Returns

Returns an object that represents a timezone.

Return type

dict

Properties

tz_id

The id of timezone (specific to netlab).

tz_iana

The iana identifier of the timezone.

tz_name

The name of the timezone.

tz_sort

The sort order of the timezone.

system_usage_cpu(**kwargs)

This method allows you to query NETLAB+ CPU usage.

Returns

Returns an object with N+1 properties, where N is the number of CPUs. The CPUs are listed from 0 to N-1 and also includes all . They each contain an object with the following properties:

Return type

dict

Properties

gnice_pct

The percentage of time spent by the CPU or CPUs to run a niced guest.

guest_pct

The percentage of time spent by the CPU or CPUs to run a virtual processor.

idle_pct

The percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.

iowait_pct

The percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.

irq_pct

The percentage of time spent by the CPU or CPUs to service hardware interrupts.

nice_pct

The percentage of CPU utilization that occurred while executing at the user level with nice priority.

soft_pct

The percentage of time spent by the CPU or CPUs to service software interrupts.

steal_pct

The percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.

sys_pct

The percentage of CPU utilization that occurred while executing at the system level (kernel). Note that this does not include time spent servicing hardware and software interrupts.

usr_pct

The percentage of CPU utilization that occurred while executing at the user level (application).

system_usage_disk(**kwargs)

This method allows you to query NETLAB+ disk usage.

Returns

Returns an object with two properties, data and programs . They each contain an object with the following properties:

Return type

dict

Properties

avail_b

Available disk space in bytes.

total_b

Total disk space in bytes.

used_b

Used disk space in bytes.

used_pct

Disk space used as a percentage of the whole.

system_usage_memory(**kwargs)

This method allows you to query NETLAB+ memory usage.

Returns

Returns an object with a single property, ram. It contains an object with the following properties:

Return type

dict

Properties

free_b

Free memory in bytes.

total_b

Total memory in bytes.

used_b

Used memory in bytes.