Terminal: Add workitem settings to status display (can be handy for debugging)

pull/1511/head
jsteube 6 years ago
parent 53e2b40bad
commit 11b18512c7

@ -62,6 +62,7 @@
- Self Test: Skip self-test for mode 15700 because the settings are too high and cause startup times that are too long
- Self Test: Skip self-test for mode 8900 - user-configurable scrypt settings are incompatible with fixed settings in the self-test hash
- Terminal: Send clear line code to the same output stream as the message immediately following
- Terminal: Add workitem settings to status display (can be handy for debugging)
- Timer: Switch from gettimeofday() to clock_gettime() to work around problems on cygwin
- User Options: According to getopts manpage the last element of the option array has to be filled with zeros

@ -84,6 +84,10 @@ int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_
int status_get_memoryspeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_get_progress_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
double status_get_runtime_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_get_kernel_accel_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_get_kernel_loops_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_get_kernel_threads_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_get_vector_width_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_progress_init (hashcat_ctx_t *hashcat_ctx);
void status_progress_destroy (hashcat_ctx_t *hashcat_ctx);

@ -938,6 +938,8 @@ typedef struct hc_device_param
u32 kernel_loops;
u32 kernel_accel;
u32 kernel_loops_prev;
u32 kernel_accel_prev;
u32 kernel_loops_min;
u32 kernel_loops_max;
u32 kernel_loops_min_sav; // the _sav are required because each -i iteration
@ -1737,6 +1739,10 @@ typedef struct device_info
int memoryspeed_dev;
double runtime_msec_dev;
int progress_dev;
int kernel_accel_dev;
int kernel_loops_dev;
int kernel_threads_dev;
int vector_width_dev;
} device_info_t;

@ -271,6 +271,9 @@ static int calc_stdin (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par
if (user_options->speed_only == true) break;
}
device_param->kernel_accel_prev = device_param->kernel_accel;
device_param->kernel_loops_prev = device_param->kernel_loops;
device_param->kernel_accel = 0;
device_param->kernel_loops = 0;
@ -688,6 +691,9 @@ static int calc (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
hcfree (hashcat_ctx_tmp);
}
device_param->kernel_accel_prev = device_param->kernel_accel;
device_param->kernel_loops_prev = device_param->kernel_loops;
device_param->kernel_accel = 0;
device_param->kernel_loops = 0;

@ -1366,6 +1366,10 @@ int hashcat_get_status (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_st
device_info->memoryspeed_dev = status_get_memoryspeed_dev (hashcat_ctx, device_id);
device_info->progress_dev = status_get_progress_dev (hashcat_ctx, device_id);
device_info->runtime_msec_dev = status_get_runtime_msec_dev (hashcat_ctx, device_id);
device_info->kernel_accel_dev = status_get_kernel_accel_dev (hashcat_ctx, device_id);
device_info->kernel_loops_dev = status_get_kernel_loops_dev (hashcat_ctx, device_id);
device_info->kernel_threads_dev = status_get_kernel_threads_dev (hashcat_ctx, device_id);
device_info->vector_width_dev = status_get_vector_width_dev (hashcat_ctx, device_id);
}
hashcat_status->hashes_msec_all = status_get_hashes_msec_all (hashcat_ctx);

@ -1781,6 +1781,54 @@ double status_get_runtime_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int
return device_param->outerloop_msec;
}
int status_get_kernel_accel_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id)
{
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
if (device_param->skipped == true) return 0;
if (device_param->kernel_accel_prev) return device_param->kernel_accel_prev;
return device_param->kernel_accel;
}
int status_get_kernel_loops_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id)
{
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
if (device_param->skipped == true) return 0;
if (device_param->kernel_loops_prev) return device_param->kernel_loops_prev;
return device_param->kernel_loops;
}
int status_get_kernel_threads_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id)
{
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
if (device_param->skipped == true) return 0;
return device_param->kernel_threads_by_user;
}
int status_get_vector_width_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id)
{
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
if (device_param->skipped == true) return 0;
return device_param->vector_width;
}
int status_progress_init (hashcat_ctx_t *hashcat_ctx)
{
status_ctx_t *status_ctx = hashcat_ctx->status_ctx;
@ -1857,7 +1905,6 @@ void status_ctx_destroy (hashcat_ctx_t *hashcat_ctx)
memset (status_ctx, 0, sizeof (status_ctx_t));
}
void status_status_destroy (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_status)
{
const status_ctx_t *status_ctx = hashcat_ctx->status_ctx;

@ -1202,9 +1202,13 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_dev == true) continue;
event_log_info (hashcat_ctx,
"Speed.Dev.#%d.....: %9sH/s (%0.2fms)", device_id + 1,
"Speed.Dev.#%d.....: %9sH/s (%0.2fms) @ Accel:%3d Loops:%3d Thr:%2d Width:%d", device_id + 1,
device_info->speed_sec_dev,
device_info->exec_msec_dev);
device_info->exec_msec_dev,
device_info->kernel_accel_dev,
device_info->kernel_loops_dev,
device_info->kernel_threads_dev,
device_info->vector_width_dev);
}
if (hashcat_status->device_info_active > 1)
@ -1365,9 +1369,13 @@ void status_benchmark (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_dev == true) continue;
event_log_info (hashcat_ctx,
"Speed.Dev.#%d.....: %9sH/s (%0.2fms)", device_id + 1,
"Speed.Dev.#%d.....: %9sH/s (%0.2fms) @ Accel:%3d Loops:%3d Thr:%2d Width:%d", device_id + 1,
device_info->speed_sec_dev,
device_info->exec_msec_dev);
device_info->exec_msec_dev,
device_info->kernel_accel_dev,
device_info->kernel_loops_dev,
device_info->kernel_threads_dev,
device_info->vector_width_dev);
}
if (hashcat_status->device_info_active > 1)

Loading…
Cancel
Save