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

inconsistent filesystem traversing #106

Open
leszekeljasz opened this issue Oct 13, 2023 · 0 comments
Open

inconsistent filesystem traversing #106

leszekeljasz opened this issue Oct 13, 2023 · 0 comments

Comments

@leszekeljasz
Copy link

leszekeljasz commented Oct 13, 2023

Hello!

Thank you for this lovely tool. Just spotted this behaviour that does not seem to be desired.
Here's my situation, a Linux server with two mounts: / and /var/www/virtualmin:

root@web01:/# df -h | grep -vE 'snap|run|udev|tmpfs'
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1   39G   16G   24G  40% /
/dev/nvme1n1     30G   25G  4.7G  85% /var/www/virtualmin

When I use vmtouch against /, it indicates total pages ~ 16G which aligns with filesystem usage on the / mount - so looks like vmtouch skips the mount in /var/www/virtualmin:

root@web01:/# vmtouch / 2>&1 | grep -v WARNING
           Files: 544678
     Directories: 47977
  Resident Pages: 209724/4307663  819M/16G  4.87%
         Elapsed: 47.997 seconds

But when I execute it against all files in / (skipping some), it indicates total pages as 39GB which more or less aligns with total filesystem usage on both / and /var/www/virtualmin, so in this variant it includes the mount:

root@web01:/# vmtouch $(ls -d /* | grep -vE 'dev|sys|proc|snap|run') 2>&1 | grep -v WARNING
           Files: 819215
     Directories: 103000
  Resident Pages: 305073/10413686  1G/39G  2.93%
         Elapsed: 45.924 seconds

Is this expected? My linux version: 5.4.0-1103-aws.

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

No branches or pull requests

1 participant