Unix/Linux 网络接口管理相关命令介绍
Unix/Linux 网络接口管理相关命令介绍
获取网络适配器列表信息
在获知网络接口使用状态之前,你可能需要知道你当前的系统使用的网络适配器,在 Linux 和 AIX 中查看网络设备器的属性使用不同的命令,下面的例子给出了在不同系统上如何查看网络设备器的属性。
Linux 系统启动加载网卡驱动会输出识别到的所有网络适配器信息。dmesg 显示系统开机信息。所以可以利用该命令取得系统网络适配器列表。清单 1 命令输出显示共有 2 块网卡,eth0 与 eth1,其中仅 eth1 被启用。
在 RHEL5.3 系统上查看网络适配器
# dmesg|grep -i eth
IBM eHEA ethernet device driver (Release EHEA_0092-03)
ehea: eth0: Jumbo frames are enabled
ehea: eth0 -> logical port id #1
ehea: eth1: Jumbo frames are enabled
ehea: eth1 -> logical port id #2
ehea: eth1: Physical port up
eth1: no IPv6 routers present
复制代码
查看网络接口状态
网络接口状态包括接口是否启用,是否设置 IP 地址、MTU 大小、收发的包数等,查询的命令为 ifconfig, 在不同操作系统其输出格式略有不同。
清单 3 为在 RHEL5.3 上的输出,其显示两个以太网络接口,eth0 未配置 ip 地址,未被启用;eth1 配置了 IP 地址并被启用。
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1A:64:44:AC:34
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth1 Link encap:Ethernet HWaddr 00:1A:64:44:AC:35
inet addr:9.114.70.151 Bcast:9.114.70.255 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12337126 errors:0 dro
相关文档:
1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI) 就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......
一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......
The original /etc/sysconfig/i18n file is:
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
if we want to change locale to be japanese, just follow the instuction below.
body { margin: 0 0 0 0; padding:0 0 0 0 }td,div { font-family:Times New Roman;font-size:11pt;vert ......
我为什么写这个题目呢,因为我今天要写的博与这三者都有关系,至少我个人认为是这样的。
有个人问了一个这样的小程序,说有问题:
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector <string*> spvec;
string str;
cout & ......
http://blog.csdn.net/zengyang/archive/2009/01/07/3725320.aspx
http://tech.ccidnet.com/art/305/20071226/1322187_1.html
State
进程在执行过程中会根据环境来改变state。Linux进程有以下状态:
Running
进程处于运行(它是系统的当前进程)或者准备运行状态(它在等待系统将CPU分配给它) ......