Statistics for a Tugboat Service

Returns resource usage statistics for a running Tugboat Service. The resources include things like CPU, Memory, Disk I/O, Network I/O, etc.

Arguments

  • service - Required
    The service for which to obtain the statistics.

Example

socket.emit('tugboat', 'services', 'stats', args, callback);

Output

[
    {
        "id": "58cf4e012057230001ae530b",
        "stats": {
            "read": "2017-03-20T21:02:16.639723802Z",
            "preread": "2017-03-20T21:02:15.64102508Z",
            "pids_stats": {},
            "blkio_stats": {
                "io_service_bytes_recursive": [
                    { "major": 8, "minor": 32, "op": "Read", "value": 65536 },
                    { "major": 8, "minor": 32, "op": "Write", "value": 86016 },
                    { "major": 8, "minor": 32, "op": "Sync", "value": 0 },
                    { "major": 8, "minor": 32, "op": "Async", "value": 151552 },
                    { "major": 8, "minor": 32, "op": "Total", "value": 151552 },
                    { "major": 252, "minor": 0, "op": "Read", "value": 65536 },
                    { "major": 252, "minor": 0, "op": "Write", "value": 86016 },
                    { "major": 252, "minor": 0, "op": "Sync", "value": 0 },
                    {
                        "major": 252,
                        "minor": 0,
                        "op": "Async",
                        "value": 151552
                    },
                    {
                        "major": 252,
                        "minor": 0,
                        "op": "Total",
                        "value": 151552
                    },
                    { "major": 252, "minor": 2, "op": "Read", "value": 65536 },
                    { "major": 252, "minor": 2, "op": "Write", "value": 86016 },
                    { "major": 252, "minor": 2, "op": "Sync", "value": 0 },
                    {
                        "major": 252,
                        "minor": 2,
                        "op": "Async",
                        "value": 151552
                    },
                    {
                        "major": 252,
                        "minor": 2,
                        "op": "Total",
                        "value": 151552
                    },
                    {
                        "major": 252,
                        "minor": 15,
                        "op": "Read",
                        "value": 24364032
                    },
                    {
                        "major": 252,
                        "minor": 15,
                        "op": "Write",
                        "value": 114688
                    },
                    { "major": 252, "minor": 15, "op": "Sync", "value": 0 },
                    {
                        "major": 252,
                        "minor": 15,
                        "op": "Async",
                        "value": 24478720
                    },
                    {
                        "major": 252,
                        "minor": 15,
                        "op": "Total",
                        "value": 24478720
                    }
                ],
                "io_serviced_recursive": [
                    { "major": 8, "minor": 32, "op": "Read", "value": 10 },
                    { "major": 8, "minor": 32, "op": "Write", "value": 21 },
                    { "major": 8, "minor": 32, "op": "Sync", "value": 0 },
                    { "major": 8, "minor": 32, "op": "Async", "value": 31 },
                    { "major": 8, "minor": 32, "op": "Total", "value": 31 },
                    { "major": 252, "minor": 0, "op": "Read", "value": 10 },
                    { "major": 252, "minor": 0, "op": "Write", "value": 21 },
                    { "major": 252, "minor": 0, "op": "Sync", "value": 0 },
                    { "major": 252, "minor": 0, "op": "Async", "value": 31 },
                    { "major": 252, "minor": 0, "op": "Total", "value": 31 },
                    { "major": 252, "minor": 2, "op": "Read", "value": 10 },
                    { "major": 252, "minor": 2, "op": "Write", "value": 21 },
                    { "major": 252, "minor": 2, "op": "Sync", "value": 0 },
                    { "major": 252, "minor": 2, "op": "Async", "value": 31 },
                    { "major": 252, "minor": 2, "op": "Total", "value": 31 },
                    { "major": 252, "minor": 15, "op": "Read", "value": 760 },
                    { "major": 252, "minor": 15, "op": "Write", "value": 28 },
                    { "major": 252, "minor": 15, "op": "Sync", "value": 0 },
                    { "major": 252, "minor": 15, "op": "Async", "value": 788 },
                    { "major": 252, "minor": 15, "op": "Total", "value": 788 }
                ],
                "io_queue_recursive": [],
                "io_service_time_recursive": [],
                "io_wait_time_recursive": [],
                "io_merged_recursive": [],
                "io_time_recursive": [],
                "sectors_recursive": []
            },
            "num_procs": 0,
            "storage_stats": {},
            "cpu_stats": {
                "cpu_usage": {
                    "total_usage": 36916763899,
                    "percpu_usage": [36916763899],
                    "usage_in_kernelmode": 9950000000,
                    "usage_in_usermode": 17920000000
                },
                "system_cpu_usage": 998487900000000,
                "throttling_data": {
                    "periods": 0,
                    "throttled_periods": 0,
                    "throttled_time": 0
                }
            },
            "precpu_stats": {
                "cpu_usage": {
                    "total_usage": 36916058894,
                    "percpu_usage": [36916058894],
                    "usage_in_kernelmode": 9950000000,
                    "usage_in_usermode": 17920000000
                },
                "system_cpu_usage": 998486890000000,
                "throttling_data": {
                    "periods": 0,
                    "throttled_periods": 0,
                    "throttled_time": 0
                }
            },
            "memory_stats": {
                "usage": 25059328,
                "max_usage": 37789696,
                "stats": {
                    "active_anon": 6713344,
                    "active_file": 6053888,
                    "cache": 11800576,
                    "hierarchical_memory_limit": 18446744073709552000,
                    "inactive_anon": 6803456,
                    "inactive_file": 5488640,
                    "mapped_file": 6643712,
                    "pgfault": 16301,
                    "pgmajfault": 207,
                    "pgpgin": 10846,
                    "pgpgout": 5750,
                    "rss": 13258752,
                    "rss_huge": 4194304,
                    "total_active_anon": 6713344,
                    "total_active_file": 6053888,
                    "total_cache": 11800576,
                    "total_inactive_anon": 6803456,
                    "total_inactive_file": 5488640,
                    "total_mapped_file": 6643712,
                    "total_pgfault": 16301,
                    "total_pgmajfault": 207,
                    "total_pgpgin": 10846,
                    "total_pgpgout": 5750,
                    "total_rss": 13258752,
                    "total_rss_huge": 4194304,
                    "total_unevictable": 0,
                    "total_writeback": 0,
                    "unevictable": 0,
                    "writeback": 0
                },
                "limit": 2099073024
            },
            "name": "/58cf4e012057230001ae530b",
            "id": "fd0146315c43a75b3c5c24bd39a3b73cf7ae82fc185dea7511ac9fc978e28339",
            "networks": {
                "eth0": {
                    "rx_bytes": 788,
                    "rx_packets": 10,
                    "rx_errors": 0,
                    "rx_dropped": 0,
                    "tx_bytes": 648,
                    "tx_packets": 8,
                    "tx_errors": 0,
                    "tx_dropped": 0
                },
                "eth1": {
                    "rx_bytes": 690,
                    "rx_packets": 9,
                    "rx_errors": 0,
                    "rx_dropped": 0,
                    "tx_bytes": 690,
                    "tx_packets": 9,
                    "tx_errors": 0,
                    "tx_dropped": 0
                }
            }
        }
    }
]

Errors

  • 1016: No Services Found
    Returned if the requested services do not exist, or the requestor does not have permission to view the services' statistics.

  • 1017: No Service ID Provided
    The required service argument was not included in the request.

results matching ""

    No results matching ""