Script to show alert when today's total download has exceeded 500mb, 1 gb, 1500mb and 1800mb


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to show alert when today's total download has exceeded 500mb, 1 gb, 1500mb and 1800mb
# 1  
Old 12-09-2017
Script to show alert when today's total download has exceeded 500mb, 1 gb, 1500mb and 1800mb

Hey,

I'm new to learning scripting with linux bash shell. And, I was thinking I'd learn linux by learning to solve a problem. So, I currently use a internet connection which allots me 2GB starting from 12:01 am in my timezone to 11.59pm. But, occasionally when I watch videos from youtube, my bandwidth runs out and I'm stuck with zero internet. So, I was thinking it would be fantastic if I could write a linux script which would show me an alert on my screen top right corner as and when every 500mb,1GB, 1500mb and 1800mb has been used up.

Would love to have your inputs for the same. Smilie
# 2  
Old 12-09-2017
You can find the network usage information in the Linux /proc filesystem.

So, I would write some code that sets timers and reads the required vars in the Linux proc filesystem related to network traffic.

Give it a try and post back!

And welcome to the forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help with Expect script for pulling log files size larger than 500Mb;

I am new at developing EXPECT scripts. I'm trying to create a script that will automatically connect to a several UNIX (sun solaris and HPUX) database server via FTP and pull the sizes of the listener/alert log files from specified server directory on the remote machines. 1. I want the script... (7 Replies)
Discussion started by: mikebantor
7 Replies

2. UNIX for Beginners Questions & Answers

Need to select files larger than 500Mb from servers

I need help modifying these two scripts to do the following: - print files in (MB) instead of (KB) - only select files larger than 500MB -> these will be mailed out daily - Select all files regardless of size all in (MB) -> these will be mailed out once a week this is what i have so far and... (5 Replies)
Discussion started by: donpasscal
5 Replies

3. Shell Programming and Scripting

How to compare if the size of the directory is more than 500MB in unix

I use du -sk command to find the size of the directory but when i use the result of 'du -sk' into if statement its throwing error.. Could u solve with this..? (14 Replies)
Discussion started by: shaal89
14 Replies

4. Shell Programming and Scripting

ftp - How to download files which created today?

Hello experts, I have written following script to download files which created today. Unfortunately, it's not working. test.ksh: #Defining variables USR='xxx' PASSWD='yyyy' HT='test.test.com' FILE='S*.pdf' XFILE=$(echo find . -type f -mtime 0) ZFILE=$(echo ls -tR|grep 'Jun 8')... (14 Replies)
Discussion started by: dipeshvshah
14 Replies

5. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

6. Shell Programming and Scripting

Calculate 30/31 days from today date script

Hi Guys, I was working some time ago n was in need to calculate date 30/31 days from today including Feb (Leap yr stuff). Today date is variable depending on day of execution of script. I tried searching but was not able to get exactly what I needed....So at that I time I implemented by my own... (3 Replies)
Discussion started by: coolgoose85
3 Replies

7. Shell Programming and Scripting

Script to copy log files with today's date

I am a newbie to scripting. I need a korn shell script to copy log files of current day to archive folder and rename with current days date stamp. I would really appreciate your help. File structure is as follows. Everyday files get overwritten, so I need copy to a archive directory and... (3 Replies)
Discussion started by: mdncan
3 Replies

8. UNIX for Dummies Questions & Answers

grep running total/ final total across multiple files

Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies

9. Shell Programming and Scripting

script for listing files of today's time stamp

Hi, I need to write a script,which behaves like this, Given the folder name, it should list the files with today's timestamp. Please direct me on this. Thanks. (2 Replies)
Discussion started by: kid123
2 Replies
Login or Register to Ask a Question