Home  >  Article  >  Operation and Maintenance  >  Query the traffic information used by a secondary network card within a specified period of time

Query the traffic information used by a secondary network card within a specified period of time

坏嘻嘻
坏嘻嘻Original
2018-09-26 15:19:243514browse

This article introduces the query of traffic information used by an auxiliary network card within a specified time period, and focuses on the specific steps. The content of this article is compact, and I hope you can gain something.

DescribeEniMonitorData

Description

The auxiliary network card traffic information that can be queried includes the number of data packets sent and received by the auxiliary network card, the intranet Incoming and outgoing traffic, and the number of lost packets sent and received by the auxiliary network card. When some content is missing from the returned information, it may be because the system did not obtain the corresponding information. For example, if the instance is in the Stopped state or the secondary network card is not mounted to the instance, it is in the Available state. When calling this interface, you need to pay attention:

A maximum of 400 pieces of monitoring data are returned each time, that is, if the specified parameter (EndTime-StartTime)/Peroid>400, an error will be returned.

Monitoring information within the past 30 days can be queried at most at a time. If the specified parameter StartTime exceeds 30 days, an error will be returned.

Request parameters

Query the traffic information used by a secondary network card within a specified period of time

##Return parameters

Query the traffic information used by a secondary network card within a specified period of time

Data TypeEniMonitorDataType

Query the traffic information used by a secondary network card within a specified period of time

##Example

Request example

https://ecs.aliyuncs.com/?Action=DescribeEniMonitorData
&EniId=eni-myENI
&InstanceId=myInstance
&StartTime=2018-05-21T12:19:00Z
&EndTime=2018-05-21T12:22:00Z
&<公共请求参数>

Return example

XML format

<DescribeEniMonitorDataResponse>
 <RequestId>5A03C2BA-3BCE-4A87-8076-7DC1629</RequestId>
 <TotalCount>4</TotalCount>
 <MonitorData>
     <EniMonitorData>
         <PacketTx>0</PacketTx>
         <TimeStamp>2018-05-21T03:22:00Z</TimeStamp>
         <IntranetOut>0</IntranetOut>
         <DropPacketRx>0</DropPacketRx>
         <IntranetIn>0</IntranetIn>
         <EniId>eni-myENI</EniId>
         <DropPacketTx>0</DropPacketTx>
         <PacketRx>0</PacketRx>
     </EniMonitorData>
     <EniMonitorData>
         <PacketTx>0</PacketTx>
         <TimeStamp>2018-05-21T03:21:00Z</TimeStamp>
         <IntranetOut>0</IntranetOut>
         <DropPacketRx>0</DropPacketRx>
         <IntranetIn>0</IntranetIn>
         <EniId>eni-myENI</EniId>
         <DropPacketTx>0</DropPacketTx>
         <PacketRx>0</PacketRx>
     </EniMonitorData>
     <EniMonitorData>
         <PacketTx>52240</PacketTx>
         <TimeStamp>2018-05-21T03:19:00Z</TimeStamp>
         <IntranetOut>73344</IntranetOut>
         <DropPacketRx>0</DropPacketRx>
         <IntranetIn>467</IntranetIn>
         <EniId>eni-myENI</EniId>
         <DropPacketTx>0</DropPacketTx>
         <PacketRx>6603</PacketRx>
     </EniMonitorData>
     <EniMonitorData>
         <PacketTx>34925</PacketTx>
         <TimeStamp>2018-05-21T03:20:00Z</TimeStamp>
         <IntranetOut>48871</IntranetOut>
         <DropPacketRx>0</DropPacketRx>
         <IntranetIn>350</IntranetIn>
         <EniId>eni-myENI</EniId>
         <DropPacketTx>0</DropPacketTx>
         <PacketRx>4888</PacketRx>
     </EniMonitorData>
 </MonitorData>
</DescribeEniMonitorDataResponse>

JSON format

{
 "RequestId":"5A03C2BA-3BCE-4A87-8076-7DC1629",
 "MonitorData":{
     "EniMonitorData":[
         {
             "PacketTx":0,
             "TimeStamp":"2018-05-21T03:22:00Z",
             "IntranetOut":0,
             "DropPacketRx":0,
             "IntranetIn":0,
             "EniId":"eni-myENI",
             "DropPacketTx":0,
             "PacketRx":0
         },
         {
             "PacketTx":0,
             "TimeStamp":"2018-05-21T03:21:00Z",
             "IntranetOut":0,
             "DropPacketRx":0,
             "IntranetIn":0,
             "EniId":"eni-myENI",
             "DropPacketTx":0,
             "PacketRx":0
         },
         {
             "PacketTx":52240,
             "TimeStamp":"2018-05-21T03:19:00Z",
             "IntranetOut":73344,
             "DropPacketRx":0,
             "IntranetIn":467,
             "EniId":"eni-myENI",
             "DropPacketTx":0,
             "PacketRx":6603
         },
         {
             "PacketTx":34925,
             "TimeStamp":"2018-05-21T03:20:00Z",
             "IntranetOut":48871,
             "DropPacketRx":0,
             "IntranetIn":350,
             "EniId":"eni-myENI",
             "DropPacketTx":0,
             "PacketRx":4888
         }
     ]
 }
}

Error codeThe following are error codes unique to this interface. For more error codes, please visit the API Error Center.

The above is the detailed content of Query the traffic information used by a secondary network card within a specified period of time. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn