1. Shell command Introduction
The shell is the user interface of the system and provides an interface for users to interoperate with the kernel. It receives the instruction entered by the user and sends it to the kernel for execution. A shell user manual has been provided in Sylixos, but the system has evolved and been updated to produce some new shell instructions. The following is a description of the two new shell instructions associated with the NIC.
2. Add Shell Command 2.1 printEn
Format 1:printen x (enable NIC number) C.
Return value: Execution returns 0.
Description: Gets the NIC basic information, as shown in 2.1. In the actual use of the process may encounter such as checksum error, no open 0 copies and other conditions cause the program to run slowly, you can see the basic information of the current use of the network card to find the essential cause of the problem.
Figure 2.1 Getting the NIC basic information
As shown in Figure 2.1, each parameter represents the following scenario:
Adapter Common Info: adapter basic information;
Check_sum Common info: checksum basic information;
Zero copy Common info: 0 copy basic information;
RX TX intr Common info: input/output interrupt basic information;
Rx Common Info: enter basic information;
TX Common INFO: output basic information;
The Sylixos of the NIC can be viewed in the ifconfig, shown in 2.2.
Figure 2.2 Viewing the NIC enable condition
Format 2:printen x (enable the NIC number) R.
Return value: Execution returns 0.
Description: Gets the NIC register value as shown in 2.3. In the actual application process, the corresponding register value can be used to determine the status of the appropriate network card.
Figure 2.3 Obtaining the NIC Register value
3. Summary
In peacetime design and development process will encounter a variety of unexpected problems, cleverly through the shell command to find and solve these problems, can greatly improve the efficiency of project development.
4. References
"Sylixos Application Development Handbook"
"Realevo-ide User Manual"
Sylixos Common shell directives