Lua+nginx development often needs to simulate the request API to determine whether its API is perfect enough
Curl knocks a get,post request is easy, simple pass-through command is simple
Curl URL
curl-d URL
As for form, you can make an HTML to simulate, or the next integration tool, to simulate the request, in short, everything is fast, can quickly solve the problem. (using the command line at least, faster than using other methods, and seeing the results clearly), can (man Baidu,google curl). Here the protocol analysis is not required, because the API is encapsulated, and sometimes you encapsulate the request datagram, Send it out. Packet analysis for packet interception on the network is the tcpdump command, but to listen for the network card, use the ifconfig(network interfaces Configuring),
For example,:>> ifconfig can get the device name of a network card used by itself ENPLS0
sudo tcpdump-i enp1s0 can listen to the network request processing situation.
Of course wireshark is a good tool to learn it well. Of course.
sudo tcpdump-i enp1s0-w xx.cap
This command allows you to save the information you hear as a. cap file so that you can open the view with Wireshark.
Here's a question: General network fault checking.
Since it is a network problem, it is based on the network level (physical layer, Data link layer, network layer, Transport layer, application layer) analysis, think, network equipment view, gateway configuration, routers and so on. So such as Ping,tracepath, Traceroute and other orders also because it is necessary to understand some. At least Ping is the ICMP protocol, which is a sub-protocol of the TCP/IP protocol family, belongs to the Network layer protocol, and so on need to keep in mind.
- Another is the Top command (the top command is a common performance analysis tool under Linux, which can show the resource usage of each process in real-time, similar to the Task Manager of Windows), mainly because sometimes ssh connection to remote machine is easy to break, The reason is that the interaction cannot be achieved for a long time. So hit a top, so that will not because of long time not with the remote machine burst communication and chaos, but this is not very good, remember top.
Summary of Linux related development learning in internship process (IV.)