get the number of defined domains

libvirt_get_hostname
libvirt_get_last_error
Libvirt Functions
PHP Manual

# libvirt_get_inactive_domain_count

(php-libvirt 0.1)

libvirt_get_inactive_domain_count — get the number of defined domains

### Description

Integer libvirt_get_inactive_domain_count ( resource `$connection` )

Provides the number of defined but inactive domains.

### Parameters

`connection`

  Connection resource of hypervisor.

### Return Values

Number of defined but inactive domains.

### Examples

Example #1 libvirt_get_domain_count(),libvirt_get_active_domain_count() and libvirt_get_inactive_domain_count() example

Get count of all, active and inactive domains.

`<?php
echo ("Domain count: Active ".libvirt_get_active_domain_count($conn).",Inactive ".libvirt_get_inactive_domain_count($conn).", Total ".libvirt_get_domain_count($conn)."\n");
?>`

The above example will output something similar to:

    Domain count: Active 1,Inactive 6, Total 7

### See Also

- libvirt_get_active_domain_count() - Get the number of active domains.
- libvirt_get_domain_count() - Get the number of all domains

libvirt_get_hostname
libvirt_get_last_error
Libvirt Functions
PHP Manual