From 6ebf9236668e365f836da7b4eee75cce74ba25d2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 4 Mar 2021 12:19:44 +0100 Subject: read_number_processed: Only look at end of log file --- src/gui_index.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui_index.c') diff --git a/src/gui_index.c b/src/gui_index.c index 589e0281..98f8a84c 100644 --- a/src/gui_index.c +++ b/src/gui_index.c @@ -799,6 +799,9 @@ int read_number_processed(const char *filename) /* Normal situation if SLURM job hasn't started yet */ if ( fh == NULL ) return 0; + /* Only look at the last part of the file */ + fseek(fh, -4096, SEEK_END); + do { char line[1024]; if ( fgets(line, 1024, fh) == NULL ) break; -- cgit v1.2.3