#!/usr/bin/env python3 """ Created on 29 Apr 2018 @author: Bruno Beloff ([email protected]) """ from scs_host.sys.host import Host # -------------------------------------------------------------------------------------------------------------------- home_path = Host.home_path() print("home_path: %s" % home_path) du = Host.disk_usage(home_path) print("du: %s" % du)
#!/usr/bin/env python3 """ Created on 29 Apr 2018 @author: Bruno Beloff ([email protected]) """ from scs_host.sys.host import Host # -------------------------------------------------------------------------------------------------------------------- home_dir = Host.home_path() print("home_dir: %s" % home_dir) du = Host.disk_usage(home_dir) print("du: %s" % du)
from scs_host.sys.host import Host # -------------------------------------------------------------------------------------------------------------------- mounted_on = '/srv/SCS_logging' print(mounted_on) volume = Host.disk_volume(mounted_on) print(volume) print(JSONify.dumps(volume)) print("-") mounted_on = '/' print(mounted_on) volume = Host.disk_volume(mounted_on) print(volume) print(JSONify.dumps(volume)) usage = Host.disk_usage(mounted_on) print(usage) print("-") jstr = JSONify.dumps(volume) print(jstr) jdict = json.loads(jstr) volume = ReportedDiskVolume.construct_from_jdict(jdict) print(volume)