Julius Randle Jersey  Allen Iverson Jersey  Python program to print memory and processor usage – Ilyas Blog

import os import psutil pid = os.getpid() py = psutil.Process(pid) mu = (py.memory_info()[0] / 2.**30) * 1000 print(‘Memory Use(MB):’, mu, ‘of process id:’, pid) print(‘CPU Use:’,psutil.cpu_percent())

Source link

Python program to print memory and processor usage

Leave a Reply

Your email address will not be published. Required fields are marked *