Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax to set disksets from commandline #35

Closed
exuvo opened this issue Apr 1, 2023 · 2 comments
Closed

Syntax to set disksets from commandline #35

exuvo opened this issue Apr 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@exuvo
Copy link

exuvo commented Apr 1, 2023

SUMMARY

Short:
I would like the option to group some disks to -D and show the totals for each group ex:
-D (sda,sdb,sdc),(sdd,sde,sdf)
which then should only shows 2st totals for each group instead of a read/write per disk.

Longer:
I have various software raids and some of them don't create any virtual devices that automatically sum up disk usage across the raid which forces me to show each individual device to dstat/dool ex -D sde,sdg,sdh,sdk,sdl,sda,sdc,sdd,sdf,md1,sdb.
Here sdg,sdh,sdk,sdl are part of a zfs array. sda,sdc,sdd,sdf are part of a btrfs raid.
I would very much like to sum up those two arrays to only show one read/write per array instead of 8st per disk.
Suggested syntax: -D sde,(sdg,sdh,sdk,sdl),(sda,sdc,sdd,sdf),md1,sdb

In the code this feature already exists but is hardcoded and called diskset.
The hardcoded values are:

self.diskset = {
  'local': ('sda', 'hd[a-d]'),
  'lores': ('sd[b-k]', 'sd[v-z]', 'sda[a-e]'),
  'hires': ('sd[l-u]', 'sda[f-o]'),
}

and can be used like dstat/dool -dD local,lores,highres

While i can modify the hardcoded values that is not very portable across machines where i am not root.

ISSUE TYPE
  • Feature Idea
@scottchiefbaker scottchiefbaker added the enhancement New feature or request label Jun 5, 2023
@scottchiefbaker
Copy link
Owner

Since it looks like most of this code is already written, we just need to expose it to the user via a param. How should we expect this to look at the command line? I'm thinking something like this:

dool --diskset os_drives:sda,sdb --diskset vault:vda,vdb,vdc

I'm not sure if we have any existing options that could take more than one value though. This might be slightly complicated.

scottchiefbaker added a commit that referenced this issue Jun 9, 2023
* Add an option for --diskset for #35

* Documentation for `--diskset`

* Add a plugin for Linux bonding devices (#10)

* Add plugin for Linux bonding devices

* Cover up the "^C" that gets printed when you CTRL + C

---------

Co-authored-by: minghungchen <[email protected]>
@scottchiefbaker
Copy link
Owner

This code has landed and will be in the next release (which will be soon)

scottchiefbaker added a commit that referenced this issue Jun 19, 2023
* Add an option for --diskset for #35

* Documentation for `--diskset`

* Add a plugin for Linux bonding devices (#10)

* Add plugin for Linux bonding devices

* Cover up the "^C" that gets printed when you CTRL + C

---------

Co-authored-by: minghungchen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants