how to get current cpu and memory assigned in unix code example Example: How many CPUs and memory do you allocate to your Linux machine? cat /proc/cpuinfo