mIRC Home    About    Download    Register    News    Help

Print Thread
Show current bandwidth usage #154797 31/07/06 11:51 PM
Joined: Oct 2005
Posts: 98
S
starpossen Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
I know some scripts has this feature but those scripts includes alot of other stuff, and I would just like this part, I dont know if it's hard to make one, what I want it to do is:
Either by an alias or popup
showing the curent upstream and downstream in kB/s
and also the ability to choose only up stream or downstream.

I did search the forum, but did not find anything, so if I have missed a post then im sorry for making this one.

Re: Show current bandwidth usage #154798 01/08/06 07:43 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
;
;usage $cps or $cps(N), valid N values are 1 to 2 representing, 1 as downstream, 2 as upstream, any other value or no other value is considered both.
;
alias cps {
  var %g.cps = 0, %g = $get(0)  | while (%g) { var %g.cps = $calc(%cps + $get(%g).cps  | dec %g }
  var %s.cps = 0, %s = $send(0) | while (%s) { var %s.cps = $calc(%cps + $send(%s).cps | dec %s }
  return $calc($iif($1 != 2,%g.cps) + $iif($1 != 1,%s.cps))
}

* untested *

That should return Chracters per second, from there you can use $bytes() and get the result in what ever resolution of speed u like.
* I believe cps and bytes per second is some how considered different, but its very close if it is different.

Re: Show current bandwidth usage #154799 01/08/06 08:26 PM
Joined: Apr 2004
Posts: 218
P
PhantasyX Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Do you mean show 'internet' bandwidth usage, not just your mIRC DCC tranfer usage?

There are several DLLs available, I personally use "band.dll" by XhaKeR.
I am able to give you a copy if you would like.

There are other ways/DLLs available to do this, but this is the easiest way I've found. =)


Live to Dream & Dream for Life
Re: Show current bandwidth usage #154800 01/08/06 09:49 PM
Joined: Oct 2005
Posts: 98
S
starpossen Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
PhantasyX, not my dcc bandwidth, but my internet bandwidth, and im very open to suggestions.

Re: Show current bandwidth usage #154801 03/08/06 09:14 AM
Joined: Aug 2006
Posts: 3
V
viveknath Offline
Self-satisified door
Offline
Self-satisified door
V
Joined: Aug 2006
Posts: 3
hey....your code seem to not understanding to me...but i have see a chat room in http://www.devaswam.com
there the chat room uses a java script and my computer prompt me to install it .

Re: Show current bandwidth usage #154802 03/08/06 02:59 PM
Joined: Oct 2005
Posts: 98
S
starpossen Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
I looked at darkengine script and pulled out some code and did some editing:
Code:
alias totband { msg $active  $+  $+ Down $de(banddown)  kB/s  $+  $+ Up $de(bandup) kB/s }
alias tottrans { msg $active  $+  $+ Downloadet: $de(total_down) MB  $+  $+ Uploadet: $de(total_up) MB }

alias band { dem Downspeed $de(banddown) kB/s }
alias upband { dem Upspeed $de(bandup) kB/s }

alias totaldown { dem Total Downloaded: $de(total_down) $+ MB }
alias totalup { dem Total Uploaded: $de(total_up) $+ MB }

alias de { return $dll(darkenginex.dll,$1,_) }
alias det { if (key isin $1) { msg $active $remove($dll(darkenginex.dll,$1,$2-),$left($2,2)) } | else { dem  $+ $dll(darkenginex.dll,$1,$2-) } }
alias dem { msg $active  $+ $dek $+  $+ $1- } 

menu channel,query {
  -Bandwidth-
  .Upstream Usage:/upband
  .Downstream Usage :/band
  .Total Bandwidth Usage:/totband
  .Total Transferred:/tottrans
}

And it does what I need, so this ends my thread.
Thanks for the replys tho.