From 477d356ffb4f510fb91e9ee1656bf63906d79830 Mon Sep 17 00:00:00 2001 From: germeier Date: Fri, 18 Apr 2003 13:53:00 +0000 Subject: implemented "health" function. this is UNTESTED! --- mpiosh/callback.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'mpiosh/callback.c') diff --git a/mpiosh/callback.c b/mpiosh/callback.c index 28c0284..b252f24 100644 --- a/mpiosh/callback.c +++ b/mpiosh/callback.c @@ -2,7 +2,7 @@ * * Author: Andreas Büsching * - * $Id: callback.c,v 1.37 2003/04/11 22:53:10 germeier Exp $ + * $Id: callback.c,v 1.38 2003/04/18 13:53:01 germeier Exp $ * * Copyright (C) 2001 Andreas Büsching * @@ -709,6 +709,7 @@ mpiosh_cmd_format(char *args[]) } } + mpiosh_cmd_health(NULL); } } @@ -744,6 +745,57 @@ mpiosh_cmd_dump_mem(char *args[]) } +void +mpiosh_cmd_health(char *args[]) +{ + mpio_health_t health; + int i, lost; + + UNUSED(args); + + MPIOSH_CHECK_CONNECTION_CLOSED; + + mpio_health(mpiosh.dev, mpiosh.card, &health); + + if (mpiosh.card == MPIO_INTERNAL_MEM) { + lost=0; + printf("health status of internal memory:\n"); + printf("=================================\n"); + printf("%d chip%c (total/spare/broken)\n", + health.num, ((health.num==1)?' ':'s')); + for(i=0; i