<div dir="ltr">Also, don&#39;t forget to send a pull request to Aravinda, so that others can use it too.<div>Maybe add some basic usage note. If it is not already there.</div><div><br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 28, 2016 at 7:04 AM, Aravinda <span dir="ltr">&lt;<a href="mailto:avishwan@redhat.com" target="_blank">avishwan@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nice tool.<br>
<br>
Easy to add, clone the glustertool repo, and run<br>
<br>
# ./newtool mnt_log_analyze --type=exec --bin=log_analyzer.sh --prog=bash<br>
<br>
I used tool name &quot;mnt_log_analyze&quot; just for this example, feel free to name your tool.<br>
<br>
This will create following dir and files<br>
glustertool/plugins/mnt_log_analyze<br>
glustertool/plugins/mnt_log_analyze/tool.conf<br>
glustertool/plugins/mnt_log_analyze/doc.txt<br>
<br>
Update the tool doc in doc.txt and copy your script to glustertool/plugins/mnt_log_analyze dir.<br>
<br>
Thats all! use your tool using,<br>
<br>
# glustertool mnt_log_analyze /var/log/glusterfs/mnt-glusterfs.log<br>
<br>
Let me know if something is not working.<br>
<br>
regards<span class="HOEnZb"><font color="#888888"><br>
Aravinda</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 01/28/2016 04:56 AM, Raghavendra Bhat wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a script written to analyze the log message of gluster process.<br>
<br>
It actually scans the log file and identifies the log messages with ERROR<br>
and WARNING levels.<br>
It lists the functions (with either ERROR or WARNING logs) and their<br>
percentage of occcurance.<br>
<br>
It also lists the MSGIDs for ERROR and WARNING logs and their percentage of<br>
occurance.<br>
<br>
A sample o/p the script:<br>
<br>
[root@hal9000 ~]# ./log_analyzer.sh /var/log/glusterfs/mnt-glusterfs.log<br>
Number Percentage Function<br>
7 0.49 __socket_rwv<br>
4 0.28 mgmt_getspec_cbk<br>
4 0.28 gf_timer_call_after<br>
3 0.21 rpc_clnt_reconfig<br>
2 0.14 fuse_thread_proc<br>
2 0.14 fini<br>
2 0.14 cleanup_and_exit<br>
1 0.07 _ios_dump_thread<br>
1 0.07 fuse_init<br>
1 0.07 fuse_graph_setup<br>
<br>
========= Error Functions ========<br>
<br>
7 0.49 __socket_rwv<br>
2 0.14 cleanup_and_exit<br>
<br>
Number Percentage MSGID<br>
958 67.99 109066<br>
424 30.09 109036<br>
3 0.21 114057<br>
3 0.21 114047<br>
3 0.21 114046<br>
3 0.21 114035<br>
3 0.21 114020<br>
3 0.21 114018<br>
3 0.21 108031<br>
2 0.14 101190<br>
1 0.07 7962<br>
1 0.07 108006<br>
1 0.07 108005<br>
1 0.07 108001<br>
1 0.07 100030<br>
<br>
========= Error MSGIDs ========<br>
<br>
1 0.07 108006<br>
1 0.07 108001<br>
<br>
It can be found here.<br>
<br>
<a href="https://github.com/raghavendrabhat/threaded-io/blob/master/log_analyzer.sh" rel="noreferrer" target="_blank">https://github.com/raghavendrabhat/threaded-io/blob/master/log_analyzer.sh</a>.<br>
<br>
Do you think it can be added to the repo?<br>
<br>
Regards,<br>
Raghavendra<br>
<br>
On Wed, Jan 27, 2016 at 3:44 AM, Aravinda &lt;<a href="mailto:avishwan@redhat.com" target="_blank">avishwan@redhat.com</a>&gt; wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I am happy to share the `glustertool` project, which is a<br>
infrastructure for adding more tools for Gluster.<br>
<br>
<a href="https://github.com/aravindavk/glustertool" rel="noreferrer" target="_blank">https://github.com/aravindavk/glustertool</a><br>
<br>
Following tools available with the initial release.(`glustertool<br>
&lt;TOOLNAME&gt; [ARGS..]`)<br>
<br>
1. gfid - To get GFID of given path(Mount or Backend)<br>
2. changelogparser - To parse the Gluster Changelog<br>
3. xtime - To get Xtime from brick backend<br>
4. stime - To get Stime from brick backend<br>
5. volmark - To get Volmark details from Gluster mount<br>
<br>
rpm/deb packages are not yet available, install this using `sudo<br>
python setup.py install`<br>
<br>
Once installed, run `glustertool list` to see list of tools available.<br>
`glustertool doc TOOLNAME` shows documentation about the tool and<br>
`glustertool &lt;TOOLNAME&gt; --help` shows the usage of the tool.<br>
<br>
More tools can be added to this collection easily using `newtool`<br>
utility available in this repo.<br>
<br>
     # ./newtool &lt;TOOLNAME&gt;<br>
<br>
Read more about adding tools here<br>
<a href="https://github.com/aravindavk/glustertool/blob/master/CONTRIBUTING.md" rel="noreferrer" target="_blank">https://github.com/aravindavk/glustertool/blob/master/CONTRIBUTING.md</a><br>
<br>
You can create an issue in github requesting more tools for Gluster<br>
<a href="https://github.com/aravindavk/glustertool/issues" rel="noreferrer" target="_blank">https://github.com/aravindavk/glustertool/issues</a><br>
<br>
Comments &amp; Suggestions Welcome<br>
<br>
regards<br>
Aravinda<br>
<br>
On 10/23/2015 11:42 PM, Vijay Bellur wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Friday 23 October 2015 04:16 PM, Aravinda wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Gluster developers,<br>
<br>
In this mail I am proposing troubleshooting documentation and<br>
Gluster Tools infrastructure.<br>
<br>
Tool to search in documentation<br>
===============================<br>
We recently added message Ids to each error messages in Gluster. Some<br>
of the error messages are self explanatory. But some error messages<br>
requires manual intervention to fix the issue. How about identifying<br>
the error messages which requires more explanation and creating<br>
documentation for the same. Even though the information about some<br>
errors available in documentation, it is very difficult to search and<br>
relate to the error message. It will be very useful if we create a<br>
tool which looks for documentation and tells us exactly what to do.<br>
<br>
For example,(Illustrativepurpose only)<br>
glusterdoc --explain GEOREP0003<br>
<br>
      SSH configuration issue. This error is seen when Pem keys from all<br>
      master nodes are not distributed properly to Slave<br>
      nodes. Use Geo-replication create command with force option to<br>
      redistribute the keys. If issue stillpersists, look for any errors<br>
      while running hook scripts inGlusterd log file.<br>
<br>
<br>
Note: Inspired from rustc --explain command<br>
<a href="https://twitter.com/jaredforsyth/status/626960244707606528" rel="noreferrer" target="_blank">https://twitter.com/jaredforsyth/status/626960244707606528</a><br>
<br>
If we don&#39;t know the message id, we can still search from the<br>
available documentation like,<br>
<br>
      glusterdoc --search &lt;SEARCH_KEY_WORD&gt;<br>
<br>
These commands can be programmatically consumed, for example<br>
`--json` will return the output in JSON format. This enables UI<br>
developers to automatically show help messages when they display<br>
errors.<br>
<br>
Gluster Tools infrastructure<br>
============================<br>
Are our Gluster log files sufficient for root causing the issues? Is<br>
that error caused due to miss configuration? Geo-replication status is<br>
showing faulty. Where to find the reason for Faulty?<br>
<br>
Sac(surs AT <a href="http://redhat.com" rel="noreferrer" target="_blank">redhat.com</a>) mentioned that heis working on gdeploy and many<br>
developers<br>
are using their owntools. How about providing common infrastructure(say<br>
gtool/glustertool) to host all these tools.<br>
<br>
<br>
</blockquote>
Would this be a repository with individual tools being git submodules or<br>
something similar? Is there also a plan to bundle the set of tools into a<br>
binary package?<br>
<br>
Looks like a good idea to me.<br>
<br>
-Vijay<br>
<br>
<br>
</blockquote>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
<br>
</blockquote></blockquote>
<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-devel</a><br>
</div></div></blockquote></div><br></div></div></div>