2016-10-22 19:27:28 +03:00
|
|
|
import psutil
|
2016-11-19 17:44:40 +02:00
|
|
|
import plugins.common
|
2016-10-22 19:27:28 +03:00
|
|
|
|
|
|
|
|
2016-11-19 17:44:40 +02:00
|
|
|
class PluginThread(plugins.common.PluginThreadCommon):
|
2016-10-22 19:27:28 +03:00
|
|
|
def __init__(self, section, config, thread_id):
|
2016-11-19 17:44:40 +02:00
|
|
|
super(PluginThread, self).__init__(section, config)
|
2016-10-22 19:27:28 +03:00
|
|
|
|
|
|
|
def main(self):
|
|
|
|
mem_stat = psutil.virtual_memory()
|
2016-10-23 01:53:02 +03:00
|
|
|
mem_available = str(round(mem_stat.available / 2**30, 2))
|
|
|
|
mem = 'RAM: ' + mem_available + 'G'
|
2016-10-22 19:27:28 +03:00
|
|
|
self.status['full_text'] = mem
|