在调试gprs模块时,教程里面提示使用网络调试工具先建立一个服务器端的tcp监听端口.然后使用gprs模块来建立连接,发送数据.想到公司当前有现成的阿里云服务器,linux版.就顺势在里面建立一个连接岂不很好.请教了hp.

参考网络命令: nc -l 1234直接建立监听端口. nc -l 1234 > fileout 可以接收数据.

windows: http analyzer fiddler

Ubuntu Network Monitoring Tools

written by: Ada Stoy•edited by: Eric Stallsworth•updated: 8/21/2011

Your network is your neighborhood – you need to keep an eye on it. For this purpose,you need the right tools. Here are some network monitoring tools you can use with Ubuntu.

  • Unlike the admin-targeted Linux distributions,which come with bunches of all sorts of tools,Ubuntu doesn't,simply because it is not meant to be a distribution for administering a network. However,this doesn't mean that you are out of options. You can do quite a lot of network monitoring and here are some ways to do it.


  • Simple Network Statistics with netstat

    One of the easiest ways to get data about the network activity of your computer is with the help of the netstat command. In a console,type netstat and you will see something like this (the xx-xxx-xxx-xxx being your actual IP):

    Active Internet connections (w/o servers)

    Proto Recv-Q Send-Q Local Address Foreign Address State

    tcp 0 0 xx-xxx-xxx-xxx.dd:33796 74.125.232.217:www TIME_WAIT

    tcp 0 0 xx-xxx-xxx-xxx.dd:47761 fra07s07-in-f103.1e:www ESTABLISHED

    The information isn't very useful but you can see the open connections and their destination (the IP of the party you are connected to). If you are interested only in interfaces,you can use the ifstat tool instead.

  • More Detailed Network Stats with iptraf

    Most likely,the output of the netstat command won't suffice and you will need a more advanced Ubuntu network monitoring tool. The choice here is really rich because there are dozens of applications that give more detailed network stats. One of them is iptraf. In order to use it,you first need to install it. In a console,type:

    sudo apt-get install iptraf

    After you have installed it,type iptraf to start it. You will see a welcome screen and then you will see its main screen,as shown in the screenshot below:

    Navigate up and down the menu and check what you want to kNow. You can set filters and configure the application,so that it monitors exactly what you want it to monitor. The configuration menu is shown in the next screenshot:

    The data gathered and shown by iptraf is very comprehensive and you can even log it for further analysis. This is a lightweight but very useful Ubuntu network monitoring tool. Its GUI might look archaic but the program itself does a really good job.

    Sponsored Content
    • Businesses should focus on building closer relationships with their customers to grow fast. Find out how DHL
    • Where Do The Richest Americans Live? Mansion Global
    • Stat-Dx Unveils Multiplex MDx System,Respiratory Panel at ECCMID GenomeWeb
    • The Datai Langkawi to Embark on Extensive Renovation Project Luxury Insider
    • Thousands of bulging methane bubbles could explode in Siberia Mother Nature Network
    • At Just 19,Kylie Jenner Buys Third Home Mansion Global
    Recommended by
  • Detailed Graphic Stats with BandwidthD

    If you don't like the console look and feel of iptraf,you can use BandwidthD to get some basic network stats. This is a modern application you can use not only to gather and perform a preliminary analysis on how your bandwidth is used,but you can capture the output to a database and generate numerous reports from it.

    BandwidthD is mainly a bandwidth monitor but it can be used for network monitoring as well. Here is what it can do according to its creators: “BandwidthD tracks usage of TCP/IP network subnets and builds html files with graphs to display utilization. Charts are built by individual IPs,and by default display utilization over 2 day,8 day,40 day,and 400 day periods. Furthermore,each ip address's utilization can be logged out at intervals of 3.3 minutes,10 minutes,1 hour or 12 hours in cdf format,or to a backend database server. HTTP,TCP,UDP,ICMP,VPN,and P2P traffic are color coded. ".

    As you see,BandwidthD is a pretty good solution for network monitoring and unless you need something really sophisticated,it Could be the best option for you.

  • Wireshark – a Powerful Packet Sniffer

    Wireshark is a network protocol analyzer,which is a nice way to call a packet sniffer. The purpose of Wireshark is to capture packets – both outgoing and incoming. For statistical and analytical purposes a packet sniffer does a really outstanding job but since it intercepts all traffic and stores copies of it,before you run it,especially on a large network,you need to double check if you have the legal right to do it. Here is what Wireshark looks like:

    I am not going to explain in detail all the things you can do with Wireshark but if you kNow what a packet sniffer is,you will kNow what this program can do. One of the best things about Wireshark is that it has a truly detailed and useful online documentation,so if you have the patience to read through it,even a novice will be able to use the program successfully.

  • Kismet – A Wireless Network Sniffer

    If you are interested in the wireless part of your network only,then you may want to try Kismet. Go to Administration → Synaptic Package Manager,find Kismet in the list of applications and install it. Unlike the other programs and tools on the list,Kismet isn't universal and can be used only for wireless interfaces.

    The Ubuntu network monitoring tools on the list are just a drop in the sea of such tools and I don't claim they are the best. Still,since they do a pretty good job and almost all of them I have been using for years,I can whole-heartedly recommend them. However,if you see that they are not what you need,or if you simply don't like them,feel free to browse the Net for alternatives.

ubuntu网络调试工具的更多相关文章

  1. 当iOS应用程序进入后台时,TCP和UDP(与多播)连接会发生什么

    我创建了几个实验:设置1:我创建了一个TCPSender应用程序和一个TCPReceiver应用程序.在本次实验中,我在iOS设备上启动了TCPSender,在另一台iOS设备上启动了TCPReceiver.然后两者都经过验证已建立连接并发送和接收数据.然后我将TCPReceiver应用程序置于后台.TCPSender应用程序指示连接丢失和崩溃(是的,我打算这样).设置2:我创建了一个UDPSen

  2. 在iOS中,如何增加主机的HTTP连接限制?

    使用Xcode网络工具,我分析说,我每次只能建立每个主机的4个TCP连接.似乎iOS的每个主机的默认TCP连接限制为4.我们如何增加这个限制?

  3. Swift开发:GCDAsyncSocket通信之TCP服务器

    overridefuncviewDidLoad(){super.viewDidLoad()clientSockets=NSMutableArray()msgTextView.backgroundColor=UIColor.grayColor()msgTextView.text="接收的客户端消息:\n"}//发送消息按钮@IBActionfuncsendBtnClick{ifclientSockets.count==0{return}letmsg=inputTextInput.text!//1.处理请求,

  4. Swift开发:GCDAsyncSocket通信之TCP 客户端

    varmainQueue=dispatch_get_main_queue()overridefuncviewDidLoad(){super.viewDidLoad()}//连接服务器按钮事件@IBActionfuncconBtnClick{do{clientSocket=GCDAsyncSocket()clientSocket.delegate=selfclientSocket.delegateQueue=dispatch_get_global_queue(0,0)tryclientSocket.conn

  5. Swift实时监听网络状态更新到Swift3

    (直接找到Reachability.swift文件拖到你的项目中就可以啦。)第二步,进入到ViewController文件如果编译无误的话,运行程序后在电脑上输出些内容,这是尝试切换网络状态试试,有没有提示。我自己在真机上测试成功。

  6. swift 监听网络变化

    方法二:viewController中调用监听网络变化参考:http://blog.csdn.net/json_vip/article/details/51754881http://blog.csdn.net/zhang5690800/article/details/51995716

  7. android – Google Cloud Messaging无法在公司网络上使用4.1.2设备

    我已经实现了一个简单的GCM客户端和服务器.客户端使用currentGCMclientAPIs(而不是deprecatedhelperlibrary).服务器(C#和.NET)遵循相应的serverguidelines(使用HTTP).我的服务器在公司域内的计算机上运行,因此我将客户端设备连接到公司网络内的Wi-Fi接入点,但可以访问Internet.简而言之,我的问题是4.3手机上收到通知,但连

  8. 如何杀死Android中未运行的进程

    ),试着让你的解决方案更灵活,比如首先检查端口范围然后使用它们是否可用.祝好运

  9. android – 在Internet上发布我的RESTful Web服务

    什么是最好的方法?例如,我可以使用AmazonWebServices或ApacheHTTPServer吗?

  10. android – 谷歌GCM推送通知服务器的IP范围?

    想知道有没有人在这里碰巧知道google的gcm服务器的ip范围?

随机推荐

  1. crontab发送一个月份的电子邮件

    ubuntu14.04邮件服务器:Postfixroot收到来自crontab的十几封电子邮件.这些邮件包含PHP警告.>我已经解决了这些警告的原因.>我已修复每个cronjobs不发送电子邮件(输出发送到>/dev/null2>&1)>我删除了之前的所有电子邮件/var/mail/root/var/spool/mail/root但我仍然每小时收到十几封电子邮件.这些电子邮件来自cronjobs,

  2. 模拟两个ubuntu服务器计算机之间的慢速连接

    我想模拟以下场景:假设我有4台ubuntu服务器机器A,B,C和D.我想在机器A和机器C之间减少20%的网络带宽,在A和B之间减少10%.使用网络模拟/限制工具来做到这一点?

  3. ubuntu-12.04 – 如何在ubuntu 12.04中卸载从源安装的redis?

    我从源代码在Ubuntu12.04上安装了redis-server.但在某些时候它无法完全安装,最后一次makeinstallcmd失败.然后我刚刚通过apt包安装.现在我很困惑哪个安装正在运行哪个conf文件?实际上我想卸载/删除通过源安装的所有内容,只是想安装一个包.转到源代码树并尝试以下命令:如果这不起作用,您可以列出软件自行安装所需的步骤:

  4. ubuntu – “apt-get source”无法找到包但“apt-get install”和“apt-get cache”可以找到它

    我正在尝试下载软件包的源代码,但是当我运行时它无法找到.但是当我运行apt-cache搜索squid3时,它会找到它.它也适用于apt-getinstallsquid3.我使用的是Ubuntu11.04服务器,这是我的/etc/apt/sources.list我已经多次更新了.我尝试了很多不同的debs,并没有发现任何其他地方的错误.这里的问题是你的二进制包(deb)与你的源包(deb-src)不

  5. ubuntu – 有没有办法检测nginx何时完成正常关闭?

    &&touchrestarted),因为即使Nginx没有完成其关闭,touch命令也会立即执行.有没有好办法呢?这样的事情怎么样?因此,pgrep将查找任何Nginx进程,而while循环将让它坐在那里直到它们全部消失.你可以改变一些有用的东西,比如睡1;/etc/init.d/Nginx停止,以便它会休眠一秒钟,然后尝试使用init.d脚本停止Nginx.你也可以在某处放置一个计数器,这样你就可以在需要太长时间时发出轰击信号.

  6. ubuntu – 如何将所有外发电子邮件从postfix重定向到单个地址进行测试

    我正在为基于Web的应用程序设置测试服务器,该应用程序发送一些电子邮件通知.有时候测试是使用真实的客户数据进行的,因此我需要保证服务器在我们测试时无法向真实客户发送电子邮件.我想要的是配置postfix,以便它接收任何外发电子邮件并将其重定向到一个电子邮件地址,而不是传递到真正的目的地.我正在运行ubuntu服务器9.10.先感谢您设置本地用户以接收所有被困邮件:你需要在main.cf中添加:然后

  7. ubuntu – vagrant无法连接到虚拟框

    当我使用基本的Vagrantfile,只配置了两条线:我看到我的虚拟框打开,但是我的流氓日志多次显示此行直到超时:然后,超时后的一段时间,虚拟框框终于要求我登录,但是太久了!所以我用流氓/流氓记录.然后在我的物理机器上,如果我“流氓ssh”.没有事情发生,直到:怎么了?

  8. ubuntu – Nginx – 转发HTTP AUTH – 用户?

    我和Nginx和Jenkins有些麻烦.我尝试使用Nginx作为Jenkins实例的反向代理,使用HTTP基本身份验证.它到目前为止工作,但我不知道如何传递带有AUTH用户名的标头?}尝试将此指令添加到您的位置块

  9. Debian / Ubuntu – 删除后如何恢复/ var / cache / apt结构?

    我在ubuntu服务器上的空间不足,所以我做了这个命令以节省空间但是现在在尝试使用apt时,我会收到以下错误:等等显然我删除了一些目录结构.有没有办法做apt-getrebuild-var-tree或类似的?

  10. 检查ubuntu上安装的rubygems版本?

    如何查看我的ubuntu盒子上安装的rubygems版本?只是一个想法,列出已安装的软件包和grep为ruby或宝石或其他:)dpkg–get-selections

返回
顶部