Exemple #1
0
 def CheckFreeGRRTempSpace(self, _):
     """Mock out the driver loading code to pass the memory image."""
     path = tempfiles.GetDefaultGRRTempDirectory()
     reply = rdf_client_fs.DiskUsage(path=path,
                                     total=10 * 1024 * 1024 * 1024,
                                     used=5 * 1024 * 1024 * 1024,
                                     free=5 * 1024 * 1024 * 1024)
     return [reply]
Exemple #2
0
 def Run(self, args):
   if args.path:
     path = args.CollapsePath()
   else:
     path = GetDefaultGRRTempDirectory()
   total, used, free, _ = psutil.disk_usage(path)
   self.SendReply(
       rdf_client_fs.DiskUsage(path=path, total=total, used=used, free=free))