Git Product home page Git Product logo

Comments (8)

CarterLi avatar CarterLi commented on June 21, 2024 1

A new flag --diskio-detect-total has been added to support the required feature.

$ ./fastfetch -s diskio --diskio-detect-total --pipe
Disk IO (APPLE SSD AP1024R Media): 64.17 GiB (R) - 15.35 GiB (W)

Worth noting that the result applies to physical disks, not partitions.

from fastfetch.

CarterLi avatar CarterLi commented on June 21, 2024

There is DiskIO. You may try it with fastfetch -s diskio

from fastfetch.

Samueru-sama avatar Samueru-sama commented on June 21, 2024

There is DiskIO. You may try it with fastfetch -s diskio

That's great, but I see that only prints the the current B/s instead of total Bytes.

Iostat does report the total kB_wrtn without needing sudo rights, I don't know how difficult it would be to implement that feature into fastfetch.

from fastfetch.

CarterLi avatar CarterLi commented on June 21, 2024

DiskIO was implemented by calcuating total-bytes growth rate
. I think I can implement an option for DiskIO to let it report total bytes.

from fastfetch.

Samueru-sama avatar Samueru-sama commented on June 21, 2024

DiskIO was implemented by calcuating total-bytes growth rate . I think I can implement an option for DiskIO to let it report total bytes.

Thank you, in the meantime I'm using iostat with this:

iostat -m -d | awk 'NR==4 { print $7" MiB Written" }

Which does print exactly that info.

from fastfetch.

CarterLi avatar CarterLi commented on June 21, 2024

You can embed this command into fastfetch

{
    "key": "Whatever",
    "type": "command",
    "text": "iostat -m -d | awk 'NR==4 { print $7\" MiB Written\" }'"
}

from fastfetch.

Samueru-sama avatar Samueru-sama commented on June 21, 2024
{
    "key": "Whatever",
    "type": "command",
    "text": "iostat -m -d | awk 'NR==4 { print $7\" MiB Written\" }'"
}

This also totally works for me, thank you so much for that!

I will leave the decision on whether to close this issue and not implement the feature to you, I'm very happy either way.

Edit: Ended up replacing the Uptime part for the custom script that does print the uptime info as well as the total MiB wirtten:

    {
    "key": "Uptime",
    "type": "command",
    "text": "( uptime -p && iostat -m -d ) | awk 'NR==1 { printf $2\" \" $3\" \" $4\" \" $5} NR==5 { printf \" (\"$7\" MiB written)\" }'"
    },

image

from fastfetch.

Samueru-sama avatar Samueru-sama commented on June 21, 2024
fastfetch -s diskio --diskio-detect-total
``

A new flag --diskio-detect-total has been added to support the required feature.

$ ./fastfetch -s diskio --diskio-detect-total --pipe
Disk IO (APPLE SSD AP1024R Media): 64.17 GiB (R) - 15.35 GiB (W)

Worth noting that the result applies to physical disks, not partitions.

Great, but is it possible to add it to the json config? I tried "diskio-detect-total", and that did not work.

If I use the flag it gets printed at the end of everything.

edit: I added it as a embedded command lol:

    {
    "key": "Physical Disk Total IO",
    "type": "command",
    "text": "fastfetch -s diskio --diskio-detect-total | awk '{ print $4 \" \"$5 \" \"$6 \" \"$7 \" \"$8 \" \"$9 \" \"$10 }'"
    },

image

edit2: FIgured it out, it has to be in the json config like this:

    {
     "key": "Physical Disk Total IO",
     "type": "diskio",
     "DetectTotal": true
    }

I changed the key name to a more proper name as well.

from fastfetch.

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.