How can I get the increased rate in MB?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How can I get the increased rate in MB?
# 1  
Old 01-21-2014
How can I get the increased rate in MB?

Deal all,

I have a directory called [msc]
I want to know how many MBs are transferred to it every 2 hours.
How can I do this?

Any ideas?

I have a simple idea but I can't translate it into shell script, the idea is:
1- get the size of the folder now, using [du -sm]
2- then get the size of the folder after 2 hours, using the same command.
3- then by subtracting the second value from the first value, I will get the increased rate in MBs.

How can I translate this idea into shell script?


Thanks
# 2  
Old 01-21-2014
You started off quite promisingly. Use what you posted and build a loop around it (assuming you know the necessary (shell) commands).

Last edited by RudiC; 01-21-2014 at 10:50 AM..
This User Gave Thanks to RudiC For This Post:
# 3  
Old 01-21-2014
So where are you stuck? Did you try implementing your idea?

You probably need

Code:
while : #start infinite loop
do
 #do your stuffs (du -sm) and redirect to file
 #wait for 2hr #man sleep
done

Search within the forum if you need help for specific command mentioned above or ask here.
# 4  
Old 01-21-2014
So as a return question, what is your operating system?

If you are AIX, then have a look at filemon

I have not used it for years, but I think it may do what you want and whilst it may be easy to log growth, filemon can (I think) give you IO rates and you can consider the effect of files being deleted too. Without this, your figures may be skewed if there is someone clearing out old data and you just measure the start and end usage.



I hope that this helps,

Robin
Liverpool/Blackburn
UK
# 5  
Old 01-22-2014
Quote:
Originally Posted by rbatte1
So as a return question, what is your operating system?

If you are AIX, then have a look at filemon

I have not used it for years, but I think it may do what you want and whilst it may be easy to log growth, filemon can (I think) give you IO rates and you can consider the effect of files being deleted too. Without this, your figures may be skewed if there is someone clearing out old data and you just measure the start and end usage.



I hope that this helps,

Robin
Liverpool/Blackburn
UK

Dear Sir,

Not AIX, it is Redhat Linux

---------- Post updated at 11:54 PM ---------- Previous update was at 11:53 PM ----------

Quote:
Originally Posted by clx
So where are you stuck? Did you try implementing your idea?

You probably need

Code:
while : #start infinite loop
do
 #do your stuffs (du -sm) and redirect to file
 #wait for 2hr #man sleep
done

Search within the forum if you need help for specific command mentioned above or ask here.
Dear Sir, I will apply your answer and tell you if anything is not ok.
Many thanks for your useful post.
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Solaris

/ root is 100% and there is nothing increased it

Guys I have solaris 9 and / root is 100% and there is nothing increased the space every thing normal , I think the problem related to audit How can I stop or shutdown audit service and start it again ? Pls advice in the reason of this increasing and is it related to audit service ? . (5 Replies)
Discussion started by: Mr.AIX
5 Replies

2. AIX

rmt0 allows get increased .. !

rmt0 allows get increased .. ! I have faced this issue in my AIX server, rmt0 allows get increased and it's filled /root till 100% There is no tape in tape drive why it's increased? Pls advice.. (1 Reply)
Discussion started by: Mr.AIX
1 Replies

3. Red Hat

how to mount SAN volume with its increased size

Hi, We have 200GB SAN volume mounted on Redhat EL 5. which is working fine. As my SAN supports dynamic resizing of volumes, i unmounted the volume and resized the SAN Volume to 300 GB successfully. Then i mounted again but it shows 200GB only but data is intact. Now, my requirement is to let... (3 Replies)
Discussion started by: prvnrk
3 Replies
Login or Register to Ask a Question