Monitor Network and File I/O

监控网络和文件输入输出Monitor Network and File I/O

工具提供了几个分析模板,用于监视应用程序的网络和文件I/O活动。Instruments provides several profiling templates that monitor your app’s network and file I/O activity.

使用活动监视器跟踪整个网络和磁盘使用Use Activity Monitor to Track Overall Network and Disk Use

活动监视器概要模板使用活动监视器工具跟踪整个系统活动,包括CPU、内存、网络和磁盘。默认情况下,活动监视器模板不会在时间轴窗格中显示网络或磁盘活动。但是,您可以手动启用这些统计数据的显示。The Activity Monitor profiling template uses the Activity Monitor instrument to track overall system activity over time, including CPU, memory, network, and disk. By default, the Activity Monitor template doesn’t display network or disk activity in the timeline pane. However, you can manually enable the display of these statistics.

用活动监测仪记录网络和磁盘的使用To record network and disk use with the Activity Monitor instrument

  1. 运载工具。Launch Instruments.
  2. 在出现的剖析模板选择对话框中,单击活动监视器。In the profiling template selection dialog that appears, click Activity Monitor.
  3. 从目标设备和流程列表中选择您的设备和应用程序。Choose your device and app from the target device and process lists.
  4. 单击“选择”创建跟踪文档。Click Choose to create a trace document.
  5. 单击时间线窗格中的活动监视器工具。Click the Activity Monitor instrument in the timeline pane.
  6. 记者command-2显示督察窗格记录设置。Press Command-2 to show record settings in the inspector pane.
  7. 在“统计到列表”区域中,选择要查看的统计信息。然后,在系统统计区域中再次选择它们以启用它们。In the “Statistics to list” area, select the statistics you want to see. Then, select them again in the System Statistics area to enable them.

    下面的统计信息与文件I/O有关:The following statistics pertain to file I/O:

    • 磁盘读取操作(操作)Disk read ops (operations)
    • 磁盘写操作Disk write ops
    • 磁盘读取的字节数Disk bytes read
    • 磁盘写入的字节Disk bytes written
    • 每秒读取磁盘操作数Disk read ops per second
    • 每秒磁盘写入操作数Disk write ops per second
    • 每秒读取磁盘字节数Disk bytes read per second
    • 每秒写入的磁盘字节数Disk bytes written per second

    下面的统计信息涉及到网络I/O:The following statistics pertain to network I/O:

    • 网络包(收到)Net packets in (received)
    • 净数据包(发送)Net packets out (sent)
    • NET字节Net bytes in
    • NET字节Net bytes out
    • 每秒净包数Net packets in per second
    • 每秒净包Net packets out per second
    • 每秒的净字节数Net bytes in per second
    • 每秒净字节数Net bytes out per second
  8. 单击“记录”按钮在工具栏(或按command-r)开始记录。Click the Record button () in the toolbar (or press Command-R) to begin recording.
  9. 正常使用你的应用程序。Use your app normally.
  10. 请单击“停止”按钮,或按command-r再次,当完成。Click the Stop button (), or press Command-R again, when complete.
  11. 检查收集的数据。Examine the collected data.

    时间线窗格显示直观显示活动的图形。在详细窗格中找到了全面的活动信息。从详细窗格的导航栏中的“详细类型”列表中选择示例,以查看在采样周期期间捕获的所有数据。检查网络和磁盘列,以确定活动特别高时的准确时间。这些领域可能是批量交易,以获得更高的性能和能源效率。The timeline pane displays graphs visually denoting activity. Comprehensive activity information is found in the detail pane. Choose Samples from the detail type list in the navigation bar of the detail pane to see all data captured during the sample period. Examine the network and disk columns to pinpoint times when activity was especially high. These may be areas where you can batch transactions for greater performance and energy efficiency.

监控iOS应用程序的网络连接Monitor Network Connections of an iOS App

网络分析模板使用连接工具来分析您的IOS应用程序的TCP/IP和UDP / IP连接。The Network profiling template uses the Connections instrument to analyze your iOS app’s TCP/IP and UDP/IP connections.

记录IOS应用程序所使用的网络连接To record network connections used by your iOS app

  1. 把你的iOS设备连接到你的Mac。Connect your iOS device to your Mac.

    您可以使用物理或无线连接。请参阅无线对象的iOS设备。You can use a physical or wireless connection. See Target an iOS Device Wirelessly.

  2. 运载工具。Launch Instruments.
  3. 在出现的分析模板选择对话框中,单击“网络”。In the profiling template selection dialog that appears, click Network.
  4. 从目标设备和流程列表中选择iOS设备和应用程序。Choose your iOS device and app from the target device and process lists.
  5. 单击“选择”创建跟踪文档。Click Choose to create a trace document.
  6. 单击“记录”按钮在工具栏(或按command-r)开始记录。Click the Record button () in the toolbar (or press Command-R) to begin recording.
  7. 正常使用你的应用程序。Use your app normally.
  8. 请单击“停止”按钮,或按command-r再次,当完成。Click the Stop button (), or press Command-R again, when complete.
  9. 检查收集的数据。Examine the collected data.

    在细节窗格的导航栏中使用详细类型列表,以通过进程、连接或网络接口(硬件)查看信息。Use the detail type list in the navigation bar of the detail pane to view information by process, connection, or network interface (hardware).

监视磁盘在OS X中的使用Monitor Disk Use in OS X

文件活动分析模板使用文件活动、读/写、文件属性和目录I/O工具来监视您的OS X应用程序的磁盘使用。The File Activity profiling template uses the File Activity, Reads/Writes, File Attributes, and Directory I/O instruments to watch your OS X app’s disk use.

记录您的OS X应用程序的文件活动To record the file activity of your OS X app

  1. 运载工具。Launch Instruments.
  2. 在出现的剖析模板选择对话框中,单击文件活动。In the profiling template selection dialog that appears, click File Activity.
  3. 从目标设备和流程列表中选择Mac和OS X应用程序。Choose your Mac and OS X app from the target device and process lists.
  4. 单击“选择”创建跟踪文档。Click Choose to create a trace document.
  5. 单击“记录”按钮在工具栏(或按command-r)开始记录。Click the Record button () in the toolbar (or press Command-R) to begin recording.
  6. 正常使用你的应用程序。Use your app normally.
  7. 请单击“停止”按钮,或按command-r再次,当完成。Click the Stop button (), or press Command-R again, when complete.
  8. 单击时间轴窗格中的单个工具,在详细窗格中查看它们的活动。Click individual instruments in the timeline pane to view their activity in the detail pane.

    每个工具都提供一个事件列表和一个调用树,您可以使用它来分析文件活动的特定实例。Each instrument provides an event list and a call tree, which you can use to analyze specific instances of file activity.

  9. 在详细窗格中选择要检查的事件。Select an event you want to inspect in the detail pane.
  10. 记者command-3显示在督察窗格扩展的详细地区选定的事件堆栈跟踪。Press Command-3 to display a stack trace for the selected event in the extended detail area of the inspector pane.
  11. 单击折叠按钮在扩展的详细地区隐藏在堆栈跟踪的系统调用。这样可以更容易地找到应用程序的方法。Click the Collapse button () in the extended detail area to hide system calls in the stack trace. This makes it easier to locate your app’s methods.

    在你的应用程序进行调用的都是黑色的,之前有一个用户代码图标。Calls made by your app are colored black and preceded by a user code icon ().

  12. 双击堆栈跟踪中的一个方法,以在工具中显示其代码。Double-click a method in the stack trace to display its code in Instruments.
  13. 点击Xcode按钮在细节窗格顶部在Xcode打开代码编辑。Click the Xcode button () at the top of the detail pane to open the code in Xcode for editing.
时间: 2024-10-17 10:59:42

Monitor Network and File I/O的相关文章

Linux/Unix shell 监控Oracle告警日志(monitor alter log file)

使用shell脚本实现对Oracle数据库的监控与管理将大大简化DBA的工作负担,如常见的对实例的监控,监听的监控,告警日志的监控,以及数据库的备份,AWR report的自动邮件等.本文给出Linux 下使用 shell 脚本来监控 Oracle 告警日志(monitor alter log file). Linux Shell的相关参考:        Linux/Unix shell 脚本中调用SQL,RMAN脚本        Linux/Unix shell sql 之间传递变量   

解决Android studio 中的 Android Device Monitor 中 File Explorer 无法打开data目录的方法(转载 http://www.jianshu.com/p/d8a9a2918c61)

Android Device Monitor 文件管理的常见问题  (转自http://www.jianshu.com/p/d8a9a2918c61) 作者 knightaoko 关注 2017.03.21 11:41* 字数 2750 阅读 770评论 5喜欢 9 Android Device Monitor 是 Android Studio 中用于监测模拟器或真机运行状态的一款开发者工具.但开发者在使用它的过程中往往会遇到很多问题,尤其对于新手.本文分析了实际学习中遇到的问题,包括:1. F

Android性能优化第(二)篇---Memory Monitor检测内存泄露

上篇说了一些性能优化的理论部分,主要是回顾一下,有了理论,小平同志又讲了,实践是检验真理的唯一标准,对于内存泄露的问题,现在通过Android Studio自带工具Memory Monitor 检测出来.性能优化的重要性不需要在强调,但是要强调一下,我并不是一个老司机,嘿嘿!没用过这个工具的,请睁大眼睛.如果你用过,那么就不用在看这篇博客了. 先看一段会发生内存泄露的代码 public class UserManger { private static UserManger instance;

Instruments_Activity Monitor使用入门

在之前的文章说过Activity Monitor,官方解释为:(活动监视器)实时显示CPU.内存和网络的使用情况,记录由虚拟内存大小测量的系统负载.用一句大白话来说,Activity Monitor类似Windows中的任务管理器,可以实时查看进程占用的CPU.内存的使用量. 一.Activity Monitor的介绍和大致使用 具体操作步骤, 首先从Xcode中运行Instruments,在顶部的菜单栏中,选择Product,选择Profile(快捷键:Command + I).会调用Inst

Analyze network packet files very carefully

As a professional forensic guy, you can not be too careful to anlyze the evidence. Especially when the case is about malware or hacker. Protect your workstation is your responsibility. You are a professional forensic examiner, so don't get infected w

安装MySQL Enterprise Monitor

对于MySQL的监控工具,市面上有很多种,这里介绍怎么安装MySQL Enterprise Monitor,官方提供的工具,安装记录不详细解释,记录如下: [[email protected] soft]# ./mysqlmonitor-3.0.22.3178-linux-x86_64-installer.bin  Language Selection Please select the installation language [1] English - English [2] Japane

Recurrent neural network language modeling toolkit 源码走读(五)

系列前言 参考文献: RNNLM - Recurrent Neural Network  Language Modeling Toolkit(点此阅读) Recurrent neural network based language model(点此阅读) EXTENSIONS OF RECURRENT NEURAL NETWORK LANGUAGE MODEL(点此阅读) Strategies for Training Large Scale Neural Network  Language

Recurrent neural network language modeling toolkit 源码走读(八)

系列前言 参考文献: RNNLM - Recurrent Neural Network  Language Modeling Toolkit(点此阅读) Recurrent neural network based language model(点此阅读) EXTENSIONS OF RECURRENT NEURAL NETWORK LANGUAGE MODEL(点此阅读) Strategies for Training Large Scale Neural Network  Language

oracle报错:The Network Adapter could not establish the connection的解决

进入oracle安装目录\product\11.2.0\dbhome_1\NETWORK\ADMIN,修改listener.ora和tnsnames.ora,修改host 我的网络IP为192.168.6.24: listener.ora # listener.ora Network Configuration File: D:\tools\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora # Generated by Oracl