Re: [mrtg] IP address count

This is a discussion on Re: [mrtg] IP address count within the MRTG forums, part of the Networking and Network Related category; --===============1543008971== Content-Type: multipart/alternative; boundary="_846cc9fb-2d51-441d-969b-2e3cbd6fc0c7_" --_846cc9fb-2d51-441d-969b-2e3cbd6fc0c7_ Content-Type: ...


Go Back   Usenet Forums > Networking and Network Related > MRTG

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-01-2008
SYED JAHANZAiB ~!~ AA Internet Cable.Network Services
 
Posts: n/a
Default Re: [mrtg] IP address count

--===============1543008971==
Content-Type: multipart/alternative;
boundary="_846cc9fb-2d51-441d-969b-2e3cbd6fc0c7_"

--_846cc9fb-2d51-441d-969b-2e3cbd6fc0c7_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable


SolarWind is a good tool specially for monitoring. But as per your case, yo=
u need a simple script which do the task u wanted, it is very easy but as I=
dont have much experience regarding scripting, I cant help u in this rega=
rd, maybe some other members will help u :)
Just to give u some idea, i m sharing one of my script which i created , it=
cat ips from the given file, and take ips and users details and scan there=
status, if the user is active, its detail will be placed in a text file, i=
n /var/www/html, u can see its result at www.aacablenet.org/lan & /mrtg
i created this script so that i can have view how many ips are active on my=
lan. just a simple script, MRTG can also be setup using this script so tha=
t we can have idea how many active ips/pcs remains online at various timing=
s :) possibly u may get some ideas . . .
=20
[root@GW aacable]# cat lan.sh=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D#!/bin/shrm -fr /var/www/html/lan=
A=3D`date | awk '{print $4}' | sed "s/:/ /" |sed "s/:/ /" | awk '{print $2=
}'`DATE=3D`date`UPTIME=3D`uptime`echo -e "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D" >> /var/www/html/lanecho -e "AA Cable.Network Services:=
<<< ACTIVE USERS REPORT >>>" >> /var/www/html/lanecho -e "The Statistic=
s were Last updated on $DATE" >> /var/www/html/lanecho -e "System Details:"=
>> /var/www/html/lanecho -e "$UPTIME \n" >> /var/www/html/lanecho -e "=3D=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" >> /var/www/html/lan
num=3D0cat /firewall/aacable/macip.allowed | sed -e "/^#/d" | while read us=
ersdo
num=3D$[$num+1]ip=3D`echo $users | awk '{print $2}'`add=3D`echo $users | aw=
k '{print $4}'`add2=3D`echo $users | awk '{print $5}'`add3=3D`echo $users |=
awk '{print $6}'`show=3D`nmap -sP $ip |grep "Nmap finished" | awk '{print =
$6}' | sed "s/(//" | sed "s/1/ALIVE/" | sed "s/0/DOWN/"`name=3D`echo $add $=
add2 $add3`echo -e "$name\t$ip\tis $show" | grep -v "DOWN" |sed /^$/d >> /v=
ar/www/html/landoneDATE2=3D`date`echo -e "\n" >> /var/www/html/lanecho -e "=
\n" >> /var/www/html/lanecho -e "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D" >> /var/www/html/lanecho -e "For Information, Please Email to aa=
cable@hotmail.com" >> /var/www/html/lanecho -e "The above statistics were c=
ompleted on $DATE2" >>/var/www/html/lanB=3D`date | awk '{print $4}' | sed =
"s/:/ /" |sed "s/:/ /" | awk '{print $2}'`TOTIP=3D`cat /firewall/aacable/ma=
cip.allowed | sed -e "/^#/d" | wc -l`echo -e "The script took $[$B-$A] minu=
tes to scan $TOTIP ips on my LAN :)" >> /var/www/html/lanecho -e "=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" >> /var/www/html/lan#done
=20
=20
Regards,=20

SYED JAHANZAIB


Date: Thu, 1 May 2008 08:30:14 -0500From: robert.mersberger@goldenliving.co=
mTo: Ertan.Atila@avea.com.tr; mrtg@lists.oetiker.chSubject: Re: [mrtg] IP a=
ddress count



Checkout Solarwind - IP Address Management. good tool that will scan your s=
ubnet as often as you want.
=20
=20


From: mrtg-bounces@lists.oetiker.ch [mailto:mrtg-bounces@lists.oetiker.ch] =
On Behalf Of Ertan AtilaSent: Thursday, May 01, 2008 6:06 AMTo: mrtg@lists.=
oetiker.chSubject: [mrtg] IP address count


Hi,
=20
I need to find out how many real IP addresses are used from our company=92s=
real IP address pool. Someone has told me that this is possible with MRTG,=
is it true? If yes how, if no does anyone knows a way how to do that? Any =
help would be really appreciated.
=20
Best Regards=20



"Bu elektronik posta ve onunla iletilen butun dosyalar gizlidir ve sadece g=
ondericisi tarafindan almasi amaclanan yetkili gercek ya da tuzel kisinin k=
ullanimi icindir. Eger soz konusu yetkili alici degilseniz bu elektronik po=
stanin icerigini aciklamaniz, kopyalamaniz, yonlendirmeniz ve kullanmaniz k=
esinlikle yasaktir ve bu elektronik postayi derhal silmeniz gerekmektedir. =
AVEA bu mesajin icerdigi bilgilerin dogrulugu veya eksiksiz oldugu konusund=
a herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne sekilde o=
lursa olsun iceriginden, iletilmesinden, alinmasindan ve saklanmasindan sor=
umlu degildir. Bu mesajdaki gorusler yalnizca gonderen kisiye ait olup, her=
zaman AVEA 'nin goruslerini yansitmayabilir. Bu e-posta bilinen butun bilg=
isayar viruslerine karsi taranmistir."


"This e-mail and any files transmitted with it are confidential and intende=
d solely for the use of the individual or entity to whom they are addressed=
.. If you are not the intended recipient you are hereby notified that any di=
ssemination, forwarding, copying or use of any of the information is strict=
ly prohibited, and the e-mail should immediately be deleted. AVEA makes no =
warranty as to the accuracy or completeness of any information contained in=
this message and hereby excludes any liability of any kind for the informa=
tion contained therein or for the information transmission, reception, stor=
age or use of such in any way whatsoever.The opinions expressed in this mes=
sage may belong to sender alone and may not necessarily reflect the opinion=
s of AVEA. This e-mail has been scanned for all known computer viruses."




Please consider the environment before printing this e-mail. CONFIDENTIAL N=
OTICE:This e-mail message and any attachment(s) (collectively, this 'Email'=
) are intended only for the confidential use of the recipient(s) named abov=
e. If the reader of this message is not the intended recipient named above =
or an agent responsible for delivering it to the intended recipient named a=
bove, you have received this Email in error. Please notify the sender immed=
iately and permanently delete this Email and any copies thereof.=20
__________________________________________________ _______________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q...US&form=3DQBR=
E=

--_846cc9fb-2d51-441d-969b-2e3cbd6fc0c7_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class=3D'hmmessage'>
SolarWind is a good tool specially for monitoring. But as per your case, yo=
u need a simple script which do the task u wanted, it is very easy but as I=
dont have much experience regarding scripting, I&nbsp; cant help u in this=
regard, maybe some other members will help u :)<BR>
Just to give u some idea, i m sharing one of my script which i created , it=
cat&nbsp;ips from the given file, and take ips and users details and scan =
there status, if the user is active, its detail&nbsp;will be placed in a te=
xt file, in /var/www/html, u can see its result at <A href=3D"http://www.aa=
cablenet.org/lan">www.aacablenet.org/lan</A> &amp; /mrtg<BR>
i created this script so that i can have view how many ips are active on my=
lan. just a simple script, MRTG can also be setup using this script so tha=
t we can have idea how many active ips/pcs remains online at various timing=
s :) possibly u may get some ideas . . .<BR>
&nbsp;<BR>
[root@GW aacable]# cat lan.sh<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= 3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR># !/bin/sh<BR>rm -fr /var/w=
ww/html/lan<BR>A=3D`date | awk&nbsp; '{print $4}' | sed "s/:/ /" |sed "s/:/=
/" | awk '{print $2}'`<BR>DATE=3D`date`<BR>UPTIME=3D`uptime`<BR>ech o -e "=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D" &gt;&gt; /var/www/html=
/lan<BR>echo -e "AA Cable.Network Services:&nbsp; &lt;&lt;&lt;&nbsp; ACTIVE=
USERS REPORT&nbsp; &gt;&gt;&gt;" &gt;&gt; /var/www/html/lan<BR>echo -e "Th=
e Statistics were Last updated on $DATE" &gt;&gt; /var/www/html/lan<BR>echo=
-e "System Details:" &gt;&gt; /var/www/html/lan<BR>echo -e "$UPTIME \n" &g=
t;&gt; /var/www/html/lan<BR>echo -e "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D" &gt;&gt; /var/www/html/lan<BR>
num=3D0<BR>cat /firewall/aacable/macip.allowed | sed -e "/^#/d" | while rea=
d users<BR>do<BR>
num=3D$[$num+1]<BR>ip=3D`echo $users | awk '{print $2}'`<BR>add=3D`echo $us=
ers | awk '{print $4}'`<BR>add2=3D`echo $users | awk '{print $5}'`<BR>add3=
=3D`echo $users | awk '{print $6}'`<BR>show=3D`nmap -sP $ip |grep "Nmap fin=
ished" | awk '{print $6}' | sed "s/(//" | sed "s/1/ALIVE/" | sed "s/0/DOWN/=
"`<BR>name=3D`echo $add $add2 $add3`<BR>echo -e "$name\t$ip\tis $show" | gr=
ep -v "DOWN" |sed /^$/d &gt;&gt; /var/www/html/lan<BR>done<BR>DATE2=3D`date=
`<BR>echo -e "\n" &gt;&gt; /var/www/html/lan<BR>echo -e "\n" &gt;&gt; /var/=
www/html/lan<BR>echo -e "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D" &gt;&gt; /var/www/html/lan<BR>echo -e "For Information, Please Email t=
o <A href=3D"mailto:aacable@hotmail.com">aacable@hotmai l.com</A>" &gt;&gt; =
/var/www/html/lan<BR>echo -e "The above statistics were completed on $DATE2=
" &gt;&gt;/var/www/html/lan<BR>B=3D`date | awk&nbsp; '{print $4}' | sed "s/=
:/ /" |sed "s/:/ /" | awk '{print $2}'`<BR>TOTIP=3D`cat /firewall/aacable/m=
acip.allowed | sed -e "/^#/d" | wc -l`<BR>echo -e "The script took $[$B-$A]=
minutes to scan $TOTIP ips on my LAN :)" &gt;&gt; /var/www/html/lan<BR>ech=
o -e "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= 3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D" &gt;&gt; /var/ww=
w/html/lan<BR>#done<BR><BR>
&nbsp;<BR>
<BR><BR>&nbsp;<BR>
<DIV>&nbsp;<BR><FONT color=3D#0066ff><STRONG><FONT color=3D#000000>Regards,=
</FONT> </STRONG></FONT><BR>
<DIV><FONT color=3D#0066ff></FONT></DIV>
<DIV><STRONG><FONT color=3D#0033ff>SYED JAHANZAIB</FONT></STRONG></DIV></DI=
V><BR><BR>
<BLOCKQUOTE>
<HR>
Date: Thu, 1 May 2008 08:30:14 -0500<BR>From: robert.mersberger@goldenlivin=
g.com<BR>To: Ertan.Atila@avea.com.tr; mrtg@lists.oetiker.ch<BR>Subject: Re:=
[mrtg] IP address count<BR><BR>
<META content=3D"Microsoft SafeHTML" name=3DGenerator>
<STYLE>
@page Section1
{size:595.3pt 841.9pt;}
..ExternalClass P.EC_MsoNormal
{font-size:12pt;font-family:'Times New Roman';}
..ExternalClass LI.EC_MsoNormal
{font-size:12pt;font-family:'Times New Roman';}
..ExternalClass DIV.EC_MsoNormal
{font-size:12pt;font-family:'Times New Roman';}
..ExternalClass A:link
{color:blue;text-decoration:underline;}
..ExternalClass SPAN.EC_MsoHyperlink
{color:blue;text-decoration:underline;}
..ExternalClass A:visited
{color:purple;text-decoration:underline;}
..ExternalClass SPAN.EC_MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
..ExternalClass SPAN.EC_EmailStyle17
{color:windowtext;font-family:Arial;}
..ExternalClass DIV.EC_Section1
{page:Section1;}
</STYLE>

<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff size=3D2><SP=
AN class=3DEC_576362813-01052008>Checkout Solarwind - IP Address Management=
.. good tool that will scan your subnet as often as you want.</SPAN></FONT><=
/DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff size=3D2><SP=
AN class=3DEC_576362813-01052008></SPAN></FONT>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial color=3D#0000ff size=3D2><SP=
AN class=3DEC_576362813-01052008></SPAN></FONT>&nbsp;</DIV><BR>
<DIV class=3DEC_OutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR>
<FONT face=3DTahoma size=3D2><B>From:</B> mrtg-bounces@lists.oetiker.ch [ma=
ilto:mrtg-bounces@lists.oetiker.ch] <B>On Behalf Of </B>Ertan Atila<BR><B>S=
ent:</B> Thursday, May 01, 2008 6:06 AM<BR><B>To:</B> mrtg@lists.oetiker.ch=
<BR><B>Subject:</B> [mrtg] IP address count<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=3DEC_Section1>
<P class=3DEC_MsoNormal><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZ=
E: 10pt; FONT-FAMILY: Arial">Hi,</SPAN></FONT></P>
<P class=3DEC_MsoNormal><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZ=
E: 10pt; FONT-FAMILY: Arial">&nbsp;</SPAN></FONT></P>
<P class=3DEC_MsoNormal><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZ=
E: 10pt; FONT-FAMILY: Arial">I need to find out how many real IP addresses =
are used from our company=92s real IP address pool. Someone has told me tha=
t this is possible with MRTG, is it true? If yes how, if no does anyone kno=
ws a way how to do that? Any help would be really appreciated.</SPAN></FONT=
></P>

<P class=3DEC_MsoNormal><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZ=
E: 10pt; FONT-FAMILY: Arial">&nbsp;</SPAN></FONT></P>
<P class=3DEC_MsoNormal><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZ=
E: 10pt; FONT-FAMILY: Arial">Best Regards</SPAN></FONT></P></DIV><B><A href=
=3D"http://www.avea.com.tr/avea/banner/index.htm" target=3D_blank><IMG src=
=3D"http://www.tt-tim.com.tr/mail/mail_banner.gif" border=3D0></A></B>=20

<HR SIZE=3D1>

<DIV align=3Djustify><FONT face=3DArial><SPAN lang=3DTR style=3D"FONT-SIZE:=
7pt; COLOR: gray">"Bu elektronik posta ve onunla iletilen butun dosyalar g=
izlidir ve sadece gondericisi tarafindan almasi amaclanan yetkili gercek ya=
da tuzel kisinin kullanimi icindir. Eger soz konusu yetkili alici degilsen=
iz bu elektronik postanin icerigini aciklamaniz, kopyalamaniz, yonlendirmen=
iz ve kullanmaniz kesinlikle yasaktir ve bu elektronik postayi derhal silme=
niz gerekmektedir. AVEA bu mesajin icerdigi bilgilerin dogrulugu veya eksik=
siz oldugu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu bilg=
ilerin ne sekilde olursa olsun iceriginden, iletilmesinden, alinmasindan ve=
saklanmasindan sorumlu degildir. Bu mesajdaki gorusler yalnizca gonderen k=
isiye ait olup, her zaman AVEA 'nin goruslerini yansitmayabilir. Bu e-posta=
bilinen butun bilgisayar viruslerine karsi taranmistir."</SPAN></DIV>
<HR SIZE=3D1>

<DIV align=3Djustify><FONT face=3DArial><SPAN lang=3DTR style=3D"FONT-SIZE:=
7pt; COLOR: gray">"This e-mail and any files transmitted with it are confi=
dential and intended solely for the use of the individual or entity to whom=
they are addressed. If you are not the intended recipient you are hereby n=
otified that any dissemination, forwarding, copying or use of any of the in=
formation is strictly prohibited, and the e-mail should immediately be dele=
ted. AVEA makes no warranty as to the accuracy or completeness of any infor=
mation contained in this message and hereby excludes any liability of any k=
ind for the information contained therein or for the information transmissi=
on, reception, storage or use of such in any way whatsoever.The opinions ex=
pressed in this message may belong to sender alone and may not necessarily =
reflect the opinions of AVEA. This e-mail has been scanned for all known co=
mputer viruses."</SPAN></DIV>
<HR SIZE=3D1>

<DIV align=3Djustify><FONT face=3DArial><SPAN lang=3DTR style=3D"FONT-SIZE:=
7pt; COLOR: gray"></SPAN></DIV></FONT></FONT></FONT>
<P><BR>
Please consider the environment before printing this e-mail. <BR><BR>CONFID=
ENTIAL NOTICE:<BR>This e-mail message and any attachment(s) (collectively, =
this 'Email') are intended <BR>only for the confidential use of the recipie=
nt(s) named above. If the reader of this <BR>message is not the intended re=
cipient named above or an agent responsible for <BR>delivering it to the in=
tended recipient named above, you have received this Email in error. <BR>Pl=
ease notify the sender immediately and permanently delete this Email and an=
y copies thereof. <BR></BLOCKQUOTE><br /><hr />Discover the new Windows Vis=
ta <a href=3D'http://search.msn.com/results.aspx?q=3Dwindows+vista&mkt=3Den=
-US&form=3DQBRE' target=3D'_new'>Learn more!</a></body>
</html>=

--_846cc9fb-2d51-441d-969b-2e3cbd6fc0c7_--


--===============1543008971==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
mrtg mailing list
mrtg@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg

--===============1543008971==--

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:07 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0