[expert] usage shell script

2002-08-01 Thread Belkie, Dan

Does anyone have a shell script example or a better idea on how to monitor
network usage? I don't think I need anything as big as MRTG.

I have a small network behind a Linux router (2 LAN cards) Can I pull this
info with a shell script with ifconfig? and have it emailed daily? or
monthly

Really at the end of the day I would like a daily report, and a monthly
report.

Thoughts?

Dan



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



RE: [expert] usage

2002-02-26 Thread Belkie, Dan

Hi Guys!
If I run the ifdown eth0 then ifup eth0 it does not reset the RX and TX info
on eth0?

Any ideas how I can reset it?

Thanks!

--
=
Dan Belkie



-Original Message-
From: Terry Mathews [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 5:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [expert] usage


Run ifdown eth0 and iup eth0 at midnight one night, then run ifconfig the
next and write down the transmitted and recieved numbers...?


Terry
 Can anyone suggest a simple way of checking out how much data is passing
 through a Nic card within a 24 hr period?





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[expert] usage

2002-02-25 Thread Belkie, Dan

Can anyone suggest a simple way of checking out how much data is passing
through a Nic card within a 24 hr period?

Thanks

--
=
Dan Belkie



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage

2002-02-25 Thread Brandon Dorman

Don't know but have you checked out ethereal? It looks like some sort of
logging program.  

http://www.ethereal.com/

-Brandon
On Mon, 2002-02-25 at 13:47, Belkie, Dan wrote:
 Can anyone suggest a simple way of checking out how much data is passing
 through a Nic card within a 24 hr period?
 
 Thanks
 
 --
 =
 Dan Belkie
 
 
 

 Want to buy your Pack or Services from MandrakeSoft? 
 Go to http://www.mandrakestore.com



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage

2002-02-25 Thread Chuck Shirley

On Monday 25 February 2002 16:47, Belkie, Dan wrote:
Can anyone suggest a simple way of checking out how much data is passing
through a Nic card within a 24 hr period?

Thanks

if you don't need to know until tomorrow, you could try:


echo `grep eth0 /proc/net/dev | cut -c8-18`-`sleep 86400 ; grep eth0 /proc/net/dev | 
cut -c8-18` | bc

(for data in)

and

echo `grep eth0 /proc/net/dev | cut -c19-28`-`sleep 86400 ; grep eth0 /proc/net/dev | 
cut -c19-28` | bc

(for data out)

It'll give you a negative number, but the magnatude is correct.  I'm sure there 
is a more elegant way, and when someone sees this hack, I'm sure they'll pipe up!


-- 
Chuck



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage

2002-02-25 Thread J.P. Pasnak

On Monday 25 February 2002 15:47, you wrote:
 Can anyone suggest a simple way of checking out how much data is passing
 through a Nic card within a 24 hr period?

 Thanks

Try MRTG (web), or iptraf (console).   Both are in contribs.

http://people.ee.ethz.ch/~oetiker/webtools/mrtg/
http://cebu.mozcom.com/riker/iptraf/


-- 
Live fast, die young,
you're sucking up my bandwidth.
--
J.P. Pasnak, CD
[EMAIL PROTECTED]
http://www.warpedsystems.sk.ca

 Kernel version: 2.4.17-20mdk
Current Linux uptime: 1 day 19 hours 32 minutes.



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage

2002-02-25 Thread Pierre Fortin

On Mon, 25 Feb 2002 14:47:06 -0700 Belkie, Dan [EMAIL PROTECTED] wrote:

 Can anyone suggest a simple way of checking out how much data is passing
 through a Nic card within a 24 hr period?

Simple:  ifconfig -- subtract count from 24 hours ago; repeat in 24 hours

Complex:  SNMP

Pierre



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage

2002-02-25 Thread Pierre Fortin

On 25 Feb 2002 14:52:19 -0800 Brandon Dorman [EMAIL PROTECTED] wrote:

 Don't know but have you checked out ethereal? It looks like some sort of
 logging program.  
 
 http://www.ethereal.com/

Nope!  This is for packet sniffing.  A very poor way to count bytes/packets...

Pierre

 -Brandon
 On Mon, 2002-02-25 at 13:47, Belkie, Dan wrote:
  Can anyone suggest a simple way of checking out how much data is passing
  through a Nic card within a 24 hr period?



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage

2002-02-25 Thread Terry Mathews

Run ifdown eth0 and iup eth0 at midnight one night, then run ifconfig the
next and write down the transmitted and recieved numbers...?


Terry
 Can anyone suggest a simple way of checking out how much data is passing
 through a Nic card within a 24 hr period?




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage

2002-02-25 Thread Klaus Peter Elsner

On Mon, 25 Feb 2002 14:47:06 -0700, Belkie, Dan wrote:

-Can anyone suggest a simple way of checking out how much data is passing
-through a Nic card within a 24 hr period?
-

try ifconfig and grep out the RX and TX bytes 
in bracket are the amount in Mb so you mustn't calc it yourself.
put it in a cron job and you are done.
I thinkt it's the easiest way 



Bye Peter

Tel: +49 (30) 742 61 10
Fax:+49 (30) 743 750 02
e-mail: [EMAIL PROTECTED]
ICQ #: 55400701 





Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage

2002-02-25 Thread Brandon Dorman


  Don't know but have you checked out ethereal? It looks like some sort of
  logging program.  
  
  http://www.ethereal.com/
 
 Nope!  This is for packet sniffing.  A very poor way to count bytes/packets...
Yeah, I went into it after i made the post and discovered that.  Thanks
for the clarification.  A pretty cool program in of itself though.

-Brandon
 



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] usage on ports 980-989 and 1000-1024 and syslog --MARK

1999-09-29 Thread Axalon Bloodstone

On Wed, 29 Sep 1999, Lee Wilson wrote:

 I've noticed a few odd things in my logs and in my port usage, and I'm curious
 if these are normal and if so, what causes them.  I am using Linux-Mandrake 6.0
 (with updates)
 
 1) In /var/log/messages I am getting at seemingly random intervals a message
 that says, simply
 
 Sep 26 07:39:03 ad1440 -- MARK --

Check those times it's not random.. then man syslogd /marker
 
 This is happening on 3 different machines, so I am assuming it is normal.  But I
 cannot for the life of me figure out what it's for, why it's being put there, or
 what is doing it.
 
 
 
 2) I am noticing random ports between 980-989 and 1000-1024 being used as
 LISTENer ports.  I cannot find any entries in /etc/services for these ports and
 don't know of a way to track down what process ID is using a specific port.
 This is also happening on all 3 boxes, so I think it's probably normal.
 Nonetheless, I'd like to know what is causing it.

lsof -i, will identify whats useing what tcp ports.

 If anyone knows anything about either of these issues, I would really appreciate
 some help.  Thanks in advance!
 
 
 
 

--
MandrakeSoft  http://www.mandrakesoft.com/
--Axalon



Re: [expert] usage on ports 980-989 and 1000-1024 and syslog --MARK

1999-09-29 Thread Axalon Bloodstone

On Wed, 29 Sep 1999, Lee Wilson wrote:

  Sep 26 07:39:03 ad1440 -- MARK --
 
 Check those times it's not random.. then man syslogd /marker
 
 thanks.  that solves that problem.
 
  2) I am noticing random ports between 980-989 and 1000-1024 being used as
  LISTENer ports.  I cannot find any entries in /etc/services for these ports
 and
  don't know of a way to track down what process ID is using a specific port.
  This is also happening on all 3 boxes, so I think it's probably normal.
  Nonetheless, I'd like to know what is causing it.
 
 lsof -i, will identify whats useing what tcp ports.
 
 lsof does not seem to be a standard package installed with Mandrake.  But I
 went out and got it from rpmfind.net.  Very nice package.  I wish I'd known of
 it for the past several years.  Oh well.  Anyway, it showed me the following
 (minus the irrevelant stuff):

Nope not in any of the default selections dureing install. but it's on the
cd also. but rpmfind works just aswell.
 
 COMMAND PIDUSER   FD   TYPE DEVICE SIZE NODE NAME
 rpc.statd   386root3u  inet540   UDP *:987
 rpc.statd   386root4u  inet543   TCP *:989 (LISTEN)
 rpc.rquot   396root3u  inet563   UDP *:997
 rpc.mount   406root3u  inet583   UDP *:1006
 rpc.mount   406root4u  inet586   TCP *:1008 (LISTEN)
 rpc.mount   406root5u  inet591   UDP *:1011
 rpc.mount   406root6u  inet594   TCP *:1013 (LISTEN)
 rpc.mount   406root8u  inet599   UDP *:1016
 rpc.mount   406root   10u  inet602   TCP *:1018 (LISTEN)
 
 So, what is this stuff?  Why is rpc.[mount,statd,rquot] listening on several
 different ports  1024?
 
 These are the nfs daemons (client or server escapes me at the moment it's
late)
/etc/rc.d/init.d/nfs stop
/etc/rc.d/init.d/portmap stop
ntsysv

if you don't need them. they should also have man pages, ala,
 man rpc.statd 

--
MandrakeSoft  http://www.mandrakesoft.com/
--Axalon