libvirt_domain_get_job_info Extract information about progress of a background job on a domain. Will return an error if the domain is not active.
&reftitle.description; array libvirt_domain_get_job_info resource domain

Extract information about progress of a background job on a domain. Will return an error if the domain is not active. For exact description of returned values see original documentation.

Libvirt version

. This function has been added to Libvirt in version 0.7.7. You need this or newer version of Libvirt to be able to use this function..

Warning

. This function returns values that may be bigger than 32bit integer limit. Please read this note for more details.

&reftitle.parameters;

domain

  Domain resource of domain to get job information of

&reftitle.returnvalues;

Associative array on success and &false; on failure.

&reftitle.examples;

`libvirt_domain_get_job_info` example

Get info about live migration of domain.

    <?php
        $dom=@libvirt_domain_lookup_by_name($conn,"f13_exper");
        if ($dom==false)
        {
           echo ("Domain not found\n");
           echo ("Libvirt last error: ".libvirt_get_last_error()."\n");
           exit;
        }
        echo ("Domain found\n");
        echo ("Getting job info for the domain\n");
        $info=libvirt_domain_get_job_info($dom);

    ?>

&example.outputs.similar;

    Domain found
    Getting job info for the domain
    Array
    (
        [type] => 2
        [time_elapsed] => 24036
        [time_remaining] => 0
        [data_total] => 554041344
        [data_processed] => 244097024
        [data_remaining] => 313507840
        [mem_total] => 554041344
        [mem_processed] => 244097024
        [mem_remaining] => 313507840
        [file_total] => 0
        [file_processed] => 0
        [file_remaining] => 0
    )

&reftitle.seealso;

- `libvirt_domain_migrate`
- `libvirt_domain_migrate_to_uri2`
- `libvirt_domain_migrate_to_uri`