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

Some removable drives are part of statistic alerted because 100% full #49

Open
o1e9 opened this issue Feb 25, 2014 · 1 comment
Open

Comments

@o1e9
Copy link

o1e9 commented Feb 25, 2014

Hi,

It looks like some devices may be recognized as flash drives however those are license dongles for example and read-only with no disk space left. It creates problems in statistics reporting DISK red because some disks are full.

I have found lines in DiskPlugin related to it:

DiskMuninNodePlugin::DiskMuninNodePlugin()
{
int i;
for (i = 0; i < 32; i++) {
drives[i][0] = NULL;
}
i = 0;
for (int d = 'A'; d <= 'Z'; d++) {
drives[i][0] = d;
drives[i][1] = ':';
drives[i][2] = NULL;//'';
drives[i][3] = NULL;
if (GetDriveTypeA(drives[i]) != DRIVE_FIXED) {
// Remove it
drives[i][0] = NULL;
} else {
i++;
}
}
}

Shall it be like:

if (GetDriveTypeA(drives[i]) != DRIVE_FIXED || GetDriveTypeA(drives[i]) != DRIVE_REMOVABLE) {

So to check explicitly for removable disk drive.

Thank you,
Oleg

@o1e9
Copy link
Author

o1e9 commented Feb 27, 2014

cut&paste mistake, it must be:

if (GetDriveTypeA(drives[i]) != DRIVE_FIXED || GetDriveTypeA(drives[i]) != DRIVE_REMOVABLE) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant