Monitor & Log iOS Processes for CPU usage times?

Discussion in 'Jailbreaks and iOS Hacks' started by ShionoyaTamaki, Jan 26, 2012.

  1. ShionoyaTamaki macrumors 6502

    Joined:
    Oct 9, 2011
    #1
    Is there a way to monitor and keep a log of CPU usage times for each process? Maybe through an app or mod or tweak. Is that even possible with a jailbroken device?

    I know the appStore doesn't have anything that can do this. Only apps I've seen are ones that list process and give current overall CPU usage, but that doesn't give logging or ability to pin point processes over time.

    I recall during the battery-gate incident, some users were asked by apple engineers to install some battery/performance monitoring app. So it is probably possible?

    For example, I would sometime leave my iPhone in my desk, fully charged, then come back later to find it dead. Usage time would say 3hrs 27minute, while standby time at 3hrs 44minutes. So something was running for that whole 3hours basically eating battery away. Doesn't always happen so it is hard to figure out what is the cause. Just leaves me guessing. Probably Mail/Exchange/Calendar looping, but not sure.

    I know there are lots of guides and advice on battery drain like turn this feature off or that, reinstall fresh, do this and that, trial and error. But, an app or tool like this would be very helpful in diagnosing what is causing battery drains. You would get more concrete information instead of guessing.
     
  2. Feed Me macrumors 6502a

    Feed Me

    Joined:
    Jan 7, 2012
    Location:
    Location Location
    #2
    If you have a Mac, you can download Xcode from the Mac AppStore for free. Xcode includes an app called "Instruments" which will show detailled information on all running apps on your device, including RAM and CPU usage. Your device can be plugged in or remotely connected, and all the info will appear in real time.

    Hopefully this helps.
     
  3. ShionoyaTamaki thread starter macrumors 6502

    Joined:
    Oct 9, 2011
    #3
  4. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #4
    It can monitor nearly everything that happens process-wise on your iPhone.
     
  5. ShionoyaTamaki thread starter macrumors 6502

    Joined:
    Oct 9, 2011
    #5
    Seems interesting, more work than I want just to see cpu usage times, but wonder if it works for jailbroken apps too?
     
  6. ShionoyaTamaki thread starter macrumors 6502

    Joined:
    Oct 9, 2011
    #6
    Looks like I don't have to use Instruments just to view the CPU usage per process.

    I installed Mobile Terminal via Cydia and use the top and ps command just like in *nix machine.
     
  7. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #7
    The top command itself consumes about 5-10% total CPU usage itself. Not something one would use to monitor a CPU with.
     
  8. ShionoyaTamaki thread starter macrumors 6502

    Joined:
    Oct 9, 2011
    #8
    I don't need to keep 'top' running. I just used it to find the "time" field for each process. or I can just use 'ps' to get the same data.
     
  9. Pendragon1 macrumors newbie

    Joined:
    Feb 16, 2012
    #9
    Hi,

    I'm new here. Hope you dont mind me jacking this thread.

    Wanted to find out exactly how you ran the ps and top commands.

    I installed mobile terminal and BigBoss Tools for the Adv-cmds and cant get these commands to run.

    Any assistance would be greatly appreciated.

    Thanks
     
  10. ShionoyaTamaki thread starter macrumors 6502

    Joined:
    Oct 9, 2011
    #10
    Adv-cmds will give you 'ps' command, just type ps in mobile terminal and whatever flag/switch you want e.g "px -ax"

    for top command you need to install the 'top' package from cydia it is not included in adv-cmds package.
     

Share This Page