IOS流程内部 - 如何获取信息? [英] IOS process internals - how to get information?

查看:110
本文介绍了IOS流程内部 - 如何获取信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个API来监控普通iPhone上运行的任务(没有越狱)。这些是关于:

I am looking for an API to monitor the tasks running on a plain iPhone (no jailbreak). Those are about:


  • 寻找CPU使用率(我的主要关注点)。

  • 查找内存使用情况。

  • 查找磁盘使用情况(读/写多少)

  • 查找网络使用情况(多少字节)通过网络发送和接收:3G,Wifi,GSM)。

  • 是否可以依赖在Mac上运行的IOS模拟器(或者我应该直接在设备上测试我的应用程序)?

  • look for CPU usage (my main concern).
  • look for memory usage.
  • look for disk usage (how many read/write)
  • look for network usage (how many bytes sent and received by network: 3G, Wifi, GSM).
  • is it possible to rely on the IOS simulator running on a Mac (or should I test my application directly on the device)?

我想我可以查看系统C库(sigint等),但我不确定是否能够检索这个除当前运行的应用程序之外的信息。我知道一些监视器应用程序在全局使用上运行,但我希望能够按流程查找信息流程。

I think I can look into the system C libraries (sigint, etc.) but I am not sure to be able to retrieve this information except for the current applications running. I know some monitor applications run on the global usage but I would like to be able to find the information process by process.

如果有人可以提供某些链接或有用的东西,我将开始进行更深入的调查。

If someone can provide some links or something useful, I will start a deeper investigation then.

推荐答案

通过查看此相关问题的代码可以找到CPU使用情况:

CPU usage can be found by looking at the code from this related question:

iOS - 从应用程序中获取CPU使用率

内存使用情况:

适用于iPhone OS应用程序的可用内存

这里有几个主题谈论如何了解当前运行的应用程序或任务:

And here are a couple threads that talk about how to find out about the applications or tasks currently running:

我们可以检索应用程序目前在iPhone和iPad上运行的邮件

如何在App Store批准的应用程序中获取有关可用内存和运行进程的信息? (是的,有一个!)

如何在iOS中运行活动进程

这些问题的答案可能会指向你你希望走向的方向。

The answers to these questions may point you in the direction you'd like to head towards.

祝你好运!

这篇关于IOS流程内部 - 如何获取信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆