Server Stats

From INAP Dropzone API
(Difference between revisions)
Jump to: navigation, search
(Availability)
(Returned Data)
Line 29: Line 29:
  
 
<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 101:
 
                     [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 107:
 
                 )
 
                 )
  
            [1365538224] => Array
 
                (
 
                    [tick_ids] => Array
 
                        (
 
                            [0] => MongoId Object
 
                                (
 
                                    [$id] => 5164780fbb8d32cd56001331
 
                                )
 
 
                        )
 
 
                    [format] => flat1
 
                    [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
 
                    [load5] => 0.01
 
                    [load15] => 0.05
 
                    [memused] => 4676828
 
                    [memfree%] => 42.81
 
                    [swapused] => 5060
 
                    [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
 
                        (
 
                            [0] => MongoId Object
 
                                (
 
                                    [$id] => 51647a67bb8d32c858001337
 
                                )
 
 
                        )
 
 
                    [format] => flat1
 
                    [aggregation] => raw
 
                    [server_id] => 212981
 
                    [agent] => dom0d
 
                    [revision] => 2.20
 
                    [hypervisor] => qemu
 
                    [hypervisor_version] => 0.14.1
 
                    [uptime] => 6635363.48
 
                    [ts] => MongoDate Object
 
                        (
 
                            [sec] => 1365539426
 
                            [usec] => 0
 
                        )
 
 
                    [load1] => 0.13
 
                    [load5] => 0.11
 
                    [load15] => 0.07
 
                    [memused] => 4676028
 
                    [memfree%] => 42.82
 
                    [swapused] => 5060
 
                    [swapfree%] => 99.87
 
                    [localused] => 19881256
 
                    [localfree%] => 95.89
 
                    [disk_ios_pending] => 0
 
                    [time_user] => 24
 
                    [time_nice] => 0
 
                    [time_system] => 6
 
                    [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_private_rx_errors] => 0
 
                    [interface_public_rx_drop] => 0
 
                    [interface_private_rx_drop] => 20
 
                    [interface_public_tx_packets] => 370
 
                    [interface_private_tx_packets] => 277
 
                    [interface_public_tx_bytes] => 26163
 
                    [interface_private_tx_bytes] => 70857
 
                    [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] => 51647a67bb8d32c858001337
 
                                )
 
 
                            [format] => flat1
 
                            [aggregation] => raw
 
                            [server_id] => 212981
 
                            [ts] => MongoDate Object
 
                                (
 
                                    [sec] => 1365539426
 
                                    [usec] => 0
 
                                )
 
 
                            [agent] => dom0d
 
                            [revision] => 2.20
 
                            [hypervisor] => qemu
 
                            [hypervisor_version] => 0.14.1
 
                            [uptime] => 6635363.48
 
                            [memused] => 4676028
 
                            [memfree%] => 42.82%
 
                            [swapused] => 5060
 
                            [swapfree%] => 99.87%
 
                            [localused] => 19881256
 
                            [localfree%] => 95.89%
 
                            [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
 
                )
 
 
         )
 
         )
 
)
 
)
 
</pre>
 
</pre>

Revision as of 20:59, 9 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.
<?
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
                )

        )
)
Personal tools