Reliance broadband netconnect data usage script!

  • Thread starter Thread starter harsha.pic
  • Start date Start date
  • Replies Replies 3
  • Views Views 5,843
Status
Not open for further replies.

harsha.pic

Newbie
Messages
2
Location
NA
ISP
Reliance
Actually today morning i have downloaded a CSV file for a month of my net usage of reliance wireless broadband and i wanted to know what is total usage, morning time usage(6am to 10pm) and night usage separately(10pm to 6am). But i got confused to know it by opening data usage CSV file downloaded from myserevices from reliance website...:(So i wrote a perl code to know with that CSV file.....might be useful for others also.....below shared perl code....:)and njoy.....##welcome to reliance data usage tool####my $csv_file;print("plese enter give path of relaince CSV file:");chomp( $csv_file = );@mrng_hash = ();@evening_hash = ();open(INFO, $csv_file); # Open the fileforeach $line (){if($line =~ /^([0-9\-]+)\,(\s*[0-9\:]+)\,(.+)\,(\s*[0-9\.]+)$/){#print $2."--->".$4."\n";$time = $2;$bytes = $4;if($time =~ /\s*(\d+)\:(\d+)\:(\d+)\s*/){if($1>=22){ push(@evening_hash,$bytes);}else{ push(@mrng_hash,$bytes);}}}}close(INFO); # Close the file$eve_total = 0;foreach $temp (@evening_hash) {$eve_total = $eve_total+ $temp;}$mrn_total = 0;foreach $temp (@mrng_hash) {$mrn_total = $mrn_total+ $temp;}print "Morning time usage is--->".$mrn_total."--->".($mrn_total/1000000)." GB\n";print "Evening time usage is--->".$eve_total."--->".($eve_total/1000000)." GB\n";print "Total time usage is--->".($mrn_total+$eve_total)."--->".(($mrn_total+$eve_total)/1000000)." GB\n";
 
hey..i dont know pearl..& tell me how the code works. i m very confused about my data usage..i.e peak hour & non pick hour data usage..
 
hey i thnk for u using script will be difficult......tomorrow i wll create exe and will post here....with its usage......
 
that will be the best..plz create sections for peak hour & off pick hour usage so that the usages of day & night become clear.also make a field for custom date interval...i.e.my billing period is from 25th in this month to 24th of nxt month...looking forward for ur applicationthanking u:thumb:
 
Status
Not open for further replies.
Back