Whamcloud - gitweb
LU-3999 hsm: Improve mdt.*.hsm.agents output in /proc 44/7744/2
authorAurelien Degremont <aurelien.degremont@cea.fr>
Tue, 24 Sep 2013 13:33:02 +0000 (15:33 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 26 Sep 2013 21:38:10 +0000 (21:38 +0000)
mdt.*.hsm.agents file contains a list of registered agents and a
couple of information for each of them. This patch improves the output
to clarify the meaning of each returned values.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Id4858f7ac9387d539eba03389871c6e99476a5c9
Reviewed-on: http://review.whamcloud.com/7744
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_hsm_cdt_agent.c

index 122f07b..9a9ce6d 100644 (file)
@@ -576,15 +576,16 @@ static int mdt_hsm_agent_proc_show(struct seq_file *s, void *v)
                RETURN(0);
 
        ha = list_entry(pos, struct hsm_agent, ha_list);
-       seq_printf(s, "uuid=%s archive#=%d (", ha->ha_uuid.uuid,
-                  ha->ha_archive_cnt);
-       if (ha->ha_archive_cnt == 0)
-               seq_printf(s, "all");
-       else
-               for (i = 0; i < ha->ha_archive_cnt; i++)
-                       seq_printf(s, "%d ", ha->ha_archive_id[i]);
+       seq_printf(s, "uuid=%s archive_id=", ha->ha_uuid.uuid);
+       if (ha->ha_archive_cnt == 0) {
+               seq_printf(s, "ANY");
+       } else {
+               seq_printf(s, "%d", ha->ha_archive_id[0]);
+               for (i = 1; i < ha->ha_archive_cnt; i++)
+                       seq_printf(s, ",%d", ha->ha_archive_id[i]);
+       }
 
-       seq_printf(s, ") r=%d s=%d f=%d\n",
+       seq_printf(s, " requests=[current:%d ok:%d errors:%d]\n",
                   atomic_read(&ha->ha_requests),
                   atomic_read(&ha->ha_success),
                   atomic_read(&ha->ha_failure));