opensm/console: add abreviations for perfmgr commands
PATCH 8/10 opensm/console: add abreviations for perfmgr commands
Add:
"pm" for "perfmgr"
"pc" for "print_counters"
Signed-off-by Ira Weiny <[email protected]>
--- opensm/osm_console.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
opensm/osm_console.c +14 -2
@@ -239,7 +239,10 @@ static void help_update_desc(FILE *out, int detail)static void help_perfmgr (FILE * out,int detail) {fprintf (out, -"perfmgr [enable|disable|clear_counters|dump_counters|print_counters|dump_redir|clear_redir|set_rm_nodes|clear_rm_nodes|clear_inactive|sweep_time[seconds]]\n" ); +"perfmgr(pm) [enable|disable\n" +" |clear_counters|dump_counters|print_counters(pc)\n" +" |set_rm_nodes|clear_rm_nodes|clear_inactive\n" +" |dump_redir|clear_redir|sweep_time[seconds]]\n" );if (detail) {fprintf (out,"perfmgr -- print the performance manager state\n" );
@@ -262,6 +265,8 @@ static void help_perfmgr(FILE * out, int detail)fprintf (out," [pe [<nodename|nodeguid>]] -- same as print_errors\n" );fprintf (out, +" [pc [<nodename|nodeguid>]] -- same as print_counters\n" ); +fprintf (out," [dump_redir [<nodename|nodeguid>]] -- dump the redirection table\n" );fprintf (out," [clear_redir [<nodename|nodeguid>]] -- clear the redirection table\n" );
@@ -272,6 +277,11 @@ static void help_perfmgr(FILE * out, int detail) " [clear_inactive] -- Delete inactive nodes from the DB\n"); } } +static void help_pm (FILE *out,int detail) +{ +if (detail) +help_perfmgr (out, detail); +}#endif /* ENABLE_OSM_PERF_MGR */ /* more help routines go here */
@@ -1472,7 +1482,8 @@ static void perfmgr_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) }else if (strcmp (p_cmd,"clear_inactive" ) ==0 ) {unsigned cnt =osm_perfmgr_delete_inactive (&p_osm->perfmgr);fprintf (out,"Removed %u nodes from Database\n" , cnt); - }else if (strcmp (p_cmd,"print_counters" ) ==0 ) { + }else if (strcmp (p_cmd,"print_counters" ) ==0 || +strcmp (p_cmd,"pc" ) ==0 ) {char *port =NULL ; p_cmd =name_token (p_last);if (p_cmd) {
@@ -1670,6 +1681,7 @@ static const struct command console_cmds[] = { {"version", &help_version, &version_parse}, #ifdef ENABLE_OSM_PERF_MGR {"perfmgr", &help_perfmgr, &perfmgr_parse}, + {"pm", &help_pm, &perfmgr_parse}, #endif /* ENABLE_OSM_PERF_MGR */ {"dump_portguid", &help_dump_portguid, &dump_portguid_parse}, {NULL, NULL, NULL} /* end of array */
Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html