(imported topic written by jcsUTSW)
Has anyone written an custom analysis that will report the fragmentation level of all local drives?
(imported topic written by jcsUTSW)
Has anyone written an custom analysis that will report the fragmentation level of all local drives?
(imported comment written by NoahSalzman)
Haven’t done it myself, but sure, it can be done.
One way to do it would be to run an ActionScript that uses the defrag command line – c:\defrag.exe -a c: > results.txt – to output the results. Then you would have to parse the results and gather them. Is this what you had in mind?
(imported comment written by jcsUTSW)
Yeah I looked at that… Just hoping there was something that someone had already written to detect all local storage and their drive letter and would report back on all…
I was hoping there was some kind of native inspector that could tell me this info and maybe provide some kind of trending.
(imported comment written by NoahSalzman)
It’s pretty easy to setup in the Console, although I’ve only done it for drive c:.
delete “c:\defrag_status.txt”
waithidden defrag.exe -a c: > c:\defrag_status.txt
That task should be set so it is only relevant for OSes that contain “Win” (although, you may want to tighten that down further)
Create a drive defragmentation analysis that uses this Relevance
(parenthesized part 2 of it) of matches (regex
"(Percent file fragmentation.=)(\ [0-9])(.*)$" of (lines of file
"defrag_status.txt" of folder
"c:")
(imported comment written by ErinC91)
Hello
I came onto the forum looking for precisely this type of analysis today, searched for and found this thread.
However, when I create the task as mentioned above it fails to work correctly when rolled out to the target PC. The task actually shows as complete but doesn’t actually create the report file.
Additionally, when I created the relevance in the analysis, it flags the bracket before regex as having no corresponding closed bracket. I modified it to read;
(parenthesized part 2 of it) of matches (regex
"(Percent file fragmentation.*=)(\ [0-9]*)(.*)$") of (lines of file
"defrag_status.txt" of folder
"c:\")
I manually ran the defrag command (defrag.exe -a c: > c:\defrag_status.txt) from a DOS prompt and this worked ok but the analysis still doesn’t pick it up but reports the PC as
Please advise, this analysis would be most helpful, thanks!
EDIT: For info. We’re running BigFix 7.2.4.60 server, clients and consoles.
Has there been any progress over the years to make strides in a native way to pull back fragmentation data through an analysis without a task/analysis pair?
It looks like someone could make a registry based defrag status now.
Look in HKLM\SOFTWARE\Microsoft\Dfrg\Statistics and there are a whole lot of “Fragmented” values to examine