Cpu utilisation threshold

in cpu stress o meter project ,how to decide the threshold ?
what value should be given to it so that we can actually see switching on and off of two led while running code means what is the appropriate value so that we can be sure that our cpu utilisation will definitely go below and above it once while running?

Hi @jain.reechika,

In my case when I run the below prgram

import psutil
cpu_usage = psutil.cpu_percent(interval = 20)
print (cpu_usage)

It is returning 0.2, so I will set my threshold 0.1 just for the testing purpose.

Do let me know in case you need further assistance.