MENU
      GetServersTop

        GetServersTop


        Article summary

        Available in Classic and VPC

        Get the top five servers with the highest CPU, memory, and file system usage from the servers owned by the user account.

        Request

        This section describes the request format. The method and URI are as follows:

        MethodURI
        POST/cw_fea/real/cw/api/servers/top

        Request headers

        For information about the headers common to all Cloud Insight APIs, see Cloud Insight request headers.

        Request query parameters

        You can use the following query parameters with your request:

        FieldTypeRequiredDescription
        queryStringRequiredMetric name
        • avg_cpu_used_rto | mem_usert | avg_fs_usert
          • avg_cpu_used_rto: CPU usage average
          • mem_usert: memory usage
          • avg_fs_usert: file system usage average
        prodStringOptionalEnvironment in which the server is located
        • VPC (default)| Classic
          • VPC: VPC environment
          • Classic: Classic environment

        Request example

        The request example is as follows:

        curl --location --request POST 'https://cw.apigw.ntruss.com/cw_fea/real/cw/api/servers/top?query=avg_cpu_used_rto&prod=vpc' \
        --header 'x-ncp-apigw-timestamp: {Timestamp}' \
        --header 'x-ncp-iam-access-key: {Access Key}' \
        --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
        Shell

        Response

        This section describes the response format.

        Response body

        The response body includes the following data:

        FieldTypeRequiredDescription
        avg_cpu_user_rtoString-CPU user ratio average (%)
        hostNameString-Host name
        instanceNoString-Host instance number
        avg_cpu_used_rtoNumber-CPU usage average (%)
        avg_fs_usertNumber-File system usage average (%)
        mem_usertNumber-Memory usage (%)

        Response status codes

        For response status codes common to NAVER Cloud Platform, see Cloud Insight API response status codes.

        Response example

        The response example is as follows:

        [
            {
                "avg_cpu_user_rto": "0.34282196",
                "hostName": "**********",
                "instanceNo": "**********",
                "avg_cpu_used_rto": 0.34282196,
                "avg_fs_usert": 8.1264,
                "mem_usert": 4.8596377
            },
            {
                "avg_cpu_user_rto": "0.3427846",
                "hostName": "**********",
                "instanceNo": "**********",
                "avg_cpu_used_rto": 0.3427846,
                "avg_fs_usert": 8.132111,
                "mem_usert": 4.678288
            },
            {
                "avg_cpu_user_rto": "0.34265983",
                "hostName": "**********",
                "instanceNo": "**********",
                "avg_cpu_used_rto": 0.34265983,
                "avg_fs_usert": 8.128385,
                "mem_usert": 4.7205358
            },
            {
                "avg_cpu_user_rto": "0.3425775",
                "hostName": "**********",
                "instanceNo": "**********",
                "avg_cpu_used_rto": 0.3425775,
                "avg_fs_usert": 8.1275215,
                "mem_usert": 4.7187376
            },
            {
                "avg_cpu_user_rto": "0.32602215",
                "hostName": "**********",
                "instanceNo": "**********",
                "avg_cpu_used_rto": 0.32602215,
                "avg_fs_usert": 8.127369,
                "mem_usert": 4.765153
            }
        ]
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.