From: Thomas F. <tlf...@li...> - 2014-11-19 00:01:31
|
The SMT row will only display the number of enabled SMT threads if SMT is enabled. Signed-off-by: Thomas Falcon <tlf...@li...> --- man/lparstat.8 | 2 +- src/lparstat.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/man/lparstat.8 b/man/lparstat.8 index 8accc83..6d94486 100644 --- a/man/lparstat.8 +++ b/man/lparstat.8 @@ -25,7 +25,7 @@ mode Indicates whether the partition processor capacity is capped or uncapped allowing it to consume idle cycles from the shared pool. Dedicated LPAR is capped or donating. .TP smt -Indicates whether simultaneous multi-threading is enabled or disabled in the partition. If there are two SMT threads, the row is displayed as "on." However, if there are more than two SMT threads, the number of SMT threads is displayed. +Indicates whether simultaneous multi-threading is enabled or disabled in the partition. If SMT is enabled, the number of SMT threads is displayed. .TP lcpu Number of online logical processors. diff --git a/src/lparstat.c b/src/lparstat.c index 92fabc5..8c4c71d 100644 --- a/src/lparstat.c +++ b/src/lparstat.c @@ -375,12 +375,10 @@ void get_smt_mode(struct sysentry *se, char *buf) unused = fgets(line, 128, f); pclose(f); - /* The output is either "SMT is on" or "SMT is off", we can cheat - * by looking at line[8] for either 'n' or 'f'. + /* The output is either "SMT=x" or "SMT is off", we can cheat + * by looking at line[8] for an 'f'. */ - if (line[8] == 'n') - sprintf(buf, "On"); - else if (line[8] == 'f') + if (line[8] == 'f') sprintf(buf, "Off"); else sprintf(buf, "%c", line[4]); -- 2.1.2 |