Giter Site home page Giter Site logo

Comments (7)

tenox7 avatar tenox7 commented on June 2, 2024

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.

hartwork avatar hartwork commented on June 2, 2024

@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.

tenox7 avatar tenox7 commented on June 2, 2024

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.

hartwork avatar hartwork commented on June 2, 2024

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 named ttyplot-<something>
  • (/usr/sbin if only root should use them. Probably not.)
  • /usr/lib/ttyplot/bin/ if we want to stay out of ${PATH} with lib 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.

edgar-bonet avatar edgar-bonet commented on June 2, 2024

@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.

hartwork avatar hartwork commented on June 2, 2024

@edgar-bonet $(PREFIX)/bin, you're right 👍

from ttyplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.