Comments (7)
thank you, I will update the doc; in general however the examples are not meant to be exhaustive or even fully correct on all systems, just a general samples of how the app can be used
from ttyplot.
@tenox7 unless I'm overlooking something, it would be worth labelling examples that should not be run verbatim, because many of them do work well with copy-pasting and it doesn't seem unreasonable to then expect that approach to work well with other examples also. So if some examples are more like templates that need adjustment, let's make sure that's impossible to not notice before first running the command.
I theory we could also turn most of these samples into files named like ttyplot-ram-usage
or so on and maintain them and enrich them with checks for command availability and such, but we may get flooded with pull requests then, I don't know 😄
from ttyplot.
I like the idea of have scripts with concrete metrics. We could write shell scripts that not only check command availability but also resolve OS differences between Linux/BSD/MacOS, etc. I have a bunch of scripts myself that I wanted to add but they are little beyond what I want in examples. I'm ok with getting flood of pull requests for these. What I'm unclear is how to actually distribute them. Should it go to the package? if so where should they land? Maybe have one shell script that takes argument of a metric?
In respect of examples in the readme I have a feeling that there already is too many of them, and definitely too many are using awk. I want to convert more to sed/perl, maybe python? Also there is too much sar, I think for memory usage I would like to use free
perhaps? These are supposed to be just examples and not exhaustive.
from ttyplot.
I like the idea of have scripts with concrete metrics. We could write shell scripts that not only check command availability but also resolve OS differences between Linux/BSD/MacOS, etc. I have a bunch of scripts myself that I wanted to add but they are little beyond what I want in examples.
@tenox7 I see!
I'm ok with getting flood of pull requests for these.
A flood of pull requests will need quick response times to not end up in frustration.
What I'm unclear is how to actually distribute them. Should it go to the package?
Probably yes, they would become part of the API then though meaning that usage of a script cannot just change in breaking ways without a major version bump or frustrate users.
if so where should they land?
For candidates:
/usr/bin
if scripts are namedttyplot-<something>
- (
/usr/sbin
if only root should use them. Probably not.) /usr/lib/ttyplot/bin/
if we want to stay out of${PATH}
withlib
or/usr/lib/
overridable by distros/usr/libexec/ttyplot/
if we want to stay out of${PATH}
Needs checking against FHS, was only brainstorming so far.
Maybe have one shell script that takes argument of a metric?
I'm not sure that will give good maintainability. I'd prefer a bunch of independent scripts where each can be fixed without breaking the rest of them.
In respect of examples in the readme I have a feeling that there already is too many of them, and definitely too many are using awk.
Too many seems like a concern of discoverability and/or cognitive overload. Good organization would be an alternative to dropping existing useful bits.
I want to convert more to sed/perl, maybe python?
How would sed be better than awk?
Keeping Perl out of this would be my main concern, I'd be good with any of sed, awk, Python 3 and the more readable, the better (if still reasonably portable).
Also there is too much sar, I think for memory usage I would like to use
free
perhaps?
Maybe, I don't have sar installed and I need to know or research that I need package "sysstat" installed for it. Not a showstopper to me personally though.
These are supposed to be just examples and not exhaustive.
Understood, yes.
from ttyplot.
@hartwork suggested:
For candidates: •
/usr/bin
[...]
Rather /usr/local/{bin,lib,man...}
. This is where non-distro stuff is typically installed. And it should be easy to override by distro packagers, who would move that to /usr/{bin,lib,man...}
.
from ttyplot.
@edgar-bonet $(PREFIX)/bin
, you're right 👍
from ttyplot.
Related Issues (20)
- arguments broken HOT 22
- Please add a Fish shell completion file HOT 1
- [1.5.2] `ttyplot.c:129:9: runtime error: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int'` HOT 5
- [1.5.2] `ttyplot -c X -2` fails to use ASCII character "X" for drawing? HOT 2
- (Plans and remaing todos for) Release 1.6.0 HOT 6
- ttyplot doesn't build (in general and on Void Linux) because of issues in the Makefile HOT 15
- Use of `M_PI` in `stresstest.c` is not C99 and unfortunately breaks compilation with musl libc HOT 5
- [1.6.1] Chart output corrupts after a few minutes on macOS? HOT 20
- [master] Fails to compile with error: cannot find -lcurses: No such file or directory
- [master] "make deb" is broken
- use hline() vline() instead of drawing by hand HOT 1
- better SIGWINCH handler HOT 2
- stdin closes on SIGWINCH on some systems HOT 3
- [1.5.1] Minimum window size assumptions can be violated? HOT 4
- error: format not a string literal and no format arguments HOT 6
- handle window resize on older systems HOT 2
- Multi-byte characters not supported? HOT 17
- Average should be calculated from the available samples instead of the total number of potentially availalbe values HOT 4
- Release a new version and support -v option? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ttyplot.