Sida Zhou
Sida Zhou

Reputation: 3705

How to print all memory available in jupyter

I have my python jupyter notebook configured in a docker container, I want to check if everything is configured correctly and all cpu and memory are available to jupyter.

How can I print out the cpu/memory available jupyter?

I understand all systems cpu/memory should be availablem, see here, but is there a pythonic way to get this info?

Not sure if this is related or not:

https://stackoverflow.com/a/4285292/2202107

EDIT: I was fearing that docker or jupyter will have a config file that limits its process's cpu/memory usage, but it turns out that resource monitor I was using iStat Menu was showing different resource usage than docker stats, which made me think jupyter/docker wasn't allocated all the resources. In fact, all the resources cpu/memory were utlized, according to docker stats. As a side note, please remember to set the cpu/mem limits on docker-machine.

Upvotes: 4

Views: 10166

Answers (1)

wellplayed
wellplayed

Reputation: 1048

On Linux:

!cat /proc/meminfo | grep Mem

On OS X:

!top -l 1 -s 0 | grep PhysMem

Upvotes: 9

Related Questions