Esempio n. 1
0
 def print_stats_to_file(self):
     """Since the stats collected at the begingng and end of a run are the
     same, they can be collapsed into a single function"""
     current_time = time.time()
     self.log("time: " + str(current_time))
     current_txg = ZfsApi.get_current_txg(Configs.main_pool)
     self.log("TXG: " + str(current_txg))
     # If the filesystem does not exist, its size is 0.
     if ZfsApi.fs_exists(self.filesystem):
         current_size = ZfsApi.get_filesystem_size(self.filesystem)
         self.log("size: " + str(current_size))
     else:
         self.log("size: 0")
     self.log("zpool iostat -v:")
     self.log(subprocess.check_output(["zpool", "iostat", "-v"]))
     self.log("zpool status:")
     self.log(subprocess.check_output(["zpool", "status"]))
Esempio n. 2
0
 def print_stats_to_file(self):
     """Since the stats collected at the begingng and end of a run are the
     same, they can be collapsed into a single function"""
     current_time = time.time()
     self.log("time: " + str(current_time))
     current_txg = ZfsApi.get_current_txg(Configs.main_pool)
     self.log("TXG: " + str(current_txg))
     # If the filesystem does not exist, its size is 0.
     if ZfsApi.fs_exists(self.filesystem):
         current_size = ZfsApi.get_filesystem_size(self.filesystem)
         self.log("size: " + str(current_size))
     else:
         self.log("size: 0")
     self.log("zpool iostat -v:")
     self.log(subprocess.check_output(['zpool', 'iostat', '-v']))
     self.log("zpool status:")
     self.log(subprocess.check_output(['zpool', 'status']))
Esempio n. 3
0
        choices=xrange(1,32),
        help="The number of concurrent receives to perform")
args = parser.parse_args()

# Use TestConfig to ensure this computer is set up properly
TestConfig.check_all()
# This test case will use the test send file, check that it will work
TestConfig.check_testfile()

Pid.create_pid_file()

# Establish where this test will be writing its output
current_min = time.strftime("%Y%m%d%H%M%S")
zfs_receive_path = Configs.test_filesystem_path + '/runs/' + current_min

start_txg = ZfsApi.get_current_txg(Configs.main_pool)

results_collector = Results.ResultsCollector(zfs_receive_path)
results_collector.gather_start_results()

if args.verbose:
    monitor_thread = MonitorThread.MonitorThread(zfs_receive_path)
    monitor_thread.start()

# Create the base FS that each thread will be receiveing into sub filesystem
ZfsApi.create_filesystem(zfs_receive_path)

start_time = time.time()

def receive_file(zfs_filesystem):
    ZfsApi.zfs_recv(Configs.test_file_full_path, zfs_filesystem)
Esempio n. 4
0
    "-t", "--threads", type=int, default=4, choices=xrange(1, 32), help="The number of concurrent receives to perform"
)
args = parser.parse_args()

# Use TestConfig to ensure this computer is set up properly
TestConfig.check_all()
# This test case will use the test send file, check that it will work
TestConfig.check_testfile()

Pid.create_pid_file()

# Establish where this test will be writing its output
current_min = time.strftime("%Y%m%d%H%M%S")
zfs_receive_path = Configs.test_filesystem_path + "/runs/" + current_min

start_txg = ZfsApi.get_current_txg(Configs.main_pool)

results_collector = Results.ResultsCollector(zfs_receive_path)
results_collector.gather_start_results()

if args.verbose:
    monitor_thread = MonitorThread.MonitorThread(zfs_receive_path)
    monitor_thread.start()

# Create the base FS that each thread will be receiveing into sub filesystem
ZfsApi.create_filesystem(zfs_receive_path)

start_time = time.time()


def receive_file(zfs_filesystem):