Skip to content

Conversation

@Bluemangoo
Copy link
Collaborator

@Bluemangoo Bluemangoo commented Jul 31, 2025

This PR implemented --disk(-d), --disk-sum(-D), --partition <device>(-p).

So far, all the features of vmstat on Linux have been implemented.

$ cargo run -q vmstat -d && echo '\n' && vmstat -d
disk- ------------reads------------ ------------writes----------- -----IO------
       total merged sectors      ms  total merged sectors      ms    cur    sec
nvme0n1  87787    629 15882401   47181 756219  25189 60103306 1911481      0    246
loop0      0      0       0       0      0      0       0       0      0      0
loop1      0      0       0       0      0      0       0       0      0      0
loop2      0      0       0       0      0      0       0       0      0      0
loop3      0      0       0       0      0      0       0       0      0      0
loop4      0      0       0       0      0      0       0       0      0      0
loop5      0      0       0       0      0      0       0       0      0      0
loop6      0      0       0       0      0      0       0       0      0      0
loop7      0      0       0       0      0      0       0       0      0      0


disk- ------------reads------------ ------------writes----------- -----IO------
       total merged sectors      ms  total merged sectors      ms    cur    sec
nvme0n1  87787    629 15882401   47181 756219  25189 60103306 1911481      0    246
loop0      0      0       0       0      0      0       0       0      0      0
loop1      0      0       0       0      0      0       0       0      0      0
loop2      0      0       0       0      0      0       0       0      0      0
loop3      0      0       0       0      0      0       0       0      0      0
loop4      0      0       0       0      0      0       0       0      0      0
loop5      0      0       0       0      0      0       0       0      0      0
loop6      0      0       0       0      0      0       0       0      0      0
loop7      0      0       0       0      0      0       0       0      0      0
$ cargo run -q vmstat -D && echo '\n' && vmstat -D
            9 disks
            8 partitions
        87789 total reads
          629 merged reads
     15884129 read sectors
        47191 milli reading
       757487 writes
        25206 merged writes
     60175450 written sectors
      1921462 milli writing
            0 in progress IO
          247 milli spent IO
         1997 milli weighted IO


            9 disks
            8 partitions
        87789 total reads
          629 merged reads
     15884129 read sectors
        47191 milli reading
       757487 writes
        25206 merged writes
     60175450 written sectors
      1921462 milli writing
            0 inprogress IO
          247 milli spent IO
         1997 milli weighted IO
$ cargo run -q vmstat -p nvme0n1 && echo '\n' && vmstat -p nvme0n1 
nvme0n1         reads      read sectors      writes  requested writes
                87789          15884129      759103          60263578


nvme0n1         reads      read sectors      writes  requested writes
                87789          15884129      759103          60263578
$ cargo run -q vmstat -p nvme0n1p5 && echo '\n' && vmstat -p nvme0n1p5
nvme0n1p5       reads      read sectors      writes  requested writes
                31133            444776           0                 0


nvme0n1p5       reads      read sectors      writes  requested writes
                31133            444776           0                 0

@Bluemangoo Bluemangoo force-pushed the feature/vmstat-disk branch from 379ac49 to 341d106 Compare July 31, 2025 10:05
@Bluemangoo Bluemangoo force-pushed the feature/vmstat-disk branch from 341d106 to 19a1c37 Compare July 31, 2025 10:07
@cakebaker cakebaker merged commit 1be5929 into uutils:main Aug 1, 2025
16 checks passed
@cakebaker
Copy link
Contributor

So far, all the features of vmstat on Linux have been implemented.

Kudos, good work!

@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (6a64f1b) to head (19a1c37).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #477   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Bluemangoo Bluemangoo deleted the feature/vmstat-disk branch August 7, 2025 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants