--- ../SPECstorage2020_2511/./Makefile 2022-04-05 15:17:42.367843417 -0500 +++ ./Makefile 2022-03-06 11:23:23.000000000 -0600 @@ -46,7 +46,7 @@ BUILD_PROD := build/$(PROD) BUILD_COMMON := build/common -NETMIST_BINS := netmist netmist_monitor netmist_modify pump_carbon pump_csv +NETMIST_BINS := netmist netmist_monitor netmist_modify pump_carbon pump_csv get_control put_control PROD_BIN_INSTALL := $(addprefix bin/,$(NETMIST_BINS)) SCRIPTS := $(wildcard bin.in/common/*) $(wildcard bin.in/*$(PROD)*/*) --- ../SPECstorage2020_2511/./bin.in/dist_pro/SM2020 2022-04-05 15:17:42.370843470 -0500 +++ ./bin.in/dist_pro/SM2020 2022-03-06 11:23:23.000000000 -0600 @@ -2248,6 +2248,8 @@ sfslog.close() + if os.access(client_csv_name, os.F_OK): + os.remove(client_csv_name) os.rename(default_client_csv_name, client_csv_name) --- ../SPECstorage2020_2511/./netmist/netmist.c 2022-04-05 15:17:42.403844058 -0500 +++ ./netmist/netmist.c 2022-03-06 11:23:24.000000000 -0600 @@ -130,6 +130,14 @@ #include "netmist_vfs.h" +#if defined(WIN32) +void unlock_pdsm_control(HANDLE); +void lock_pdsm_control(HANDLD); +#else +void unlock_pdsm_control( int); +void lock_pdsm_control( int); +#endif + /* XXX Hack to help stage to the VFS API */ #if defined(WIN32) #include "netmist_vfs_fs_win32.c" @@ -792,14 +800,14 @@ #include "netmist_workfun.h" void generic_null (void); -void clear_stats (void); +void clear_stats (int); void usage (void); void init_tests (int); void create_tests (int); int gen_op (int, int); -void client_init_files (int); +void client_init_files (int,int); void client_init_block (char *); void client_validate_ops (void); @@ -2590,7 +2598,7 @@ phase = WARM_PHASE; - clear_stats (); + clear_stats (1); my_start_time = gettime (); time_of_last_tick = my_start_time; @@ -3317,7 +3325,7 @@ total_seconds_napped = 0.0; total_file_ops = 0.0; prev_file_ops = 0.0; - clear_stats (); + clear_stats (1); /* Sends an intermediate message from * Client -> NM -> Prime to allow MON scripts @ Prime */ @@ -4345,22 +4353,26 @@ { /* - * If we're skipping initialization, we still need to walk down to - * get our working directory, which would ordinarily be a - * side-effect of client_init_files. Instead, do just that piece here. - */ - - setup_workdir (cmdline.client_id, 0); + * Need to set the skip flag for client_init_files to fill in the file sizes in memory + */ + if (cmdline.sharing_flag) + { + client_init_files (0,1); + } + else + { + client_init_files (cmdline.client_id,1); + } } else { if (cmdline.sharing_flag) { - client_init_files (0); + client_init_files (0,0); } else { - client_init_files (cmdline.client_id); + client_init_files (cmdline.client_id,0); } } log_file (LOG_EXEC, "Finished client init files.\n"); @@ -4385,7 +4397,7 @@ lru_promote_count = lru_reuse_count = 0; } - clear_stats (); + clear_stats (1); } /** @@ -5151,7 +5163,7 @@ log_file (LOG_EXEC, "op validation skipped!\n"); } - clear_stats (); + clear_stats (1); } @@ -7646,7 +7658,7 @@ * __doc__ */ void -client_init_files (int client_id) +client_init_files (int client_id, int skip) { #if defined(WIN32) DWORD ret = 0; @@ -7802,7 +7814,15 @@ log_file (LOG_EXEC, "Client %d: client_dirs: %d\n", client_id, cmdline.client_dirs); - setup_workdir (client_id, 1); + /* Skip creation of directories, if skip == 1*/ + if(skip) + { + setup_workdir (client_id, 0); + } + else + { + setup_workdir (client_id, 1); + } for (k = 0; k < NUM_OP_TYPES; k++) { @@ -8161,7 +8181,8 @@ if (k == OP_RMDIR) continue; /* Create an empty file. Use virtualized interface */ - (*Netmist_Ops[my_workload].init_empty_file) (kdir, + if(!skip) + (*Netmist_Ops[my_workload].init_empty_file) (kdir, leaf_name); empty_count++; } @@ -8179,7 +8200,8 @@ */ if (k == OP_RMDIR) continue; - (*Netmist_Ops[my_workload].init_file) (k, file_ptr); + if(!skip) + (*Netmist_Ops[my_workload].init_file) (k, file_ptr); } } } @@ -8488,7 +8510,9 @@ vds = vfst->netmist_vfs_direct_size (vfsr); *ds = (*ds / vds) * vds; if (nozero && (*ds == 0)) + { *ds = vds; + } } return od; } @@ -10441,7 +10465,7 @@ { const char *nes = netmist_vfs_errstr (err); log_file (LOG_EXEC, - "Generic read op failed file %s in %s: Error %s, Error value %d Ret %d Flags 0x%x Trans 0x%x Offset 0x%llx\n", + "Generic read op failed file %s in %s: Error %s, Error value %d Flags 0x%x Trans 0x%x Offset 0x%llx\n", fp->relfilename, VFS (pathptr, fp->dir), nes, err, flags, trans, fp->seqread_offset); @@ -13045,15 +13069,18 @@ * __doc__ */ void -clear_stats (void) +clear_stats (int all) { int i; - total_read_bytes = 0; - total_write_bytes = 0; - total_copyfile_bytes = total_file_ops = total_read_rand_bytes = 0; - total_file_op_time = total_meta_r_ops = total_meta_w_ops = 0; - total_rmw_ops = 0; + if(all) + { + total_read_bytes = 0; + total_write_bytes = 0; + total_copyfile_bytes = total_file_ops = total_read_rand_bytes = 0; + total_file_op_time = total_meta_r_ops = total_meta_w_ops = 0; + total_rmw_ops = 0; + } for (i = 0; i < num_work_obj; i++) { /* Raw counters */ @@ -15559,6 +15586,7 @@ #else int ret; #endif +again: /* Copy inbound op_rate and mix table (workload) to current definitions. */ ret = pdsm_get_control_data (pdsm_control); /* get the control data */ if (ret != 0) @@ -15579,9 +15607,19 @@ (double) (last_heart_beat - my_start_time)); log_file (LOG_EXEC, "pdsm_set_attributes, changing op rate to %f.\n", cmdline.op_rate); + clear_stats (0); } - /* If the user said to set the workload */ - if (pdsm_control->set_workload) + + /* In the event the fs_type is not filled in... try this from the top */ + if ( (pdsm_control->set_workload) && strlen(pdsm_control->work_load_out.fs_type) == 0) + goto again; + + /* If the user said to set the workload, and the fs_type has been stored in the on + * disk version, then this makes it more likely to be a valid entry ) + */ + if ( (pdsm_control->set_workload) && + ((((my_strcasecmp (pdsm_control->work_load_out.fs_type, "POSIX")) == 0)) || + (((my_strcasecmp (pdsm_control->work_load_out.fs_type, "WINDOWS")) == 0))) ) { memcpy (&my_mix_table[my_workload], &pdsm_control->work_load_out, sizeof (struct mix_table)); @@ -15595,8 +15633,73 @@ total_file_ops = (pdsm_control->op_rate * (double) (last_heart_beat - my_start_time)); + clear_stats (0); + } +} + +#if defined(WIN32) +void +unlock_pdsm_control(HANDLE fd) +{ + UnlockFile (fd, (DWORD)0, (DWORD)-1, (DWORD) - 1, (DWORD) - 1); +} +#else +void +unlock_pdsm_control( int fd) +{ + struct flock flk; + int res, error_value; + + flk.l_type = F_UNLCK; /* Unlock */ + if( !fd ) + return; + res = fcntl (fd, F_SETLKW, &flk); + if (res != 0) + { + error_value = netmist_get_error (); + log_file (LOG_EXEC, "unlock of pdsm control file error %d\n", + error_value); + } + else + log_file (LOG_DEBUG, "Unlock of pdsm control file \n"); +} +#endif + +#if defined(WIN32) +void +lock_pdsm_control(HANDLE fd) +{ + LockFileEx( + fd, + LOCKFILE_EXCLUSIVE_LOCK, + 0, + (DWORD)-1, + (DWORD)-1, + NULL); +} +#else +void +lock_pdsm_control(int fd) +{ + struct flock flk; + int res, error_value; + + flk.l_type = F_WRLCK; + flk.l_whence = SEEK_SET; + flk.l_start = 0; + flk.l_len = 0; /* The whole file */ + flk.l_pid = getpid (); + + res = fcntl (fd, F_SETLKW, &flk); + if (res != 0) + { + error_value = netmist_get_error (); + log_file (LOG_EXEC, "lock of pdsm control file error %d\n",error_value); } + else + log_file (LOG_DEBUG, "Lock of pdsm control file \n"); } +#endif int pdsm_get_control_data (struct pdsm_remote_control *pdsm_control) @@ -15650,6 +15753,7 @@ /* If not initialized, write out this proc's mix_table entry */ if (pdsm_control_once == 0) { + lock_pdsm_control(pdsm_control_file_fd); pdsm_control_once++; pdsm_control->op_rate = cmdline.op_rate; pdsm_control->set_op_rate = 0; @@ -15677,6 +15781,7 @@ write (pdsm_control_file_fd, pdsm_control, sizeof (struct pdsm_remote_control)); #endif + unlock_pdsm_control(pdsm_control_file_fd); } ret = I_STAT (my_pdsm_control_file, &stbuf); if (ret < 0) @@ -15686,6 +15791,7 @@ } if (pdsm_cur_stat_mod_time < stbuf.st_mtime) { + lock_pdsm_control(pdsm_control_file_fd); #if defined(WIN32) largeoffset.QuadPart = sizeof (struct pdsm_remote_control) * cmdline.client_id; @@ -15711,10 +15817,12 @@ log_file (LOG_ERROR, "pdsm_get_control_data: Unable to read data from %s\n", my_pdsm_control_file); + unlock_pdsm_control(pdsm_control_file_fd); return (0); } pdsm_cur_stat_mod_time = stbuf.st_mtime; + unlock_pdsm_control(pdsm_control_file_fd); } return (0); } @@ -15756,6 +15864,7 @@ /* If not initialized, write out this proc's mix_table entry */ if (pdsm_control_once == 0) { + lock_pdsm_control(pdsm_control_file_fd); pdsm_control->set_op_rate = cmdline.op_rate; memcpy (&pdsm_control->work_load_out, &my_mix_table[my_workload], sizeof (struct mix_table)); @@ -15788,7 +15897,9 @@ return (0); } pdsm_control_once++; + unlock_pdsm_control(pdsm_control_file_fd); } + lock_pdsm_control(pdsm_control_file_fd); my_strncpy (pdsm_control->hostname, client_localname, MAXHNAME); pdsm_control->client_id = cmdline.client_id; #if defined(WIN32) @@ -15815,9 +15926,11 @@ log_file (LOG_ERROR, "pdsm_put_control_data: Unable to write control file %s\n", my_pdsm_control_file); + unlock_pdsm_control(pdsm_control_file_fd); return (0); } fsync (pdsm_control_file_fd); /* This is rare, so lets get it on disk, and pushed to any remote servers */ + unlock_pdsm_control(pdsm_control_file_fd); return (0); } #endif @@ -18533,15 +18646,26 @@ client_validate_ops (); if ((cmdline.skip_init == 1) && (dir_exist () == 0)) { + /* + * Need to call the _skip version of client_init_files to fill in the file sizes in memory + */ + if (cmdline.sharing_flag) + { + client_init_files (0,1); + } + else + { + client_init_files (cmdline.client_id,1); + } return; } if (cmdline.sharing_flag) { - client_init_files (0); + client_init_files (0,0); } else { - client_init_files (cmdline.client_id); + client_init_files (cmdline.client_id,0); } } --- ../SPECstorage2020_2511/./netmist/make-netmist.in 2022-04-05 15:17:42.402844040 -0500 +++ ./netmist/make-netmist.in 2022-03-06 11:23:24.000000000 -0600 @@ -47,15 +47,17 @@ BUILD_DIR := ../../build/$(PROD)/$(OS)/$(ARCH) -BINS = $(addprefix $(BUILD_DIR)/,netmist) $(addprefix $(BUILD_DIR)/,netmist_monitor) $(addprefix $(BUILD_DIR)/,netmist_modify) $(addprefix $(BUILD_DIR)/,pump_carbon) $(addprefix $(BUILD_DIR)/,pump_csv) +BINS = $(addprefix $(BUILD_DIR)/,netmist) $(addprefix $(BUILD_DIR)/,netmist_monitor) $(addprefix $(BUILD_DIR)/,netmist_modify) $(addprefix $(BUILD_DIR)/,pump_carbon) $(addprefix $(BUILD_DIR)/,pump_csv) $(addprefix $(BUILD_DIR)/,get_control) $(addprefix $(BUILD_DIR)/,put_control) -NETMIST_OBJS += $(addprefix $(BUILD_DIR)/,netmist.o netmist_if.o netmist_prime.o netmist_nodeManager.o netmist_client.o netmist_structures.o netmist_logger.o netmist_utils.o netmist_copyright.o netmist_random.o workload.o mix_table.o netmist_fdcache.o netmist_version.o netmist_fsm.o netmist_thread.o netmist_vfs_paths_abs.o) +NETMIST_OBJS += $(addprefix $(BUILD_DIR)/,netmist.o netmist_if.o netmist_prime.o netmist_nodeManager.o netmist_client.o netmist_structures.o netmist_logger.o netmist_hashtable.o netmist_utils.o netmist_copyright.o netmist_random.o workload.o mix_table.o netmist_fdcache.o netmist_version.o netmist_fsm.o netmist_thread.o netmist_vfs_paths_abs.o) MONITOR_OBJS := $(addprefix $(BUILD_DIR)/,netmist_monitor.o) MODIFY_OBJS := $(addprefix $(BUILD_DIR)/,netmist_modify.o) PUMP_CARBON_OBJS := $(addprefix $(BUILD_DIR)/,pump_carbon.o) +GET_CONTROL_OBJS := $(addprefix $(BUILD_DIR)/,get_control.o) +PUT_CONTROL_OBJS := $(addprefix $(BUILD_DIR)/,put_control.o) PUMP_CSV_OBJS := $(addprefix $(BUILD_DIR)/,pump_csv.o) -OBJS := $(NETMIST_OBJS) $(MONITOR_OBJS) $(MODIFY_OBJS) $(PUMP_CARBON_OBJS) +OBJS := $(NETMIST_OBJS) $(MONITOR_OBJS) $(MODIFY_OBJS) $(PUMP_CARBON_OBJS) $(GET_CONTROL_OBJS) $(PUT_CONTROL_OBJS) all: check-os $(BUILD_DIR) $(BINS) @@ -82,6 +84,14 @@ $(BUILD_DIR)/pump_csv: $(PUMP_CSV_OBJS) $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ +$(BUILD_DIR)/get_control: +$(BUILD_DIR)/get_control: $(GET_CONTROL_OBJS) + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(BUILD_DIR)/put_control: +$(BUILD_DIR)/put_control: $(PUT_CONTROL_OBJS) + $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + $(BUILD_DIR)/netmist_monitor.o: CFLAGS += $(LARGEFILE) $(BUILD_DIR)/netmist_monitor.o: netmist_monitor.c netmist.h copyright.txt license.txt @@ -94,6 +104,12 @@ $(BUILD_DIR)/pump_csv.o: CFLAGS += $(LARGEFILE) $(BUILD_DIR)/pump_csv.o: pump_csv.c netmist.h copyright.txt license.txt +$(BUILD_DIR)/get_control.o: CFLAGS += $(LARGEFILE) +$(BUILD_DIR)/get_control.o: get_control.c netmist.h copyright.txt license.txt + +$(BUILD_DIR)/put_control.o: CFLAGS += $(LARGEFILE) +$(BUILD_DIR)/put_control.o: put_control.c netmist.h copyright.txt license.txt + $(BUILD_DIR)/netmist.o: CFLAGS += $(LARGEFILE) $(BUILD_DIR)/netmist.o: netmist.c netmist.h copyright.txt license.txt netmist_defines.h netmist_fdcache.h netmist_structures.h dist_pro/import.c dist_pro/import_yaml.c --- ../SPECstorage2020_2511/./netmist/netmist_defines.h 2022-04-05 15:17:42.403844058 -0500 +++ ./netmist/netmist_defines.h 2022-03-06 11:23:24.000000000 -0600 @@ -302,7 +302,10 @@ #define RECV_POLL_TIMEOUT -1 #endif -#define KEEPALIVE_POLL_TIMEOUT 300000 /* Poll timeout is 5 mins */ +/*#define KEEPALIVE_POLL_TIMEOUT 300000 Poll timeout is 5 mins */ + +/* 5 X bigger than keepalive, and scales with respece to keepalive */ +#define KEEPALIVE_POLL_TIMEOUT ((cmdline.keepalive * 1000)* 5) #define KEEPALIVE_SCAN_FREQ 3 #define KEEPALIVE_MISSED_COUNT 2 --- ../SPECstorage2020_2511/./netmist/netmist_hashtable.c 1969-12-31 18:00:00.000000000 -0600 +++ ./netmist/netmist_hashtable.c 2022-03-06 11:23:24.000000000 -0600 @@ -0,0 +1,183 @@ +/** + * @copyright + * Copyright (c) 2002-2021 by Iozone.org + * All rights reserved. + * Iozone.org + * 7417 Crenshaw Dr. + * Plano, TX 75025 + * + * This product contains benchmarks acquired from several sources who + * understand and agree with Iozone's goal of creating fair and objective + * benchmarks to measure computer performance. + * + * This copyright notice is placed here only to protect Iozone.org in the + * event the source is misused in any manner that is contrary to the + * spirit, the goals and the intent of Iozone.org + * + * Author: Udayan Bapat, Cohesity Inc. + * + */ +#include "./copyright.txt" +#include "./license.txt" + +#include +#include +#include +#include +#if !defined(WIN32) +#include +#else +#include "../win32lib/win32_sub.h" +#endif +#include +#include +#if !defined(WIN32) +#include +#endif + +#include "netmist_hashtable.h" +#include "netmist_logger.h" +#include "netmist_utils.h" + +struct bucket_ { + int key; // key + void *value; // value (user manages memory for this pointer) + struct bucket_ *next; // linked-list 'next' pointer +}; + +typedef struct bucket_ BUCKET; + +struct buckets_ { + int total_entries; // book keeping to measure collisions + BUCKET *head; // linked-list 'head' pointer +}; + +typedef struct buckets_ HASH_BUCKETS; + +struct hastable_ { + int max_buckets; // HASH key + HASH_BUCKETS *buckets; // bucket array for lookups +}; + +typedef struct hastable_ HASHTABLE; + +static BUCKET *create_bucket (int entry_id, void *data) { + BUCKET *bucket = (BUCKET *) my_malloc(sizeof(BUCKET)); + + if (!bucket) { + log_file (LOG_ERROR, "Failed allocate bucket in %s\n", __FUNCTION__); + return NULL; + } + + bucket->key = entry_id; + bucket->value = data; + bucket->next = NULL; + + return bucket; +} + +static void *find_bucket (BUCKET *head, int entry_id) { + if (!head) { + return NULL; + } + + BUCKET *curr = head; + + while (curr) { + if (curr->key == entry_id) { + return curr; + } + + curr = curr->next; + } + + return NULL; +} + +void *create_hash_table (int max_buckets) { + HASHTABLE *table = (HASHTABLE *) my_malloc(sizeof(HASHTABLE)); + + if (!table) { + log_file (LOG_ERROR, "Failed allocate hashtable in %s\n", __FUNCTION__); + return NULL; + } + + table->max_buckets = max_buckets; + + table->buckets = (HASH_BUCKETS *) my_malloc(max_buckets * sizeof(HASH_BUCKETS)); + + if (!table->buckets) { + log_file (LOG_ERROR, "Failed allocate hashtable buckets in %s\n", __FUNCTION__); + return NULL; + } + + return (void *) table; +} + +int add_hash_entry (void *table, int entry_id, void *data) { + if (!table || !data) { + log_file (LOG_ERROR, "Invalid entry addition in %s\n", __FUNCTION__); + } + + HASHTABLE *t = (HASHTABLE *) table; + + int total_buckets = t->max_buckets; + + int bucket_id = (entry_id *4099 ) % total_buckets; + + BUCKET *bucket = create_bucket(entry_id, data); + + if (!bucket) { + log_file (LOG_ERROR, "bucket creation failed in %s\n", __FUNCTION__); + return HASH_FAILURE; + } + + BUCKET *head = t->buckets[bucket_id].head; + + if (head == NULL) { + t->buckets[bucket_id].total_entries++; + t->buckets[bucket_id].head = bucket; + return HASH_SUCCESS; + } + + if (find_bucket(head, entry_id) != NULL) { + log_file (LOG_ERROR, "can not add duplicate entry %d in %s\n", + entry_id, __FUNCTION__); + free (bucket); + return HASH_FAILURE; + } + + t->buckets[bucket_id].total_entries++; + + /* Add at the front */ + bucket->next = head; + t->buckets[bucket_id].head = bucket; + return HASH_SUCCESS; +} + +void *lookup_hash_entry (void *table, int entry_id) { + if (!table) { + log_file (LOG_ERROR, "Invalid tanle pointer in %s\n", __FUNCTION__); + } + + HASHTABLE *t = (HASHTABLE *) table; + + int total_buckets = t->max_buckets; + int bucket_id = (entry_id * 4099) % total_buckets; + + BUCKET *head = t->buckets[bucket_id].head; + + if (head == NULL) { + log_file (LOG_ERROR, "entry %d not found in %s\n", entry_id, __FUNCTION__); + return NULL; + } + + BUCKET *bucket = find_bucket(head, entry_id); + + if (bucket == NULL) { + log_file (LOG_ERROR, "entry %d not found in %s\n", entry_id, __FUNCTION__); + return NULL; + } + + return bucket->value; +} --- ../SPECstorage2020_2511/./netmist/netmist_hashtable.h 1969-12-31 18:00:00.000000000 -0600 +++ ./netmist/netmist_hashtable.h 2022-03-06 11:23:24.000000000 -0600 @@ -0,0 +1,34 @@ +/** + * @copyright + * Copyright (c) 2002-2021 by Iozone.org + * All rights reserved. + * Iozone.org + * 7417 Crenshaw Dr. + * Plano, TX 75025 + * + * This product contains benchmarks acquired from several sources who + * understand and agree with Iozone's goal of creating fair and objective + * benchmarks to measure computer performance. + * + * This copyright notice is placed here only to protect Iozone.org in the + * event the source is misused in any manner that is contrary to the + * spirit, the goals and the intent of Iozone.org + * + * Author: Udayan Bapat, Cohesity Inc. + * + */ +#include "./copyright.txt" +#include "./license.txt" + + +#ifndef __NETMIST_HASHTABLE_H__ +#define __NETMIST_HASHTABLE_H__ + +#define HASH_FAILURE 0 +#define HASH_SUCCESS 1 + +void *create_hash_table(int max_buckets); +int add_hash_entry (void *table, int entry_id, void *data); +void *lookup_hash_entry (void *table, int entry_id); + +#endif \ No newline at end of file --- ../SPECstorage2020_2511/./netmist/netmist_structures.c 2022-04-05 15:17:42.405844094 -0500 +++ ./netmist/netmist_structures.c 2022-03-06 11:23:24.000000000 -0600 @@ -36,6 +36,7 @@ /* This is different for the various versions. */ #include +#include "netmist_hashtable.h" #include "netmist_utils.h" #include "netmist_structures.h" #include "netmist_logger.h" @@ -102,7 +103,7 @@ /* * Only used by nodeManager program */ -client_ids **client_array = NULL; +static void *client_array = NULL; struct _workdirs { @@ -609,7 +610,7 @@ int listen_socket, int prime_socket, int num_clients, int *client_id_list) { - int i, hash; + int i; client_ids *client_node; /* @@ -647,9 +648,8 @@ return NODEMANAGER_FAILURE; } - client_array = - (client_ids **) my_malloc2 (sizeof (client_ids *) * - MAXCLIENTS_PER_NM); + client_array = create_hash_table(MAXCLIENTS_PER_NM); + if (client_array == NULL) { log_file (LOG_ERROR, "malloc failure in %s\n", __FUNCTION__); @@ -669,10 +669,13 @@ } client_node->client_id = client_id_list[i]; - /* Add to hash for faster lookup */ - hash = (client_node->client_id) % MAXCLIENTS_PER_NM; - client_array[hash] = client_node; + if (add_hash_entry(client_array, client_node->client_id, + (void *)client_node) != HASH_SUCCESS) + { + log_file (LOG_ERROR, "\nclients: failed to add entry in hashtable\n"); + return NODEMANAGER_FAILURE; + } /* * Add to the front of the linked list @@ -698,18 +701,13 @@ int get_nm_client_port (int client_id) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; - + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { return 0; } - - return (curr_client->client_port); } @@ -722,11 +720,9 @@ int set_nm_client_port (int client_id, int port) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { @@ -745,11 +741,9 @@ int get_nm_client_pid (int client_id) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { @@ -768,11 +762,9 @@ int set_nm_client_pid (int client_id, int pid) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { @@ -791,11 +783,9 @@ int get_nm_client_socket (int client_id) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { @@ -814,11 +804,9 @@ int set_nm_client_socket (int client_id, int socket) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { @@ -838,11 +826,9 @@ int set_nm_client_keepalive (int client_id, unsigned int keepalive) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { @@ -873,11 +859,9 @@ int get_nm_client_files (int client_id) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { @@ -896,12 +880,9 @@ int set_nm_client_files (int client_id, int files) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; - + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { return NODEMANAGER_FAILURE; @@ -919,11 +900,9 @@ int get_nm_client_dirs (int client_id) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { @@ -942,11 +921,9 @@ int set_nm_client_dirs (int client_id, int dirs) { - int hash; client_ids *curr_client; - hash = client_id % MAXCLIENTS_PER_NM; - curr_client = client_array[hash]; + curr_client = (client_ids *) lookup_hash_entry(client_array, client_id); if (curr_client == NULL) { --- ../SPECstorage2020_2511/./netmist/netmist_version.c 2022-04-05 15:17:42.405844094 -0500 +++ ./netmist/netmist_version.c 2022-03-06 11:23:24.000000000 -0600 @@ -1,4 +1,4 @@ #include "netmist_version.h" -char *git_date = "Tue Nov 3 16:41:01 CST 2020"; -char *git_sha = "b14f6dd081899c693e96da008b2fec8d51d70757"; -char *git_version = "$Revision: 2511 $"; +char *git_date = "Wed Jan 12 09:26:08 CST 2022"; +char *git_sha = "6519793c828734598f80b1c9b4415bfbf440456d"; +char *git_version = "$Revision: 2529 $"; --- ../SPECstorage2020_2511/./netmist/pump_carbon.c 2022-04-05 15:17:42.408844147 -0500 +++ ./netmist/pump_carbon.c 2022-03-06 11:23:24.000000000 -0600 @@ -26,6 +26,8 @@ */ #define PDSM_RO_ACTIVE +#include +#include #include #if !defined(WIN32) #include @@ -70,7 +72,8 @@ time_t dummytime; char time_string[30]; int number_of_entries; -int number; +int number,port_flag; +int port_number = 2003; int bar_value; char cret; void usage (void); @@ -94,7 +97,7 @@ usage (); exit (0); }; - while ((cret = getopt (argc, argv, "hkvtf:s:i:")) != EOF) + while ((cret = getopt (argc, argv, "hkvtf:s:i:p:")) != EOF) { switch (cret) { @@ -113,6 +116,10 @@ carbon++; strcpy (carbonhost, optarg); break; + case 'p': /* port number */ + port_flag++; + port_number = atoi (optarg); + break; case 'i': /* Interval */ interval = atoi (optarg); break; @@ -125,7 +132,8 @@ }; } - snprintf (command, sizeof (command), "nc %s 2003", carbonhost); +/* + snprintf (command, sizeof (command), "nc %s %d", carbonhost,port_number); carbonfile = popen (command, "w"); if (carbonfile == 0) { @@ -135,6 +143,7 @@ printf ("Carbon server: %s\n", carbonhost); pclose (carbonfile); sleep (1); +*/ pdsm_stats = (struct pdsm_remote_stats *) @@ -148,7 +157,7 @@ if (carbon) { - snprintf (command, sizeof (command), "nc %s 2003", carbonhost); + snprintf (command, sizeof (command), "nc %s %d", carbonhost,port_number); carbonfile = popen (command, "w"); if (carbonfile == 0) { @@ -161,6 +170,13 @@ printf ("Scanning collection frames\n"); number_of_entries = scan_pdsm_file (); printf ("Found %d collection frames\n", number_of_entries); + pdsm_file_fd = open (my_pdsm_file, O_RDONLY, 0666); + if (pdsm_file_fd < 0) + { + printf ("Unable to open %s\n", my_pdsm_file); + exit (1); + } + for (j = 0; j < number_of_entries; j++) { lseek (pdsm_file_fd, j * sizeof (struct pdsm_remote_stats), @@ -180,6 +196,36 @@ fprintf (carbonfile, "%s.%d.%s.oprate %10.2f %lld\n", hostname, client_id, workload_name, pdsm_stats->achieved_op_rate, (long long) my_time); + if (pdsm_stats->read_throughput != 0.0) + fprintf (carbonfile, + "%s.%d.%s.read_throughput %10.6f %lld\n", hostname, + client_id, workload_name, + pdsm_stats->read_throughput, (long long) my_time); + else + fprintf (carbonfile, + "%s.%d.%s.read_throughput %10.6f %lld\n", hostname, + client_id, workload_name, 0.0, + (long long) my_time); + if (pdsm_stats->write_throughput != 0.0) + fprintf (carbonfile, + "%s.%d.%s.write_throughput %10.6f %lld\n", hostname, + client_id, workload_name, + pdsm_stats->write_throughput, (long long) my_time); + else + fprintf (carbonfile, + "%s.%d.%s.write_throughput %10.6f %lld\n", hostname, + client_id, workload_name, 0.0, + (long long) my_time); + if (pdsm_stats->meta_throughput != 0.0) + fprintf (carbonfile, + "%s.%d.%s.meta_throughput %10.6f %lld\n", hostname, + client_id, workload_name, + pdsm_stats->meta_throughput, (long long) my_time); + else + fprintf (carbonfile, + "%s.%d.%s.meta_throughput %10.6f %lld\n", hostname, + client_id, workload_name, 0.0, + (long long) my_time); if (pdsm_stats->read_op_count) fprintf (carbonfile, "%s.%d.%s.read_latency %10.6f %lld\n", hostname, @@ -520,6 +566,7 @@ printf ("\t-k............ Ignore STOP. Used for multiple load point runs with PDSM_MODE=1\n"); printf ("\t-s............ Carbon server\n"); + printf ("\t-p............ TCP port number. Default = 2003\n"); printf ("\t-i............ Interval in seconds\n"); printf ("\t-t............ One pass flag. Use with append mode collection.\n"); @@ -543,21 +590,14 @@ { int x; int count = 0; - struct pdsm_remote_stats remote_stats; - pdsm_file_fd = open (my_pdsm_file, O_RDONLY, 0666); - if (pdsm_file_fd < 0) + struct stat my_stat; + + x = stat(my_pdsm_file, &my_stat); + if (x < 0) { - printf ("Unable to open %s\n", my_pdsm_file); + printf ("Unable to stat file %s\n", my_pdsm_file); exit (1); } - while (1) - { - x = read (pdsm_file_fd, &remote_stats, - sizeof (struct pdsm_remote_stats)); - if (x <= 0) - { - return (count); - } - count++; - } + count = (int)(my_stat.st_size/sizeof(struct pdsm_remote_stats)); + return (count); } --- ../SPECstorage2020_2511/./netmist/put_control.c 1969-12-31 18:00:00.000000000 -0600 +++ ./netmist/put_control.c 2022-03-06 11:23:24.000000000 -0600 @@ -0,0 +1,2018 @@ +/* + * Copyright 2002-2021 + * Created: Sept 2021 + * Author: Don Capps + * Location: Iozone.org + * + * This is a utility that can be used to update values in the + * pdsm_control_file from data arriving over a TCP connection. + * + * This is a listener that receives data from standard in and applies the + * changes to the pdsm_control file. This application is used in conjunction + * with 'nc' to transport pdsm_control data updates from a network sender + * and apply these changes to the running pdsm_control file, which is then + * picked up by netmist and applied to the running workload. + * In the typical use case, nc recieves the data over the assigned tcp port, + * and then sends it to stdout, which is piped into Put_control. + * Put_control transforms the network formatted data into binary datat and + * then writes the pdsm updates to the pdsm_control file. + * + * This example takes the data from the ncat utility's stdout, transforms it, + * and then writes it to the pdsm_control file + * + */ +#define PDSM_RO_ACTIVE + +#include +#if !defined(WIN32) +#include +#include +#endif +#include +#include +#include +#include +#include +#if defined(LITE) +#include "lite/netmist.h" +#else +#if defined(PRO) +#include "pro/netmist.h" +#else +#include "dist/netmist.h" +#endif +#endif +#if defined(WIN32) +#pragma warning(disable:4996) +#pragma warning(disable:4267) +#pragma warning(disable:4133) +#pragma warning(disable:4244) +#pragma warning(disable:4102) +#pragma warning(disable:4018) +#include <../win32lib/win32_sub.h> +#include <../win32lib/win32_getopt.h> +#endif +#include "netmist_version.c" + +int verbose = 0; +int interval = 2; +FILE *NCSU_nc_file; +#if defined(WIN32) +HANDLE pdsm_file_fd; +LARGE_INTEGER largeoffset; +#else +int pdsm_file_fd; +#endif +int stop_flag; +time_t my_time; +char my_pdsm_file[256]; +int getopt (); +int client_id, no_loop, set_continue; +struct pdsm_remote_control *pdsm_remote_control_ptr; +char *next_token (char *, char **); + +time_t dummytime; +char time_string[30]; +int number_of_entries; +int number; +char cret; +void usage (void); +int pdsm_control_file_fd; +char hostname[256]; +char workload_name[256]; +char command[256]; +int NCSU_active = 1; +char NCSU_hostname[256]; +int NCSU_port; +char timestr[50]; +char pdsm_remote_control_buf[10000]; +char *here, *there; +char *my_end; +#if defined(WIN32) + DWORD ret, flags = 0; +#else + int ret, flags = 0; +#endif +int error_value; + +#if defined(WIN32) +void +unlock_pdsm_control(HANDLE fd) +{ + UnlockFile (fd, (DWORD)0, (DWORD)-1, (DWORD) - 1, (DWORD) - 1); +} +#else +void +unlock_pdsm_control( int fd) +{ + struct flock flk; + int res; + + flk.l_type = F_UNLCK; /* Unlock */ + res = fcntl (fd, F_SETLKW, &flk); + if (res != 0) + { + perror("unlock of pdsm control file error\n"); + } +/* + else + printf("Unlock of pdsm control file succeeded\n"); +*/ +} +#endif + +#if defined(WIN32) +void +lock_pdsm_control(HANDLE fd) +{ + LockFileEx( + fd, + LOCKFILE_EXCLUSIVE_LOCK, + 0, + (DWORD)-1, + (DWORD)-1, + NULL); +} +#else +void +lock_pdsm_control(int fd) +{ + struct flock flk; + int res; + + flk.l_type = F_WRLCK; + flk.l_whence = SEEK_SET; + flk.l_start = 0; + flk.l_len = 0; /* The whole file */ + flk.l_pid = getpid (); + + res = fcntl (fd, F_SETLKW, &flk); + if (res != 0) + { + perror("Lock of pdsm control file error\n"); + } +/* + else + printf("lock of pdsm control file succeeded\n"); +*/ + +} +#endif + +int +main (int argc, char **argv) +{ + + int i; + if (argc == 1) + { + usage (); + exit (0); + }; + while ((cret = getopt (argc, argv, "dhvf:p:")) != EOF) + { + switch (cret) + { + case 'h': /* Help screen */ + usage (); + exit (0); + break; + case 'v': /* Version */ + printf ("Version %s\n", git_version); + exit (0); + break; + case 'f': /* pdsm control file */ + strcpy (my_pdsm_file, optarg); + break; + case 'p': /* ncat port */ + NCSU_port = atoi (optarg); + break; + case 'd': /* Debug */ + verbose = 1; + break; + }; + } + + pdsm_remote_control_ptr = (struct pdsm_remote_control *) + malloc (sizeof (struct pdsm_remote_control)); + if (pdsm_remote_control_ptr == NULL) + { + printf ("Malloc failed for size %d\n", + (int) sizeof (struct pdsm_remote_control)); + exit (1); + } + + if (NCSU_active) + { + snprintf (command, sizeof (command), "nc -l -k %d", NCSU_port); + NCSU_nc_file = popen (command, "r"); + if (NCSU_nc_file == 0) + { + printf ("popen failed %d\n", errno); + exit (1); + } + if (verbose) + printf ("Popen command2: %s\n", command); + } + while (1) + { + if (NCSU_active) + { + memset (pdsm_remote_control_buf, 0, + sizeof (pdsm_remote_control_buf)); + /* + * The fscanf will block waiting on data to arrive over the 'nc' + * connection. + */ + fscanf (NCSU_nc_file, "%s", pdsm_remote_control_buf); + /* Hostname */ + there = next_token (pdsm_remote_control_buf, &my_end); + if (there) + { + sscanf (there, "%s", pdsm_remote_control_ptr->hostname); + if (verbose) + printf ("Hostname: %s\n", + pdsm_remote_control_ptr->hostname); + } + /* client_id */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", &pdsm_remote_control_ptr->client_id); + if (verbose) + printf ("Client_id: %d\n", + pdsm_remote_control_ptr->client_id); + } + /* Op_rate value. Used to tell netmist to set the op_rate value. + * This is a shortcut that one can use instead of loading the full + * workload mix object + */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%lf", &pdsm_remote_control_ptr->op_rate); + if (verbose) + printf ("Op_rate_value: %lf\n", + pdsm_remote_control_ptr->op_rate); + } + /* Set__op_rate_flag. Tells Netmist to actually update the current + * op_rate. + * This is a shortcut that one can use instead of loading the full + * workload mix object + */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", &pdsm_remote_control_ptr->set_op_rate); + if (verbose) + printf ("Set_op_rate_flag: %d\n", + pdsm_remote_control_ptr->set_op_rate); + } + /* + * Set_workload. This tells Netmist to load this updated workload + * mix into the running benchmark. + * If you don't set this to True, then the updated workload mix + * will not be applied. + */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", &pdsm_remote_control_ptr->set_workload); + if (verbose) + printf ("Set_workload_flag: %d\n", + pdsm_remote_control_ptr->set_workload); + } + /* Workload name */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.workload_name); + if (verbose) + printf ("Workload: %s\n", + pdsm_remote_control_ptr->work_load_out. + workload_name); + } + /* percent read */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.percent_read); + if (verbose) + printf ("Percent_read: %d\n", + pdsm_remote_control_ptr->work_load_out.percent_read); + if( pdsm_remote_control_ptr->work_load_out.percent_read > 100) + { + printf("Corrupted Percent_read = %d\n", pdsm_remote_control_ptr->work_load_out.percent_read); + exit(1); + } + } + /* Read string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.read_string); + if (verbose) + printf ("Read_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + read_string); + } + /* Percent read file */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_read_file); + if (verbose) + printf ("Percent_read_file: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_read_file); + if( pdsm_remote_control_ptr->work_load_out.percent_read_file > 100) + { + printf("Corrupted Percent_read_file = %d\n", pdsm_remote_control_ptr->work_load_out.percent_read_file); + exit(1); + } + } + /* Read file string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + read_file_string); + if (verbose) + printf ("Read_file_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + read_file_string); + } + /* Percent mmap read */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_mmap_read); + if (verbose) + printf ("Percent_mmap_read: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_mmap_read); + if( pdsm_remote_control_ptr->work_load_out.percent_mmap_read > 100) + { + printf("Corrupted Percent_mmap_read = %d\n", pdsm_remote_control_ptr->work_load_out.percent_mmap_read); + exit(1); + } + } + /* Mmap read string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + mmap_read_string); + if (verbose) + printf ("Mmap_read_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + mmap_read_string); + } + /* Percent read random */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_read_rand); + if (verbose) + printf ("Percent_read_rand: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_read_rand); + if( pdsm_remote_control_ptr->work_load_out.percent_read_rand > 100) + { + printf("Corrupted Percent_read_rand = %d\n", pdsm_remote_control_ptr->work_load_out.percent_read_rand); + exit(1); + } + } + /* Read random string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + read_rand_string); + if (verbose) + printf ("Read_rand_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + read_rand_string); + } + /* Percent write */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_write); + if (verbose) + printf ("Percent_write: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_write); + if( pdsm_remote_control_ptr->work_load_out.percent_write > 100) + { + printf("Corrupted Percent_write = %d\n", pdsm_remote_control_ptr->work_load_out.percent_write); + exit(1); + } + } + /* Write string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.write_string); + if (verbose) + printf ("Write_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + write_string); + } + /* Percent write file */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_write_file); + if (verbose) + printf ("Percent_write_file: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_write_file); + if( pdsm_remote_control_ptr->work_load_out.percent_write_file > 100) + { + printf("Corrupted Percent_write_file = %d\n", pdsm_remote_control_ptr->work_load_out.percent_write_file); + exit(1); + } + } + /* Write file string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + write_file_string); + if (verbose) + printf ("Write_file_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + write_file_string); + } + /* Percent mmap write */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_mmap_write); + if (verbose) + printf ("Percent_mmap_write: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_mmap_write); + if( pdsm_remote_control_ptr->work_load_out.percent_mmap_write > 100) + { + printf("Corrupted Percent_mmap_write = %d\n", pdsm_remote_control_ptr->work_load_out.percent_mmap_write); + exit(1); + } + } + /* mmap write string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + mmap_write_string); + if (verbose) + printf ("Mmap_write_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + mmap_write_string); + } + /* Percent write random */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_write_rand); + if (verbose) + printf ("Percent_write_rand: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_write_rand); + if( pdsm_remote_control_ptr->work_load_out.percent_write_rand > 100) + { + printf("Corrupted Percent_write_rand = %d\n", pdsm_remote_control_ptr->work_load_out.percent_mmap_read); + exit(1); + } + } + /* Write random string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + write_rand_string); + if (verbose) + printf ("Write_rand_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + write_rand_string); + } + /* Percent RMW */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.percent_rmw); + if (verbose) + printf ("Percent_rmw: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_rmw); + if( pdsm_remote_control_ptr->work_load_out.percent_rmw > 100) + { + printf("Corrupted Percent_rmw = %d\n", pdsm_remote_control_ptr->work_load_out.percent_rmw); + exit(1); + } + } + /* RMW string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.rmw_string); + if (verbose) + printf ("Rmw_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + rmw_string); + } + /* Percent mkdir */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_mkdir); + if (verbose) + printf ("Percent_write_rand: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_mkdir); + if( pdsm_remote_control_ptr->work_load_out.percent_mkdir > 100) + { + printf("Corrupted Percent_mkdir = %d\n", pdsm_remote_control_ptr->work_load_out.percent_mkdir); + exit(1); + } + } + /* Mkdir string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.mkdir_string); + if (verbose) + printf ("Mkdir_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + mkdir_string); + } + /* Percent rmdir */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_rmdir); + if (verbose) + printf ("Percent_rmdir: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_rmdir); + if( pdsm_remote_control_ptr->work_load_out.percent_rmdir > 100) + { + printf("Corrupted Percent_rmdir = %d\n", pdsm_remote_control_ptr->work_load_out.percent_rmdir); + exit(1); + } + } + /* Rmdir string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.rmdir_string); + if (verbose) + printf ("Rmdir_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + rmdir_string); + } + /* Percent unlink */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_unlink); + if (verbose) + printf ("Percent_unlink: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_unlink); + if( pdsm_remote_control_ptr->work_load_out.percent_unlink > 100) + { + printf("Corrupted Percent_unlink = %d\n", pdsm_remote_control_ptr->work_load_out.percent_unlink); + exit(1); + } + } + /* Unlink string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.unlink_string); + if (verbose) + printf ("Unlink_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + unlink_string); + } + /* Percent unlink2 */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_unlink2); + if (verbose) + printf ("Percent_unlink2: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_unlink2); + if( pdsm_remote_control_ptr->work_load_out.percent_unlink2 > 100) + { + printf("Corrupted Percent_unlink2 = %d\n", pdsm_remote_control_ptr->work_load_out.percent_unlink2); + exit(1); + } + } + /* Unlink2 string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + unlink2_string); + if (verbose) + printf ("Unlink2_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + unlink2_string); + } + /* Percent create */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_create); + if (verbose) + printf ("Percent_create: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_create); + if( pdsm_remote_control_ptr->work_load_out.percent_create > 100) + { + printf("Corrupted Percent_create = %d\n", pdsm_remote_control_ptr->work_load_out.percent_create); + exit(1); + } + } + /* Create string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.create_string); + if (verbose) + printf ("Create_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + create_string); + } + /* Percent append */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_append); + if (verbose) + printf ("Percent_append: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_append); + if( pdsm_remote_control_ptr->work_load_out.percent_append > 100) + { + printf("Corrupted Percent_append = %d\n", pdsm_remote_control_ptr->work_load_out.percent_append); + exit(1); + } + } + /* Append string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.append_string); + if (verbose) + printf ("Append_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + append_string); + } + /* Percent locking */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_locking); + if (verbose) + printf ("Percent_locking: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_locking); + if( pdsm_remote_control_ptr->work_load_out.percent_locking > 100) + { + printf("Corrupted Percent_locking = %d\n", pdsm_remote_control_ptr->work_load_out.percent_locking); + exit(1); + } + } + /* Locking string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + locking_string); + if (verbose) + printf ("Locking_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + locking_string); + } + /* Percent access */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_access); + if (verbose) + printf ("Percent_access: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_access); + if( pdsm_remote_control_ptr->work_load_out.percent_access > 100) + { + printf("Corrupted Percent_access = %d\n", pdsm_remote_control_ptr->work_load_out.percent_access); + exit(1); + } + } + /* Access string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.access_string); + if (verbose) + printf ("Access_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + access_string); + } + /* Percent stat */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.percent_stat); + if (verbose) + printf ("Percent_stat: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_stat); + if( pdsm_remote_control_ptr->work_load_out.percent_stat > 100) + { + printf("Corrupted Percent_stat = %d\n", pdsm_remote_control_ptr->work_load_out.percent_stat); + exit(1); + } + } + /* Stat string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.stat_string); + if (verbose) + printf ("Stat_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + stat_string); + } + /* Percent neg_stat */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_neg_stat); + if (verbose) + printf ("Percent_neg_stat: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_neg_stat); + if( pdsm_remote_control_ptr->work_load_out.percent_neg_stat > 100) + { + printf("Corrupted Percent_neg_stat = %d\n", pdsm_remote_control_ptr->work_load_out.percent_neg_stat); + exit(1); + } + } + /* Neg_stat string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + neg_stat_string); + if (verbose) + printf ("Neg_stat_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + neg_stat_string); + } + /* Percent chmod */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_chmod); + if (verbose) + printf ("Percent_chmod: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_chmod); + if( pdsm_remote_control_ptr->work_load_out.percent_chmod > 100) + { + printf("Corrupted Percent_chmod = %d\n", pdsm_remote_control_ptr->work_load_out.percent_chmod); + exit(1); + } + } + /* Chmod string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.chmod_string); + if (verbose) + printf ("Chmod_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + chmod_string); + } + /* Percent readdir */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_readdir); + if (verbose) + printf ("Percent_readdir: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_readdir); + if( pdsm_remote_control_ptr->work_load_out.percent_readdir > 100) + { + printf("Corrupted Percent_readdir = %d\n", pdsm_remote_control_ptr->work_load_out.percent_readdir); + exit(1); + } + } + /* Readdir string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + readdir_string); + if (verbose) + printf ("Readdir_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + readdir_string); + } + /* Percent copyfile */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_copyfile); + if (verbose) + printf ("Percent_copyfile: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_copyfile); + if( pdsm_remote_control_ptr->work_load_out.percent_copyfile > 100) + { + printf("Corrupted Percent_copyfile = %d\n", pdsm_remote_control_ptr->work_load_out.percent_copyfile); + exit(1); + } + } + /* Copyfile string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + copyfile_string); + if (verbose) + printf ("Copyfile_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + copyfile_string); + } + /* Percent rename */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_rename); + if (verbose) + printf ("Percent_rename: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_rename); + if( pdsm_remote_control_ptr->work_load_out.percent_rename > 100) + { + printf("Corrupted Percent_rename = %d\n", pdsm_remote_control_ptr->work_load_out.percent_rename); + exit(1); + } + } + /* Rename string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.rename_string); + if (verbose) + printf ("Rename_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + rename_string); + } + /* Percent statfs */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_statfs); + if (verbose) + printf ("Percent_statfs: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_statfs); + if( pdsm_remote_control_ptr->work_load_out.percent_statfs > 100) + { + printf("Corrupted Percent_statfs = %d\n", pdsm_remote_control_ptr->work_load_out.percent_statfs); + exit(1); + } + } + /* Statfs string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.statfs_string); + if (verbose) + printf ("Statfs_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + statfs_string); + } + /* Percent pathconf */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_pathconf); + if (verbose) + printf ("Percent_pathconf: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_pathconf); + if( pdsm_remote_control_ptr->work_load_out.percent_pathconf > 100) + { + printf("Corrupted Percent_pathconf = %d\n", pdsm_remote_control_ptr->work_load_out.percent_pathconf); + exit(1); + } + } + /* Pathconf string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + pathconf_string); + if (verbose) + printf ("Pathconf_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + pathconf_string); + } + /* Percent trunc */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_trunc); + if (verbose) + printf ("Percent_trunc: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_trunc); + if( pdsm_remote_control_ptr->work_load_out.percent_trunc > 100) + { + printf("Corrupted Percent_trunc = %d\n", pdsm_remote_control_ptr->work_load_out.percent_trunc); + exit(1); + } + } + /* Trunc string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.trunc_string); + if (verbose) + printf ("Trunc_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + trunc_string); + } + /* Percent custom1 */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_custom1); + if (verbose) + printf ("Percent_custom1: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_custom1); + if( pdsm_remote_control_ptr->work_load_out.percent_custom1 > 100) + { + printf("Corrupted Percent_custom1 = %d\n", pdsm_remote_control_ptr->work_load_out.percent_custom1); + exit(1); + } + } + /* Custom1 string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + custom1_string); + if (verbose) + printf ("Custom1_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + custom1_string); + } + /* Percent custom2 */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_custom2); + if (verbose) + printf ("Percent_custom2: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_custom2); + if( pdsm_remote_control_ptr->work_load_out.percent_custom2 > 100) + { + printf("Corrupted Percent_custom2 = %d\n", pdsm_remote_control_ptr->work_load_out.percent_custom2); + exit(1); + } + } + /* Custom2 string */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out. + custom2_string); + if (verbose) + printf ("Custom2_string: %s\n", + pdsm_remote_control_ptr->work_load_out. + custom2_string); + } + /* Read size dist */ + for (i = 0; i < MAX_DIST_ELEM; i++) + { + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + read_dist[i].size_min); + if (verbose) + printf ("Read_dist[%d].size_min: %d\n", i, + pdsm_remote_control_ptr->work_load_out. + read_dist[i].size_min); + } + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + read_dist[i].size_max); + if (verbose) + printf ("Read_dist[%d].size_max: %d\n", i, + pdsm_remote_control_ptr->work_load_out. + read_dist[i].size_max); + } + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + read_dist[i].percent); + if (verbose) + printf ("Read_dist[%d].percent: %d\n", i, + pdsm_remote_control_ptr->work_load_out. + read_dist[i].percent); + if(pdsm_remote_control_ptr->work_load_out.read_dist[i].percent > 100) + { + printf("Corrupted Read_dist[%d].percent = %d\n",i, + pdsm_remote_control_ptr->work_load_out.read_dist[i].percent); + exit(1); + } + } + } + /* Write size dist */ + for (i = 0; i < MAX_DIST_ELEM; i++) + { + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + write_dist[i].size_min); + if (verbose) + printf ("Write_dist[%d].size_min: %d\n", i, + pdsm_remote_control_ptr->work_load_out. + write_dist[i].size_min); + } + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + write_dist[i].size_max); + if (verbose) + printf ("Write_dist[%d].size_max: %d\n", i, + pdsm_remote_control_ptr->work_load_out. + write_dist[i].size_max); + } + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + write_dist[i].percent); + if (verbose) + printf ("Write_dist[%d].percent: %d\n", i, + pdsm_remote_control_ptr->work_load_out. + write_dist[i].percent); + if(pdsm_remote_control_ptr->work_load_out.write_dist[i].percent > 100) + { + printf("Corrupted Write_dist[%d].percent = %d\n",i, + pdsm_remote_control_ptr->work_load_out.write_dist[i].percent); + exit(1); + } + } + } + /* File size dist */ + for (i = 0; i < MAX_DIST_ELEM; i++) + { + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%lld", + &pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].size_min); + if (verbose) + printf ("File_size_dist[%d].size_min: %lld\n", i, + pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].size_min); + } + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%lld", + &pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].size_max); + if (verbose) + printf ("File_size_dist[%d].size_max: %lld\n", i, + pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].size_max); + } + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].percent); + if (verbose) + printf ("File_size_dist[%d].percent: %d\n", i, + pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].percent); + if(pdsm_remote_control_ptr->work_load_out.file_size_dist[i].percent > 100) + { + printf("Corrupted File_size_dist[%d].percent = %d\n",i, + pdsm_remote_control_ptr->work_load_out.file_size_dist[i].percent); + exit(1); + } + } + } + /* Min prename length */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + min_pre_name_length); + if (verbose) + printf ("Min_pre_name_length: %d\n", + pdsm_remote_control_ptr->work_load_out. + min_pre_name_length); + } + /* Max prename length */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + max_pre_name_length); + if (verbose) + printf ("Max_pre_name_length: %d\n", + pdsm_remote_control_ptr->work_load_out. + max_pre_name_length); + } + /* Min postname length */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + min_post_name_length); + if (verbose) + printf ("Min_post_name_length: %d\n", + pdsm_remote_control_ptr->work_load_out. + min_post_name_length); + } + /* Max postname length */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + max_post_name_length); + if (verbose) + printf ("Max_post_name_length: %d\n", + pdsm_remote_control_ptr->work_load_out. + max_post_name_length); + } + /* Percent commit */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_commit); + if (verbose) + printf ("Percent_commit: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_commit); + if( pdsm_remote_control_ptr->work_load_out.percent_commit > 100) + { + printf("Corrupted Percent_commit = %d\n", pdsm_remote_control_ptr->work_load_out.percent_commit); + exit(1); + } + } + /* Percent direct */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_direct); + if (verbose) + printf ("Percent_direct: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_direct); + if( pdsm_remote_control_ptr->work_load_out.percent_direct > 100) + { + printf("Corrupted Percent_direct = %d\n", pdsm_remote_control_ptr->work_load_out.percent_direct); + exit(1); + } + } + /* Percent fadvise_seq */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_fadvise_seq); + if (verbose) + printf ("Percent_fadvise_seq: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_fadvise_seq); + if( pdsm_remote_control_ptr->work_load_out.percent_fadvise_seq > 100) + { + printf("Corrupted Percent_fadvise_seq = %d\n", pdsm_remote_control_ptr->work_load_out.percent_fadvise_seq); + exit(1); + } + } + /* Percent fadvise_rand */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_fadvise_rand); + if (verbose) + printf ("Percent_fadvise_rand: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_fadvise_rand); + if( pdsm_remote_control_ptr->work_load_out.percent_fadvise_rand > 100) + { + printf("Corrupted Percent_fadvise_rand = %d\n", pdsm_remote_control_ptr->work_load_out.percent_fadvise_rand); + exit(1); + } + } + /* Percent fadvise_dont_need */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_fadvise_dont_need); + if (verbose) + printf ("Percent_fadvise_dont_need: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_fadvise_dont_need); + if( pdsm_remote_control_ptr->work_load_out.percent_fadvise_dont_need > 100) + { + printf("Corrupted Percent_fadvise_dont_need = %d\n", pdsm_remote_control_ptr->work_load_out.percent_fadvise_dont_need); + exit(1); + } + } + /* Percent madvise_seq */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_madvise_seq); + if (verbose) + printf ("Percent_madvise_seq: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_madvise_seq); + if( pdsm_remote_control_ptr->work_load_out.percent_madvise_seq > 100) + { + printf("Corrupted Percent_madvise_seq = %d\n", pdsm_remote_control_ptr->work_load_out.percent_madvise_seq); + exit(1); + } + } + /* Percent madvise_rand */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_madvise_rand); + if (verbose) + printf ("Percent_madvise_rand: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_madvise_rand); + if( pdsm_remote_control_ptr->work_load_out.percent_madvise_rand > 100) + { + printf("Corrupted Percent_madvise_rand = %d\n", pdsm_remote_control_ptr->work_load_out.percent_madvise_rand); + exit(1); + } + } + /* Percent madvise_dont_need */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_madvise_dont_need); + if (verbose) + printf ("Percent_madvise_dont_need: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_madvise_dont_need); + if( pdsm_remote_control_ptr->work_load_out.percent_madvise_dont_need > 100) + { + printf("Corrupted Percent_madvise_dont_need = %d\n", pdsm_remote_control_ptr->work_load_out.percent_madvise_dont_need); + exit(1); + } + } + /* Align */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.align); + if (verbose) + printf ("Align: %d\n", + pdsm_remote_control_ptr->work_load_out.align); + } + /* Percent Osync */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_osync); + if (verbose) + printf ("Percent_osync: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_osync); + if( pdsm_remote_control_ptr->work_load_out.percent_osync > 100) + { + printf("Corrupted Percent_osync = %d\n", pdsm_remote_control_ptr->work_load_out.percent_osync); + exit(1); + } + } + /* Percent Geometric */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_geometric); + if (verbose) + printf ("Percent_geometric: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_geometric); + if( pdsm_remote_control_ptr->work_load_out.percent_geometric > 100) + { + printf("Corrupted Percent_geometric = %d\n", pdsm_remote_control_ptr->work_load_out.percent_geometric); + exit(1); + } + } + /* Percent compress */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_compress); + if (verbose) + printf ("Percent_compress: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_compress); + if( pdsm_remote_control_ptr->work_load_out.percent_compress > 100) + { + printf("Corrupted Percent_compress = %d\n", pdsm_remote_control_ptr->work_load_out.percent_compress); + exit(1); + } + } + /* Percent Dedup */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_dedup); + if (verbose) + printf ("Percent_dedup: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_dedup); + if( pdsm_remote_control_ptr->work_load_out.percent_dedup > 100) + { + printf("Corrupted Percent_dedup = %d\n", pdsm_remote_control_ptr->work_load_out.percent_dedup); + exit(1); + } + } + /* Percent Dedup Within */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_dedup_within); + if (verbose) + printf ("Percent_dedup_within: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_dedup_within); + if( pdsm_remote_control_ptr->work_load_out.percent_dedup_within > 100) + { + printf("Corrupted Percent_dedup_within = %d\n", pdsm_remote_control_ptr->work_load_out.percent_dedup_within); + exit(1); + } + } + /* Percent Dedup Across */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_dedup_across); + if (verbose) + printf ("Percent_dedup_across: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_dedup_across); + if( pdsm_remote_control_ptr->work_load_out.percent_dedup_across > 100) + { + printf("Corrupted Percent_dedup_across = %d\n", pdsm_remote_control_ptr->work_load_out.percent_dedup_across); + exit(1); + } + } + /* Dedup group count */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + dedup_group_count); + if (verbose) + printf ("Dedup_group_count: %d\n", + pdsm_remote_control_ptr->work_load_out. + dedup_group_count); + } + /* Percent per spot */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_per_spot); + if (verbose) + printf ("Percent_per_spot: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_per_spot); + if( pdsm_remote_control_ptr->work_load_out.percent_per_spot > 100) + { + printf("Corrupted Percent_per_spot = %d\n", pdsm_remote_control_ptr->work_load_out.percent_per_spot); + exit(1); + } + } + /* Min accesses per spot */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_per_spot); + if (verbose) + printf ("Min_acc_per_spot: %d\n", + pdsm_remote_control_ptr->work_load_out. + min_acc_per_spot); + } + /* Access multiplier spot */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + acc_mult_spot); + if (verbose) + printf ("Acc_mult_spot: %d\n", + pdsm_remote_control_ptr->work_load_out. + acc_mult_spot); + } + /* Percent affinity */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + percent_affinity); + if (verbose) + printf ("Percent_affinity: %d\n", + pdsm_remote_control_ptr->work_load_out. + percent_affinity); + if( pdsm_remote_control_ptr->work_load_out.percent_affinity > 100) + { + printf("Corrupted Percent_affinity = %d\n", pdsm_remote_control_ptr->work_load_out.percent_affinity); + exit(1); + } + } + /* Spot shape */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.spot_shape); + if (verbose) + printf ("Spot_shape: %d\n", + pdsm_remote_control_ptr->work_load_out. + spot_shape); + } + /* Dedupe granule size */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + dedup_granule_size); + if (verbose) + printf ("Dedup_granule_size: %d\n", + pdsm_remote_control_ptr->work_load_out. + dedup_granule_size); + } + /* Dedupe gran rep limit */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + dedup_gran_rep_limit); + if (verbose) + printf ("Dedup_gran_rep_limit: %d\n", + pdsm_remote_control_ptr->work_load_out. + dedup_gran_rep_limit); + } + /* Use file size distribution */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + use_file_size_dist); + if (verbose) + printf ("Use_file_size_dist: %d\n", + pdsm_remote_control_ptr->work_load_out. + use_file_size_dist); + } + /* Compression granule size */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + comp_granule_size); + if (verbose) + printf ("Comp_granule_size: %d\n", + pdsm_remote_control_ptr->work_load_out. + comp_granule_size); + } + /* Background mode */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.background); + if (verbose) + printf ("Background: %d\n", + pdsm_remote_control_ptr->work_load_out. + background); + } + /* Share Mode */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.sharemode); + if (verbose) + printf ("Sharemode: %d\n", + pdsm_remote_control_ptr->work_load_out.sharemode); + } + /* Rand dist behavior */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + rand_dist_behavior); + if (verbose) + printf ("Rand_dist_behavior: %d\n", + pdsm_remote_control_ptr->work_load_out. + rand_dist_behavior); + } + /* Uniform file size dist */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + uniform_file_size_dist); + if (verbose) + printf ("Uniform_file_size_dist: %d\n", + pdsm_remote_control_ptr->work_load_out. + uniform_file_size_dist); + } + /* Cipher */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.cipher); + if (verbose) + printf ("Cipher: %d\n", + pdsm_remote_control_ptr->work_load_out.cipher); + } + /* Notify */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.notify); + if (verbose) + printf ("Notify: %d\n", + pdsm_remote_control_ptr->work_load_out.notify); + } + /* LRU on */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.lru_on); + if (verbose) + printf ("Lru_on: %d\n", + pdsm_remote_control_ptr->work_load_out.lru_on); + } + /* Pattern version */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.patt_vers); + if (verbose) + printf ("Patt_vers: %d\n", + pdsm_remote_control_ptr->work_load_out.patt_vers); + } + /* Init rate enable */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + init_rate_enable); + if (verbose) + printf ("Init_rate_enable: %d\n", + pdsm_remote_control_ptr->work_load_out. + init_rate_enable); + } + /* Init rate speed */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%f", + &pdsm_remote_control_ptr->work_load_out. + init_rate_speed); + if (verbose) + printf ("Init_rate_speed: %f\n", + pdsm_remote_control_ptr->work_load_out. + init_rate_speed); + } + /* Init read */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.init_read); + if (verbose) + printf ("Init_rate_read: %d\n", + pdsm_remote_control_ptr->work_load_out.init_read); + } + /* Shared Buckets */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + shared_buckets); + if (verbose) + printf ("Shared_buckets: %d\n", + pdsm_remote_control_ptr->work_load_out. + shared_buckets); + } + /* Unlink2 no recreate */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + unlink2_no_recreate); + if (verbose) + printf ("Unlink2_no_recreate: %d\n", + pdsm_remote_control_ptr->work_load_out. + unlink2_no_recreate); + } + /* Extra dir levels */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + extra_dir_levels); + if (verbose) + printf ("Extra_dir_levels: %d\n", + pdsm_remote_control_ptr->work_load_out. + extra_dir_levels); + } + /* Chaff count */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.chaff_count); + if (verbose) + printf ("Chaff_count: %d\n", + pdsm_remote_control_ptr->work_load_out. + chaff_count); + } + /* Dir count */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.dir_count); + if (verbose) + printf ("Dir_count: %d\n", + pdsm_remote_control_ptr->work_load_out.dir_count); + } + /* Instances */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.instances); + if (verbose) + printf ("Instances: %d\n", + pdsm_remote_control_ptr->work_load_out.instances); + } + /* Op_rate */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%f", + &pdsm_remote_control_ptr->work_load_out.op_rate); + if (verbose) + printf ("Op_rate: %f\n", + pdsm_remote_control_ptr->work_load_out.op_rate); + } + /* Files per dir */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out. + files_per_dir); + if (verbose) + printf ("Files_per_dir: %d\n", + pdsm_remote_control_ptr->work_load_out. + files_per_dir); + } + /* File Size */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.file_size); + if (verbose) + printf ("File_size: %d\n", + pdsm_remote_control_ptr->work_load_out.file_size); + } + /* Release version */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.rel_version); + if (verbose) + printf ("Rel_version: %d\n", + pdsm_remote_control_ptr->work_load_out. + rel_version); + } + /* Warmup time */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%d", + &pdsm_remote_control_ptr->work_load_out.warm_time); + if (verbose) + printf ("Warm_time: %d\n", + pdsm_remote_control_ptr->work_load_out.warm_time); + } + /* Platform type */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.platform_type); + if (verbose) + printf ("Platform_type: %s\n", + pdsm_remote_control_ptr->work_load_out. + platform_type); + } + /* FS type */ + there = next_token (my_end, &my_end); + if (there) + { + sscanf (there, "%s", + pdsm_remote_control_ptr->work_load_out.fs_type); + if (verbose) + printf ("Fs_type: %s\n", + pdsm_remote_control_ptr->work_load_out.fs_type); + } + + /* + * Open the pdsm_control file for write access + */ +#if defined(WIN32) + flags |= FILE_FLAG_POSIX_SEMANTICS; +#else + flags = O_RDWR; +#endif + +#if defined(WIN32) + pdsm_file_fd = CreateFile (my_pdsm_file, + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE | + FILE_SHARE_DELETE, NULL, OPEN_ALWAYS, + flags, NULL); +#else + pdsm_file_fd = open (my_pdsm_file, flags, 0666); +#endif + if (pdsm_file_fd < 0) + { + printf ("Unable to open %s\n", my_pdsm_file); + exit (1); + } + + lock_pdsm_control(pdsm_file_fd); + /* + * Update values in the pdsm_control file + */ +#if defined(WIN32) + largeoffset.QuadPart = + sizeof (struct pdsm_remote_control) * + pdsm_remote_control_ptr->client_id; + SetFilePointerEx (pdsm_file_fd, largeoffset, NULL, + FILE_BEGIN); +#else + + lseek (pdsm_file_fd, + pdsm_remote_control_ptr->client_id * + sizeof (struct pdsm_remote_control), SEEK_SET); +#endif + +#if defined(WIN32) + WriteFile (pdsm_file_fd, pdsm_remote_control_ptr, + sizeof (struct pdsm_remote_control), &ret, NULL); +#else + + ret = write (pdsm_file_fd, pdsm_remote_control_ptr, + sizeof (struct pdsm_remote_control)); +#endif + if(ret <=0) + { +#if defined(WIN32) + error_value = GetLastError(); + printf("Error writing to pdsm_control file. Error %d\n", + errno); +#else + error_value = errno; + printf("Error writing to pdsm_control file. Error %d\n", + error_value); +#endif + unlock_pdsm_control(pdsm_file_fd); + exit(1); + } +#if defined(WIN32) + FlushFileBuffers(pdsm_file_fd); +#else + fsync (pdsm_file_fd); +#endif + unlock_pdsm_control(pdsm_file_fd); + /* + * Need to close and re-open, or Windows won't work due to + * exclusive locking on all open() calls. + */ +#if defined(WIN32) + CloseHandle(pdsm_file_fd); +#else + close (pdsm_file_fd); +#endif + } + } +} + +void +usage () +{ + printf ("put_control:\n"); + printf ("\t-h............ Help screen\n"); + printf ("\t-f............ pdsm_control_file_name\n"); + printf ("\t-p............ TCP port\n"); + printf ("\t-v............ Display version information\n"); + printf ("\n"); +} + +char * +next_token (char *start, char **end) +{ + char *there, *endptr; + + there = strstr (start, ":"); + if (there) + { + there++; + endptr = strstr (there, ","); + if (endptr) + { + *endptr = 0; + endptr++; + *end = endptr; + } + return (there); + } + else + return (NULL); +} --- ../SPECstorage2020_2511/./netmist/get_control.c 1969-12-31 18:00:00.000000000 -0600 +++ ./netmist/get_control.c 2022-03-06 11:23:24.000000000 -0600 @@ -0,0 +1,589 @@ +/* + * Copyright 2002-2021 + * Created: Sept 2021 + * Author: Don Capps + * Location: Iozone.org + * + * This is an app that can be used to get values from the + * pdsm_control_file. It is a simple demonstration of the capabilty to + * get variables that are modified by a set of distributed clients, and + * transported over a TCP connection into a visualization tool. + * + * In this case, Netmist is running on a bunch of clients. Netmist + * detects if PDSM is active, and if so, it will deposit the + * current control data from every client into the PDSM control file. + * + * This example takes the data from the PDSM control file and sends it to + * a server for processing. ( Thinking NCSU visualization tool here ) + * + */ +#define PDSM_RO_ACTIVE + +#include +#if !defined(WIN32) +#include +#include +#include +#include +#endif +#include +#include +#include +#include +#include +#if defined(LITE) +#include "lite/netmist.h" +#else +#if defined(PRO) +#include "pro/netmist.h" +#else +#include "dist/netmist.h" +#endif +#endif +#if defined(WIN32) +#pragma warning(disable:4996) +#pragma warning(disable:4267) +#pragma warning(disable:4133) +#pragma warning(disable:4244) +#pragma warning(disable:4102) +#pragma warning(disable:4018) +#include <../win32lib/win32_sub.h> +#include <../win32lib/win32_getopt.h> +#endif +#include "netmist_version.c" + +int verbose = 1; +int interval = 2; +FILE *NCSU_nc_file; +#if defined(WIN32) +HANDLE pdsm_file_fd; +LARGE_INTEGER largeoffset; +#else +int pdsm_file_fd; +#endif +int stop_flag; +time_t my_time; +char my_pdsm_file[256]; +int scan_pdsm_control_file (void); +int getopt (); +int client_id, no_loop, set_continue; +struct pdsm_remote_control *pdsm_remote_control_ptr; + +time_t dummytime; +char time_string[30]; +int number_of_entries; +int number; +char cret; +void usage (void); +int pdsm_control_file_fd; +char hostname[256]; +char workload_name[256]; +char command[256]; +int NCSU_active;; +char NCSU_hostname[256]; +int NCSU_port; +char timestr[50]; + +#if defined(WIN32) +void +unlock_pdsm_control(HANDLE fd) +{ + UnlockFile (fd, (DWORD)0, (DWORD)-1, (DWORD) - 1, (DWORD) - 1); +} +#else +void +unlock_pdsm_control( int fd) +{ + struct flock flk; + int res; + + flk.l_type = F_UNLCK; /* Unlock */ + res = fcntl (fd, F_SETLKW, &flk); + if (res != 0) + { + perror("unlock of pdsm control file error\n"); + } +/* + else + printf("Unlock of pdsm control file succeeded\n"); +*/ +} +#endif + +#if defined(WIN32) +void +lock_pdsm_control(HANDLE fd) +{ + LockFileEx( + fd, + LOCKFILE_EXCLUSIVE_LOCK, + 0, + (DWORD)-1, + (DWORD)-1, + NULL); +} +#else +void +lock_pdsm_control(int fd) +{ + struct flock flk; + int res; + + flk.l_type = F_WRLCK; + flk.l_whence = SEEK_SET; + flk.l_start = 0; + flk.l_len = 0; /* The whole file */ + flk.l_pid = getpid (); + + res = fcntl (fd, F_SETLKW, &flk); + if (res != 0) + { + perror("Lock of pdsm control file error\n"); + } +/* + else + printf("lock of pdsm control file succeeded\n"); +*/ + +} +#endif + +int +main (int argc, char **argv) +{ + + int j, i; +#if defined(WIN32) + DWORD ret, flags = 0; +#else + int ret, flags = 0; +#endif + if (argc == 1) + { + usage (); + exit (0); + }; + while ((cret = getopt (argc, argv, "hvf:s:p:")) != EOF) + { + switch (cret) + { + case 'h': /* Help screen */ + usage (); + exit (0); + break; + case 'v': /* Version */ + printf ("Version %s\n", git_version); + exit (0); + break; + case 'f': /* pdsm control file */ + strcpy (my_pdsm_file, optarg); + break; + case 's': /* NCSU server */ + NCSU_active++; + strcpy (NCSU_hostname, optarg); + break; + case 'p': /* ncat port */ + NCSU_port = atoi (optarg); + break; + }; + } + + pdsm_remote_control_ptr = (struct pdsm_remote_control *) + malloc (sizeof (struct pdsm_remote_control)); + if (pdsm_remote_control_ptr == NULL) + { + printf ("Malloc failed for size %d\n", + (int) sizeof (struct pdsm_remote_control)); + exit (1); + } + + if (NCSU_active) + { + snprintf (command, sizeof (command), "nc %s %d", NCSU_hostname, + NCSU_port); + NCSU_nc_file = popen (command, "w"); + if (NCSU_nc_file == 0) + { + printf ("popen failed %d\n", errno); + exit (1); + } + } +#if defined(WIN32) + flags |= FILE_FLAG_POSIX_SEMANTICS; +#else + flags = O_RDWR; +#endif + while (1) + { + printf ("Scanning control frames\n"); + number_of_entries = scan_pdsm_control_file (); +#if defined(WIN32) + pdsm_file_fd = CreateFile (my_pdsm_file, + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE | + FILE_SHARE_DELETE, NULL, OPEN_ALWAYS, + flags, NULL); +#else + pdsm_file_fd = open (my_pdsm_file, flags, 0666); +#endif + if (pdsm_file_fd < 0) + { + printf ("Unable to open %s\n", my_pdsm_file); + exit (1); + } + printf ("Found %d collection frames\n", number_of_entries); + + lock_pdsm_control(pdsm_file_fd); /* lock for now */ + + for (j = 0; j < number_of_entries; j++) + { +#if defined(WIN32) + largeoffset.QuadPart = + j * sizeof (struct pdsm_remote_control); + SetFilePointerEx (pdsm_file_fd, largeoffset, NULL, + FILE_BEGIN); +#else + + lseek (pdsm_file_fd, + j * sizeof (struct pdsm_remote_control), SEEK_SET); +#endif +#if defined(WIN32) + ReadFile (pdsm_file_fd, pdsm_remote_control_ptr, + sizeof (struct pdsm_remote_control), &ret, NULL); +#else + ret = read (pdsm_file_fd, pdsm_remote_control_ptr, + sizeof (struct pdsm_remote_control)); +#endif + + if (ret <= 0) + break; + strcpy (hostname, pdsm_remote_control_ptr->hostname); + client_id = pdsm_remote_control_ptr->client_id; + + if (NCSU_active && (strlen (hostname) != 0)) + { + fprintf (NCSU_nc_file, + "Host:%s,Client_id:%d,Op_rate_value:%lf,Set_op_rate_flag:%d,Set_workload_flag:%d,Workload_name:%s,Percent_read:%d,Read_string:%s,Percent_read_file:%d,Read_file_string:%s,Percent_mmap_read:%d,Mmap_read_string:%s,Percent_read_rand:%d,Read_rand_string:%s,Percent_write:%d,Write_string:%s,Percent_write_file:%d,Write_file_string:%s,Percent_mmap_write:%d,Mmap_write_string:%s,Percent_write_rand:%d,Write_rand_string:%s,Percent_rmw:%d,Rmw_string:%s,Precent_mkdir:%d,Mkdir_string:%s,Percent_rmdir:%d,Rmdir_string:%s,Percent_unlink:%d,Unlink_string:%s,Percent_unlink2:%d,Unlink2_string:%s,Percent_create:%d,Create_string:%s,Percent_append:%d,Append_string:%s,Percent_locking:%d,Locking_string:%s,Percent_access:%d,Access_string:%s,Percent_stat:%d,Stat_string:%s,Percent_neg_stat:%d,Neg_stat_string:%s,Percent_chmod:%d,Chmod_string:%s,Percent_readdir:%d,Readdir_string:%s,Percent_copyfile:%d,Copyfile_string:%s,Percent_rename:%d,Rename_string:%s,Percent_statfs:%d,Statfs_string:%s,Percent_pathconf:%d,Pathconf_string:%s,Percent_trunc:%d,Trunc_string:%s,Percent_custom1:%d,Custom1_string:%s,Percent_custom2:%d,Custom2_string:%s,", + hostname, client_id, + pdsm_remote_control_ptr->op_rate, + pdsm_remote_control_ptr->set_op_rate, + pdsm_remote_control_ptr->set_workload, + pdsm_remote_control_ptr->work_load_out.workload_name, + pdsm_remote_control_ptr->work_load_out.percent_read, + pdsm_remote_control_ptr->work_load_out.read_string, + pdsm_remote_control_ptr->work_load_out. + percent_read_file, + pdsm_remote_control_ptr->work_load_out. + read_file_string, + pdsm_remote_control_ptr->work_load_out. + percent_mmap_read, + pdsm_remote_control_ptr->work_load_out. + mmap_read_string, + pdsm_remote_control_ptr->work_load_out. + percent_read_rand, + pdsm_remote_control_ptr->work_load_out. + read_rand_string, + pdsm_remote_control_ptr->work_load_out.percent_write, + pdsm_remote_control_ptr->work_load_out.write_string, + pdsm_remote_control_ptr->work_load_out. + percent_write_file, + pdsm_remote_control_ptr->work_load_out. + write_file_string, + pdsm_remote_control_ptr->work_load_out. + percent_mmap_write, + pdsm_remote_control_ptr->work_load_out. + mmap_write_string, + pdsm_remote_control_ptr->work_load_out. + percent_write_rand, + pdsm_remote_control_ptr->work_load_out. + write_rand_string, + pdsm_remote_control_ptr->work_load_out.percent_rmw, + pdsm_remote_control_ptr->work_load_out.rmw_string, + pdsm_remote_control_ptr->work_load_out.percent_mkdir, + pdsm_remote_control_ptr->work_load_out.mkdir_string, + pdsm_remote_control_ptr->work_load_out.percent_rmdir, + pdsm_remote_control_ptr->work_load_out.rmdir_string, + pdsm_remote_control_ptr->work_load_out. + percent_unlink, + pdsm_remote_control_ptr->work_load_out.unlink_string, + pdsm_remote_control_ptr->work_load_out. + percent_unlink2, + pdsm_remote_control_ptr->work_load_out. + unlink2_string, + pdsm_remote_control_ptr->work_load_out. + percent_create, + pdsm_remote_control_ptr->work_load_out.create_string, + pdsm_remote_control_ptr->work_load_out. + percent_append, + pdsm_remote_control_ptr->work_load_out.append_string, + pdsm_remote_control_ptr->work_load_out. + percent_locking, + pdsm_remote_control_ptr->work_load_out. + locking_string, + pdsm_remote_control_ptr->work_load_out. + percent_access, + pdsm_remote_control_ptr->work_load_out.access_string, + pdsm_remote_control_ptr->work_load_out.percent_stat, + pdsm_remote_control_ptr->work_load_out.stat_string, + pdsm_remote_control_ptr->work_load_out. + percent_neg_stat, + pdsm_remote_control_ptr->work_load_out. + neg_stat_string, + pdsm_remote_control_ptr->work_load_out.percent_chmod, + pdsm_remote_control_ptr->work_load_out.chmod_string, + pdsm_remote_control_ptr->work_load_out. + percent_readdir, + pdsm_remote_control_ptr->work_load_out. + readdir_string, + pdsm_remote_control_ptr->work_load_out. + percent_copyfile, + pdsm_remote_control_ptr->work_load_out. + copyfile_string, + pdsm_remote_control_ptr->work_load_out. + percent_rename, + pdsm_remote_control_ptr->work_load_out.rename_string, + pdsm_remote_control_ptr->work_load_out. + percent_statfs, + pdsm_remote_control_ptr->work_load_out.statfs_string, + pdsm_remote_control_ptr->work_load_out. + percent_pathconf, + pdsm_remote_control_ptr->work_load_out. + pathconf_string, + pdsm_remote_control_ptr->work_load_out.percent_trunc, + pdsm_remote_control_ptr->work_load_out.trunc_string, + pdsm_remote_control_ptr->work_load_out. + percent_custom1, + pdsm_remote_control_ptr->work_load_out. + custom1_string, + pdsm_remote_control_ptr->work_load_out. + percent_custom2, + pdsm_remote_control_ptr->work_load_out. + custom2_string); + + /* Read sizes */ + for (i = 0; i < MAX_DIST_ELEM; i++) + { + fprintf (NCSU_nc_file, "Read_dist[%d].size_min:%d,", i, + pdsm_remote_control_ptr->work_load_out. + read_dist[i].size_min); + fprintf (NCSU_nc_file, "Read_dist[%d].size_max:%d,", i, + pdsm_remote_control_ptr->work_load_out. + read_dist[i].size_max); + fprintf (NCSU_nc_file, "Read_dist[%d].percent:%d,", i, + pdsm_remote_control_ptr->work_load_out. + read_dist[i].percent); + }; + /* Write sizes */ + for (i = 0; i < MAX_DIST_ELEM; i++) + { + fprintf (NCSU_nc_file, "Write_dist[%d].size_min:%d,", i, + pdsm_remote_control_ptr->work_load_out. + write_dist[i].size_min); + fprintf (NCSU_nc_file, "Write_dist[%d].size_max:%d,", i, + pdsm_remote_control_ptr->work_load_out. + write_dist[i].size_max); + fprintf (NCSU_nc_file, "Write_dist[%d].percent:%d,", i, + pdsm_remote_control_ptr->work_load_out. + write_dist[i].percent); + }; + /* File sizes */ + for (i = 0; i < MAX_DIST_ELEM; i++) + { + fprintf (NCSU_nc_file, + "File_size_dist[%d].size_min:%lld,", i, + pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].size_min); + fprintf (NCSU_nc_file, + "File_size_dist[%d].size_max:%lld,", i, + pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].size_max); + fprintf (NCSU_nc_file, "File_size_dist[%d].percent:%d,", + i, + pdsm_remote_control_ptr->work_load_out. + file_size_dist[i].percent); + }; + fprintf (NCSU_nc_file, + "Min_pre_name_len:%d,Max_pre_name_len:%d,", + pdsm_remote_control_ptr->work_load_out. + min_pre_name_length, + pdsm_remote_control_ptr->work_load_out. + max_pre_name_length); + fprintf (NCSU_nc_file, + "Min_post_name_len:%d,Max_post_name_len:%d,", + pdsm_remote_control_ptr->work_load_out. + min_post_name_length, + pdsm_remote_control_ptr->work_load_out. + max_post_name_length); + + fprintf (NCSU_nc_file, "Percent_commit:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_commit); + fprintf (NCSU_nc_file, "Percent_direct:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_direct); + fprintf (NCSU_nc_file, "Percent_fadvise_seq:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_fadvise_seq); + fprintf (NCSU_nc_file, "Percent_fadvise_rand:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_fadvise_rand); + fprintf (NCSU_nc_file, "Percent_fadvise_dont_need:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_fadvise_dont_need); + fprintf (NCSU_nc_file, "Percent_madvise_seq:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_madvise_seq); + fprintf (NCSU_nc_file, "Percent_madvise_rand:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_madvise_rand); + fprintf (NCSU_nc_file, "Percent_madvise_dont_need:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_madvise_dont_need); + fprintf (NCSU_nc_file, "Align:%d,", + pdsm_remote_control_ptr->work_load_out.align); + fprintf (NCSU_nc_file, "Percent_osync:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_osync); + fprintf (NCSU_nc_file, "Percent_geometric:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_geometric); + fprintf (NCSU_nc_file, "Percent_compress:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_compress); + fprintf (NCSU_nc_file, "Percent_dedup:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_dedup); + fprintf (NCSU_nc_file, "Percent_dedup_within:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_dedup_within); + fprintf (NCSU_nc_file, "Percent_dedup_across:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_dedup_across); + fprintf (NCSU_nc_file, "Dedup_group_count:%d,", + pdsm_remote_control_ptr->work_load_out. + dedup_group_count); + fprintf (NCSU_nc_file, "Percent_per_spot:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_per_spot); + fprintf (NCSU_nc_file, "Min_acc_per_spot:%d,", + pdsm_remote_control_ptr->work_load_out. + min_acc_per_spot); + fprintf (NCSU_nc_file, "Acc_mult_spot:%d,", + pdsm_remote_control_ptr->work_load_out. + acc_mult_spot); + fprintf (NCSU_nc_file, "Percent_affinity:%d,", + pdsm_remote_control_ptr->work_load_out. + percent_affinity); + fprintf (NCSU_nc_file, "Spot_shape:%d,", + pdsm_remote_control_ptr->work_load_out.spot_shape); + fprintf (NCSU_nc_file, "Dedup_granule_size:%d,", + pdsm_remote_control_ptr->work_load_out. + dedup_granule_size); + fprintf (NCSU_nc_file, "Dedup_gran_rep_limit:%d,", + pdsm_remote_control_ptr->work_load_out. + dedup_gran_rep_limit); + fprintf (NCSU_nc_file, "Use_file_size_dist:%d,", + pdsm_remote_control_ptr->work_load_out. + use_file_size_dist); + fprintf (NCSU_nc_file, "Comp_granule_size:%d,", + pdsm_remote_control_ptr->work_load_out. + comp_granule_size); + fprintf (NCSU_nc_file, "Background:%d,", + pdsm_remote_control_ptr->work_load_out.background); + fprintf (NCSU_nc_file, "Sharemode:%d,", + pdsm_remote_control_ptr->work_load_out.sharemode); + fprintf (NCSU_nc_file, "Rand_dist_behavior:%d,", + pdsm_remote_control_ptr->work_load_out. + rand_dist_behavior); + fprintf (NCSU_nc_file, "Uniform_file_size_dist:%d,", + pdsm_remote_control_ptr->work_load_out. + uniform_file_size_dist); + fprintf (NCSU_nc_file, "Cipher:%d,", + pdsm_remote_control_ptr->work_load_out.cipher); + fprintf (NCSU_nc_file, "Notify:%d,", + pdsm_remote_control_ptr->work_load_out.notify); + fprintf (NCSU_nc_file, "Lru_on:%d,", + pdsm_remote_control_ptr->work_load_out.lru_on); + fprintf (NCSU_nc_file, "Patt_vers:%d,", + pdsm_remote_control_ptr->work_load_out.patt_vers); + fprintf (NCSU_nc_file, "Init_rate_enable:%d,", + pdsm_remote_control_ptr->work_load_out. + init_rate_enable); + fprintf (NCSU_nc_file, "Init_rate_speed:%f,", + pdsm_remote_control_ptr->work_load_out. + init_rate_speed); + fprintf (NCSU_nc_file, "Init_read:%d,", + pdsm_remote_control_ptr->work_load_out.init_read); + fprintf (NCSU_nc_file, "Shared_buckets:%d,", + pdsm_remote_control_ptr->work_load_out. + shared_buckets); + fprintf (NCSU_nc_file, "Unlink2_no_recreate:%d,", + pdsm_remote_control_ptr->work_load_out. + unlink2_no_recreate); + fprintf (NCSU_nc_file, "Extra_dir_levels:%d,", + pdsm_remote_control_ptr->work_load_out. + extra_dir_levels); + fprintf (NCSU_nc_file, "Chaff_count:%d,", + pdsm_remote_control_ptr->work_load_out.chaff_count); + fprintf (NCSU_nc_file, "Dir_count:%d,", + pdsm_remote_control_ptr->work_load_out.dir_count); + fprintf (NCSU_nc_file, "Instances:%d,", + pdsm_remote_control_ptr->work_load_out.instances); + fprintf (NCSU_nc_file, "Op_rate:%f,", + pdsm_remote_control_ptr->work_load_out.op_rate); + fprintf (NCSU_nc_file, "Files_per_dir:%d,", + pdsm_remote_control_ptr->work_load_out. + files_per_dir); + fprintf (NCSU_nc_file, "File_size:%d,", + pdsm_remote_control_ptr->work_load_out.file_size); + fprintf (NCSU_nc_file, "Rel_version:%d,", + pdsm_remote_control_ptr->work_load_out.rel_version); + fprintf (NCSU_nc_file, "Warmup_time:%d,", + pdsm_remote_control_ptr->work_load_out.warm_time); + fprintf (NCSU_nc_file, "Platform_type:%s,", + pdsm_remote_control_ptr->work_load_out. + platform_type); + fprintf (NCSU_nc_file, "fs_type:%s\n", + pdsm_remote_control_ptr->work_load_out.fs_type); + + } + fprintf (NCSU_nc_file, "\n"); + } + unlock_pdsm_control(pdsm_file_fd); /* lock for now */ +#if defined(WIN32) + CloseHandle(pdsm_file_fd); +#else + close (pdsm_file_fd); +#endif + exit (0); + } + return (0); +} + +void +usage () +{ + printf ("get_control:\n"); + printf ("\t-h............ Help screen\n"); + printf ("\t-f............ pdsm_control_file_name\n"); + printf ("\t-s............ NCSU server\n"); + printf ("\t-p............ TCP port\n"); + printf ("\t-v............ Display version information\n"); + printf ("\n"); +} + +int +scan_pdsm_control_file () +{ + int x; + int count = 0; + struct stat my_stat; + x = stat(my_pdsm_file,&my_stat); + if (x < 0) + { + printf ("Unable to stat %s\n", my_pdsm_file); + exit (1); + } + count = (int) (my_stat.st_size / sizeof(struct pdsm_remote_control)); + return (count); +} --- ../SPECstorage2020_2511/./netmist/msbuild/get_control.target 1969-12-31 18:00:00.000000000 -0600 +++ ./netmist/msbuild/get_control.target 2022-03-06 11:23:24.000000000 -0600 @@ -0,0 +1,112 @@ + + + + + Release + Win32 + + + Release + x64 + + + + + NotUsing + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + + + + + + + + + Win32Proj + get_control + 8.1 + + + + Application + false + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + false + $(IncludePath);$(SolutionDir)\..\win32lib + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath);$(SolutionDir)..\build\common\windows\$(Platform)\ + $(SolutionDir)..\build\$(NetmistProd)\windows\$(Platform)\ + $(SolutionDir)..\build\$(NetmistProd)\windows\$(Platform)\get_control\ + + + false + $(IncludePath);$(SolutionDir)\..\win32lib + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath);$(SolutionDir)..\build\common\windows\$(Platform)\ + $(SolutionDir)..\build\$(NetmistProd)\windows\$(Platform)\ + $(SolutionDir)..\build\$(NetmistProd)\windows\$(Platform)\get_control\ + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;_NDEBUG;_CONSOLE;%(PreprocessorDefinitions);__STDC__;_NTSUBSET_;HAVE_ANSIC_C + MultiThreadedDLL + + + Console + true + true + true + Netapi32.lib;Ws2_32.lib;win32lib.lib;%(AdditionalDependencies) + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + + + Console + true + true + true + Netapi32.lib;Ws2_32.lib;win32lib.lib;%(AdditionalDependencies) + + + + + + --- ../SPECstorage2020_2511/./netmist/msbuild/put_control.target 1969-12-31 18:00:00.000000000 -0600 +++ ./netmist/msbuild/put_control.target 2022-03-06 11:23:24.000000000 -0600 @@ -0,0 +1,112 @@ + + + + + Release + Win32 + + + Release + x64 + + + + + NotUsing + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + + + + + + + + + Win32Proj + put_control + 8.1 + + + + Application + false + true + Unicode + v140 + + + Application + false + true + Unicode + v140 + + + + + + + + + + + + + false + $(IncludePath);$(SolutionDir)\..\win32lib + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath);$(SolutionDir)..\build\common\windows\$(Platform)\ + $(SolutionDir)..\build\$(NetmistProd)\windows\$(Platform)\ + $(SolutionDir)..\build\$(NetmistProd)\windows\$(Platform)\put_control\ + + + false + $(IncludePath);$(SolutionDir)\..\win32lib + $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\ + $(LibraryPath);$(SolutionDir)..\build\common\windows\$(Platform)\ + $(SolutionDir)..\build\$(NetmistProd)\windows\$(Platform)\ + $(SolutionDir)..\build\$(NetmistProd)\windows\$(Platform)\put_control\ + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;_NDEBUG;_CONSOLE;%(PreprocessorDefinitions);__STDC__;_NTSUBSET_;HAVE_ANSIC_C + MultiThreadedDLL + + + Console + true + true + true + Netapi32.lib;Ws2_32.lib;win32lib.lib;%(AdditionalDependencies) + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + + + Console + true + true + true + Netapi32.lib;Ws2_32.lib;win32lib.lib;%(AdditionalDependencies) + + + + + + --- ../SPECstorage2020_2511/./netmist/dist/msbuild/netmist.vcxproj 2022-04-05 15:17:42.409844165 -0500 +++ ./netmist/dist/msbuild/netmist.vcxproj 2022-03-06 11:23:24.000000000 -0600 @@ -16,6 +16,7 @@ + @@ -27,16 +28,21 @@ + + + + ..;..\..\dist_pro;..\..\;$(AdditionalIncludeDirectories) + YAML_DECLARE_STATIC --- ../SPECstorage2020_2511/./netmist/dist/msbuild/get_control.vcxproj 1969-12-31 18:00:00.000000000 -0600 +++ ./netmist/dist/msbuild/get_control.vcxproj 2022-03-06 11:23:24.000000000 -0600 @@ -0,0 +1,31 @@ + + + + {A87405CA-17F5-4091-A4A2-0A590F2626E0} + + + dist + $(SolutionDir)\dist_pro;$(SolutionDir)\dist + SPEC_DIST + + + + + + + + + + + + + + ..;..\..\dist_pro;..\..\;$(AdditionalIncludeDirectories) + + + + %(AdditionalDependencies) + + + + \ No newline at end of file --- ../SPECstorage2020_2511/./netmist/dist/msbuild/put_control.vcxproj 1969-12-31 18:00:00.000000000 -0600 +++ ./netmist/dist/msbuild/put_control.vcxproj 2022-03-06 11:23:24.000000000 -0600 @@ -0,0 +1,31 @@ + + + + {0139CD3A-FADE-4075-9E9A-D563B5852C4A} + + + dist + $(SolutionDir)\dist_pro;$(SolutionDir)\dist + SPEC_DIST + + + + + + + + + + + + + + ..;..\..\dist_pro;..\..\;$(AdditionalIncludeDirectories) + + + + %(AdditionalDependencies) + + + + \ No newline at end of file --- ../SPECstorage2020_2511/./msbuild/netmist_dist.sln 2022-04-05 15:17:42.401844023 -0500 +++ ./msbuild/netmist_dist.sln 2022-03-06 11:23:24.000000000 -0600 @@ -29,36 +29,156 @@ {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD} = {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "get_control", "..\netmist\dist\msbuild\get_control.vcxproj", "{A87405CA-17F5-4091-A4A2-0A590F2626E0}" + ProjectSection(ProjectDependencies) = postProject + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD} = {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "put_control", "..\netmist\dist\msbuild\put_control.vcxproj", "{0139CD3A-FADE-4075-9E9A-D563B5852C4A}" + ProjectSection(ProjectDependencies) = postProject + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD} = {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + MinSizeRel|Win32 = MinSizeRel|Win32 + MinSizeRel|x64 = MinSizeRel|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 + RelWithDebInfo|Win32 = RelWithDebInfo|Win32 + RelWithDebInfo|x64 = RelWithDebInfo|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.Debug|Win32.ActiveCfg = Release|Win32 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.Debug|Win32.Build.0 = Release|Win32 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.Debug|x64.ActiveCfg = Release|x64 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.Debug|x64.Build.0 = Release|x64 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.MinSizeRel|Win32.ActiveCfg = Release|Win32 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.MinSizeRel|Win32.Build.0 = Release|Win32 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.MinSizeRel|x64.ActiveCfg = Release|x64 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.MinSizeRel|x64.Build.0 = Release|x64 {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.Release|Win32.ActiveCfg = Release|Win32 {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.Release|Win32.Build.0 = Release|Win32 {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.Release|x64.ActiveCfg = Release|x64 {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.Release|x64.Build.0 = Release|x64 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.RelWithDebInfo|Win32.Build.0 = Release|Win32 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.RelWithDebInfo|x64.ActiveCfg = Release|x64 + {565D2A6D-4179-41C4-92BF-D32A2EB7EB21}.RelWithDebInfo|x64.Build.0 = Release|x64 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.Debug|Win32.ActiveCfg = Debug|Win32 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.Debug|Win32.Build.0 = Debug|Win32 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.Debug|x64.ActiveCfg = Debug|x64 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.Debug|x64.Build.0 = Debug|x64 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.MinSizeRel|Win32.ActiveCfg = Release_VS2012|Win32 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.MinSizeRel|Win32.Build.0 = Release_VS2012|Win32 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.MinSizeRel|x64.ActiveCfg = Release_VS2012|x64 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.MinSizeRel|x64.Build.0 = Release_VS2012|x64 {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.Release|Win32.ActiveCfg = Release|Win32 {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.Release|Win32.Build.0 = Release|Win32 {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.Release|x64.ActiveCfg = Release|x64 {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.Release|x64.Build.0 = Release|x64 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.RelWithDebInfo|Win32.ActiveCfg = Release_VS2012|Win32 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.RelWithDebInfo|Win32.Build.0 = Release_VS2012|Win32 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.RelWithDebInfo|x64.ActiveCfg = Release_VS2012|x64 + {A4E4C38C-8BFF-42F3-9318-DEA33CAE7BAD}.RelWithDebInfo|x64.Build.0 = Release_VS2012|x64 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.Debug|Win32.ActiveCfg = Release|Win32 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.Debug|Win32.Build.0 = Release|Win32 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.Debug|x64.ActiveCfg = Release|x64 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.Debug|x64.Build.0 = Release|x64 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.MinSizeRel|Win32.ActiveCfg = Release|Win32 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.MinSizeRel|Win32.Build.0 = Release|Win32 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.MinSizeRel|x64.ActiveCfg = Release|x64 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.MinSizeRel|x64.Build.0 = Release|x64 {C9617581-D313-4C33-B655-D07EAF7EBDF5}.Release|Win32.ActiveCfg = Release|Win32 {C9617581-D313-4C33-B655-D07EAF7EBDF5}.Release|Win32.Build.0 = Release|Win32 {C9617581-D313-4C33-B655-D07EAF7EBDF5}.Release|x64.ActiveCfg = Release|x64 {C9617581-D313-4C33-B655-D07EAF7EBDF5}.Release|x64.Build.0 = Release|x64 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.RelWithDebInfo|Win32.Build.0 = Release|Win32 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.RelWithDebInfo|x64.ActiveCfg = Release|x64 + {C9617581-D313-4C33-B655-D07EAF7EBDF5}.RelWithDebInfo|x64.Build.0 = Release|x64 + {748A24CB-4577-4449-9414-3B2DF17083C2}.Debug|Win32.ActiveCfg = Release|Win32 + {748A24CB-4577-4449-9414-3B2DF17083C2}.Debug|Win32.Build.0 = Release|Win32 + {748A24CB-4577-4449-9414-3B2DF17083C2}.Debug|x64.ActiveCfg = Release|x64 + {748A24CB-4577-4449-9414-3B2DF17083C2}.Debug|x64.Build.0 = Release|x64 + {748A24CB-4577-4449-9414-3B2DF17083C2}.MinSizeRel|Win32.ActiveCfg = Release|Win32 + {748A24CB-4577-4449-9414-3B2DF17083C2}.MinSizeRel|Win32.Build.0 = Release|Win32 + {748A24CB-4577-4449-9414-3B2DF17083C2}.MinSizeRel|x64.ActiveCfg = Release|x64 + {748A24CB-4577-4449-9414-3B2DF17083C2}.MinSizeRel|x64.Build.0 = Release|x64 {748A24CB-4577-4449-9414-3B2DF17083C2}.Release|Win32.ActiveCfg = Release|Win32 {748A24CB-4577-4449-9414-3B2DF17083C2}.Release|Win32.Build.0 = Release|Win32 {748A24CB-4577-4449-9414-3B2DF17083C2}.Release|x64.ActiveCfg = Release|x64 {748A24CB-4577-4449-9414-3B2DF17083C2}.Release|x64.Build.0 = Release|x64 + {748A24CB-4577-4449-9414-3B2DF17083C2}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 + {748A24CB-4577-4449-9414-3B2DF17083C2}.RelWithDebInfo|Win32.Build.0 = Release|Win32 + {748A24CB-4577-4449-9414-3B2DF17083C2}.RelWithDebInfo|x64.ActiveCfg = Release|x64 + {748A24CB-4577-4449-9414-3B2DF17083C2}.RelWithDebInfo|x64.Build.0 = Release|x64 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.Debug|Win32.ActiveCfg = Release|Win32 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.Debug|Win32.Build.0 = Release|Win32 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.Debug|x64.ActiveCfg = Release|x64 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.Debug|x64.Build.0 = Release|x64 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.MinSizeRel|Win32.ActiveCfg = Release|Win32 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.MinSizeRel|Win32.Build.0 = Release|Win32 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.MinSizeRel|x64.ActiveCfg = Release|x64 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.MinSizeRel|x64.Build.0 = Release|x64 {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.Release|Win32.ActiveCfg = Release|Win32 {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.Release|Win32.Build.0 = Release|Win32 {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.Release|x64.ActiveCfg = Release|x64 {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.Release|x64.Build.0 = Release|x64 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.RelWithDebInfo|Win32.Build.0 = Release|Win32 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.RelWithDebInfo|x64.ActiveCfg = Release|x64 + {93F10ADF-8F10-490D-9CB8-B8A378D6ADD5}.RelWithDebInfo|x64.Build.0 = Release|x64 + {53F18541-578E-4A97-8F46-6871012A2E82}.Debug|Win32.ActiveCfg = Release|Win32 + {53F18541-578E-4A97-8F46-6871012A2E82}.Debug|Win32.Build.0 = Release|Win32 + {53F18541-578E-4A97-8F46-6871012A2E82}.Debug|x64.ActiveCfg = Release|x64 + {53F18541-578E-4A97-8F46-6871012A2E82}.Debug|x64.Build.0 = Release|x64 + {53F18541-578E-4A97-8F46-6871012A2E82}.MinSizeRel|Win32.ActiveCfg = Release|Win32 + {53F18541-578E-4A97-8F46-6871012A2E82}.MinSizeRel|Win32.Build.0 = Release|Win32 + {53F18541-578E-4A97-8F46-6871012A2E82}.MinSizeRel|x64.ActiveCfg = Release|x64 + {53F18541-578E-4A97-8F46-6871012A2E82}.MinSizeRel|x64.Build.0 = Release|x64 {53F18541-578E-4A97-8F46-6871012A2E82}.Release|Win32.ActiveCfg = Release|Win32 {53F18541-578E-4A97-8F46-6871012A2E82}.Release|Win32.Build.0 = Release|Win32 {53F18541-578E-4A97-8F46-6871012A2E82}.Release|x64.ActiveCfg = Release|x64 {53F18541-578E-4A97-8F46-6871012A2E82}.Release|x64.Build.0 = Release|x64 + {53F18541-578E-4A97-8F46-6871012A2E82}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 + {53F18541-578E-4A97-8F46-6871012A2E82}.RelWithDebInfo|Win32.Build.0 = Release|Win32 + {53F18541-578E-4A97-8F46-6871012A2E82}.RelWithDebInfo|x64.ActiveCfg = Release|x64 + {53F18541-578E-4A97-8F46-6871012A2E82}.RelWithDebInfo|x64.Build.0 = Release|x64 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.Debug|Win32.ActiveCfg = Release|Win32 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.Debug|Win32.Build.0 = Release|Win32 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.Debug|x64.ActiveCfg = Release|x64 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.Debug|x64.Build.0 = Release|x64 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.MinSizeRel|Win32.ActiveCfg = Release|Win32 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.MinSizeRel|Win32.Build.0 = Release|Win32 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.MinSizeRel|x64.ActiveCfg = Release|x64 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.MinSizeRel|x64.Build.0 = Release|x64 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.Release|Win32.ActiveCfg = Release|Win32 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.Release|Win32.Build.0 = Release|Win32 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.Release|x64.ActiveCfg = Release|x64 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.Release|x64.Build.0 = Release|x64 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.RelWithDebInfo|Win32.Build.0 = Release|Win32 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.RelWithDebInfo|x64.ActiveCfg = Release|x64 + {A87405CA-17F5-4091-A4A2-0A590F2626E0}.RelWithDebInfo|x64.Build.0 = Release|x64 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.Debug|Win32.ActiveCfg = Release|Win32 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.Debug|Win32.Build.0 = Release|Win32 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.Debug|x64.ActiveCfg = Release|x64 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.Debug|x64.Build.0 = Release|x64 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.MinSizeRel|Win32.ActiveCfg = Release|Win32 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.MinSizeRel|Win32.Build.0 = Release|Win32 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.MinSizeRel|x64.ActiveCfg = Release|x64 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.MinSizeRel|x64.Build.0 = Release|x64 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.Release|Win32.ActiveCfg = Release|Win32 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.Release|Win32.Build.0 = Release|Win32 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.Release|x64.ActiveCfg = Release|x64 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.Release|x64.Build.0 = Release|x64 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.RelWithDebInfo|Win32.Build.0 = Release|Win32 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.RelWithDebInfo|x64.ActiveCfg = Release|x64 + {0139CD3A-FADE-4075-9E9A-D563B5852C4A}.RelWithDebInfo|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE --- ../SPECstorage2020_2511/./SM2020 2022-04-05 15:17:42.368843435 -0500 +++ ./SM2020 2022-03-30 22:39:37.000000000 -0500 @@ -2248,6 +2248,8 @@ sfslog.close() + if os.access(client_csv_name, os.F_OK): + os.remove(client_csv_name) os.rename(default_client_csv_name, client_csv_name)