- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: How to see the disk's fragment status or file'...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2006 02:27 PM
тАО05-29-2006 02:27 PM
Is there any command that can see disk's fragment status or file's fragment?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2006 02:31 PM
тАО05-29-2006 02:31 PM
SolutionThe HP Defrag tool DFO has a free reporting functions.
Personally I would recommend picking up the DFU freeware tool. It is a must have for disk/file management with fragmentation reports and file search based on fragments, and extent-headers and more.
For trivial/simple single file fragmenation analysis just use DUMP/HEADER/BLOCK=COUNT=0
Good luck,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2006 06:04 PM
тАО05-29-2006 06:04 PM
Re: How to see the disk's fragment status or file's fragment
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2006 10:15 PM
тАО05-29-2006 10:15 PM
Re: How to see the disk's fragment status or file's fragment
The DUMP/HEADER command will display the file header for an individual file, with complete information about the mapping pointers about which blocks (LBNs) on the disk are used by the file.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2006 11:52 PM
тАО05-29-2006 11:52 PM
Re: How to see the disk's fragment status or file's fragment
On the DUMP/HEAD, and processing the data.
Here is some more playing with perl:
One liner for 1 file, avoiding 2 temp files:
$ pipe DUMP/HEAD/BLOC=COUNT=0 test.mai | perl -ne "$frag++ if /^\s+Count:/; print ""$frag fragments\n"" if eof"
Script with args globbed from command line:
-------------------------------
while ($file=shift @ARGV) {
$frag = 0;
foreach (`DUMP/HEAD/BLOC=COUNT=0 $file`) {
$frag++ if /^\s+Count:/
}
print "$frag fragments in $file\n";
}
Please note the the wildcard file expansion is done before the script runs. This is often helpful, but actually tricky to avoid. One has to protect the wildcards with strong (') or double-double quotes to stop the help, and later strip those.
Script with args explicitly processed
-------------------------------
while ($files = shift @ARGV) {
# print "--$files\n"
$files =~ s/"|'//g; # strip quotes
while ( $file = glob $files ) {
$frag = 0;
foreach (`DUMP/HEAD/BLOC=COUNT=0 $file`) {
$frag++ if /^\s+Count:/
}
print " $frag fragments in $file\n";
}
}
Sample of ugly quote usage:
perl frags.pl """[...]*.mai""" *.log "'*.tmp'"
Hein.