diff mbox series

rteval: Add tuned state to rteval text report

Message ID 20240807063333.258868-1-tglozar@redhat.com
State New
Headers show
Series rteval: Add tuned state to rteval text report | expand

Commit Message

Tomas Glozar Aug. 7, 2024, 6:33 a.m. UTC
From: Tomas Glozar <tglozar@redhat.com>

Add a section "Tuned state" to the text report generated by rteval. Show
tuned active state if tuned is present, otherwise, show a message that
tuned is not present. If the active state is known, show also the
verification result.

Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
 rteval/rteval_text.xsl | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

John Kacur Aug. 7, 2024, 3:05 p.m. UTC | #1
On Wed, 7 Aug 2024, tglozar@redhat.com wrote:

> From: Tomas Glozar <tglozar@redhat.com>
> 
> Add a section "Tuned state" to the text report generated by rteval. Show
> tuned active state if tuned is present, otherwise, show a message that
> tuned is not present. If the active state is known, show also the
> verification result.
> 
> Signed-off-by: Tomas Glozar <tglozar@redhat.com>
> ---
>  rteval/rteval_text.xsl | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/rteval/rteval_text.xsl b/rteval/rteval_text.xsl
> index 96846aa..70f3e0f 100644
> --- a/rteval/rteval_text.xsl
> +++ b/rteval/rteval_text.xsl
> @@ -143,6 +143,22 @@
>        </xsl:when>
>        <xsl:otherwise>(unknown)</xsl:otherwise>
>      </xsl:choose>
> +    <xsl:text>&#10;</xsl:text>
> +
> +    <xsl:text>   Tuned state:  </xsl:text>
> +    <xsl:choose>
> +      <xsl:when test="SystemInfo/Tuned/@present='1'">
> +        <xsl:value-of select="SystemInfo/Tuned/active_profile"/>
> +        <xsl:text> profile</xsl:text>
> +          <xsl:if test="SystemInfo/Tuned/active_profile != 'unknown'">
> +            <xsl:text>, verification: </xsl:text>
> +            <xsl:value-of select="SystemInfo/Tuned/verified"/>
> +          </xsl:if>
> +        </xsl:when>
> +        <xsl:otherwise>
> +          <xsl:text>not present</xsl:text>
> +        </xsl:otherwise>
> +    </xsl:choose>
>      <xsl:text>&#10;&#10;</xsl:text>
>     
>      <xsl:text>   System load:&#10;</xsl:text>
> -- 

Signed-off-by: John Kacur <jkacur@redhat.com>
diff mbox series

Patch

diff --git a/rteval/rteval_text.xsl b/rteval/rteval_text.xsl
index 96846aa..70f3e0f 100644
--- a/rteval/rteval_text.xsl
+++ b/rteval/rteval_text.xsl
@@ -143,6 +143,22 @@ 
       </xsl:when>
       <xsl:otherwise>(unknown)</xsl:otherwise>
     </xsl:choose>
+    <xsl:text>&#10;</xsl:text>
+
+    <xsl:text>   Tuned state:  </xsl:text>
+    <xsl:choose>
+      <xsl:when test="SystemInfo/Tuned/@present='1'">
+        <xsl:value-of select="SystemInfo/Tuned/active_profile"/>
+        <xsl:text> profile</xsl:text>
+          <xsl:if test="SystemInfo/Tuned/active_profile != 'unknown'">
+            <xsl:text>, verification: </xsl:text>
+            <xsl:value-of select="SystemInfo/Tuned/verified"/>
+          </xsl:if>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>not present</xsl:text>
+        </xsl:otherwise>
+    </xsl:choose>
     <xsl:text>&#10;&#10;</xsl:text>
    
     <xsl:text>   System load:&#10;</xsl:text>