Forums

How can I see what is using CPU seconds?

Hi,

I have a bunch of different programs on my PythonAnywhere account and I was wondering if there was a way to see how many CPU seconds each of them is using.

There's a Process list you can load on the Consoles tab and on the Tasks tab. It will show the CPU seconds used by the currently running processes.

I'm guessing there's no way to do what I'm looking for, but just in case:

I imagine the websites must contribute to the CPU seconds total, but I don't see them listed. Also, the non-website processes I'm running are started from two entries on the Tasks tab but they tend not to show up when I'm checking the tasks tab (I'm still dealing with a small total CPU seconds used).

Websites are not included in the CPU count and the scheduled tasks will only appear in the list when they are actually running.

Bumping this because I was wondering if it was now possible to view the CPU time used by scheduled tasks after their completion?

If not, I think that this would be a useful feature to add to this service. I have a task that runs in the night hours so that it does not consume some API rate limits during peak hours, but the only way to see how much CPU time it consumes is by staying up in those wee hours myself. It is also more nebulous because my CPU time resets a few hours after the task, so I cannot get a rough estimate either.

It's an interesting feature idea. You can check https://blog.pythonanywhere.com/181/ for a less precise but usable tool.

Oh! I didn't know about that API, that'll do me fine. Thanks!

Glad to hear that it works for you!