diff --git a/docs/changes.txt b/docs/changes.txt index 93e2ca86e..102bd6448 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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 diff --git a/include/status.h b/include/status.h index 61d9a25de..69094e176 100644 --- a/include/status.h +++ b/include/status.h @@ -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); diff --git a/include/types.h b/include/types.h index 55060c3c1..f3e0e43e7 100644 --- a/include/types.h +++ b/include/types.h @@ -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; diff --git a/src/dispatch.c b/src/dispatch.c index 37a71824f..b843783e1 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -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; diff --git a/src/hashcat.c b/src/hashcat.c index d14d90ddd..237e5c903 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -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); diff --git a/src/status.c b/src/status.c index f733ebe44..b16ae32ba 100644 --- a/src/status.c +++ b/src/status.c @@ -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; diff --git a/src/terminal.c b/src/terminal.c index 750c00197..3373ab43e 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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)