Skip to content

Commit a5ec670

Browse files
committed
add an interval for tracking cpu percent so it isn't always 0.0
1 parent 4a769d8 commit a5ec670

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def system(reply, message):
5151
process = psutil.Process(os.getpid())
5252

5353
# get the data we need using the Process we got
54-
cpu_usage = process.cpu_percent()
54+
cpu_usage = process.cpu_percent(1)
5555
thread_count = process.num_threads()
5656
memory_usage = format_bytes(process.memory_info()[0])
5757
uptime = timedelta(seconds=round(time.time() - process.create_time()))

0 commit comments

Comments
 (0)