0

i have question How print text and data in one line, in this script what show me cpu usage and disck free space:

print 'MEM Usage:'
print(psutil.virtual_memory().percent)
print
print 'Disk Usage:' 
print(psutil.disk_usage('/').percent)

i wish to summarise all in one line to see it like this:

Mem Use : 40.1
SPU Use : 70.3

please your help, Thank you

xanpx
  • 9
  • 5

1 Answers1

1
import psutil
print 'MEM Usage:',psutil.virtual_memory().percent
print 'Disk Usage:',psutil.disk_usage('/').percent
Rahil Hastu
  • 558
  • 2
  • 13