Server Stats

From INAP Dropzone API
(Difference between revisions)
Jump to: navigation, search
(Availability)
(Availability)
 
(5 intermediate revisions by one user not shown)
Line 11: Line 11:
 
==Availability==
 
==Availability==
 
*[[servers#Dynamic Server|Dynamic Server]]
 
*[[servers#Dynamic Server|Dynamic Server]]
 +
*Cascade Virtual Machine
  
 
==Required Data Parameters==
 
==Required Data Parameters==
Line 27: Line 28:
 
* interval_length is the difference between interval_end and interval_start
 
* interval_length is the difference between interval_end and interval_start
 
* ticks is the number of raw data points from the database that were used to create the returned data point.
 
* ticks is the number of raw data points from the database that were used to create the returned data point.
 +
 +
Different performance data will be returned depending on whether the {$serverid} refers to a Dynamic Server or a VM.
 +
 +
Here is data for a Dynamic Server:
  
 
<pre>
 
<pre>
 
Array
 
Array
 
(
 
(
     [success] => true,
+
     [success] => 'true',
 
     [data] => Array
 
     [data] => Array
 
         (
 
         (
            [1365536424] => Array
 
                (
 
                    [tick_ids] => Array
 
                        (
 
                            [0] => MongoId Object
 
                                (
 
                                    [$id] => 51647107bb8d321151001331
 
                                )
 
 
                        )
 
 
                    [format] => flat1
 
                    [aggregation] => raw
 
                    [server_id] => 212981
 
                    [agent] => dom0d
 
                    [revision] => 2.20
 
                    [hypervisor] => qemu
 
                    [hypervisor_version] => 0.14.1
 
                    [uptime] => 6632966.44
 
                    [ts] => MongoDate Object
 
                        (
 
                            [sec] => 1365537023
 
                            [usec] => 0
 
                        )
 
 
                    [load1] => 0.01
 
                    [load5] => 0.04
 
                    [load15] => 0.05
 
                    [memused] => 4675804
 
                    [memfree%] => 42.82
 
                    [swapused] => 5060
 
                    [swapfree%] => 99.87
 
                    [localused] => 19881256
 
                    [localfree%] => 95.89
 
                    [disk_ios_pending] => 0
 
                    [time_user] => 28
 
                    [time_nice] => 0
 
                    [time_system] => 6
 
                    [time_idle] => 4668
 
                    [time_iowait] => 0
 
                    [time_irq] => 0
 
                    [time_softirq] => 1
 
                    [time_steal] => 0
 
                    [time_guest] => 22
 
                    [disk_reads_completed] => 0
 
                    [disk_read_sectors] => 0
 
                    [disk_read_bytes] => 0
 
                    [disk_writes_completed] => 5620
 
                    [disk_write_sectors] => 107072
 
                    [disk_write_bytes] => 54820864
 
                    [interface_public_rx_packets] => 3883
 
                    [interface_private_rx_packets] => 5625
 
                    [interface_public_rx_bytes] => 453718
 
                    [interface_private_rx_bytes] => 684193
 
                    [interface_public_rx_errors] => 0
 
                    [interface_private_rx_errors] => 0
 
                    [interface_public_rx_drop] => 0
 
                    [interface_private_rx_drop] => 19
 
                    [interface_public_tx_packets] => 4841
 
                    [interface_private_tx_packets] => 277
 
                    [interface_public_tx_bytes] => 829019
 
                    [interface_private_tx_bytes] => 70863
 
                    [interface_public_tx_errors] => 0
 
                    [interface_private_tx_errors] => 0
 
                    [interface_public_tx_drop] => 0
 
                    [interface_private_tx_drop] => 0
 
                    [last_raw_stat] => Array
 
                        (
 
                            [_id] => MongoId Object
 
                                (
 
                                    [$id] => 51647107bb8d321151001331
 
                                )
 
 
                            [format] => flat1
 
                            [aggregation] => raw
 
                            [server_id] => 212981
 
                            [ts] => MongoDate Object
 
                                (
 
                                    [sec] => 1365537023
 
                                    [usec] => 0
 
                                )
 
 
                            [agent] => dom0d
 
                            [revision] => 2.20
 
                            [hypervisor] => qemu
 
                            [hypervisor_version] => 0.14.1
 
                            [uptime] => 6632966.44
 
                            [memused] => 4675804
 
                            [memfree%] => 42.82%
 
                            [swapused] => 5060
 
                            [swapfree%] => 99.87%
 
                            [localused] => 19881256
 
                            [localfree%] => 95.89%
 
                            [load1] => 0.01
 
                            [load5] => 0.04
 
                            [load15] => 0.05
 
                            [time_total] =>
 
                            [time_user] => 260347
 
                            [time_nice] => 0
 
                            [time_system] => 154668
 
                            [time_idle] => 52637293
 
                            [time_iowait] => 10366
 
                            [time_irq] => 0
 
                            [time_softirq] => 938
 
                            [time_steal] => 0
 
                            [time_guest] => 194001
 
                            [interface_private_rx_packets] => 129737946
 
                            [interface_private_rx_bytes] => 100433650984
 
                            [interface_private_rx_errors] => 0
 
                            [interface_private_rx_drop] => 221096
 
                            [interface_private_tx_packets] => 20205229
 
                            [interface_private_tx_bytes] => 2253936869
 
                            [interface_private_tx_errors] => 0
 
                            [interface_private_tx_drop] => 0
 
                            [interface_public_rx_packets] => 9797828
 
                            [interface_public_rx_bytes] => 2674888308
 
                            [interface_public_rx_errors] => 0
 
                            [interface_public_rx_drop] => 0
 
                            [interface_public_tx_packets] => 17072742
 
                            [interface_public_tx_bytes] => 15421029873
 
                            [interface_public_tx_errors] => 0
 
                            [interface_public_tx_drop] => 0
 
                            [disk_reads_completed] => 1580095
 
                            [disk_read_sectors] => 88146023
 
                            [disk_read_bytes] => 45130763776
 
                            [disk_writes_completed] => 12983929
 
                            [disk_write_sectors] => 420948932
 
                            [disk_write_bytes] => 215525853184
 
                            [disk_ios_pending] => 0
 
                        )
 
 
                    [interval_start] => 1365536424
 
                    [interval_end] => 1365537023
 
                    [interval_length] => 599
 
                    [ticks] => 1
 
                )
 
 
            [1365537023] => Array
 
                (
 
                    [tick_ids] => Array
 
                        (
 
                            [0] => MongoId Object
 
                                (
 
                                    [$id] => 5164736f521554bd55001331
 
                                )
 
 
                        )
 
 
                    [format] => flat1
 
                    [aggregation] => raw
 
                    [server_id] => 212981
 
                    [agent] => dom0d
 
                    [revision] => 2.20
 
                    [hypervisor] => qemu
 
                    [hypervisor_version] => 0.14.1
 
                    [uptime] => 6633599.72
 
                    [ts] => MongoDate Object
 
                        (
 
                            [sec] => 1365537644
 
                            [usec] => 0
 
                        )
 
 
                    [load1] => 0
 
                    [load5] => 0.01
 
                    [load15] => 0.05
 
                    [memused] => 4677560
 
                    [memfree%] => 42.8
 
                    [swapused] => 5060
 
                    [swapfree%] => 99.87
 
                    [localused] => 19881256
 
                    [localfree%] => 95.89
 
                    [disk_ios_pending] => 0
 
                    [time_user] => 31
 
                    [time_nice] => 0
 
                    [time_system] => 7
 
                    [time_idle] => 5030
 
                    [time_iowait] => 0
 
                    [time_irq] => 0
 
                    [time_softirq] => 0
 
                    [time_steal] => 0
 
                    [time_guest] => 22
 
                    [disk_reads_completed] => 0
 
                    [disk_read_sectors] => 0
 
                    [disk_read_bytes] => 0
 
                    [disk_writes_completed] => 3195
 
                    [disk_write_sectors] => 58352
 
                    [disk_write_bytes] => 29876224
 
                    [interface_public_rx_packets] => 2052
 
                    [interface_private_rx_packets] => 5914
 
                    [interface_public_rx_bytes] => 239073
 
                    [interface_private_rx_bytes] => 723144
 
                    [interface_public_rx_errors] => 0
 
                    [interface_private_rx_errors] => 0
 
                    [interface_public_rx_drop] => 0
 
                    [interface_private_rx_drop] => 21
 
                    [interface_public_tx_packets] => 2746
 
                    [interface_private_tx_packets] => 304
 
                    [interface_public_tx_bytes] => 448019
 
                    [interface_private_tx_bytes] => 77380
 
                    [interface_public_tx_errors] => 0
 
                    [interface_private_tx_errors] => 0
 
                    [interface_public_tx_drop] => 0
 
                    [interface_private_tx_drop] => 0
 
                    [last_raw_stat] => Array
 
                        (
 
                            [_id] => MongoId Object
 
                                (
 
                                    [$id] => 5164736f521554bd55001331
 
                                )
 
 
                            [format] => flat1
 
                            [aggregation] => raw
 
                            [server_id] => 212981
 
                            [ts] => MongoDate Object
 
                                (
 
                                    [sec] => 1365537644
 
                                    [usec] => 0
 
                                )
 
 
                            [agent] => dom0d
 
                            [revision] => 2.20
 
                            [hypervisor] => qemu
 
                            [hypervisor_version] => 0.14.1
 
                            [uptime] => 6633599.72
 
                            [memused] => 4677560
 
                            [memfree%] => 42.80%
 
                            [swapused] => 5060
 
                            [swapfree%] => 99.87%
 
                            [localused] => 19881256
 
                            [localfree%] => 95.89%
 
                            [load1] => 0.00
 
                            [load5] => 0.01
 
                            [load15] => 0.05
 
                            [time_total] =>
 
                            [time_user] => 260378
 
                            [time_nice] => 0
 
                            [time_system] => 154675
 
                            [time_idle] => 52642323
 
                            [time_iowait] => 10366
 
                            [time_irq] => 0
 
                            [time_softirq] => 938
 
                            [time_steal] => 0
 
                            [time_guest] => 194023
 
                            [interface_private_rx_packets] => 129743860
 
                            [interface_private_rx_bytes] => 100434374128
 
                            [interface_private_rx_errors] => 0
 
                            [interface_private_rx_drop] => 221117
 
                            [interface_private_tx_packets] => 20205533
 
                            [interface_private_tx_bytes] => 2254014249
 
                            [interface_private_tx_errors] => 0
 
                            [interface_private_tx_drop] => 0
 
                            [interface_public_rx_packets] => 9799880
 
                            [interface_public_rx_bytes] => 2675127381
 
                            [interface_public_rx_errors] => 0
 
                            [interface_public_rx_drop] => 0
 
                            [interface_public_tx_packets] => 17075488
 
                            [interface_public_tx_bytes] => 15421477892
 
                            [interface_public_tx_errors] => 0
 
                            [interface_public_tx_drop] => 0
 
                            [disk_reads_completed] => 1580095
 
                            [disk_read_sectors] => 88146023
 
                            [disk_read_bytes] => 45130763776
 
                            [disk_writes_completed] => 12987124
 
                            [disk_write_sectors] => 421007284
 
                            [disk_write_bytes] => 215555729408
 
                            [disk_ios_pending] => 0
 
                        )
 
 
                    [interval_start] => 1365537023
 
                    [interval_end] => 1365537644
 
                    [interval_length] => 621
 
                    [ticks] => 1
 
                )
 
 
 
             [1365537644] => Array
 
             [1365537644] => Array
 
                 (
 
                 (
Line 374: Line 105:
 
                     [interface_public_tx_drop] => 0
 
                     [interface_public_tx_drop] => 0
 
                     [interface_private_tx_drop] => 0
 
                     [interface_private_tx_drop] => 0
                    [last_raw_stat] => Array
 
                        (
 
                            [_id] => MongoId Object
 
                                (
 
                                    [$id] => 516475b6bb8d32b953001331
 
                                )
 
 
                            [format] => flat1
 
                            [aggregation] => raw
 
                            [server_id] => 212981
 
                            [ts] => MongoDate Object
 
                                (
 
                                    [sec] => 1365538224
 
                                    [usec] => 0
 
                                )
 
 
                            [agent] => dom0d
 
                            [revision] => 2.20
 
                            [hypervisor] => qemu
 
                            [hypervisor_version] => 0.14.1
 
                            [uptime] => 6634187.65
 
                            [memused] => 4675832
 
                            [memfree%] => 42.82%
 
                            [swapused] => 5060
 
                            [swapfree%] => 99.87%
 
                            [localused] => 19881256
 
                            [localfree%] => 95.89%
 
                            [load1] => 0.00
 
                            [load5] => 0.01
 
                            [load15] => 0.05
 
                            [time_total] =>
 
                            [time_user] => 260397
 
                            [time_nice] => 0
 
                            [time_system] => 154680
 
                            [time_idle] => 52647002
 
                            [time_iowait] => 10366
 
                            [time_irq] => 0
 
                            [time_softirq] => 938
 
                            [time_steal] => 0
 
                            [time_guest] => 194036
 
                            [interface_private_rx_packets] => 129749427
 
                            [interface_private_rx_bytes] => 100435053443
 
                            [interface_private_rx_errors] => 0
 
                            [interface_private_rx_drop] => 221137
 
                            [interface_private_tx_packets] => 20205813
 
                            [interface_private_tx_bytes] => 2254085312
 
                            [interface_private_tx_errors] => 0
 
                            [interface_private_tx_drop] => 0
 
                            [interface_public_rx_packets] => 9799987
 
                            [interface_public_rx_bytes] => 2675146666
 
                            [interface_public_rx_errors] => 0
 
                            [interface_public_rx_drop] => 0
 
                            [interface_public_tx_packets] => 17075988
 
                            [interface_public_tx_bytes] => 15421514306
 
                            [interface_public_tx_errors] => 0
 
                            [interface_public_tx_drop] => 0
 
                            [disk_reads_completed] => 1580095
 
                            [disk_read_sectors] => 88146023
 
                            [disk_read_bytes] => 45130763776
 
                            [disk_writes_completed] => 12987460
 
                            [disk_write_sectors] => 421014772
 
                            [disk_write_bytes] => 215559563264
 
                            [disk_ios_pending] => 0
 
                        )
 
 
 
                     [interval_start] => 1365537644
 
                     [interval_start] => 1365537644
 
                     [interval_end] => 1365538224
 
                     [interval_end] => 1365538224
Line 445: Line 111:
 
                 )
 
                 )
  
            [1365538224] => Array
+
        )
                (
+
)
                    [tick_ids] => Array
+
</pre>
                        (
+
                            [0] => MongoId Object
+
                                (
+
                                    [$id] => 5164780fbb8d32cd56001331
+
                                )
+
  
                        )
 
  
                    [format] => flat1
+
And here is data for a VM:
                    [aggregation] => raw
+
                    [server_id] => 212981
+
                    [agent] => dom0d
+
                    [revision] => 2.20
+
                    [hypervisor] => qemu
+
                    [hypervisor_version] => 0.14.1
+
                    [uptime] => 6634775.44
+
                    [ts] => MongoDate Object
+
                        (
+
                            [sec] => 1365538824
+
                            [usec] => 0
+
                        )
+
  
                    [load1] => 0
+
<pre>
                    [load5] => 0.01
+
(
                    [load15] => 0.05
+
    [success] => 'true',
                    [memused] => 4676828
+
    [data] => Array
                    [memfree%] => 42.81
+
        (
                    [swapused] => 5060
+
             [1365539419] => Array
                    [swapfree%] => 99.87
+
                    [localused] => 19881256
+
                    [localfree%] => 95.89
+
                    [disk_ios_pending] => 0
+
                    [time_user] => 21
+
                    [time_nice] => 0
+
                    [time_system] => 6
+
                    [time_idle] => 4675
+
                    [time_iowait] => 0
+
                    [time_irq] => 0
+
                    [time_softirq] => 0
+
                    [time_steal] => 0
+
                    [time_guest] => 14
+
                    [disk_reads_completed] => 0
+
                    [disk_read_sectors] => 0
+
                    [disk_read_bytes] => 0
+
                    [disk_writes_completed] => 215
+
                    [disk_write_sectors] => 2165
+
                    [disk_write_bytes] => 1108480
+
                    [interface_public_rx_packets] => 2
+
                    [interface_private_rx_packets] => 5453
+
                    [interface_public_rx_bytes] => 128
+
                    [interface_private_rx_bytes] => 667558
+
                    [interface_public_rx_errors] => 0
+
                    [interface_private_rx_errors] => 0
+
                    [interface_public_rx_drop] => 0
+
                    [interface_private_rx_drop] => 19
+
                    [interface_public_tx_packets] => 354
+
                    [interface_private_tx_packets] => 275
+
                    [interface_public_tx_bytes] => 22760
+
                    [interface_private_tx_bytes] => 70771
+
                    [interface_public_tx_errors] => 0
+
                    [interface_private_tx_errors] => 0
+
                    [interface_public_tx_drop] => 0
+
                    [interface_private_tx_drop] => 0
+
                    [last_raw_stat] => Array
+
                        (
+
                            [_id] => MongoId Object
+
                                (
+
                                    [$id] => 5164780fbb8d32cd56001331
+
                                )
+
 
+
                            [format] => flat1
+
                            [aggregation] => raw
+
                            [server_id] => 212981
+
                            [ts] => MongoDate Object
+
                                (
+
                                    [sec] => 1365538824
+
                                    [usec] => 0
+
                                )
+
 
+
                            [agent] => dom0d
+
                            [revision] => 2.20
+
                            [hypervisor] => qemu
+
                            [hypervisor_version] => 0.14.1
+
                            [uptime] => 6634775.44
+
                            [memused] => 4676828
+
                            [memfree%] => 42.81%
+
                            [swapused] => 5060
+
                            [swapfree%] => 99.87%
+
                            [localused] => 19881256
+
                            [localfree%] => 95.89%
+
                            [load1] => 0.00
+
                            [load5] => 0.01
+
                            [load15] => 0.05
+
                            [time_total] =>
+
                            [time_user] => 260418
+
                            [time_nice] => 0
+
                            [time_system] => 154686
+
                            [time_idle] => 52651677
+
                            [time_iowait] => 10366
+
                            [time_irq] => 0
+
                            [time_softirq] => 938
+
                            [time_steal] => 0
+
                            [time_guest] => 194050
+
                            [interface_private_rx_packets] => 129754880
+
                            [interface_private_rx_bytes] => 100435721001
+
                            [interface_private_rx_errors] => 0
+
                            [interface_private_rx_drop] => 221156
+
                            [interface_private_tx_packets] => 20206088
+
                            [interface_private_tx_bytes] => 2254156083
+
                            [interface_private_tx_errors] => 0
+
                            [interface_private_tx_drop] => 0
+
                            [interface_public_rx_packets] => 9799989
+
                            [interface_public_rx_bytes] => 2675146794
+
                            [interface_public_rx_errors] => 0
+
                            [interface_public_rx_drop] => 0
+
                            [interface_public_tx_packets] => 17076342
+
                            [interface_public_tx_bytes] => 15421537066
+
                            [interface_public_tx_errors] => 0
+
                            [interface_public_tx_drop] => 0
+
                            [disk_reads_completed] => 1580095
+
                            [disk_read_sectors] => 88146023
+
                            [disk_read_bytes] => 45130763776
+
                            [disk_writes_completed] => 12987675
+
                            [disk_write_sectors] => 421016937
+
                            [disk_write_bytes] => 215560671744
+
                            [disk_ios_pending] => 0
+
                        )
+
 
+
                    [interval_start] => 1365538224
+
                    [interval_end] => 1365538824
+
                    [interval_length] => 600
+
                    [ticks] => 1
+
                )
+
 
+
             [1365538824] => Array
+
 
                 (
 
                 (
 
                     [tick_ids] => Array
 
                     [tick_ids] => Array
Line 588: Line 129:
 
                             [0] => MongoId Object
 
                             [0] => MongoId Object
 
                                 (
 
                                 (
                                     [$id] => 51647a67bb8d32c858001337
+
                                     [$id] => 51647cc2521554d859000e3b
 
                                 )
 
                                 )
  
Line 595: Line 136:
 
                     [format] => flat1
 
                     [format] => flat1
 
                     [aggregation] => raw
 
                     [aggregation] => raw
                     [server_id] => 212981
+
                     [vm_id] => 212960
                     [agent] => dom0d
+
                     [hostname] => cloud.quintet.ca
                    [revision] => 2.20
+
                     [uberid] => 179099
                    [hypervisor] => qemu
+
                    [hypervisor_version] => 0.14.1
+
                     [uptime] => 6635363.48
+
 
                     [ts] => MongoDate Object
 
                     [ts] => MongoDate Object
 
                         (
 
                         (
                             [sec] => 1365539426
+
                             [sec] => 1365540019
 
                             [usec] => 0
 
                             [usec] => 0
 
                         )
 
                         )
  
                     [load1] => 0.13
+
                     [disk_usage] => 11075664
                     [load5] => 0.11
+
                     [max_vcpus] => 24
                     [load15] => 0.07
+
                     [cpu_nanoseconds] => 509350000000
                    [memused] => 4676028
+
                     [disk_primary_read_requests] => 0
                    [memfree%] => 42.82
+
                     [disk_primary_read_bytes] => 0
                    [swapused] => 5060
+
                     [disk_primary_write_requests] => 599
                    [swapfree%] => 99.87
+
                     [disk_primary_write_bytes] => 6246400
                    [localused] => 19881256
+
                     [disk_swap_read_requests] => 0
                    [localfree%] => 95.89
+
                     [disk_swap_read_bytes] => 0
                     [disk_ios_pending] => 0
+
                     [disk_swap_write_requests] => 0
                     [time_user] => 24
+
                     [disk_swap_write_bytes] => 0
                    [time_nice] => 0
+
                     [interface_public_rx_packets] => 10
                     [time_system] => 6
+
                     [interface_public_rx_bytes] => 660
                     [time_idle] => 4674
+
                     [time_iowait] => 0
+
                     [time_irq] => 0
+
                     [time_softirq] => 0
+
                     [time_steal] => 0
+
                    [time_guest] => 18
+
                    [disk_reads_completed] => 0
+
                    [disk_read_sectors] => 0
+
                    [disk_read_bytes] => 0
+
                    [disk_writes_completed] => 182
+
                    [disk_write_sectors] => 1808
+
                    [disk_write_bytes] => 925696
+
                     [interface_public_rx_packets] => 24
+
                    [interface_private_rx_packets] => 5518
+
                     [interface_public_rx_bytes] => 3025
+
                    [interface_private_rx_bytes] => 669833
+
 
                     [interface_public_rx_errors] => 0
 
                     [interface_public_rx_errors] => 0
                    [interface_private_rx_errors] => 0
 
 
                     [interface_public_rx_drop] => 0
 
                     [interface_public_rx_drop] => 0
                    [interface_private_rx_drop] => 20
+
                     [interface_public_tx_packets] => 0
                     [interface_public_tx_packets] => 370
+
                     [interface_public_tx_bytes] => 0
                    [interface_private_tx_packets] => 277
+
                     [interface_public_tx_bytes] => 26163
+
                    [interface_private_tx_bytes] => 70857
+
 
                     [interface_public_tx_errors] => 0
 
                     [interface_public_tx_errors] => 0
 +
                    [interface_public_tx_drop] => 0
 +
                    [interface_private_rx_packets] => 1365
 +
                    [interface_private_rx_bytes] => 100354
 +
                    [interface_private_rx_errors] => 0
 +
                    [interface_private_rx_drop] => 0
 +
                    [interface_private_tx_packets] => 0
 +
                    [interface_private_tx_bytes] => 0
 
                     [interface_private_tx_errors] => 0
 
                     [interface_private_tx_errors] => 0
                    [interface_public_tx_drop] => 0
 
 
                     [interface_private_tx_drop] => 0
 
                     [interface_private_tx_drop] => 0
                     [last_raw_stat] => Array
+
                     [vcpu_nanoseconds_0] => 33410000000
                        (
+
                    [vcpu_nanoseconds_1] => 19150000000
                            [_id] => MongoId Object
+
                    [vcpu_nanoseconds_2] => 18480000000
                                (
+
                    [vcpu_nanoseconds_3] => 18530000000
                                    [$id] => 51647a67bb8d32c858001337
+
                    [vcpu_nanoseconds_4] => 18910000000
                                )
+
                    [vcpu_nanoseconds_5] => 18090000000
 
+
                    [vcpu_nanoseconds_6] => 18650000000
                            [format] => flat1
+
                    [vcpu_nanoseconds_7] => 18370000000
                            [aggregation] => raw
+
                    [vcpu_nanoseconds_8] => 18360000000
                            [server_id] => 212981
+
                    [vcpu_nanoseconds_9] => 18180000000
                            [ts] => MongoDate Object
+
                    [vcpu_nanoseconds_10] => 17980000000
                                (
+
                    [vcpu_nanoseconds_11] => 18600000000
                                    [sec] => 1365539426
+
                    [vcpu_nanoseconds_12] => 17970000000
                                    [usec] => 0
+
                    [vcpu_nanoseconds_13] => 18470000000
                                )
+
                    [vcpu_nanoseconds_14] => 17590000000
 
+
                    [vcpu_nanoseconds_15] => 18290000000
                            [agent] => dom0d
+
                    [vcpu_nanoseconds_16] => 18170000000
                            [revision] => 2.20
+
                    [vcpu_nanoseconds_17] => 19020000000
                            [hypervisor] => qemu
+
                    [vcpu_nanoseconds_18] => 17260000000
                            [hypervisor_version] => 0.14.1
+
                    [vcpu_nanoseconds_19] => 18230000000
                            [uptime] => 6635363.48
+
                    [vcpu_nanoseconds_20] => 17730000000
                            [memused] => 4676028
+
                    [vcpu_nanoseconds_21] => 19540000000
                            [memfree%] => 42.82%
+
                    [vcpu_nanoseconds_22] => 18170000000
                            [swapused] => 5060
+
                    [vcpu_nanoseconds_23] => 17500000000
                            [swapfree%] => 99.87%
+
                     [interval_start] => 1365539419
                            [localused] => 19881256
+
                     [interval_end] => 1365540019
                            [localfree%] => 95.89%
+
                     [interval_length] => 600
                            [load1] => 0.13
+
                            [load5] => 0.11
+
                            [load15] => 0.07
+
                            [time_total] =>  
+
                            [time_user] => 260442
+
                            [time_nice] => 0
+
                            [time_system] => 154692
+
                            [time_idle] => 52656351
+
                            [time_iowait] => 10366
+
                            [time_irq] => 0
+
                            [time_softirq] => 938
+
                            [time_steal] => 0
+
                            [time_guest] => 194068
+
                            [interface_private_rx_packets] => 129760398
+
                            [interface_private_rx_bytes] => 100436390834
+
                            [interface_private_rx_errors] => 0
+
                            [interface_private_rx_drop] => 221176
+
                            [interface_private_tx_packets] => 20206365
+
                            [interface_private_tx_bytes] => 2254226940
+
                            [interface_private_tx_errors] => 0
+
                            [interface_private_tx_drop] => 0
+
                            [interface_public_rx_packets] => 9800013
+
                            [interface_public_rx_bytes] => 2675149819
+
                            [interface_public_rx_errors] => 0
+
                            [interface_public_rx_drop] => 0
+
                            [interface_public_tx_packets] => 17076712
+
                            [interface_public_tx_bytes] => 15421563229
+
                            [interface_public_tx_errors] => 0
+
                            [interface_public_tx_drop] => 0
+
                            [disk_reads_completed] => 1580095
+
                            [disk_read_sectors] => 88146023
+
                            [disk_read_bytes] => 45130763776
+
                            [disk_writes_completed] => 12987857
+
                            [disk_write_sectors] => 421018745
+
                            [disk_write_bytes] => 215561597440
+
                            [disk_ios_pending] => 0
+
                        )
+
 
+
                     [interval_start] => 1365538824
+
                     [interval_end] => 1365539426
+
                     [interval_length] => 602
+
 
                     [ticks] => 1
 
                     [ticks] => 1
 
                 )
 
                 )

Latest revision as of 15:24, 23 April 2013

The server stats command returns performance stats for a server over a given time period.

Contents

Path

  • /server/stats/{$start}/{$end}/{$aggregatePeriod}/{$serverid}
  • /server/stats/{$start}/{$end}/{$serverid}
  • /server/stats/{$start}/{$serverid}
  • /server/stats/{$serverid}

Method

Availability

Required Data Parameters

  • {$serverid}: The server ID that is returned when using the list command.

Optional Data Parameters

  • {$aggregatePeriod}: The amount of time in seconds to use to "smooth" the returned data. Defaults to 600 (10 minutes) which is about how often stats are stored to the database and as such is the smallest time period available. Higher aggregatePeriod values will return less data points compared to the amount stored and the data points will contained averaged and cumulative values (depending on the nature of each stat) from the raw data it contains. Each returned data point has a 'ticks' field that contains the number of raw data points used to create the data.
  • {$end}: A unix timestamp of the end of the time period from which you want stats. Defaults to PHP's time(). If this is less than the {$start} time you will be returned an error.
  • {$start}: A unix timestamp of the start of the time period from which you want stats. Defaults to {$end} - 3600 (one hour before the {$end} value).

Returned Data

The data returned will be an associative array where each key is a unix timestamp and the value is the aggregated data for that time. Some pieces of data to note:

  • last_raw_stat contains all the raw data from the previous point.
  • interval_start is the timestamp for the beginning of the time period aggregated for the data point.
  • interval_end is the timestamp for the end of the time period aggregated for the data point.
  • interval_length is the difference between interval_end and interval_start
  • ticks is the number of raw data points from the database that were used to create the returned data point.

Different performance data will be returned depending on whether the {$serverid} refers to a Dynamic Server or a VM.

Here is data for a Dynamic Server:

Array
(
    [success] => 'true',
    [data] => Array
        (
            [1365537644] => Array
                (
                    [tick_ids] => Array
                        (
                            [0] => MongoId Object
                                (
                                    [$id] => 516475b6bb8d32b953001331
                                )

                        )

                    [format] => flat1
                    [aggregation] => raw
                    [server_id] => 212981
                    [agent] => dom0d
                    [revision] => 2.20
                    [hypervisor] => qemu
                    [hypervisor_version] => 0.14.1
                    [uptime] => 6634187.65
                    [ts] => MongoDate Object
                        (
                            [sec] => 1365538224
                            [usec] => 0
                        )

                    [load1] => 0
                    [load5] => 0.01
                    [load15] => 0.05
                    [memused] => 4675832
                    [memfree%] => 42.82
                    [swapused] => 5060
                    [swapfree%] => 99.87
                    [localused] => 19881256
                    [localfree%] => 95.89
                    [disk_ios_pending] => 0
                    [time_user] => 19
                    [time_nice] => 0
                    [time_system] => 5
                    [time_idle] => 4679
                    [time_iowait] => 0
                    [time_irq] => 0
                    [time_softirq] => 0
                    [time_steal] => 0
                    [time_guest] => 13
                    [disk_reads_completed] => 0
                    [disk_read_sectors] => 0
                    [disk_read_bytes] => 0
                    [disk_writes_completed] => 336
                    [disk_write_sectors] => 7488
                    [disk_write_bytes] => 3833856
                    [interface_public_rx_packets] => 107
                    [interface_private_rx_packets] => 5567
                    [interface_public_rx_bytes] => 19285
                    [interface_private_rx_bytes] => 679315
                    [interface_public_rx_errors] => 0
                    [interface_private_rx_errors] => 0
                    [interface_public_rx_drop] => 0
                    [interface_private_rx_drop] => 20
                    [interface_public_tx_packets] => 500
                    [interface_private_tx_packets] => 280
                    [interface_public_tx_bytes] => 36414
                    [interface_private_tx_bytes] => 71063
                    [interface_public_tx_errors] => 0
                    [interface_private_tx_errors] => 0
                    [interface_public_tx_drop] => 0
                    [interface_private_tx_drop] => 0
                    [interval_start] => 1365537644
                    [interval_end] => 1365538224
                    [interval_length] => 580
                    [ticks] => 1
                )

        )
)


And here is data for a VM:

(
    [success] => 'true',
    [data] => Array
        (
            [1365539419] => Array
                (
                    [tick_ids] => Array
                        (
                            [0] => MongoId Object
                                (
                                    [$id] => 51647cc2521554d859000e3b
                                )

                        )

                    [format] => flat1
                    [aggregation] => raw
                    [vm_id] => 212960
                    [hostname] => cloud.quintet.ca
                    [uberid] => 179099
                    [ts] => MongoDate Object
                        (
                            [sec] => 1365540019
                            [usec] => 0
                        )

                    [disk_usage] => 11075664
                    [max_vcpus] => 24
                    [cpu_nanoseconds] => 509350000000
                    [disk_primary_read_requests] => 0
                    [disk_primary_read_bytes] => 0
                    [disk_primary_write_requests] => 599
                    [disk_primary_write_bytes] => 6246400
                    [disk_swap_read_requests] => 0
                    [disk_swap_read_bytes] => 0
                    [disk_swap_write_requests] => 0
                    [disk_swap_write_bytes] => 0
                    [interface_public_rx_packets] => 10
                    [interface_public_rx_bytes] => 660
                    [interface_public_rx_errors] => 0
                    [interface_public_rx_drop] => 0
                    [interface_public_tx_packets] => 0
                    [interface_public_tx_bytes] => 0
                    [interface_public_tx_errors] => 0
                    [interface_public_tx_drop] => 0
                    [interface_private_rx_packets] => 1365
                    [interface_private_rx_bytes] => 100354
                    [interface_private_rx_errors] => 0
                    [interface_private_rx_drop] => 0
                    [interface_private_tx_packets] => 0
                    [interface_private_tx_bytes] => 0
                    [interface_private_tx_errors] => 0
                    [interface_private_tx_drop] => 0
                    [vcpu_nanoseconds_0] => 33410000000
                    [vcpu_nanoseconds_1] => 19150000000
                    [vcpu_nanoseconds_2] => 18480000000
                    [vcpu_nanoseconds_3] => 18530000000
                    [vcpu_nanoseconds_4] => 18910000000
                    [vcpu_nanoseconds_5] => 18090000000
                    [vcpu_nanoseconds_6] => 18650000000
                    [vcpu_nanoseconds_7] => 18370000000
                    [vcpu_nanoseconds_8] => 18360000000
                    [vcpu_nanoseconds_9] => 18180000000
                    [vcpu_nanoseconds_10] => 17980000000
                    [vcpu_nanoseconds_11] => 18600000000
                    [vcpu_nanoseconds_12] => 17970000000
                    [vcpu_nanoseconds_13] => 18470000000
                    [vcpu_nanoseconds_14] => 17590000000
                    [vcpu_nanoseconds_15] => 18290000000
                    [vcpu_nanoseconds_16] => 18170000000
                    [vcpu_nanoseconds_17] => 19020000000
                    [vcpu_nanoseconds_18] => 17260000000
                    [vcpu_nanoseconds_19] => 18230000000
                    [vcpu_nanoseconds_20] => 17730000000
                    [vcpu_nanoseconds_21] => 19540000000
                    [vcpu_nanoseconds_22] => 18170000000
                    [vcpu_nanoseconds_23] => 17500000000
                    [interval_start] => 1365539419
                    [interval_end] => 1365540019
                    [interval_length] => 600
                    [ticks] => 1
                )
        )
)
Personal tools