<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:25:09 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-16228] create lljobstats command</title>
                <link>https://jira.whamcloud.com/browse/LU-16228</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In DDN-3356, by Andreas Dilger:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;We don&apos;t have a tool to do this today, but it would make sense to write a simple tool &quot;lljobstat&quot; to show the top jobs on a server in order to simplify debugging of high load problems, since this is a reasonably frequent request.&lt;/p&gt;

&lt;p&gt;It should be included with the base Lustre RPMs, so it must not have any complex external dependencies that are not included in the base OS distro (el7, el8, sles15, ubuntu22).&lt;/p&gt;

&lt;p&gt;It should read all of the local &quot;&lt;b&gt;.&lt;/b&gt;.job_stats&quot; files (by default, or --ost or --mdt, or a specific jobstats file if given as an argument) every 10s interval (configurable, either &quot;-i N&quot; or last argument) and prints the top e.g. 5 jobs (configurable &quot;-c N&quot;), one line per job similar to &quot;iostat -x -k -z 10&quot;. It should show something useful when run with minimal arguments (eg. just the interval), so that users can use it to easily determine which jobs are driving the most load.&lt;/p&gt;

&lt;p&gt;Since the job_stats has a large number of stats, it is not possible to fit all of them in a single 80-column line, so any operations that have samples = 0 should not be shown. Priority for display should be to show read, write (counts, if non-zero), read_bytes, write_bytes (in MiB/s units, if non-zero), then the top metadata ops by count. It probably makes sense to use abbreviations for the names, like llobdstat so that more can fit onto the line (cx: create, dx: destroy, st: statfs, pu: punch, etc). In the newer llstat and llobdstst it checks if the terminal width is over 80 and shows more fields, but this doesn&apos;t have to be in the first version.&lt;/p&gt;

&lt;p&gt;To determine the &quot;top&quot; jobs, it probably makes sense to sum the operations for the same job name across all watched job_stats files, then sort by total count of operations (read+write, but not bytes) and include this as the second item shown (&quot;ops: N&quot;) after the job name (&quot;job: name&quot;, with escaping/quoting if needed). The timestamp should be shown for each interval.&lt;/p&gt;

&lt;p&gt;Given that the input is YAML, the output could also be YAML, but only if it can be formatted nicely for human readability (one line per job, no excessive quoting). The main users of this will be people, since monitoring tools will likely read and process all of the job_stats output directly.&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="72719">LU-16228</key>
            <summary>create lljobstats command</summary>
                <type id="2" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11311&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="flei">Feng Lei </assignee>
                                    <reporter username="flei">Feng Lei </reporter>
                        <labels>
                    </labels>
                <created>Sun, 9 Oct 2022 06:54:23 +0000</created>
                <updated>Wed, 7 Feb 2024 05:35:45 +0000</updated>
                            <resolved>Fri, 27 Jan 2023 04:19:37 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="349073" author="flei" created="Sun, 9 Oct 2022 09:20:27 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt; What about such a format of output?&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-yaml&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;timestamp: &lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;20221010090000&lt;/span&gt;
&lt;span class=&quot;code-keyword&quot;&gt;jobs: &lt;/span&gt;
- {&lt;span class=&quot;code-keyword&quot;&gt;job: &lt;/span&gt;mkdir.&lt;span class=&quot;code-object&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;ops: &lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;cr: &lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;dt: &lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;2&lt;/span&gt;}
- {&lt;span class=&quot;code-keyword&quot;&gt;job: &lt;/span&gt;rm.&lt;span class=&quot;code-object&quot;&gt;101&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;ops: &lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot;&gt;dt: &lt;/span&gt;&lt;span class=&quot;code-object&quot;&gt;1&lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="349077" author="adilger" created="Mon, 10 Oct 2022 03:43:07 +0000"  >&lt;p&gt;The timestamp should be Unix seconds lik the other timestamps reported by Lustre. That avoids time zone issues and simplifies log correlation. &lt;/p&gt;</comment>
                            <comment id="349196" author="flei" created="Tue, 11 Oct 2022 02:41:22 +0000"  >&lt;p&gt;Command Synopsis:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-bash&quot;&gt;
lljobstat [-i|--interval NUM] [-c|--count NUM] [--mdt|--ost|--param PARAM_PATH] 
  -i NUM: interval &lt;span class=&quot;code-object&quot;&gt;in&lt;/span&gt; seconds, default 10
  -c NUM: how many jobs are displayed, default 5
  --mdt: check only mdt job_stats
  --ost: check only ost job_stats
  --param PARAM_PATH: check specified PARAM_PATH, e.g., *.lustre-*.job_stats&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="349201" author="flei" created="Tue, 11 Oct 2022 04:29:36 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt;&#160; To confirm that snapshot_time is designed to be uptime (the seconds from the last OS bootup), not clock time. For example:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-bash&quot;&gt;
&lt;span class=&quot;code-comment&quot;&gt;# lctl get_param *.*.job_stats | grep snapshot
&lt;/span&gt;  snapshot_time:   5754772.790688109 secs.nsecs
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It is significantly different from epoch seconds:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-bash&quot;&gt;
&lt;span class=&quot;code-comment&quot;&gt;# date +%s
&lt;/span&gt;1665461988
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;But similar to system uptime:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-bash&quot;&gt;
&lt;span class=&quot;code-comment&quot;&gt;# cat /proc/uptime
&lt;/span&gt;5755466.00 22244003.59
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="349248" author="adilger" created="Tue, 11 Oct 2022 08:38:39 +0000"  >&lt;p&gt;No, the time should be the current Unix timestamp in seconds:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# lctl get_param llite.*.stats
llite.testfs-ffff89b1b9c27000.stats=
snapshot_time             1665476432.161461498 secs.nsecs
ioctl                     502 samples [reqs]
getattr                   290 samples [usec] 56 1059 48623 11761597
getxattr                  2 samples [usec] 975 30159 31134 910515906
inode_permission          298 samples [usec] 61 566 52783 11517621
opencount                 295 samples [reqs] 1 1 295 295
# date +%s
1665476439
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;there is a bug on master that the timestamp is incorrectly printing the boot-relative time instead of the wallclock time. See &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16231&quot; title=&quot;Lustre stats header incorrectly using boot time&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16231&quot;&gt;&lt;del&gt;LU-16231&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="349333" author="flei" created="Wed, 12 Oct 2022 06:50:54 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt;&#160; Is such an output OK?&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-bash&quot;&gt;
&lt;span class=&quot;code-comment&quot;&gt;# ./lljobstat
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;# Abbr.:
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;# cr: create,    op: open,      cl: close,     mn: mknod,     lk: link,     
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;# ul: unlink,    mk: mkdir,     rm: rmdir,     mv: rename,    ga: getattr,  
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;# sa: setattr,   gx: getxattr,  sx: setxattr,  st: statfs,    sy: sync,     
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;# rd: read,      wr: write,     pu: punch,     mi: migrate,   fa: fallocate,
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;# dt: destroy,   gi: get_info,  si: set_info,  qc: quotactl,  pa: prealloc, 
&lt;/span&gt;timestamp: 1665557039
top jobs:
- touch.500:       {ops: 6, op: 1, cl: 1, mn: 1, ga: 1, sa: 2}
- rm.0:            {ops: 6, cl: 2, ul: 1, rm: 1, ga: 1, st: 1}
- chown.0:         {ops: 3, ga: 2, sa: 1}
- bash.0:          {ops: 2, ga: 2}
- mkdir.0:         {ops: 2, mk: 1, st: 1}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="349345" author="adilger" created="Wed, 12 Oct 2022 08:18:10 +0000"  >&lt;p&gt;Feng Lei, this looks mostly good. I would say that the comment is large enough that it shouldn&apos;t be printed each time, maybe just document the abbreviations in the man page or if &quot;&lt;tt&gt;-h&lt;/tt&gt;&quot; is used. I would suggest &quot;&lt;tt&gt;ln&lt;/tt&gt;&quot; for link (to match the command name).&lt;/p&gt;

&lt;p&gt;The &quot;&lt;tt&gt;top_jobs:&lt;/tt&gt;&quot; should have an underscore so it is a single word, even though I know YAML does not require this, since it makes parsing easier with scripts (eg. &quot;&lt;tt&gt;awk &apos;/keyname:/ { print $2 }&apos;&lt;/tt&gt;&quot;.&lt;/p&gt;</comment>
                            <comment id="349830" author="gerrit" created="Mon, 17 Oct 2022 05:38:46 +0000"  >&lt;p&gt;&quot;Feng Lei &amp;lt;flei@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/48888&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/48888&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16228&quot; title=&quot;create lljobstats command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16228&quot;&gt;&lt;del&gt;LU-16228&lt;/del&gt;&lt;/a&gt; utils: add lljobstat util&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 777dd8757b0a121daf22f275f7eeb5a2b00ea62f&lt;/p&gt;</comment>
                            <comment id="360275" author="adilger" created="Wed, 25 Jan 2023 00:45:58 +0000"  >&lt;p&gt;It looks like the newly-added sanity.sh test_205e needs to add a version check for interop testing:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;trevis-82vm3: sh: lljobstat: command not found
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There is a version check in test_205d already.&lt;/p&gt;</comment>
                            <comment id="360568" author="gerrit" created="Fri, 27 Jan 2023 00:33:43 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/48888/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/48888/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16228&quot; title=&quot;create lljobstats command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16228&quot;&gt;&lt;del&gt;LU-16228&lt;/del&gt;&lt;/a&gt; utils: add lljobstat util&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: e2812e877314bc101efdc5a235c7fae8f7424f96&lt;/p&gt;</comment>
                            <comment id="360594" author="pjones" created="Fri, 27 Jan 2023 04:19:37 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                            <comment id="382748" author="adilger" created="Thu, 17 Aug 2023 04:39:18 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=bolausson&quot; class=&quot;user-hover&quot; rel=&quot;bolausson&quot;&gt;bolausson&lt;/a&gt;, I pushed the &quot;simple&quot; version of your patch but it is reporting an error:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;This is causing test failures:

 lljobstat -n 1 -i 0 -c 1000
  Traceback (most recent call last):
    File &quot;/usr/bin/lljobstat&quot;, line 15, in 
       from yaml import CLoader as Loader, CDumper as Dumper
  ImportError: cannot import name &apos;CLoader&apos;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="382753" author="bolausson" created="Thu, 17 Aug 2023 04:57:50 +0000"  >&lt;p&gt;See link for solution:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/yaml/pyyaml/issues/108#issuecomment-370459912&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/yaml/pyyaml/issues/108#issuecomment-370459912&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Essentially libyaml-dev is missing on your system. It is required for the CLoader (which replaces the slow Python loader)&lt;/p&gt;

&lt;p&gt;Greetings, Bjoern&lt;/p&gt;</comment>
                            <comment id="382813" author="adilger" created="Thu, 17 Aug 2023 14:39:15 +0000"  >&lt;p&gt;Bjoern, is there a way to &quot;try&quot; loading the libyaml-dev CLoader, but fall back to the regular Loader if it is not installed?&lt;/p&gt;</comment>
                            <comment id="382819" author="bolausson" created="Thu, 17 Aug 2023 15:01:49 +0000"  >&lt;p&gt;Yes this is possible with a try - except construct.&lt;/p&gt;

&lt;p&gt;The CLoader worked perfeclty fine on default EXAScaler 5.2.7 install.&lt;br/&gt;
It was not neccessary to install any aditional packages except:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
python3 -m venv lljobstat
. ./lljobstat/bin/activate
python3 -m pip install pyyaml
python3 -m pip install paramiko
python3 -m pip install urllib3 &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;By the way, I added my enhneced version to the DDNeu GitHub repo:&lt;br/&gt;
&lt;a href=&quot;https://github.com/DDNeu/global-lustre-jobstats&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/DDNeu/global-lustre-jobstats&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Bjoern&lt;/p&gt;</comment>
                            <comment id="382823" author="bolausson" created="Thu, 17 Aug 2023 15:09:23 +0000"  >&lt;p&gt;Here the lines you would need to change:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
#!/bin/env python3
&apos;&apos;&apos;
lljobstat command. Read job_stats files, parse and aggregate data of every
job on multiple OSS/MDS, show top jobs
&apos;&apos;&apos;
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; argparse
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; errno
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; subprocess
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; sys
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; time
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; yaml
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; signal
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; urllib3
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; warnings
&lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; configparser
from multiprocessing &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt;, Queue, Pool, Manager, active_children, Pipe
from subprocess &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Popen, PIPE, STDOUT
from pprint &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; pprint
from os.path &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; expanduser
from pathlib &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Path
&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;:
&#160; &#160; from yaml &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; CLoader as Loader, CDumper as Dumper
except ImportError:
&#160; &#160; pass
warnings.filterwarnings(action=&lt;span class=&quot;code-quote&quot;&gt;&apos;ignore&apos;&lt;/span&gt;,module=&lt;span class=&quot;code-quote&quot;&gt;&apos;.*paramiko.*&apos;&lt;/span&gt;)
urllib3.disable_warnings()
[...]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="382911" author="flei" created="Fri, 18 Aug 2023 02:06:50 +0000"  >&lt;blockquote&gt;&lt;p&gt;is there a way to &quot;try&quot; loading the libyaml-dev CLoader, but fall back to the regular Loader if it is not installed?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;It can be checked at runtime:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-python&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;hasattr&lt;/span&gt;(yaml, &lt;span class=&quot;code-quote&quot;&gt;&quot;CLoader&quot;&lt;/span&gt;):
    yaml_obj = yaml.load(output, Loader=yaml.CLoader)
&lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;:
    yaml_obj = yaml.safe_load(output)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="382920" author="bolausson" created="Fri, 18 Aug 2023 06:55:26 +0000"  >&lt;p&gt;That works as well but has the disatvantage that you have to use the conditional check whenever you use yaml.load() anywhere in the code.&lt;/p&gt;

&lt;p&gt;This is only required once:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;:
&#160; &#160; from yaml &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; CLoader as Loader
except ImportError:
  &#160; from yaml &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Loader&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and you could add a note on one time on each start of the program:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;try&lt;/span&gt;:
&#160; &#160; from yaml &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; CLoader as Loader
except ImportError:
    print(&lt;span class=&quot;code-quote&quot;&gt;&quot;Install libyaml-dev &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; faster processing&quot;&lt;/span&gt;, file=sys.stderr)
  &#160; from yaml &lt;span class=&quot;code-keyword&quot;&gt;import&lt;/span&gt; Loader&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
(lljobstat) [root@n2admin1 bolausson]# ./glljobstat.py -n1 -c3&#160;
Install libyaml-dev &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; faster processing
---
timestamp: 1692341521
top_jobs:
- .0@n2oss4: &#160; &#160; &#160; {ops: 499163955, op: 11394216, cl: 41637516, mn: 9374215, ga: 191342407, sa: 88644483, gx: 6939749, sx: 146146, st: 2610083, sy: 36495657, rd: 65229069, wr: 42911419, pu: 2438995}
- .0@n2oss8: &#160; &#160; &#160; {ops: 473355574, op: 7909593, cl: 31620149, mn: 6376866, ga: 82344877, sa: 97854466, gx: 6512529, sx: 29034, st: 51, sy: 39334661, rd: 130433638, wr: 66882172, pu: 4057538}
- .0@n2oss7: &#160; &#160; &#160; {ops: 419629946, op: 7035889, cl: 27444959, mn: 5526838, ga: 78507580, sa: 94406102, gx: 5645268, sx: 20790, st: 34, sy: 37915437, rd: 93283959, wr: 66197236, pu: 3645854}
...
(lljobstat) [root@n2admin1 bolausson]# &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Attached the modified lljobstat:&lt;br/&gt;
&lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/attachment/50082/50082_lljobstat&quot; title=&quot;lljobstat attached to LU-16228&quot;&gt;lljobstat&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.whamcloud.com/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Bjoern&lt;/p&gt;</comment>
                            <comment id="382927" author="adilger" created="Fri, 18 Aug 2023 08:13:26 +0000"  >&lt;p&gt;I think the best approach is to &lt;tt&gt;Suggest:&lt;/tt&gt; or &lt;tt&gt;Recommend:&lt;/tt&gt; the faster &lt;tt&gt;libyaml-dev&lt;/tt&gt; in &lt;tt&gt;lustre.spec.in&lt;/tt&gt; (for all except el7.9 which doesn&apos;t support this, see other similar checks therein), and keep the try/except for fallback if it isn&apos;t installed. &lt;/p&gt;

&lt;p&gt;However, I do not think it makes sense to print a message in that case, as it breaks the output, and I don&apos;t think users care so much if it &quot;just works&quot; for them.&lt;/p&gt;

&lt;p&gt;Feng Lei, can you please also backport the &quot;fix YAML printing of jobstats&quot; patches to b_es5_2 (there are about 3 of them, but &lt;b&gt;not&lt;/b&gt; the stats header or histogram patches), so that we get proper quoting of the jobid name in the &lt;tt&gt;job_stats&lt;/tt&gt; output.  While the &quot;@&quot; substitution will fix the one case running with DDN Insight, it will not handle all cases of bad jobid names. &lt;/p&gt;</comment>
                            <comment id="382930" author="bolausson" created="Fri, 18 Aug 2023 08:20:26 +0000"  >&lt;p&gt;Makes sense &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Thanks Andreas!&lt;/p&gt;</comment>
                            <comment id="383082" author="bolausson" created="Sat, 19 Aug 2023 13:54:48 +0000"  >&lt;p&gt;Okay, now we are getting to something that is actually pretty useful:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/DDNeu/global-lustre-jobstats&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/DDNeu/global-lustre-jobstats&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is faster by factors!&lt;/p&gt;

&lt;p&gt;If you don&apos;t want all the bells and wistles because of the additional modules (paramiko), you might want to try the naive parser with parallel parsing instead of yaml.load(). It is a drop-in replacement, no other code-changes required.&lt;br/&gt;
It is way faster even compared to the parallel yaml CLoader! It is now in a range where you can run it in a loop and watch the rates &quot;live&quot;.&lt;/p&gt;

&lt;p&gt;My naive parser:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
(lljobstat) [root@n2oss1 bolausson]# time ./glljobstat_testing.py -n 1 -c 2
SSH time &#160; &#160; &#160; &#160; : 0.837817907333374
Bjoern time &#160; &#160; &#160;: 2.07401442527771
---
timestamp: 1692439321
servers_queried: 8
total_jobs: 2601
top_2_jobs:
- 4635385@46526@n2cn0225: {ops: 589959692, rd: 589959689, wr: 3}
- @0@n2oss4: &#160; &#160; &#160;        {ops: 485340474, op: 10540091, cl: 34838831, mn: 8118882, ga: 191221978, sa: 84975235, gx: 5400547, sx: 145756, st: 2610082, sy: 34832893, rd: 66827250, wr: 43403088, pu: 2425841}
...
real &#160; &#160;0m4.603s
user &#160; &#160;0m10.878s
sys &#160; &#160; 0m1.994s &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;yaml.load() with CLoader&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
(lljobstat) [root@n2oss1 bolausson]# time ./glljobstat.py -n 1 -c 2
SSH time         : 0.8781006336212158
yaml CLoader time: 9.084490060806274
---
timestamp: 1692439328
servers_queried: 8
total_jobs: 2601
top_2_jobs:
- 4635385@46526@n2cn0225: \{ops: 589957196, rd: 589957193, wr: 3}
- .0@n2oss4:       \{ops: 485340452, op: 10540089, cl: 34838826, mn: 8118881, ga: 191221973, sa: 84975231, gx: 5400546, sx: 145756, st: 2610082, sy: 34832891, rd: 66827249, wr: 43403087, pu: 2425841}
...

real	0m11.095s
user	0m55.775s
sys	0m4.393s &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="402947" author="gerrit" created="Wed, 7 Feb 2024 01:18:46 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/doc/manual/+/53948&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/doc/manual/+/53948&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16228&quot; title=&quot;create lljobstats command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16228&quot;&gt;&lt;del&gt;LU-16228&lt;/del&gt;&lt;/a&gt; utils: update jobstats section&lt;br/&gt;
Project: doc/manual&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 39b650af5c4d52533d5bf7d388f179403f14693d&lt;/p&gt;</comment>
                            <comment id="402954" author="gerrit" created="Wed, 7 Feb 2024 05:35:45 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/doc/manual/+/53948/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/doc/manual/+/53948/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16228&quot; title=&quot;create lljobstats command&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16228&quot;&gt;&lt;del&gt;LU-16228&lt;/del&gt;&lt;/a&gt; utils: update jobstats section&lt;br/&gt;
Project: doc/manual&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 58f5e8ac8970efcbcbf44889b14e9c6400c29e3d&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="72739">LU-16231</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="72855">LU-16251</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="72029">LU-16110</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="79496">LU-17352</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="50058" name="glljobstat" size="16210" author="adilger" created="Thu, 17 Aug 2023 04:38:08 +0000"/>
                            <attachment id="50082" name="lljobstat" size="8044" author="bolausson" created="Fri, 18 Aug 2023 07:03:26 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i032en:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>