<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
SolarWind is a good tool specially for monitoring. But as per your case, you 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 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 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, in /var/www/html, u can see its result at <A href="http://www.aacablenet.org/lan">www.aacablenet.org/lan</A> & /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 that we can have idea how many active ips/pcs remains online at various timings :) possibly u may get some ideas . . .<BR>
<BR>
[root@GW aacable]# cat lan.sh<BR>=============================<BR>#!/bin/sh<BR>rm -fr /var/www/html/lan<BR>A=`date | awk '{print $4}' | sed "s/:/ /" |sed "s/:/ /" | awk '{print $2}'`<BR>DATE=`date`<BR>UPTIME=`uptime`<BR>echo -e "===================================================================" >> /var/www/html/lan<BR>echo -e "AA Cable.Network Services: <<< ACTIVE USERS REPORT >>>" >> /var/www/html/lan<BR>echo -e "The Statistics were Last updated on $DATE" >> /var/www/html/lan<BR>echo -e "System Details:" >> /var/www/html/lan<BR>echo -e "$UPTIME \n" >> /var/www/html/lan<BR>echo -e "===================================================================" >> /var/www/html/lan<BR>
num=0<BR>cat /firewall/aacable/macip.allowed | sed -e "/^#/d" | while read users<BR>do<BR>
num=$[$num+1]<BR>ip=`echo $users | awk '{print $2}'`<BR>add=`echo $users | awk '{print $4}'`<BR>add2=`echo $users | awk '{print $5}'`<BR>add3=`echo $users | awk '{print $6}'`<BR>show=`nmap -sP $ip |grep "Nmap finished" | awk '{print $6}' | sed "s/(//" | sed "s/1/ALIVE/" | sed "s/0/DOWN/"`<BR>name=`echo $add $add2 $add3`<BR>echo -e "$name\t$ip\tis $show" | grep -v "DOWN" |sed /^$/d >> /var/www/html/lan<BR>done<BR>DATE2=`date`<BR>echo -e "\n" >> /var/www/html/lan<BR>echo -e "\n" >> /var/www/html/lan<BR>echo -e "===================================================================" >> /var/www/html/lan<BR>echo -e "For Information, Please Email to <A href="mailto:aacable@hotmail.com">aacable@hotmail.com</A>" >> /var/www/html/lan<BR>echo -e "The above statistics were completed on $DATE2" >>/var/www/html/lan<BR>B=`date | awk '{print $4}' | sed "s/:/ /" |sed "s/:/ /" | awk '{print $2}'`<BR>TOTIP=`cat /firewall/aacable/macip.allowed | sed -e "/^#/d" | wc -l`<BR>echo -e "The script took $[$B-$A] minutes to scan $TOTIP ips on my LAN :)" >> /var/www/html/lan<BR>echo -e "===================================================================" >> /var/www/html/lan<BR>#done<BR><BR>
<BR>
<BR><BR> <BR>
<DIV> <BR><FONT color=#0066ff><STRONG><FONT color=#000000>Regards,</FONT> </STRONG></FONT><BR>
<DIV><FONT color=#0066ff></FONT></DIV>
<DIV><STRONG><FONT color=#0033ff>SYED JAHANZAIB</FONT></STRONG></DIV></DIV><BR><BR>
<BLOCKQUOTE>
<HR>
Date: Thu, 1 May 2008 08:30:14 -0500<BR>From: robert.mersberger@goldenliving.com<BR>To: Ertan.Atila@avea.com.tr; mrtg@lists.oetiker.ch<BR>Subject: Re: [mrtg] IP address count<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<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=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_576362813-01052008>Checkout Solarwind - IP Address Management. good tool that will scan your subnet as often as you want.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_576362813-01052008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN class=EC_576362813-01052008></SPAN></FONT> </DIV><BR>
<DIV class=EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> mrtg-bounces@lists.oetiker.ch [mailto:mrtg-bounces@lists.oetiker.ch] <B>On Behalf Of </B>Ertan Atila<BR><B>Sent:</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=EC_Section1>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I need to find out how many real IP addresses are used from our company’s 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.</SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </SPAN></FONT></P>
<P class=EC_MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Best Regards</SPAN></FONT></P></DIV><B><A href="http://www.avea.com.tr/avea/banner/index.htm" target=_blank><IMG src="http://www.tt-tim.com.tr/mail/mail_banner.gif" border=0></A></B>
<HR SIZE=1>
<DIV align=justify><FONT face=Arial><SPAN lang=TR style="FONT-SIZE: 7pt; COLOR: gray">"Bu elektronik posta ve onunla iletilen butun dosyalar gizlidir ve sadece gondericisi tarafindan almasi amaclanan yetkili gercek ya da tuzel kisinin kullanimi icindir. Eger soz konusu yetkili alici degilseniz bu elektronik postanin icerigini aciklamaniz, kopyalamaniz, yonlendirmeniz ve kullanmaniz kesinlikle yasaktir ve bu elektronik postayi derhal silmeniz gerekmektedir. AVEA bu mesajin icerdigi bilgilerin dogrulugu veya eksiksiz oldugu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne sekilde olursa olsun iceriginden, iletilmesinden, alinmasindan ve saklanmasindan sorumlu degildir. Bu mesajdaki gorusler yalnizca gonderen kisiye ait olup, her zaman AVEA 'nin goruslerini yansitmayabilir. Bu e-posta bilinen butun bilgisayar viruslerine karsi taranmistir."</SPAN></DIV>
<HR SIZE=1>
<DIV align=justify><FONT face=Arial><SPAN lang=TR style="FONT-SIZE: 7pt; COLOR: gray">"This e-mail and any files transmitted with it are confidential 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 notified that any dissemination, forwarding, copying or use of any of the information is strictly 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 information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever.The opinions expressed 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 computer viruses."</SPAN></DIV>
<HR SIZE=1>
<DIV align=justify><FONT face=Arial><SPAN lang=TR style="FONT-SIZE: 7pt; COLOR: gray"></SPAN></DIV></FONT></FONT></FONT>
<P><BR>
Please consider the environment before printing this e-mail. <BR><BR>CONFIDENTIAL NOTICE:<BR>This e-mail message and any attachment(s) (collectively, this 'Email') are intended <BR>only for the confidential use of the recipient(s) named above. If the reader of this <BR>message is not the intended recipient named above or an agent responsible for <BR>delivering it to the intended recipient named above, you have received this Email in error. <BR>Please notify the sender immediately and permanently delete this Email and any copies thereof. <BR></BLOCKQUOTE><br /><hr />Discover the new Windows Vista <a href='http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE' target='_new'>Learn more!</a></body>
</html>