[-]
[+]
|
Changed |
_service:tar_git:harbour-dool.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/sailfishos-chum/dool</param>
<param name="branch">master</param>
- <param name="revision">1.1.0+obs1</param>
+ <param name="revision">1.3.1+obs1</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-dool-1.1.0+obs1.tar.gz/upstream/COPYING
^
|
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/.github/ISSUE_TEMPLATE.md
^
|
@@ -1,7 +1,7 @@
<!--- Verify first that your issue/request is not already reported in GitHub -->
##### SUMMARY
-<!--- Explain the problem briefly here, details go way below -->
+<!--- Explain the problem briefly here, details go below -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
@@ -9,25 +9,12 @@
- Feature Idea
- Documentation Report
-##### DSTAT VERSION
-```
-<!--- Paste verbatim output from “dstat --version” here between tripple quotes -->
-```
-
-<!---
-Test your issue using the latest release AND using the master branch code.
-Download the latest release and the master branch from:
-
- https://github.com/dagwieers/dstat/releases
- https://github.com/dagwieers/dstat/archive/master.tar.gz
-
-You can run dstat directly from the source tree using: ./dstat
-Mention below which versions work correctly, or when it started to fail.
--->
+##### DOOL VERSION
+<!--- Paste Dool version here -->
##### OS / ENVIRONMENT
<!---
-Mention the OS you are running Dstat from, and anything platform-specific
+What the OS you are running Dool on, and anything platform-specific
that could be related to your issue.
-->
@@ -37,18 +24,8 @@
For new features, show how the feature would be used.
-->
-```
-<!--- Paste example use or output here between quotes -->
-```
-
-<!--- You can also paste gist.github.com links for larger files -->
-
##### EXPECTED RESULTS
<!--- What did you expect to happen when running the steps above? -->
##### ACTUAL RESULTS
-<!--- What actually happened? Try running with debug enabled "dstat --debug" -->
-
-```
-<!--- Paste verbatim command output between quotes -->
-```
+<!--- What actually happened? Try running with debug enabled "dool --debug" -->
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/.github/PULL_REQUEST_TEMPLATE.md
^
|
@@ -1,14 +1,5 @@
-##### ISSUE TYPE
-<!--- Pick one below and delete the rest: -->
- - New plugin pull-request
- - Feature pull-request
- - Bugfix pull-request
- - Docs pull-request
-
-##### DSTAT VERSION
-```
-<!--- Paste verbatim output from “dstat --version” here -->
-```
+##### DOOL VERSION
+<!--- Paste Dool version here -->
##### SUMMARY
<!--- Describe the change here, including rationale and design decisions -->
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/ChangeLog
^
|
@@ -1,3 +1,28 @@
+* 1.3.0
+- add support for terminals with only 16 colors by @leahneukirchen in #43
+- Correctly report disk stats for NVME drives by @scottchiefbaker in #49
+- Capture VM name for top-cpu by @scottchiefbaker in #48
+- Properly capitalize unit letters for real this time by @Low-power in #34
+- Add a \n to output when using a count
+- Fix the NTP plugin for Python 3.x
+- Massive internal naming change dstat -> dool
+- Fix bits/bytes in CSV file output
+- Add a --devel logging option to assist in future developementg
+- Update Github templates to simplify them and reflect the Dool name
+- Lots of comments in the code as I slowly learn more about how it works
+
+* 1.2.0
+- Remove a bunch of old Kernel 2.4 functions we dont use anymore
+
+* 1.1.0
+- Use unicode box drawing characters to make things look more modern
+- Add installation script
+- Make the output cleaner by using better ANSI line clearing options
+- Better compatibility on older versions of Python. Tested on Python 3.6
+- Memory calculation is now closer to free
+- Include "available" memory instead of "buffers"
+- Major README updates to help new users get started
+
* 1.0.0
- Initial modern release
|
[-]
[+]
|
Added |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/LICENSE
^
|
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/README.md
^
|
@@ -41,9 +41,9 @@
Dool ships with many plug-ins to configure the output to your taste.
- dool --cpu --net --time --full 15 # Show CPU usage, and each network interface
- dool --disk --memory 5 # Show disk totals, and memory consumption
- dool --cpu --load --swap --time 60 # Show CPU, load, and swap
+ dool --cpu --net --time --full # Show CPU usage, and each network interface
+ dool --disk -D total,sda,sdd # Show the total disk IO, and /dev/sda and /dev/sdd
+ dool --net -N eth0,eth1 # Show the network traffic for eth0 and eth1
A list of available plug-ins are available if you run `dool --version`
@@ -60,3 +60,11 @@
* [btop](https://github.com/aristocratos/btop)
* [iotop](https://github.com/Tomas-M/iotop)
+### Pull Requests and Branches
+
+The latest stable release (plus bugfixes) will live on the `master` branch,
+and development of new features will occur on the `next` branch. Please have
+pull requests target the `next` branch.
+
+Various feature/bug branches may come and go as we work on more complex
+functionality, but those can be safely ignored.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/docs/Makefile
^
|
@@ -11,13 +11,13 @@
dist: docs
-docs: dstat.1 $(htmltargets)
+docs: dool.1 $(htmltargets)
-install: dstat.1
- install -Dp -m0644 dstat.1 $(DESTDIR)$(mandir)/man1/dstat.1
+install: dool.1
+ install -Dp -m0644 dool.1 $(DESTDIR)$(mandir)/man1/dool.1
clean:
- rm -f dstat.1 *.html *.xml
+ rm -f dool.1 *.html *.xml
%.1.html: %.1.adoc
asciidoc -d manpage $<
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/docs/dool.1
^
|
@@ -1,14 +1,22 @@
'\" t
.\" Title: dool
.\" Author: Scott Baker <scott@perturb.org>
-.\" Author: Dag Wieers <dag@wieers.com>
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: August 2014
+.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
+.\" Date: June 2023
.\" Manual: \ \&
-.\" Source: \ \& 0.7.3
+.\" Source: \ \& 1.1.0
.\" Language: English
.\"
-.TH "DOOL" "1" "August 2014"
+.TH "DOOL" "1" "June 2023" "\ \& 1\&.1\&.0" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -35,22 +43,6 @@
Dool is unique in letting you aggregate block device throughput for a certain diskset or network bandwidth for a group of interfaces, ie\&. you can see the throughput for all the block devices that make up a single filesystem or storage system\&.
.sp
Dool allows its data to be directly written to a CSV file to be imported and used by OpenOffice, Gnumeric or Excel to create graphs\&.
-.if n \{\
-.sp
-.\}
-.RS 4
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.br
-.ps +1
-\fBNote\fR
-.ps -1
-.br
-.sp
-Users of Sleuthkit might find Sleuthkit\(cqs dool being renamed to datastat to avoid a name conflict\&. See Debian bug #283709 for more information\&.
-.sp .5v
-.RE
.SH "OPTIONS"
.PP
\-c, \-\-cpu
@@ -75,9 +67,14 @@
plugins
.RE
.PP
-\-D total,hda
+\-D total,sda
+.RS 4
+include total and sda (when using \-\-disk)
+.RE
+.PP
+\-\-diskset diskset_name:dev1,dev2,dev3,etc\&...
.RS 4
-include total and hda (when using \-d/\-\-disk)
+group several disks together and report aggregate stats (when using \-\-disk)
.RE
.PP
\-g, \-\-page
@@ -228,7 +225,7 @@
enable zoneinfo stats (d32F, d32H, normF, normH)
.RE
.PP
-\-\-plugin\-name
+\-\-<plugin\-name>
.RS 4
enable (external) plugins by plugin name, see
\fBPLUGINS\fR
@@ -262,12 +259,12 @@
.PP
\-\-bits
.RS 4
-force output values in bits (default)
+force bits for values expressed in bytes
.RE
.PP
\-\-bytes
.RS 4
-force output values in bytes
+force bytes for values expressed in bits
.RE
.PP
\-\-float
@@ -282,6 +279,16 @@
\fB\-\-float\fR)
.RE
.PP
+\-\-color
+.RS 4
+force 256 color output (default)
+.RE
+.PP
+\-\-color16
+.RS 4
+force 16 color
+.RE
+.PP
\-\-bw, \-\-blackonwhite
.RS 4
change colors for white background terminal
@@ -307,6 +314,13 @@
write CSV output to file
.RE
.PP
+\-\-display
+.RS 4
+output tabular data to the display\&. Useful in conjunction with
+\fB\-\-output\fR
+to display on screen and write to a file at the same time
+.RE
+.PP
\-\-profile
.RS 4
show profiling statistics when exiting dool
@@ -314,7 +328,7 @@
.PP
\-\-ascii
.RS 4
-output using only ASCII characters
+output table data in ascii instead of ANSI
.RE
.SH "PLUGINS"
.sp
@@ -818,7 +832,7 @@
.\}
.SH "BUGS"
.sp
-Since it is practically impossible to test dool on every possible permutation of kernel, Python or distribution version, I need your help and your feedback to fix the remaining problems\&. If you have improvements or bugreports, please report them on GitHub: https://github.com/scottchiefbaker/dool
+Since it is practically impossible to test dool on every possible permutation of kernel, python or distribution version, I need your help and your feedback to fix the remaining problems\&. If you have improvements or bugreports, please send them to: \m[blue]\fBdag@wieers\&.com\fR\m[]\&\s-2\u[1]\d\s+2
.if n \{\
.sp
.\}
@@ -828,6 +842,13 @@
.nr an-break-flag 1
.br
.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+Please see the TODO file for known bugs and future plans\&.
+.sp .5v
+.RE
.SH "FILES"
.sp
Paths that may contain external dool_*\&.py plugins:
@@ -1015,9 +1036,36 @@
.if n \{\
.RE
.\}
-.SH "URL"
+.SH "AUTHOR"
+.sp
+Dool is maintained by Scott Baker \m[blue]\fBscott@perturb\&.org\fR\m[]\&\s-2\u[2]\d\s+2
.sp
-https://github.com/scottchiefbaker/dool/
+Homepage at \m[blue]\fBhttps://github\&.com/scottchiefbaker/dool\fR\m[]
.sp
+dstat originally written by Dag Wieers \m[blue]\fBdag@wieers\&.com\fR\m[]\&\s-2\u[1]\d\s+2
+.sp
+Homepage at \m[blue]\fBhttp://dag\&.wieers\&.com/home\-made/dstat/\fR\m[]
+.sp
+This manpage was initially written by Andrew Pollock \m[blue]\fBapollock@debian\&.org\fR\m[]\&\s-2\u[3]\d\s+2 for the Debian GNU/Linux system\&.
+.SH "AUTHOR"
+.PP
+\fBScott Baker\fR <\&scott@perturb\&.org\&>
+.RS 4
+Author.
+.RE
.SH "NOTES"
-This manpage was originally written by Andrew Pollock apollock@debian\&.org for the Debian GNU/Linux system\&.
+.IP " 1." 4
+dag@wieers.com
+.RS 4
+\%mailto:dag@wieers.com
+.RE
+.IP " 2." 4
+scott@perturb.org
+.RS 4
+\%mailto:scott@perturb.org
+.RE
+.IP " 3." 4
+apollock@debian.org
+.RS 4
+\%mailto:apollock@debian.org
+.RE
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/docs/dool.1.adoc
^
|
@@ -1,43 +1,36 @@
-= dstat(1)
-Dag Wieers <dag@wieers.com>
-v0.7.3, August 2014
-
+= dool(1)
+Scott Baker <scott@perturb.org>
+v1.1.0, June 2023
== NAME
-dstat - versatile tool for generating system resource statistics
+dool - versatile tool for generating system resource statistics
== SYNOPSIS
-dstat [-afv] [options..] [delay [count]]
+dool [-afv] [options..] [delay [count]]
== DESCRIPTION
-Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat
+Dool is a versatile replacement for vmstat, iostat and ifstat. Dool
overcomes some of the limitations and adds some extra features.
-Dstat allows you to view all of your system resources instantly, you
+Dool allows you to view all of your system resources instantly, you
can eg. compare disk usage in combination with interrupts from your
IDE controller, or compare the network bandwidth numbers directly with
the disk throughput (in the same interval).
-Dstat also cleverly gives you the most detailed information in columns
+Dool also cleverly gives you the most detailed information in columns
and clearly indicates in what magnitude and unit the output is displayed.
Less confusion, less mistakes, more efficient.
-Dstat is unique in letting you aggregate block device throughput for a
-certain diskset or network bandwidth for a group of interfaces, ie.
+Dool is unique in letting you aggregate block device throughput for a
+certain diskset or network bandwidth for a group of interfaces, ie.
you can see the throughput for all the block devices that make up a
single filesystem or storage system.
-Dstat allows its data to be directly written to a CSV file to be
+Dool allows its data to be directly written to a CSV file to be
imported and used by OpenOffice, Gnumeric or Excel to create graphs.
-[NOTE]
-Users of Sleuthkit might find Sleuthkit's dstat being renamed to
-datastat to avoid a name conflict. See Debian bug #283709 for more
-information.
-
-
== OPTIONS
-c, --cpu::
enable cpu stats (system, user, idle, wait), for more CPU related
@@ -51,8 +44,11 @@
enable disk stats (read, write), for more disk related stats look
into the other *--disk* plugins
--D total,hda::
- include total and hda (when using -d/--disk)
+-D total,sda::
+ include total and sda (when using --disk)
+
+--diskset diskset_name:dev1,dev2,dev3,etc...::
+ group several disks together and report aggregate stats (when using --disk)
-g, --page::
enable page stats (page in, page out)
@@ -165,12 +161,21 @@
--bits::
force bits for values expressed in bytes
+--bytes::
+ force bytes for values expressed in bits
+
--float::
force float values on screen (mutual exclusive with *--integer*)
--integer::
force integer values on screen (mutual exclusive with *--float*)
+--color::
+ force 256 color output (default)
+
+--color16::
+ force 16 color
+
--bw, --blackonwhite::
change colors for white background terminal
@@ -186,14 +191,21 @@
--output file::
write CSV output to file
+--display::
+ output tabular data to the display. Useful in conjunction with *--output*
+ to display on screen and write to a file at the same time
+
--profile::
- show profiling statistics when exiting dstat
+ show profiling statistics when exiting dool
+
+--ascii::
+ output table data in ascii instead of ANSI
== PLUGINS
-While anyone can create their own dstat plugins (and contribute them) dstat
+While anyone can create their own dool plugins (and contribute them) dool
ships with a number of plugins already that extend its capabilities greatly.
-Here is an overview of the plugins dstat ships with:
+Here is an overview of the plugins dool ships with:
--battery::
battery in percentage (needs ACPI)
@@ -225,17 +237,17 @@
--disk-wait::
average time (in milliseconds) for I/O requests issued to the device to be served
---dstat::
- show dstat cputime consumption and latency
+--dool::
+ show dool cputime consumption and latency
---dstat-cpu::
- show dstat advanced cpu usage
+--dool-cpu::
+ show dool advanced cpu usage
---dstat-ctxt::
- show dstat context switches
+--dool-ctxt::
+ show dool context switches
---dstat-mem::
- show dstat advanced memory usage
+--dool-mem::
+ show dool advanced memory usage
--fan::
fan speed (needs ACPI)
@@ -250,7 +262,7 @@
GPFS filesystem operations (needs mmpmon)
--helloworld::
- Hello world example dstat plugin
+ Hello world example dool plugin
--innodb-buffer::
show innodb buffer stats
@@ -340,22 +352,22 @@
show sendmail queue size (needs sendmail)
--snmp-cpu::
- show CPU stats using SNMP from DSTAT_SNMPSERVER
+ show CPU stats using SNMP from DOOL_SNMPSERVER
--snmp-load::
- show load stats using SNMP from DSTAT_SNMPSERVER
+ show load stats using SNMP from DOOL_SNMPSERVER
--snmp-mem::
- show memory stats using SNMP from DSTAT_SNMPSERVER
+ show memory stats using SNMP from DOOL_SNMPSERVER
--snmp-net::
- show network stats using SNMP from DSTAT_SNMPSERVER
+ show network stats using SNMP from DOOL_SNMPSERVER
--snmp-net-err:
- show network errors using SNMP from DSTAT_SNMPSERVER
+ show network errors using SNMP from DOOL_SNMPSERVER
--snmp-sys::
- show system stats (interrupts and context switches) using SNMP from DSTAT_SNMPSERVER
+ show system stats (interrupts and context switches) using SNMP from DOOL_SNMPSERVER
--snooze::
show number of ticks per second
@@ -463,7 +475,7 @@
== INTERMEDIATE UPDATES
-When invoking dstat with a *delay* greater than 1 and without the
+When invoking dool with a *delay* greater than 1 and without the
*--noupdate* option, it will show intermediate updates, ie. the first
time a 1 sec average, the second update a 2 second average, etc. until
the delay has been reached.
@@ -475,34 +487,34 @@
== EXAMPLES
-Using dstat to relate disk-throughput with network-usage (eth0), total CPU-usage and system counters:
+Using dool to relate disk-throughput with network-usage (eth0), total CPU-usage and system counters:
----
-dstat -dnyc -N eth0 -C total -f 5
+dool -dnyc -N eth0 -C total -f 5
----
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/docs/dool.1.html
^
|
@@ -1,10 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.9" />
-<title>dstat(1)</title>
+<meta name="generator" content="AsciiDoc 8.6.10" />
+<title>dool(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -734,11 +735,11 @@
<body class="manpage">
<div id="header">
<h1>
-dstat(1) Manual Page
+dool(1) Manual Page
</h1>
<h2>NAME</h2>
<div class="sectionbody">
-<p>dstat -
+<p>dool -
versatile tool for generating system resource statistics
</p>
</div>
@@ -747,37 +748,27 @@
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
-<div class="paragraph"><p>dstat [-afv] [options..] [delay [count]]</p></div>
+<div class="paragraph"><p>dool [-afv] [options..] [delay [count]]</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
-<div class="paragraph"><p>Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat
+<div class="paragraph"><p>Dool is a versatile replacement for vmstat, iostat and ifstat. Dool
overcomes some of the limitations and adds some extra features.</p></div>
-<div class="paragraph"><p>Dstat allows you to view all of your system resources instantly, you
+<div class="paragraph"><p>Dool allows you to view all of your system resources instantly, you
can eg. compare disk usage in combination with interrupts from your
IDE controller, or compare the network bandwidth numbers directly with
the disk throughput (in the same interval).</p></div>
-<div class="paragraph"><p>Dstat also cleverly gives you the most detailed information in columns
+<div class="paragraph"><p>Dool also cleverly gives you the most detailed information in columns
and clearly indicates in what magnitude and unit the output is displayed.
Less confusion, less mistakes, more efficient.</p></div>
-<div class="paragraph"><p>Dstat is unique in letting you aggregate block device throughput for a
+<div class="paragraph"><p>Dool is unique in letting you aggregate block device throughput for a
certain diskset or network bandwidth for a group of interfaces, ie.
you can see the throughput for all the block devices that make up a
single filesystem or storage system.</p></div>
-<div class="paragraph"><p>Dstat allows its data to be directly written to a CSV file to be
+<div class="paragraph"><p>Dool allows its data to be directly written to a CSV file to be
imported and used by OpenOffice, Gnumeric or Excel to create graphs.</p></div>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<div class="title">Note</div>
-</td>
-<td class="content">Users of Sleuthkit might find Sleuthkit’s dstat being renamed to
-datastat to avoid a name conflict. See Debian bug #283709 for more
-information.</td>
-</tr></table>
-</div>
</div>
</div>
<div class="sect1">
@@ -812,11 +803,19 @@
</p>
</dd>
<dt class="hdlist1">
--D total,hda
+-D total,sda
+</dt>
+<dd>
+<p>
+ include total and sda (when using --disk)
+</p>
+</dd>
+<dt class="hdlist1">
+--diskset diskset_name:dev1,dev2,dev3,etc…
</dt>
<dd>
<p>
- include total and hda (when using -d/--disk)
+ group several disks together and report aggregate stats (when using --disk)
</p>
</dd>
<dt class="hdlist1">
@@ -1111,6 +1110,14 @@
</p>
</dd>
<dt class="hdlist1">
+--bytes
+</dt>
+<dd>
+<p>
+ force bytes for values expressed in bits
+</p>
+</dd>
+<dt class="hdlist1">
--float
</dt>
<dd>
@@ -1127,6 +1134,22 @@
</p>
</dd>
<dt class="hdlist1">
+--color
+</dt>
+<dd>
+<p>
+ force 256 color output (default)
+</p>
+</dd>
+<dt class="hdlist1">
+--color16
+</dt>
+<dd>
+<p>
+ force 16 color
+</p>
+</dd>
+<dt class="hdlist1">
--bw, --blackonwhite
</dt>
<dd>
@@ -1167,11 +1190,28 @@
</p>
</dd>
<dt class="hdlist1">
+--display
+</dt>
+<dd>
+<p>
+ output tabular data to the display. Useful in conjunction with <strong>--output</strong>
+ to display on screen and write to a file at the same time
+</p>
+</dd>
+<dt class="hdlist1">
--profile
</dt>
<dd>
<p>
- show profiling statistics when exiting dstat
+ show profiling statistics when exiting dool
+</p>
+</dd>
+<dt class="hdlist1">
+--ascii
+</dt>
+<dd>
+<p>
+ output table data in ascii instead of ANSI
</p>
</dd>
</dl></div>
@@ -1180,9 +1220,9 @@
<div class="sect1">
<h2 id="_plugins">PLUGINS</h2>
<div class="sectionbody">
-<div class="paragraph"><p>While anyone can create their own dstat plugins (and contribute them) dstat
+<div class="paragraph"><p>While anyone can create their own dool plugins (and contribute them) dool
ships with a number of plugins already that extend its capabilities greatly.
-Here is an overview of the plugins dstat ships with:</p></div>
+Here is an overview of the plugins dool ships with:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
--battery
@@ -1265,35 +1305,35 @@
</p>
</dd>
<dt class="hdlist1">
---dstat
+--dool
</dt>
<dd>
<p>
- show dstat cputime consumption and latency
+ show dool cputime consumption and latency
</p>
</dd>
<dt class="hdlist1">
---dstat-cpu
+--dool-cpu
</dt>
<dd>
<p>
- show dstat advanced cpu usage
+ show dool advanced cpu usage
</p>
</dd>
<dt class="hdlist1">
---dstat-ctxt
+--dool-ctxt
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/dool
^
|
@@ -14,6 +14,7 @@
### along with this program; if not, write to the Free Software
### Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+### Forked by Scott Baker in 2019
### Copyright 2004-2019 Dag Wieers <dag@wieers.com>
from __future__ import absolute_import, division, generators, print_function
@@ -24,12 +25,14 @@
import getpass
import glob
import linecache
+import math
import os
import re
import resource
import sched
import sys
import time
+import signal
# https://stackoverflow.com/questions/53978542/how-to-use-collections-abc-from-both-python-3-8-and-python-2-7
try:
@@ -37,13 +40,10 @@
except ImportError:
from collections import Sequence # Python 2.x
-VERSION = '1.1.0'
+VERSION = '1.3.1'
theme = { 'default': '' }
-if sys.version_info < (2, 2):
- sys.exit('error: Python 2.2 or later required')
-
pluginpath = [
os.path.expanduser('~/.dool/'), # home + /.dool/
os.path.abspath(os.path.dirname(sys.argv[0])) + '/plugins/', # binary path + /plugins/
@@ -51,40 +51,42 @@
'/usr/local/share/dool/',
]
-PY2 = sys.version_info[0] == 2
-PY3 = sys.version_info[0] == 3
-
-if PY3:
- string_types = str,
-else:
- string_types = basestring,
+# Global variable to match drives in /proc/
+# This is a regexp filter to EXCLUDE partitions, so we only add stats for the main parent drive
+# i.e. use stats for sda not sda1/sda7/etc.
+# NVME drives are: nvmeXnXpX
+DOOL_DISKFILTER = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+|nvme\d+n\d+p\d+)$')
class Options:
def __init__(self, args):
- self.args = args
- self.bits = True
- self.blackonwhite = False
- self.count = -1
- self.cpulist = None
- self.debug = 0
- self.delay = 1
- self.disklist = None
- self.full = False
- self.float = False
- self.integer = False
- self.intlist = None
- self.netlist = None
- self.swaplist = None
- self.color = None
- self.update = True
- self.header = True
- self.output = False
- self.pidfile = False
- self.profile = ''
- self.use_ascii = False
-
- ### List of available plugins
- allplugins = listplugins()
+ self.args = args
+ self.bits = True
+ self.blackonwhite = False
+ self.count = -1
+ self.cpulist = None
+ self.debug = 0
+ self.delay = 1
+ self.devel = 0
+ self.disklist = []
+ self.diskset = {}
+ self.full = False
+ self.float = False
+ self.integer = False
+ self.intlist = None
+ self.netlist = None
+ self.swaplist = None
+ self.color = None
+ self.update = True
+ self.header = True
+ self.output = False
+ self.pidfile = False
+ self.profile = ''
+ self.use_ascii = False
+ self.plugin_params = {} # Not currently used
+
+ ### Get all the plugins and their details
+ self.plugin_details = get_plugin_details()
+ plugin_opt_list = self.get_opt_list_from_details(self.plugin_details)
### List of plugins to show
self.plugins = []
@@ -95,19 +97,18 @@
self.header = False
self.update = False
- ### Temporary hardcoded for my own project
- self.diskset = {
- 'local': ('sda', 'hd[a-d]'),
- 'lores': ('sd[b-k]', 'sd[v-z]', 'sda[a-e]'),
- 'hires': ('sd[l-u]', 'sda[f-o]'),
- }
+ long_opts = [
+ 'all' , 'all-plugins', 'ascii' , 'bits' , 'bw' , 'bytes' , 'black-on-white', 'color' ,
+ 'color16' , 'defaults' , 'debug' , 'devel' , 'display', 'filesystem', 'float' , 'full' ,
+ 'help' , 'integer' , 'list' , 'mods' , 'modules', 'more' , 'nocolor' , 'noheaders',
+ 'noupdate', 'profile' , 'version' , 'vmstat',
+ 'diskset=', 'output=' , 'pidfile='
+ ]
+
+ long_opts += plugin_opt_list
try:
- opts, args = getopt.getopt(args, 'acdfghilmno:prstTvyC:D:I:M:N:S:V',
- ['all', 'all-plugins', 'bits', 'bw', 'bytes', 'black-on-white', 'color',
- 'defaults', 'debug', 'filesystem', 'float', 'full', 'help', 'integer',
- 'list', 'mods', 'modules', 'more', 'nocolor', 'noheaders', 'noupdate',
- 'output=', 'pidfile=', 'profile', 'version', 'vmstat', 'ascii'] + allplugins)
+ opts, args = getopt.getopt(args, 'acdfghilmno:prstTvyC:D:I:M:N:S:V', long_opts)
except getopt.error as exc:
print('dool: %s, try dool -h for a list of all the options' % exc)
sys.exit(1)
@@ -116,6 +117,14 @@
plugin_defaults = 0
+ # Loop through the opt array and find the keys
+ opt_keys = []
+ for x in opts:
+ opt_keys.append(x[0])
+
+ # We default to outputting to the display, but this may get toggled later by --output
+ self.display = True
+
for opt, arg in opts:
if opt in ['-c']:
self.plugins.append('cpu')
@@ -125,6 +134,29 @@
self.plugins.append('disk')
elif opt in ['-D']:
self.disklist = arg.split(',')
+ elif opt in ['--diskset']:
+ parts = arg.split(":", 1)
+ name = list_item_default(parts, 0, "Unknown")
+ members = list_item_default(parts, 1, "").split(",")
+
+ if (len(parts) < 2 or len(members) < 1):
+ print("Error parsing diskset...\n")
+ print("Format : diskset_name:dev1,dev2,dev3,etc...")
+ print("Example: --diskset os_drives:sda,sdb")
+
+ # We convert /dev/sda and symlinks to their raw device name that is
+ # found in /proc/diskstats
+ cleaned = []
+ for dev in members:
+ base = get_dev_name(dev)
+ if base:
+ cleaned.append(base)
+
+ if len(cleaned) == 0:
+ print('dool: diskset %s has no valid members' % name)
+
+ self.diskset[name] = cleaned
+ self.disklist.append(name)
elif opt in ['--filesystem']:
self.plugins.append('fs')
elif opt in ['-g']:
@@ -170,10 +202,7 @@
elif opt in ['-f', '--full']:
self.full = True
elif opt in ['--all-plugins']:
- ### Make list unique in a fancy fast way
- plugins = list({}.fromkeys(allplugins).keys())
- plugins.sort()
- self.plugins += plugins
+ self.plugins += plugin_opt_list
elif opt in ['--bytes']:
self.bits = False
elif opt in ['--bits']:
@@ -183,7 +212,10 @@
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/packaging/rpm/build.sh
^
|
@@ -22,6 +22,7 @@
# Build a tar archive of the current HEAD with the correct version number
cd ../../
git archive --format=tar --prefix=dool-$VERSION/ HEAD | gzip > /tmp/dool-$VERSION.tar.gz
+mkdir -p ~/rpmbuild/SOURCES/
cp -a /tmp/dool-$VERSION.tar.gz ~/rpmbuild/SOURCES/
cd -
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/packaging/rpm/dool.spec
^
|
@@ -4,7 +4,7 @@
Summary: Pluggable real-time performance monitoring tool
Name: dool
-Version: 0.9.9
+Version: 1.1.0
Release: 1
License: GPL
Group: System Environment/Base
@@ -14,8 +14,8 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
-BuildRequires: python >= 2.6
-Requires: python >= 2.6 python-six
+BuildRequires: python3 >= 3.0
+Requires: python3 >= 3.0
%description
Dool is a versatile replacement for vmstat, iostat, netstat and ifstat.
@@ -48,7 +48,7 @@
%files
%defattr(-, root, root, 0755)
-%doc AUTHORS ChangeLog COPYING README.md TODO docs/*.html docs/*.adoc examples/
+%doc AUTHORS ChangeLog LICENSE README.md docs/*.html docs/*.adoc examples/
%doc %{_mandir}/man1/dool.1*
%{_bindir}/dool
%{_datadir}/dool/
|
[-]
[+]
|
Added |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool__pid_detail.py
^
|
@@ -0,0 +1,178 @@
+### Author: Scott Baker - <https://www.perturb.org/>
+
+class dool_plugin(dool):
+ """
+ Plugin to gather data about a specific PID
+ """
+
+ def __init__(self):
+ self.vars = ('cpu read writ mem',)
+ self.type = 's'
+ self.width = 20
+ self.scale = 0
+ self.prev = { 'read': -1, 'write': -1, 'cpu': 0, 'mem': 0}
+
+ # Get the pid from the CLI options
+ try:
+ pid = int(op.plugin_params['pid-detail'])
+ except:
+ msg = 'pid-detail: %s is not a number' % (op.plugin_params['pid-detail'])
+ raise Exception(msg)
+
+ path = '/proc/%s/stat' % pid
+ if not os.path.exists(path):
+ msg = 'pid-detail: %d is not an active pid' % (pid)
+ raise Exception(msg)
+
+ name = getnamebypid(pid, 'unknown')
+
+ # Set the plugin title at the top of the column
+ self.name = "pid info: %s" % name
+
+ # Save the pid name and number for easier access later
+ self.pid_name = name
+ self.pid = pid
+
+ def extract(self):
+ pid = self.pid
+
+ # Make sure we have data for this pid
+ path = '/proc/%s/stat' % pid
+ if not os.path.exists(path):
+ self.output = 'Pid #%s not found' % pid
+ return
+
+ (disk_rd, disk_wr) = self.get_pid_disk(pid)
+ cpu_usage = self.get_pid_cpu(pid)
+ mem_usage = self.get_pid_mem(pid)
+
+ cpu_str = cprint(cpu_usage, 'f', 3, 34)
+ disk_rd = cprint(disk_rd , 'd', 5, 1024)
+ disk_wr = cprint(disk_wr , 'd', 5, 1024)
+ mem_usage = cprint(mem_usage, 'd', 4, 1024)
+
+ self.output = "%s %s %s %s" % (cpu_str, disk_rd, disk_wr, mem_usage)
+
+ # Sometimes /proc/12345/stat has a space in the proc name field
+ # which messes up the split. This tries to be smart and work around that
+ def get_proc_pid_stat(self, pid):
+ path = '/proc/%s/stat' % pid
+ if not os.path.exists(path):
+ return []
+
+ # Read the first line
+ line = proc_readline(path)
+ line = line.strip()
+
+ # Find the proc name that's between the ( )
+ x = re.search("\((.*?)\)", line)
+ paren = x.group(1)
+
+ # Replace any spaces in the parens part with underscores
+ cleaned = paren.replace(" ", "_")
+ new_line = line.replace(paren, cleaned, 1)
+
+ # Return the split array
+ parts = new_line.split(" ")
+
+ return parts
+
+ def get_pid_cpu(self, pid):
+ path = '/proc/%s/stat' % pid
+ if not os.path.exists(path):
+ self.output = 'Pid #%s not found' % pid
+
+ l = self.get_proc_pid_stat(pid)
+ if len(l) < 35: return 0
+
+ user_time = int(l[13])
+ kernel_time = int(l[14])
+
+ current_cpu = user_time + kernel_time
+ prev_cpu = self.prev['cpu']
+ usage = (current_cpu - prev_cpu) * 1.0 / elapsed / cpunr
+
+ if prev_cpu:
+ ret = usage
+ else:
+ ret = 0
+
+ # If we're at a real update (not interim) we save the data
+ if step == op.delay:
+ self.prev['cpu'] = current_cpu
+
+ return ret
+
+ def get_pid_disk(self, pid):
+ path = '/proc/%s/io' % pid
+ count = 0
+ for p in proc_splitlines(path):
+ key = p[0]
+ val = p[1]
+
+ if key == "read_bytes:":
+ cur_read = int(val)
+ elif key == "write_bytes:":
+ cur_write = int(val)
+
+ count += 1
+
+ # This is usually a permission error reading that part of /proc/
+ if count == 0:
+ return (0,0)
+
+ if (op.bits):
+ factor = 8
+ else:
+ factor = 1
+
+ # We have previous data so we calculate the difference
+ # between the two
+ if self.prev['read'] > -1:
+ rread = (cur_read - self.prev['read']) * factor / elapsed
+ rwrite = (cur_write - self.prev['write']) * factor / elapsed
+ # First round we just gather data
+ else:
+ rread = 0
+ rwrite = 0
+
+ # If we're at a real update (not interim) we save the data
+ if step == op.delay:
+ self.prev['read'] = cur_read
+ self.prev['write'] = cur_write
+
+ ret = (rread, rwrite)
+
+ return ret
+
+ def get_pid_mem(self, pid):
+ l = proc_splitline('/proc/%s/statm' % pid)
+
+ if len(l) < 2: return 0
+
+ prev_usage = self.prev['mem']
+ cur_usage = (int(l[1]) * pagesize)
+
+ # If we have previous numbers we return the average
+ if prev_usage:
+ usage = self.prev['mem'] / elapsed
+ # First run just gets the current number
+ else:
+ usage = cur_usage
+
+ self.prev['mem'] += cur_usage
+
+ if step == op.delay:
+ self.prev['mem'] = cur_usage
+
+ # Uncomment this to always return the absolute (not average)
+ #usage = cur_usage
+
+ return usage
+
+ def showcsv(self):
+ xstr = "%s %s %s %s" % (1,2,3,4)
+
+ return xstr
+
+# vim: tabstop=4 shiftwidth=4 noexpandtab autoindent softtabstop=4
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_battery.py
^
|
@@ -1,7 +1,7 @@
### Author: Dag Wieers <dag$wieers,com>
### Author: Sven-Hendrik Haase <sh@lutzhaase.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Percentage of remaining battery power as reported by ACPI.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_battery_remain.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Remaining battery time.
|
[-]
[+]
|
Added |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_bond.py
^
|
@@ -0,0 +1,76 @@
+### Author: Ming-Hung Chen <minghung.chen@gmail.com>
+
+
+class dool_plugin(dool):
+ bonddirname = '/proc/net/bonding/'
+ netdirname = '/sys/class/net/'
+ """
+ Bytes received or sent through bonding interfaces.
+ Usage:
+ dool --bond -N <adapter name>,total
+ default dool --bond is the same as
+ dool --bond -N total
+
+ """
+
+ def __init__(self):
+ self.nick = ('recv', 'send')
+ self.type = 'd'
+ self.cols = 2
+ self.width = 6
+
+ def discover(self, *objlist):
+ ret = []
+ for subdirname in os.listdir(self.bonddirname):
+ if not os.path.isdir(os.path.join(self.netdirname,subdirname, 'statistics')) : continue
+ device_dir = os.path.join(self.netdirname, subdirname, 'statistics')
+ ret.append(subdirname)
+ ret.sort()
+ for item in objlist: ret.append(item)
+ return ret
+
+ def vars(self):
+ ret = []
+ if op.netlist:
+ varlist = op.netlist
+ elif not op.full:
+ varlist = ('total',)
+ else:
+ varlist = self.discover
+ varlist.sort()
+ for name in varlist:
+ if name in self.discover + ['total']:
+ ret.append(name)
+ if not ret:
+ raise Exception('No suitable network interfaces found to monitor')
+ return ret
+
+ def name(self):
+ return ['bond/'+name for name in self.vars]
+
+ def extract(self):
+ self.set2['total'] = [0, 0]
+ ifaces = self.discover
+ for name in self.vars: self.set2[name] = [0, 0]
+ for name in ifaces:
+ rcv_counter_name=os.path.join(self.netdirname, name, 'statistics/rx_bytes')
+ xmit_counter_name=os.path.join(self.netdirname, name, 'statistics/tx_bytes')
+ rcv_lines = dopen(rcv_counter_name).readlines()
+ xmit_lines = dopen(xmit_counter_name).readlines()
+ if len(rcv_lines) < 1 or len(xmit_lines) < 1:
+ continue
+ rcv_value = int(rcv_lines[0])
+ xmit_value = int(xmit_lines[0])
+ if name in self.vars :
+ self.set2[name] = (rcv_value, xmit_value)
+ self.set2['total'] = ( self.set2['total'][0] + rcv_value, self.set2['total'][1] + xmit_value)
+ if update:
+ for name in self.set2:
+ self.val[name] = [
+ (self.set2[name][0] - self.set1[name][0]) / elapsed,
+ (self.set2[name][1] - self.set1[name][1]) / elapsed,
+ ]
+ if self.val[name][0] < 0: self.val[name][0] += maxint + 1
+ if self.val[name][1] < 0: self.val[name][1] += maxint + 1
+ if step == op.delay:
+ self.set1.update(self.set2)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_condor_queue.py
^
|
@@ -72,7 +72,7 @@
finally:
f.close()
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for Condor queue stats
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_cpufreq.py
^
|
@@ -1,6 +1,6 @@
### Author: dag@wieers.com
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
CPU frequency in percentage as reported by ACPI.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_dbus.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Number of active dbus sessions.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_disk_avgqu.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
The average queue length of the requests that were issued to the device.
"""
@@ -11,7 +11,6 @@
self.type = 'f'
self.width = 4
self.scale = 10
- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
self.open('/proc/diskstats')
self.cols = 1
self.struct = dict( rq_ticks=0 )
@@ -20,7 +19,7 @@
ret = []
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
ret.append(name)
for item in objlist: ret.append(item)
@@ -36,7 +35,7 @@
varlist = []
blockdevices = [os.path.basename(filename) for filename in glob.glob('/sys/block/*')]
for name in self.discover:
- if self.diskfilter.match(name): continue
+ if DOOL_DISKFILTER.match(name): continue
if name not in blockdevices: continue
varlist.append(name)
varlist.sort()
@@ -51,7 +50,7 @@
def extract(self):
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
if l[3] == '0' and l[7] == '0': continue
name = l[2]
if name not in self.vars or name == 'total': continue
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_disk_avgrq.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
The average size (in sectors) of the requests that were issued
to the device.
@@ -12,7 +12,6 @@
self.type = 'f'
self.width = 4
self.scale = 10
- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
self.open('/proc/diskstats')
self.cols = 1
self.struct = dict( nr_ios=0, rd_sect=0, wr_sect=0 )
@@ -21,7 +20,7 @@
ret = []
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
ret.append(name)
for item in objlist: ret.append(item)
@@ -37,7 +36,7 @@
varlist = []
blockdevices = [os.path.basename(filename) for filename in glob.glob('/sys/block/*')]
for name in self.discover:
- if self.diskfilter.match(name): continue
+ if DOOL_DISKFILTER.match(name): continue
if name not in blockdevices: continue
varlist.append(name)
varlist.sort()
@@ -52,7 +51,7 @@
def extract(self):
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
if l[3] == '0' and l[7] == '0': continue
name = l[2]
if name not in self.vars or name == 'total': continue
|
[-]
[+]
|
Added |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_disk_inflight.py
^
|
@@ -0,0 +1,63 @@
+### Author: Scott Baker <scott@perturb.org>
+
+class dool_plugin(dool):
+ """
+ The number of in-flight IO operations pending per disk
+ """
+
+ def __init__(self):
+ # Each column is X chars wide
+ self.width = 4 # Defaults to 5 if not specified
+
+ devices = self.get_devs()
+ short_devs = []
+ for x in devices:
+ short_name = dev_short_name(x, self.width)
+ short_devs.append(short_name)
+
+ # This is the plugin name that goes on top of the columns
+ #self.name = 'io/inflight'
+ self.name = short_devs
+ # Title of each column (or group of colums)
+ self.nick = ('ioif',)
+ # These are the sub headings under the main column (each disk device)
+ self.vars = devices
+ # It's a decimal number
+ self.type = 'd'
+ # Group the colorings to chunks of 20
+ self.scale = 20
+ # The number of columns we're showing
+ self.cols = len(devices)
+
+ def get_devs(self):
+ # If there was a disk filter specified on the CLI
+ # example: dool --disk-infligh -D md123,sda
+ if op.disklist:
+ return op.disklist
+
+ ret = []
+ globx = glob.glob('/sys/block/*')
+
+ for path in globx:
+ base = os.path.basename(path)
+ ret.append(base)
+
+ ret.sort()
+
+ return ret
+
+ def extract(self):
+ for dev in self.vars:
+ # Documentation for /sys/block/$DEV/stat
+ # https://www.kernel.org/doc/Documentation/block/stat.txt
+ path = ("/sys/block/%s/stat" % (dev))
+
+ for l in proc_splitlines(path):
+ value = int(l[8])
+
+ # For testing we can toss random data in the buckets
+ #value = random.randrange(1,100)
+
+ self.val[dev] = (value,)
+
+# vim: tabstop=4 shiftwidth=4 noexpandtab autoindent softtabstop=4
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_disk_svctm.py
^
|
@@ -1,7 +1,7 @@
### Author: David Nicklay <david-d$nicklay,com>
### Modified from disk-util: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
The average service time (in milliseconds) for I/O requests that were
issued to the device.
@@ -15,7 +15,6 @@
self.type = 'f'
self.width = 4
self.scale = 1
- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
self.open('/proc/diskstats')
self.cols = 1
self.struct = dict( nr_ios=0, tot_ticks=0 )
@@ -24,7 +23,7 @@
ret = []
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
ret.append(name)
for item in objlist: ret.append(item)
@@ -40,7 +39,7 @@
varlist = []
blockdevices = [os.path.basename(filename) for filename in glob.glob('/sys/block/*')]
for name in self.discover:
- if self.diskfilter.match(name): continue
+ if DOOL_DISKFILTER.match(name): continue
if name not in blockdevices: continue
varlist.append(name)
varlist.sort()
@@ -55,7 +54,7 @@
def extract(self):
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
if l[3] == '0' and l[7] == '0': continue
name = l[2]
if name not in self.vars or name == 'total': continue
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_disk_tps.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Number of read and write transactions per device.
@@ -12,7 +12,6 @@
self.type = 'd'
self.width = 5
self.scale = 1000
- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
self.open('/proc/diskstats')
self.cols = 2
@@ -20,7 +19,7 @@
ret = []
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
ret.append(name)
for item in objlist: ret.append(item)
@@ -37,7 +36,7 @@
else:
varlist = []
for name in self.discover:
- if self.diskfilter.match(name): continue
+ if DOOL_DISKFILTER.match(name): continue
if name not in blockdevices(): continue
varlist.append(name)
# if len(varlist) > 2: varlist = varlist[0:2]
@@ -55,9 +54,9 @@
for l in self.splitlines():
if len(l) < 13: continue
if l[3] == '0' and l[7] == '0': continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
- if not self.diskfilter.match(name):
+ if not DOOL_DISKFILTER.match(name):
self.set2['total'] = ( self.set2['total'][0] + int(l[3]), self.set2['total'][1] + int(l[7]) )
if name in self.vars and name != 'total':
self.set2[name] = ( self.set2[name][0] + int(l[3]), self.set2[name][1] + int(l[7]))
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_disk_util.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Percentage of bandwidth utilization for block devices.
@@ -10,25 +10,25 @@
"""
def __init__(self):
- self.nick = ('util', )
- self.type = 'f'
- self.width = 4
- self.scale = 34
- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
- self.open('/proc/diskstats')
- self.cols = 1
+ self.nick = ('util', )
+ self.type = 'f'
+ self.width = 4
+ self.scale = 34
+ self.cols = 1
self.struct = dict( tot_ticks=0 )
+ self.open('/proc/diskstats')
def discover(self, *objlist):
ret = []
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
ret.append(name)
for item in objlist: ret.append(item)
if not ret:
raise Exception('No suitable block devices found to monitor')
+
return ret
def basename(self, disk):
@@ -53,30 +53,42 @@
return disk
def vars(self):
- ret = []
+ ret = []
+ varlist = []
+
+ # If there was a disk filter specified on the CLI
+ # example: dool --disk-infligh -D md123,sda
if op.disklist:
- varlist = list(map(self.basename, op.disklist))
+ for x in op.disklist:
+ base = self.basename(x)
+ varlist.append(base)
+ # We're grabbing them all on the fly via discover()
else:
- varlist = []
for name in self.discover:
- if self.diskfilter.match(name): continue
+ if DOOL_DISKFILTER.match(name): continue
if name not in blockdevices(): continue
varlist.append(name)
-# if len(varlist) > 2: varlist = varlist[0:2]
+
varlist.sort()
+
for name in varlist:
if name in self.discover:
ret.append(name)
+
return ret
def name(self):
- return [sysfs_dev(name) for name in self.vars]
+ ret = []
+ for x in self.vars:
+ ret.append(dev_short_name(x))
+
+ return ret
def extract(self):
for l in self.splitlines():
if len(l) < 13: continue
if l[5] == '0' and l[9] == '0': continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
if name not in self.vars: continue
self.set2[name] = dict(
@@ -88,3 +100,5 @@
if step == op.delay:
self.set1.update(self.set2)
+
+# vim: tabstop=4 shiftwidth=4 expandtab autoindent softtabstop=4
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_disk_wait.py
^
|
@@ -1,7 +1,7 @@
### Author: David Nicklay <david-d$nicklay,com>
### Modified from disk-util: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Read and Write average wait times of block devices.
@@ -13,7 +13,6 @@
self.type = 'f'
self.width = 4
self.scale = 1
- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
self.open('/proc/diskstats')
self.cols = 1
self.struct = dict( rd_ios=0, wr_ios=0, rd_ticks=0, wr_ticks=0 )
@@ -22,7 +21,7 @@
ret = []
for l in self.splitlines():
if len(l) < 13: continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
ret.append(name)
for item in objlist: ret.append(item)
@@ -38,7 +37,7 @@
varlist = []
blockdevices = [os.path.basename(filename) for filename in glob.glob('/sys/block/*')]
for name in self.discover:
- if self.diskfilter.match(name): continue
+ if DOOL_DISKFILTER.match(name): continue
if name not in blockdevices: continue
varlist.append(name)
varlist.sort()
@@ -54,7 +53,7 @@
for l in self.splitlines():
if len(l) < 13: continue
if l[5] == '0' and l[9] == '0': continue
- if l[3:] == ['0',] * 11: continue
+ if set(l[3:]) == {'0'}: continue
name = l[2]
if name not in self.vars: continue
self.set2[name] = dict(
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_dool.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Provide more information related to the dstat process.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_dool_cpu.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Provide CPU information related to the dstat process.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_dool_ctxt.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Provide Dstat's number of voluntary and involuntary context switches.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_dool_mem.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Provide memory information related to the dstat process.
|
[-]
[+]
|
Added |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_dool_step.py
^
|
@@ -0,0 +1,27 @@
+### Author: Dag Wieers <dag$wieers,com>
+
+class dool_plugin(dool):
+ """
+ Show internal Dool step and delay counters
+ """
+
+ def __init__(self):
+ self.name = 'dool'
+ #self.nick = ('counter',)
+ self.vars = ('stp','dly','cnt',)
+ self.type = 'd'
+ self.width = 3
+ self.scale = 10
+
+ def extract(self):
+ self.val['stp'] = step
+ self.val['dly'] = op.delay
+
+ if op.count == -1:
+ xcount = 0
+ else:
+ xcount = op.count
+
+ self.val['cnt'] = xcount
+
+# vim:ts=4:sw=4:et
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_fan.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Fan speed in RPM (rotations per minute) as reported by ACPI.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_freespace.py
^
|
@@ -3,7 +3,7 @@
### FIXME: This module needs infrastructure to provide a list of mountpoints
### FIXME: Would be nice to have a total by default (half implemented)
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Amount of used and free space per mountpoint.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_fuse.py
^
|
@@ -1,6 +1,6 @@
### Author: Vikas Gorur (http://github.com/vikasgorur)
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Waiting calls on mounted FUSE filesystems
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_gpfs.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Total amount of read and write throughput (in bytes) on a GPFS filesystem.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_gpfs_ops.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Number of operations performed on a GPFS filesystem.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_helloworld.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Example "Hello world!" output plugin for aspiring Dstat developers.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_ib.py
^
|
@@ -1,17 +1,17 @@
-### Author: Dmitry Fedin <dmitry.fedin@gmail.com>
+### Author: Dmitry Fedin <dmitry.fedin@gmail.com>, Ming-Hung Chen <minghung.chen@gmail.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
ibdirname = '/sys/class/infiniband'
"""
Bytes received or sent through infiniband/RoCE interfaces
Usage:
- dstat --ib -N <adapter name>:<port>,total
- default dstat --ib is the same as
- dstat --ib -N total
+ dool --ib -N <adapter name>:<port>,total
+ default dool --ib is the same as
+ dool --ib -N total
example for Mellanox adapter, transfering data via port 2
- dstat --ib -Nmlx4_0:2
+ dool --ib -Nmlx4_0:2
"""
def __init__(self):
@@ -54,14 +54,21 @@
def extract(self):
self.set2['total'] = [0, 0]
+ factor={'total': 1.0}
ifaces = self.discover
for name in self.vars: self.set2[name] = [0, 0]
for name in ifaces:
l=name.split(':');
if len(l) < 2:
continue
- rcv_counter_name=os.path.join('/sys/class/infiniband', l[0], 'ports', l[1], 'counters_ext/port_rcv_data_64')
- xmit_counter_name=os.path.join('/sys/class/infiniband', l[0], 'ports', l[1], 'counters_ext/port_xmit_data_64')
+ rcv_counter_name=os.path.join('/sys/class/infiniband', l[0], 'ports', l[1], 'counters/port_rcv_data')
+ if os.path.isfile(rcv_counter_name):
+ factor[name] = 4.0
+ xmit_counter_name=os.path.join('/sys/class/infiniband', l[0], 'ports', l[1], 'counters/port_xmit_data')
+ else:
+ factor[name] = 4.0
+ rcv_counter_name=os.path.join('/sys/class/infiniband', l[0], 'ports', l[1], 'counters_ext/port_rcv_data_64')
+ xmit_counter_name=os.path.join('/sys/class/infiniband', l[0], 'ports', l[1], 'counters_ext/port_xmit_data_64')
rcv_lines = dopen(rcv_counter_name).readlines()
xmit_lines = dopen(xmit_counter_name).readlines()
if len(rcv_lines) < 1 or len(xmit_lines) < 1:
@@ -70,12 +77,12 @@
xmit_value = int(xmit_lines[0])
if name in self.vars :
self.set2[name] = (rcv_value, xmit_value)
- self.set2['total'] = ( self.set2['total'][0] + rcv_value, self.set2['total'][1] + xmit_value)
+ self.set2['total'] = ( self.set2['total'][0] + rcv_value * factor[name], self.set2['total'][1] + xmit_value * factor[name])
if update:
for name in self.set2:
self.val[name] = [
- (self.set2[name][0] - self.set1[name][0]) * 4.0 / elapsed,
- (self.set2[name][1] - self.set1[name][1]) * 4.0/ elapsed,
+ (self.set2[name][0] - self.set1[name][0]) * factor[name] / elapsed,
+ (self.set2[name][1] - self.set1[name][1]) * factor[name] / elapsed,
]
if self.val[name][0] < 0: self.val[name][0] += maxint + 1
if self.val[name][1] < 0: self.val[name][1] += maxint + 1
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_innodb_buffer.py
^
|
@@ -1,9 +1,9 @@
### Author: Dag Wieers <dag$wieers,com>
global mysql_options
-mysql_options = os.getenv('DSTAT_MYSQL')
+mysql_options = os.getenv('DOOL_MYSQL')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'innodb pool'
self.nick = ('crt', 'rea', 'wri')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_innodb_io.py
^
|
@@ -1,9 +1,9 @@
### Author: Dag Wieers <dag$wieers,com>
global mysql_options
-mysql_options = os.getenv('DSTAT_MYSQL')
+mysql_options = os.getenv('DOOL_MYSQL')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'innodb io ops '
self.nick = ('rea', 'wri', 'syn')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_innodb_ops.py
^
|
@@ -1,9 +1,9 @@
### Author: Dag Wieers <dag$wieers,com>
global mysql_options
-mysql_options = os.getenv('DSTAT_MYSQL')
+mysql_options = os.getenv('DOOL_MYSQL')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'innodb ops'
self.nick = ('ins', 'upd', 'del', 'rea')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_jvm_full.py
^
|
@@ -5,7 +5,7 @@
BIN_JCMD = '/usr/bin/jcmd'
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
This plugin gathers jvm stats via jcmd.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_jvm_vm.py
^
|
@@ -6,7 +6,7 @@
#
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'jvm mem ops '
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_lustre.py
^
|
@@ -1,24 +1,30 @@
-# Author: Brock Palen <brockp@mlds-networks.com>, Kilian Vavalotti <kilian@stanford.edu>
+# Author: Brock Palen <brockp@mlds-networks.com>, Kilian Cavalotti <kilian@stanford.edu>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.nick = ('read', 'write')
- self.cols = 2
+ self.cols = 2
+ self.stat_path = '/proc/fs/lustre/llite'
def check(self):
- if not os.path.exists('/proc/fs/lustre/llite'):
+ if os.path.exists('/proc/fs/lustre/llite'):
+ self.stat_path = '/proc/fs/lustre/llite'
+ elif os.path.exists('/sys/kernel/debug/lustre/llite'):
+ self.stat_path = '/sys/kernel/debug/lustre/llite'
+ else:
raise Exception('Lustre filesystem not found')
info(1, 'Module %s is still experimental.' % self.filename)
def name(self):
- return [mount for mount in os.listdir('/proc/fs/lustre/llite')]
+ return [mount for mount in os.listdir(self.stat_path)]
def vars(self):
- return [mount for mount in os.listdir('/proc/fs/lustre/llite')]
+ return [mount for mount in os.listdir(self.stat_path)]
def extract(self):
for name in self.vars:
- for line in dopen(os.path.join('/proc/fs/lustre/llite', name, 'stats')).readlines():
+ read = write = 0
+ for line in dopen(os.path.join(self.stat_path, name, 'stats')).readlines():
l = line.split()
if len(l) < 6: continue
if l[0] == 'read_bytes':
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_md_status.py
^
|
@@ -1,6 +1,6 @@
### Author: Bert de Bruijn <bert+dstat@debruijn.be>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Recovery state of software RAID rebuild.
|
[-]
[+]
|
Added |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mem_percent.py
^
|
@@ -0,0 +1,69 @@
+### Author: Scott Baker <scott@perturb.org>
+
+class dool_plugin(dool):
+ def __init__(self):
+ self.name = 'memory percent'
+ self.nick = ('used', 'free', 'cach', 'avai')
+ self.vars = ('MemUsed', 'MemFree', 'Cached', 'MemAvailable')
+ self.type = 's'
+ self.scale = 0
+ self.num_fmt = "%5.1f"
+
+ # If the user passed --integer
+ if op.integer:
+ self.num_fmt = "%5.0f"
+
+ self.open('/proc/meminfo')
+
+ def colorize_percent(self, num, red_high):
+
+ if red_high:
+ color_low = theme['colors_lo'][0]
+ color_med = theme['colors_lo'][1]
+ color_hig = theme['colors_lo'][2]
+ else:
+ color_low = theme['colors_lo'][2]
+ color_med = theme['colors_lo'][1]
+ color_hig = theme['colors_lo'][0]
+
+ num_str = self.num_fmt % (num)
+
+ # We're doing a simple red/yellow/green every 33%
+ if num <= 33.3333:
+ ret = color_low + num_str + ansi['reset']
+ elif num <= 66.6666:
+ ret = color_med + num_str + ansi['reset']
+ else:
+ ret = color_hig + num_str + ansi['reset']
+
+ return ret
+
+ def extract(self):
+ extra_extract_vars = ('MemTotal', 'Shmem', 'SReclaimable')
+ extra_val = {}
+
+ for l in self.splitlines():
+ if len(l) < 2: continue
+ name = l[0].split(':')[0]
+
+ if name in self.vars:
+ self.val[name] = int(l[1]) * 1024.0
+ if name in extra_extract_vars:
+ extra_val[name] = int(l[1]) * 1024.0
+
+ total = extra_val['MemTotal']
+ free = (self.val['MemFree'] / total) * 100
+ avail = (self.val['MemAvailable'] / total) * 100
+ cached = (self.val['Cached'] / total) * 100
+
+ # This math is borrow from the regular mem plugin
+ used = (((extra_val['MemTotal'] - self.val['Cached'] - extra_val['SReclaimable']) / total) * 100)
+
+ self.val['MemUsed'] = self.colorize_percent(used, False)
+ self.val['MemFree'] = self.colorize_percent(free, True)
+ self.val['MemAvailable'] = self.colorize_percent(avail, True)
+
+ # Cached is NOT colorized
+ self.val['Cached'] = self.num_fmt % cached
+
+
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_memcache_hits.py
^
|
@@ -2,7 +2,7 @@
global socket
import socket
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Memcache hit count plugin.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mongodb_conn.py
^
|
@@ -1,15 +1,15 @@
### Author: <gianfranco@mongodb.com>
global mongodb_user
-mongodb_user = os.getenv('DSTAT_MONGODB_USER') or os.getenv('USER')
+mongodb_user = os.getenv('DOOL_MONGODB_USER') or os.getenv('USER')
global mongodb_pwd
-mongodb_pwd = os.getenv('DSTAT_MONGODB_PWD')
+mongodb_pwd = os.getenv('DOOL_MONGODB_PWD')
global mongodb_host
-mongodb_host = os.getenv('DSTAT_MONGODB_HOST') or '127.0.0.1:27017'
+mongodb_host = os.getenv('DOOL_MONGODB_HOST') or '127.0.0.1:27017'
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MongoDB.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mongodb_mem.py
^
|
@@ -1,15 +1,15 @@
### Author: <gianfranco@mongodb.com>
global mongodb_user
-mongodb_user = os.getenv('DSTAT_MONGODB_USER') or os.getenv('USER')
+mongodb_user = os.getenv('DOOL_MONGODB_USER') or os.getenv('USER')
global mongodb_pwd
-mongodb_pwd = os.getenv('DSTAT_MONGODB_PWD')
+mongodb_pwd = os.getenv('DOOL_MONGODB_PWD')
global mongodb_host
-mongodb_host = os.getenv('DSTAT_MONGODB_HOST') or '127.0.0.1:27017'
+mongodb_host = os.getenv('DOOL_MONGODB_HOST') or '127.0.0.1:27017'
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MongoDB.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mongodb_opcount.py
^
|
@@ -1,15 +1,15 @@
### Author: <gianfranco@mongodb.com>
global mongodb_user
-mongodb_user = os.getenv('DSTAT_MONGODB_USER') or os.getenv('USER')
+mongodb_user = os.getenv('DOOL_MONGODB_USER') or os.getenv('USER')
global mongodb_pwd
-mongodb_pwd = os.getenv('DSTAT_MONGODB_PWD')
+mongodb_pwd = os.getenv('DOOL_MONGODB_PWD')
global mongodb_host
-mongodb_host = os.getenv('DSTAT_MONGODB_HOST') or '127.0.0.1:27017'
+mongodb_host = os.getenv('DOOL_MONGODB_HOST') or '127.0.0.1:27017'
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MongoDB.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mongodb_queue.py
^
|
@@ -1,15 +1,15 @@
### Author: <gianfranco@mongodb.com>
global mongodb_user
-mongodb_user = os.getenv('DSTAT_MONGODB_USER') or os.getenv('USER')
+mongodb_user = os.getenv('DOOL_MONGODB_USER') or os.getenv('USER')
global mongodb_pwd
-mongodb_pwd = os.getenv('DSTAT_MONGODB_PWD')
+mongodb_pwd = os.getenv('DOOL_MONGODB_PWD')
global mongodb_host
-mongodb_host = os.getenv('DSTAT_MONGODB_HOST') or '127.0.0.1:27017'
+mongodb_host = os.getenv('DOOL_MONGODB_HOST') or '127.0.0.1:27017'
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MongoDB.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mongodb_stats.py
^
|
@@ -1,15 +1,15 @@
### Author: <gianfranco@mongodb.com>
global mongodb_user
-mongodb_user = os.getenv('DSTAT_MONGODB_USER') or os.getenv('USER')
+mongodb_user = os.getenv('DOOL_MONGODB_USER') or os.getenv('USER')
global mongodb_pwd
-mongodb_pwd = os.getenv('DSTAT_MONGODB_PWD')
+mongodb_pwd = os.getenv('DOOL_MONGODB_PWD')
global mongodb_host
-mongodb_host = os.getenv('DSTAT_MONGODB_HOST') or '127.0.0.1:27017'
+mongodb_host = os.getenv('DOOL_MONGODB_HOST') or '127.0.0.1:27017'
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MongoDB.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mysql5_cmds.py
^
|
@@ -1,21 +1,21 @@
### Author: <lefred@inuits.be>
global mysql_user
-mysql_user = os.getenv('DSTAT_MYSQL_USER') or os.getenv('USER')
+mysql_user = os.getenv('DOOL_MYSQL_USER') or os.getenv('USER')
global mysql_pwd
-mysql_pwd = os.getenv('DSTAT_MYSQL_PWD')
+mysql_pwd = os.getenv('DOOL_MYSQL_PWD')
global mysql_host
-mysql_host = os.getenv('DSTAT_MYSQL_HOST')
+mysql_host = os.getenv('DOOL_MYSQL_HOST')
global mysql_port
-mysql_port = os.getenv('DSTAT_MYSQL_PORT')
+mysql_port = os.getenv('DOOL_MYSQL_PORT')
global mysql_socket
-mysql_socket = os.getenv('DSTAT_MYSQL_SOCKET')
+mysql_socket = os.getenv('DOOL_MYSQL_SOCKET')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MySQL 5 commands.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mysql5_conn.py
^
|
@@ -1,21 +1,21 @@
### Author: <lefred$inuits,be>
global mysql_user
-mysql_user = os.getenv('DSTAT_MYSQL_USER') or os.getenv('USER')
+mysql_user = os.getenv('DOOL_MYSQL_USER') or os.getenv('USER')
global mysql_pwd
-mysql_pwd = os.getenv('DSTAT_MYSQL_PWD')
+mysql_pwd = os.getenv('DOOL_MYSQL_PWD')
global mysql_host
-mysql_host = os.getenv('DSTAT_MYSQL_HOST')
+mysql_host = os.getenv('DOOL_MYSQL_HOST')
global mysql_port
-mysql_port = os.getenv('DSTAT_MYSQL_PORT')
+mysql_port = os.getenv('DOOL_MYSQL_PORT')
global mysql_socket
-mysql_socket = os.getenv('DSTAT_MYSQL_SOCKET')
+mysql_socket = os.getenv('DOOL_MYSQL_SOCKET')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MySQL 5 connections.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mysql5_io.py
^
|
@@ -1,21 +1,21 @@
### Author: <lefred$inuits,be>
global mysql_user
-mysql_user = os.getenv('DSTAT_MYSQL_USER') or os.getenv('USER')
+mysql_user = os.getenv('DOOL_MYSQL_USER') or os.getenv('USER')
global mysql_pwd
-mysql_pwd = os.getenv('DSTAT_MYSQL_PWD')
+mysql_pwd = os.getenv('DOOL_MYSQL_PWD')
global mysql_host
-mysql_host = os.getenv('DSTAT_MYSQL_HOST')
+mysql_host = os.getenv('DOOL_MYSQL_HOST')
global mysql_port
-mysql_port = os.getenv('DSTAT_MYSQL_PORT')
+mysql_port = os.getenv('DOOL_MYSQL_PORT')
global mysql_socket
-mysql_socket = os.getenv('DSTAT_MYSQL_SOCKET')
+mysql_socket = os.getenv('DOOL_MYSQL_SOCKET')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MySQL 5 I/O.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mysql5_keys.py
^
|
@@ -1,21 +1,21 @@
### Author: <lefred$inuits,be>
global mysql_user
-mysql_user = os.getenv('DSTAT_MYSQL_USER') or os.getenv('USER')
+mysql_user = os.getenv('DOOL_MYSQL_USER') or os.getenv('USER')
global mysql_pwd
-mysql_pwd = os.getenv('DSTAT_MYSQL_PWD')
+mysql_pwd = os.getenv('DOOL_MYSQL_PWD')
global mysql_host
-mysql_host = os.getenv('DSTAT_MYSQL_HOST')
+mysql_host = os.getenv('DOOL_MYSQL_HOST')
global mysql_port
-mysql_port = os.getenv('DSTAT_MYSQL_PORT')
+mysql_port = os.getenv('DOOL_MYSQL_PORT')
global mysql_socket
-mysql_socket = os.getenv('DSTAT_MYSQL_SOCKET')
+mysql_socket = os.getenv('DOOL_MYSQL_SOCKET')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Plugin for MySQL 5 Keys.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mysql_io.py
^
|
@@ -1,7 +1,7 @@
global mysql_options
-mysql_options = os.getenv('DSTAT_MYSQL')
+mysql_options = os.getenv('DOOL_MYSQL')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'mysql io'
self.nick = ('recv', 'sent')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_mysql_keys.py
^
|
@@ -1,7 +1,7 @@
global mysql_options
-mysql_options = os.getenv('DSTAT_MYSQL')
+mysql_options = os.getenv('DOOL_MYSQL')
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'mysql key status'
self.nick = ('used', 'read', 'writ', 'rreq', 'wreq')
@@ -38,7 +38,7 @@
for name in self.vars: self.val[name] = -1
except Exception as e:
- if op.debug > 1: print('%s: exception' (self.filename, e))
+ if op.debug > 1: print('%s: exception %s' % (self.filename, e))
for name in self.vars: self.val[name] = -1
# vim:ts=4:sw=4:et
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_net_packets.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Number of packets received and send per interface.
"""
@@ -10,7 +10,7 @@
self.type = 'd'
self.width = 5
self.scale = 1000
- self.totalfilter = re.compile('^(lo|bond\d+|face|.+\.\d+)$')
+ self.totalfilter = re.compile(r'^(lo|bond\d+|face|.+\.\d+)$')
self.open('/proc/net/dev')
self.cols = 2
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_nfs3.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'nfs3 client'
self.nick = ('read', 'writ', 'rdir', 'othr', 'fs', 'cmmt')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_nfs3_ops.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'extended nfs3 client operations'
self.nick = ('null', 'gatr', 'satr', 'look', 'aces', 'rdln', 'read', 'writ', 'crea', 'mkdr', 'syml', 'mknd', 'rm', 'rmdr', 'ren', 'link', 'rdir', 'rdr+', 'fstt', 'fsnf', 'path', 'cmmt')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_nfsd3.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'nfs3 server'
self.nick = ('read', 'writ', 'rdir', 'inod', 'fs', 'cmmt')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_nfsd3_ops.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'extended nfs3 server operations'
self.nick = ('null', 'gatr', 'satr', 'look', 'aces', 'rdln', 'read', 'writ', 'crea', 'mkdr', 'syml', 'mknd', 'rm', 'rmdr', 'ren', 'link', 'rdir', 'rdr+', 'fstt', 'fsnf', 'path', 'cmmt')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_nfsd4_ops.py
^
|
@@ -1,7 +1,7 @@
### Author: Adam Michel <elfurbe@furbism.com>
### Based on work by: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'nfs4 server'
# this vars/nick pair is the ones I considered relevant. Any set of the full list would work.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_nfsstat4.py
^
|
@@ -1,7 +1,7 @@
### Author: Adam Michel <elfurbe@furbism.com>
### Based on work by: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'nfs4 client'
# this vars/nick pair is the ones I considered relevant. Any set of the full list would work.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_ntp.py
^
|
@@ -9,7 +9,7 @@
### FIXME: Implement millisecond granularity as well
### FIXME: Interrupts socket if data is overdue (more than 250ms ?)
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Time from an NTP server.
@@ -20,21 +20,24 @@
"""
def __init__(self):
- self.name = 'ntp'
- self.nick = ('date/time',)
- self.vars = ('time',)
- self.timefmt = os.getenv('DSTAT_TIMEFMT') or '%d-%m %H:%M:%S'
- self.ntpserver = os.getenv('DSTAT_NTPSERVER') or '0.fedora.pool.ntp.org'
- self.type = 's'
- self.width = len(time.strftime(self.timefmt, time.localtime()))
- self.scale = 0
- self.epoch = 2208988800
+ self.name = 'ntp'
+ self.nick = ('date/time',)
+ self.vars = ('time',)
+ self.timefmt = os.getenv('DOOL_TIMEFMT') or '%d-%m %H:%M:%S'
+ self.ntpserver = os.getenv('DOOL_NTPSERVER') or '0.fedora.pool.ntp.org'
+ self.type = 's'
+ self.width = len(time.strftime(self.timefmt, time.localtime()))
+ self.scale = 0
+ self.epoch = 2208988800
# socket.setdefaulttimeout(0.25)
self.socket = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
self.socket.settimeout(0.25)
+ if op.debug:
+ print("NTP Plugin is using: '%s'" % self.ntpserver)
+
def gettime(self):
- self.socket.sendto( '\x1b' + 47 * '\0', ( self.ntpserver, 123 ))
+ self.socket.sendto( b'\x1b' + 47 * b'\0', ( self.ntpserver, 123 ))
data, address = self.socket.recvfrom(1024)
return struct.unpack( '!12I', data )[10] - self.epoch
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_postfix.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'postfix'
self.nick = ('inco', 'actv', 'dfrd', 'bnce', 'defr')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_power.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Power usage information from ACPI.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_proc_count.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Total Number of processes on this system.
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_qmail.py
^
|
@@ -1,6 +1,6 @@
### Author: Tom Van Looy <tom$ctors,net>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
port of qmail_qstat to dstat
"""
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_redis.py
^
|
@@ -1,12 +1,12 @@
### Author: Jihyun Yu <yjh0502@gmail.com>
global redis_host
-redis_host = os.getenv('DSTAT_REDIS_HOST') or "127.0.0.1"
+redis_host = os.getenv('DOOL_REDIS_HOST') or "127.0.0.1"
global redis_port
-redis_port = os.getenv('DSTAT_REDIS_PORT') or "6379"
+redis_port = os.getenv('DOOL_REDIS_PORT') or "6379"
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.type = 'd'
self.width = 7
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_rpc.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'rpc client'
self.nick = ('call', 'retr', 'refr')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_rpcd.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'rpc server'
self.nick = ('call', 'erca', 'erau', 'ercl', 'xdrc')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_sendmail.py
^
|
@@ -2,7 +2,7 @@
### FIXME: Should read /var/log/mail/statistics or /etc/mail/statistics (format ?)
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'sendmail'
self.vars = ('queue',)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_snmp_cpu.py
^
|
@@ -1,14 +1,14 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'total cpu'
self.vars = ( 'usr', 'sys', 'idl' )
self.type = 'p'
self.width = 3
self.scale = 34
- self.server = os.getenv('DSTAT_SNMPSERVER') or '192.168.1.1'
- self.community = os.getenv('DSTAT_SNMPCOMMUNITY') or 'public'
+ self.server = os.getenv('DOOL_SNMPSERVER') or '192.168.1.1'
+ self.community = os.getenv('DOOL_SNMPCOMMUNITY') or 'public'
def check(self):
try:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_snmp_load.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'load avg'
self.nick = ('1m', '5m', '15m')
@@ -8,8 +8,8 @@
self.type = 'f'
self.width = 4
self.scale = 0.5
- self.server = os.getenv('DSTAT_SNMPSERVER') or '192.168.1.1'
- self.community = os.getenv('DSTAT_SNMPCOMMUNITY') or 'public'
+ self.server = os.getenv('DOOL_SNMPSERVER') or '192.168.1.1'
+ self.community = os.getenv('DOOL_SNMPCOMMUNITY') or 'public'
def check(self):
try:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_snmp_mem.py
^
|
@@ -1,12 +1,12 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'memory usage'
self.nick = ('used', 'buff', 'cach', 'free')
self.vars = ('MemUsed', 'Buffers', 'Cached', 'MemFree')
- self.server = os.getenv('DSTAT_SNMPSERVER') or '192.168.1.1'
- self.community = os.getenv('DSTAT_SNMPCOMMUNITY') or 'public'
+ self.server = os.getenv('DOOL_SNMPSERVER') or '192.168.1.1'
+ self.community = os.getenv('DOOL_SNMPCOMMUNITY') or 'public'
def check(self):
try:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_snmp_net.py
^
|
@@ -1,12 +1,12 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.nick = ('recv', 'send')
self.type = 'b'
self.cols = 2
- self.server = os.getenv('DSTAT_SNMPSERVER') or '192.168.1.1'
- self.community = os.getenv('DSTAT_SNMPCOMMUNITY') or 'public'
+ self.server = os.getenv('DOOL_SNMPSERVER') or '192.168.1.1'
+ self.community = os.getenv('DOOL_SNMPCOMMUNITY') or 'public'
def check(self):
try:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_snmp_net_err.py
^
|
@@ -1,12 +1,12 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.nick = ('error', )
self.type = 'b'
self.cols = 1
- self.server = os.getenv('DSTAT_SNMPSERVER') or '192.168.1.1'
- self.community = os.getenv('DSTAT_SNMPCOMMUNITY') or 'public'
+ self.server = os.getenv('DOOL_SNMPSERVER') or '192.168.1.1'
+ self.community = os.getenv('DOOL_SNMPCOMMUNITY') or 'public'
def check(self):
try:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_snmp_sys.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'system'
self.nick = ('int', 'csw')
@@ -8,8 +8,8 @@
self.type = 'd'
self.width = 5
self.scale = 1000
- self.server = os.getenv('DSTAT_SNMPSERVER') or '192.168.1.1'
- self.community = os.getenv('DSTAT_SNMPCOMMUNITY') or 'public'
+ self.server = os.getenv('DOOL_SNMPSERVER') or '192.168.1.1'
+ self.community = os.getenv('DOOL_SNMPCOMMUNITY') or 'public'
def check(self):
try:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_snooze.py
^
|
@@ -1,4 +1,4 @@
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'snooze'
self.vars = ('snooze',)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_squid.py
^
|
@@ -7,9 +7,9 @@
# - Squid 2.6 and 2.7
global squidclient_options
-squidclient_options = os.getenv('DSTAT_SQUID_OPTS') # -p 8080
+squidclient_options = os.getenv('DOOL_SQUID_OPTS') # -p 8080
-class dstat_plugin(dstat):
+class dool_plugin(dool):
'''
Provides various Squid statistics.
'''
@@ -45,7 +45,7 @@
if op.debug > 1: print('%s: lost pipe to squidclient, %s' % (self.filename, e))
for name in self.vars: self.val[name] = -1
except Exception as e:
- if op.debug > 1: print('%s: exception' (self.filename, e))
+ if op.debug > 1: print('%s: exception %s' % (self.filename, e))
for name in self.vars: self.val[name] = -1
# vim:ts=4:sw=4:et
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_test.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
'''
Provides a test playground to test syntax and structure.
'''
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_thermal.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'thermal'
self.type = 'd'
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_bio.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Top most expensive block I/O process.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_bio_adv.py
^
|
@@ -3,7 +3,7 @@
###
### Authority: Guillermo Cantu Luna
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'most expensive block i/o process'
self.vars = ('process pid read write cpu',)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_childwait.py
^
|
@@ -5,7 +5,7 @@
global cpunr
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'most waiting for'
self.vars = ('child process',)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_cpu.py
^
|
@@ -1,6 +1,6 @@
### Authority: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Most expensive CPU process.
@@ -12,7 +12,7 @@
self.name = 'most expensive'
self.vars = ('cpu process',)
self.type = 's'
- self.width = 16
+ self.width = 20
self.scale = 0
self.pidset1 = {}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_cpu_adv.py
^
|
@@ -3,7 +3,7 @@
###
### Authority: Guillermo Cantu Luna
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'most expensive cpu process'
self.vars = ('process pid cpu read write',)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_cputime.py
^
|
@@ -3,7 +3,7 @@
### For more information, see:
### http://eaglet.rain.com/rick/linux/schedstat/
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Name and total amount of CPU time consumed in milliseconds of the process
that has the highest total amount of cputime for the measured timeframe.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_cputime_avg.py
^
|
@@ -3,7 +3,7 @@
### For more information, see:
### http://eaglet.rain.com/rick/linux/schedstat/
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Name and average amount of CPU time consumed in milliseconds of the process
that has the highest average amount of cputime for the different slices for
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_int.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Top interrupt
@@ -25,8 +25,8 @@
### Cleanup possible names from /proc/interrupts
l2 = ' '.join(l[cpunr+3:])
l2 = l2.replace('_hcd:', '/')
- l2 = re.sub('@pci[:\d+\.]+', '', l2)
- l2 = re.sub('ahci\[[:\da-z\.]+\]', 'ahci', l2)
+ l2 = re.sub(r'@pci[:\d+\.]+', '', l2)
+ l2 = re.sub(r'ahci\[[:\da-z\.]+\]', 'ahci', l2)
ret[l1] = l2
return ret
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_io.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Top most expensive I/O process
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_io_adv.py
^
|
@@ -1,75 +1,84 @@
-### Dstat all I/O process plugin
-### Displays all processes' I/O read/write stats and CPU usage
-###
-### Authority: Guillermo Cantu Luna
-
-class dstat_plugin(dstat):
- def __init__(self):
- self.name = 'most expensive i/o process'
- self.vars = ('process pid read write cpu',)
- self.type = 's'
- self.width = 40
- self.scale = 0
- self.pidset1 = {}
-
- def check(self):
- if not os.access('/proc/self/io', os.R_OK):
- raise Exception('Kernel has no per-process I/O accounting [CONFIG_TASK_IO_ACCOUNTING], use at least 2.6.20')
- return True
-
- def extract(self):
- self.output = ''
- self.pidset2 = {}
- self.val['usage'] = 0.0
- for pid in proc_pidlist():
- try:
- ### Reset values
- if pid not in self.pidset2:
- self.pidset2[pid] = {'rchar:': 0, 'wchar:': 0, 'cputime:': 0, 'cpuper:': 0}
- if pid not in self.pidset1:
- self.pidset1[pid] = {'rchar:': 0, 'wchar:': 0, 'cputime:': 0, 'cpuper:': 0}
-
- ### Extract name
- name = proc_splitline('/proc/%s/stat' % pid)[1][1:-1]
-
- ### Extract counters
- for l in proc_splitlines('/proc/%s/io' % pid):
- if len(l) != 2: continue
- self.pidset2[pid][l[0]] = int(l[1])
-
- ### Get CPU usage
- l = proc_splitline('/proc/%s/stat' % pid)
- if len(l) < 15:
- cpu_usage = 0
- else:
- self.pidset2[pid]['cputime:'] = int(l[13]) + int(l[14])
- cpu_usage = (self.pidset2[pid]['cputime:'] - self.pidset1[pid]['cputime:']) * 1.0 / elapsed / cpunr
-
- except ValueError:
- continue
- except IOError:
- continue
- except IndexError:
- continue
-
- read_usage = (self.pidset2[pid]['rchar:'] - self.pidset1[pid]['rchar:']) * 1.0 / elapsed
- write_usage = (self.pidset2[pid]['wchar:'] - self.pidset1[pid]['wchar:']) * 1.0 / elapsed
- usage = read_usage + write_usage
-
- ### Get the process that spends the most jiffies
- if usage > self.val['usage']:
- self.val['usage'] = usage
- self.val['read_usage'] = read_usage
- self.val['write_usage'] = write_usage
- self.val['pid'] = pid
- self.val['name'] = getnamebypid(pid, name)
- self.val['cpu_usage'] = cpu_usage
-
- if step == op.delay:
- self.pidset1 = self.pidset2
-
- if self.val['usage'] != 0.0:
- self.output = '%-*s%s%-5s%s%s%s%s%%' % (self.width-14-len(pid), self.val['name'][0:self.width-14-len(pid)], color['darkblue'], self.val['pid'], cprint(self.val['read_usage'], 'd', 5, 1024), cprint(self.val['write_usage'], 'd', 5, 1024), cprint(self.val['cpu_usage'], 'f', 3, 34), color['darkgray'])
-
- def showcsv(self):
- return 'Top: %s\t%s\t%s\t%s' % (self.val['name'][0:self.width-20], self.val['read_usage'], self.val['write_usage'], self.val['cpu_usage'])
+### Dstat all I/O process plugin
+### Displays all processes' I/O read/write stats and CPU usage
+###
+### Authority: Guillermo Cantu Luna
+
+class dool_plugin(dool):
+ def __init__(self):
+ self.name = 'most expensive i/o process'
+ self.vars = ('process pid read writ cpu ',)
+ self.type = 's'
+ self.width = 45
+ self.scale = 0
+ self.pidset1 = {}
+
+ def check(self):
+ if not os.access('/proc/self/io', os.R_OK):
+ raise Exception('Kernel has no per-process I/O accounting [CONFIG_TASK_IO_ACCOUNTING], use at least 2.6.20')
+ return True
+
+ def extract(self):
+ self.output = ''
+ self.pidset2 = {}
+ self.val['usage'] = 0.0
+ for pid in proc_pidlist():
+ try:
+ ### Reset values
+ if pid not in self.pidset2:
+ self.pidset2[pid] = {'rchar:': 0, 'wchar:': 0, 'cputime:': 0, 'cpuper:': 0}
+ if pid not in self.pidset1:
+ self.pidset1[pid] = {'rchar:': 0, 'wchar:': 0, 'cputime:': 0, 'cpuper:': 0}
+
+ ### Extract name
+ name = proc_splitline('/proc/%s/stat' % pid)[1][1:-1]
+
+ ### Extract counters
+ for l in proc_splitlines('/proc/%s/io' % pid):
+ if len(l) != 2: continue
+ self.pidset2[pid][l[0]] = int(l[1])
+
+ ### Get CPU usage
+ l = proc_splitline('/proc/%s/stat' % pid)
+ if len(l) < 15:
+ cpu_usage = 0
+ else:
+ self.pidset2[pid]['cputime:'] = int(l[13]) + int(l[14])
+ cpu_usage = (self.pidset2[pid]['cputime:'] - self.pidset1[pid]['cputime:']) * 1.0 / elapsed / cpunr
+
+ except ValueError:
+ continue
+ except IOError:
+ continue
+ except IndexError:
+ continue
+
+ read_usage = (self.pidset2[pid]['rchar:'] - self.pidset1[pid]['rchar:']) * 1.0 / elapsed
+ write_usage = (self.pidset2[pid]['wchar:'] - self.pidset1[pid]['wchar:']) * 1.0 / elapsed
+ usage = read_usage + write_usage
+
+ ### Get the process that spends the most jiffies
+ if usage > self.val['usage']:
+ self.val['usage'] = usage
+ self.val['read_usage'] = read_usage
+ self.val['write_usage'] = write_usage
+ self.val['pid'] = pid
+ self.val['name'] = getnamebypid(pid, name)
+ self.val['cpu_usage'] = cpu_usage
+
+ if step == op.delay:
+ self.pidset1 = self.pidset2
+
+ if self.val['usage'] != 0.0:
+ #self.output = '%-*s%s%-5s%s%s%s%s%%' % (self.width-14-len(pid), self.val['name'][0:self.width-14-len(pid)], color['darkblue'], self.val['pid'], cprint(self.val['read_usage'], 'd', 5, 1024), cprint(self.val['write_usage'], 'd', 5, 1024), cprint(self.val['cpu_usage'], 'f', 3, 34), color['darkgray'])
+
+ pid_str = color['darkblue'] + ("%-6s" % self.val['pid']) + ansi['reset']
+ read_str = cprint(self.val['read_usage'] , 'd', 5, 1024)
+ write_str = cprint(self.val['write_usage'], 'd', 5, 1024)
+ cpu_str = cprint(self.val['cpu_usage'] , 'f', 4, 34)
+
+ self.output = '%-20s %s %s %s %s%%' % (self.val['name'], pid_str, read_str, write_str, cpu_str)
+
+ def showcsv(self):
+ return 'Top: %s\t%s\t%s\t%s' % (self.val['name'][0:self.width-20], self.val['read_usage'], self.val['write_usage'], self.val['cpu_usage'])
+
+# vim: tabstop=4 shiftwidth=4 noexpandtab autoindent softtabstop=4
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_latency.py
^
|
@@ -1,6 +1,6 @@
### Authority: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Top process with highest total latency.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_latency_avg.py
^
|
@@ -6,7 +6,7 @@
### For more information, see:
### http://eaglet.rain.com/rick/linux/schedstat/
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'highest average'
self.vars = ('latency process',)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_mem.py
^
|
@@ -1,6 +1,6 @@
### Authority: Dag Wieers <dag$wieers,com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
Most expensive CPU process.
@@ -20,18 +20,18 @@
for pid in proc_pidlist():
try:
### Using dopen() will cause too many open files
- l = proc_splitline('/proc/%s/stat' % pid)
+ l = proc_splitline('/proc/%s/statm' % pid)
except IOError:
continue
- if len(l) < 23: continue
- usage = int(l[23]) * pagesize
+ if len(l) < 2: continue
+ usage = int(l[1]) * pagesize
### Is it a new topper ?
if usage <= self.val['max']: continue
self.val['max'] = usage
- self.val['name'] = getnamebypid(pid, l[1][1:-1])
+ self.val['name'] = getnamebypid(pid, proc_splitline('/proc/%s/comm' % pid)[0:-1])
self.val['pid'] = pid
self.output = '%-*s%s' % (self.width-5, self.val['name'][0:self.width-5], cprint(self.val['max'], 'f', 5, 1024))
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_top_oom.py
^
|
@@ -6,7 +6,7 @@
### More information:
### http://lwn.net/Articles/317814/
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'out of memory'
self.vars = ('kill score',)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_utmp.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'utmp'
self.nick = ('ses', 'usr', 'adm' )
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vm_cpu.py
^
|
@@ -4,7 +4,7 @@
### Displays CPU stats coming from the hypervisor inside VMware VMs.
### The vmGuestLib API from VMware Tools needs to be installed
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'vm cpu'
self.vars = ('used', 'stolen', 'elapsed')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vm_mem.py
^
|
@@ -4,7 +4,7 @@
### Displays memory stats coming from the hypervisor inside VMware VMs.
### The vmGuestLib API from VMware Tools needs to be installed
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'vmware memory'
self.vars = ('active', 'ballooned', 'mapped', 'swapped', 'used')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vm_mem_adv.py
^
|
@@ -4,7 +4,7 @@
### Displays memory stats coming from the hypervisor inside VMware VMs.
### The vmGuestLib API from VMware Tools needs to be installed
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'vmware advanced memory'
self.vars = ('active', 'ballooned', 'mapped', 'overhead', 'saved', 'shared', 'swapped', 'targetsize', 'used')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vmk_hba.py
^
|
@@ -12,7 +12,7 @@
# will be used by both).
# # dstat --vmkhba -d -D sda,vmhba1
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'vmkhba'
self.nick = ('read', 'writ')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vmk_int.py
^
|
@@ -11,7 +11,7 @@
# # dstat --vmkint -i -I 14,0x5a
# Look at /proc/vmware/interrupts to see which interrupt is linked to which function
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'vmkint'
self.type = 'd'
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vmk_nic.py
^
|
@@ -11,7 +11,7 @@
# # dstat --vmknic -n -N vmk0,vswif0
# NB Data comes from /proc/vmware/net/tcpip/ifconfig
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'vmknic'
self.nick = ('recv', 'send')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vz_cpu.py
^
|
@@ -5,7 +5,7 @@
#302 142926 0 10252 152896388 852779112954062 0 427034187248480 1048603937010 0 0 0
#301 27188 0 7896 152899846 853267000490282 0 427043845492614 701812592320 0 0 0
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.nick = ('usr', 'sys', 'idl', 'nic')
self.type = 'p'
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vz_io.py
^
|
@@ -20,7 +20,7 @@
# vfs_write_chars 23864660931174682
# io_pbs 16
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.nick = ['read', 'write', 'dirty', 'cancel', 'missed']
self.cols = len(self.nick)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_vz_ubc.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.nick = ('fcnt', )
self.type = 'd'
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_wifi.py
^
|
@@ -1,6 +1,6 @@
### Author: Dag Wieers <dag@wieers.com>
-class dstat_plugin(dstat):
+class dool_plugin(dool):
def __init__(self):
self.name = 'wifi'
self.nick = ('lnk', 's/n')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_zfs_arc.py
^
|
@@ -1,4 +1,4 @@
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
ZFS on Linux ARC (Adjustable Replacement Cache)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_zfs_l2arc.py
^
|
@@ -1,4 +1,4 @@
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
ZFS on Linux L2ARC (Level 2 Adjustable Replacement Cache)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool-1.3.1+obs1.tar.gz/upstream/plugins/dool_zfs_zil.py
^
|
@@ -1,4 +1,4 @@
-class dstat_plugin(dstat):
+class dool_plugin(dool):
"""
ZFS on Linux ZIL (ZFS Intent Log)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-dool.yaml
^
|
@@ -1,7 +1,7 @@
Name: harbour-dool
Summary: Pluggable real-time performance monitoring tool
-Version: 1.1.0
-Release: 3
+Version: 1.3.1
+Release: 1
Group: Applications/System
URL: https://github.com/scottchiefbaker/dool/
License: GPLv2
@@ -36,8 +36,8 @@
never expected.
%if "%{?vendor}" == "chum"
- PackageName: dool (a.k.a. dstat)
- PackagerName: nephros
+ Title: dool (a.k.a. dstat)
+ PackagedBy: nephros
Type: console-application
Categories:
- System
|