Home Directory Plugins Operating Systems Windows Check drives fragmentation status

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Check drives fragmentation status

Rating
0 votes
Favoured:
0
Current Version
1.0
Last Release Date
2021-09-12
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
License
GPL
Hits
3360
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Check drives fragmentation status
Check Windows disks fragmentation status and optionally performs defragmentation. It returns performance counters for each drive.
OUTPUTS
- OK: All disk fragmentation status is ok.
- WARNING: % of fragmentation equal to Warning treshold.
- CRITICAL: % of fragmentation equal to Critical treshold.
PARAMETER warning
- % of fragmentation for warning treshold.
- Default System default.
PARAMETER critical
- % of fragmentation for critical treshold.
- Default None.
PARAMETER disks
- Disks to check fragmentation status.
- Default: all.
- Example: "C:","D:","F:"
PARAMETER defrag
- Defrag disks if warning or critical.
- Default: false
PARAMETER forceDefrag
- Defrag disks if free space is low.
- Default: false
EXAMPLE
- Only checks all drives with system default warning treshold.
check_diskdefragstatus.ps1
EXAMPLE
- Checks all drives with 15 warning treshold and 40 critical treshold.
check_diskdefragstatus.ps1 -warning 15 -critical 40
EXAMPLE
- Checks only C and D drives with system default warning treshold and 50 critical treshold.
check_diskdefragstatus.ps1 -disks "C:","D:" -critical 50
EXAMPLE
- Checks C drive with system default warning treshold.
- If defragmentation status is greater than warning or critical treshold, it runs disk defragmentation.
check_diskdefragstatus.ps1 -disks "C:" -defrag
EXAMPLE
- Checks C drive with system default warning treshold.
- If defragmentation status is greater than warning or critical treshold, it runs disk defragmentation even C: disk free space is low.
check_diskdefragstatus.ps1 -disks "C:" -defrag -forceDefrag