Skip to content

Conversation

@caglar84
Copy link

From time to time we face "No space left on device" issue, although there is space on disk. The problem is directly related to 100% inode usage. So we need to monitor inode utilisation on instances too.

"df" command is able to give block storage or inode statistics according to "-i" parameter. So I executed df command twice to get both of those data. 2 additional iterations are added to get_disk_info method. The first one works as-is by adding inode_util value as 0. The second iteration calculates inode usage and puts this value on a temp list. The third iteration aggregates two lists.

Copy link
Owner

@osiegmar osiegmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work! Please check my review comments.

disks.append(Disk(mount, file_system, total, used, avail))
disks.append(Disk(mount, file_system, total, used, avail, 0))

df_inode_out = [s.split() for s in
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only gather inode usage if it was requested via CLI argument?

disk_group.add_argument('--disk-space-avail',
action='store_true',
help='Reports available disk space in gigabytes.')
disk_group.add_argument('--disk-inode-util',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this below the disk-space block (below the disk-space-units)

@caglar84
Copy link
Author

Thanks for the review.

@osiegmar osiegmar merged commit af37134 into osiegmar:master Jan 28, 2017
@osiegmar
Copy link
Owner

Thanks!

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