12-07-2011
calculate internal fragmentation in directory
hi
sorry for grammar mistakes but i am writting these fro tablet and am not realy used to ot so well yet....
i am in the middle of doing work here and hope some1 ca answear my question asap please :-)
How to calculate the amount of internal fragmentation using script.
cd directory ...
and???
whould i use du - s and number compare to moething oris there any command to calculate internal fragmentation?
thanks
10 More Discussions You Might Find Interesting
1. IP Networking
HI all,
I am in urgent need of this answer.
In TCP/IP protocol, If the IP datagram size > MTU of the any
routing network then the IP fragmentation takes place!
Where exactly the Fragmentation takes place? is it at the source network layer or in between at some router?
If so, which of the... (1 Reply)
Discussion started by: reddyb
1 Replies
2. Shell Programming and Scripting
Hi,
I have written one script to calculate total space of all file in one directory, ignoring subdirectory, it works fine.
Now, I've been trying to calculate all files which includes files in any subdirectories.
I use recursive function to do this, but it can work only if there is only one... (4 Replies)
Discussion started by: KLL
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Please let me know more details on fragmentation in redhat linux and command to check fragmented files?
Thanks,
Bache Gowda (2 Replies)
Discussion started by: bache_gowda
2 Replies
4. Solaris
All.
How can i calculate the fragmentation ratio on a mounted disk, given that i have no root privilege and i cannot switch to single user mode. (0 Replies)
Discussion started by: Negm
0 Replies
5. UNIX for Dummies Questions & Answers
I need to calcualte the size of a directory by the year the files in that directory were created .
For example the script will sum up, by year, the number of blocks for that directory and its' subdirectories for files created / accessed in that year.
I need a report that would look like... (11 Replies)
Discussion started by: igidttam
11 Replies
6. UNIX for Advanced & Expert Users
Hi,
I need to redirect internal internet requests to a auth client site siting on the gateway. Currently users that are authenticated to access the internet have there mac address listed in the FORWARD chain. All other users need to be redirected to a internal site for authentication.
Can... (1 Reply)
Discussion started by: mshindo
1 Replies
7. Shell Programming and Scripting
Hello,
I'm new member of shell scripting and i face some difficulties. To begin, i try to write an algorithm that calculate from one directory containing nfdump files (288) the entropy of one day 24hours. Each of the file is 5 min interval
(nfdump -r nfcapd.200908250000 -s srcip) 1st
(nfdump... (0 Replies)
Discussion started by: draxmas
0 Replies
8. Shell Programming and Scripting
Hello :
I need some help in writing a ksh script which will find a particular directory in all the file systems in a server and finally report the total size of the direcotry in all the file systems.
Some thing like this..
find /u*/app/oracle -type d -name "product" -prune
and then... (1 Reply)
Discussion started by: Sam1974
1 Replies
9. IP Networking
Hello all, I am experiencing a problem with IP fragmentation.
I am receiving an udp packet that is larger than the MTU and it is fragmented along the network.
I am receiving the two fragments but they are not being reassembled correclty.
The MTU of the system is 1500 and I cannot increase it,... (2 Replies)
Discussion started by: arichard
2 Replies
10. Shell Programming and Scripting
I am trying to use awk to calculate the average of all lines in $2 for every file in a directory. The below bash seems to do that, but I cannot figure out how to capture the string before the _ as the output file name and have it be tab-delimeted. Thank you :).
Filenames in... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT CENTOS
e4defrag
E4DEFRAG(8) System Manager's Manual E4DEFRAG(8)
NAME
e4defrag - online defragmenter for ext4 filesystem
SYNOPSIS
e4defrag [ -c ] [ -v ] target ...
DESCRIPTION
e4defrag reduces fragmentation of extent based file. The file targeted by e4defrag is created on ext4 filesystem made with "-O extent"
option (see mke2fs(8)). The targeted file gets more contiguous blocks and improves the file access speed.
target is a regular file, a directory, or a device that is mounted as ext4 filesystem. If target is a directory, e4defrag reduces fragmen-
tation of all files in it. If target is a device, e4defrag gets the mount point of it and reduces fragmentation of all files in this mount
point.
OPTIONS
-c Get a current fragmentation count and an ideal fragmentation count, and calculate fragmentation score based on them. By seeing this
score, we can determine whether we should execute e4defrag to target. When used with -v option, the current fragmentation count and
the ideal fragmentation count are printed for each file.
Also this option outputs the average data size in one extent. If you see it, you'll find the file has ideal extents or not. Note
that the maximum extent size is 131072KB in ext4 filesystem (if block size is 4KB).
If this option is specified, target is never defragmented.
-v Print error messages and the fragmentation count before and after defrag for each file.
NOTES
e4defrag does not support swap file, files in lost+found directory, and files allocated in indirect blocks. When target is a device or a
mount point, e4defrag doesn't defragment files in mount point of other device.
Non-privileged users can execute e4defrag to their own file, but the score is not printed if -c option is specified. Therefore, it is
desirable to be executed by root user.
AUTHOR
Written by Akira Fujita <a-fujita@rs.jp.nec.com> and Takashi Sato <t-sato@yk.jp.nec.com>.
SEE ALSO
mke2fs(8), mount(8).
e4defrag version 2.0 May 2009 E4DEFRAG(8)