Skip to contentSkip to conversation

print the number of bytes processed in ckpt_error()

PATCH In review Serge E. Hallyn 2 participants 2 messages Oct 23, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 print the number of bytes processed in ckpt_error()

This should be useful at restart to indicate how much we have processed before running into an error.

This only adds it to the user log for now, bc the syslog printing macro is expected to totally change anyway.

---
 checkpoint/sys.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
checkpoint/sys.c +1 -1
index 1840f90..a7fe1f8 100644
@@ -361,7 +361,7 @@ void ckpt_log_error(struct ckpt_ctx *ctx, char *fmt, ...)
 		return;
 	file = ctx->logfile;
 
-	count = snprintf(buf, 200, "%d:%d ", mypid, tpid);
+	count = snprintf(buf, 200, "%d:%d@%d ", mypid, tpid, ctx->total);
 	if (count > 200)
 		return; /* not possible */
 	fs = get_fs();
Signature · 1 line
1.6.1

A message that is not in the archive (sent off-list or not yet received): 20091023170529.GA23079-r/[email protected]

Acked-by
#2 lore raw
Quoted 7 lines · Serge E. Hallyn

This should be useful at restart to indicate how much we have processed before running into an error.

This only adds it to the user log for now, bc the syslog printing macro is expected to totally change anyway.

Should be quite useful for users trying to pinpoint the source of restart problems in their checkpoint images.

Quoted 19 lines
---
 checkpoint/sys.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
checkpoint/sys.c +1 -1
index 1840f90..a7fe1f8 100644
@@ -361,7 +361,7 @@ void ckpt_log_error(struct ckpt_ctx *ctx, char *fmt, ...)
 		return;
 	file = ctx->logfile;
 
-	count = snprintf(buf, 200, "%d:%d ", mypid, tpid);
+	count = snprintf(buf, 200, "%d:%d@%d ", mypid, tpid, ctx->total);
 	if (count > 200)
 		return; /* not possible */
 	fs = get_fs();
Signature · 1 line
1.6.1