NWS: Network Statistics

What it is

NWS consists of a Perl module, Networkstats.pm and a set of example scripts. It is intended for the collection of network statistics on a VPN where the subnets consist of Windows clients and SAMBA fileservers. Files and their meaning: The script nws-scan.pl invokes the method "scan" of the Networkstats.pm object to scan all networks, using arp to obtain mac addresses and IP addresses. Next it runs smbstatus -b to discover SAMBA users and where they are logged on. It consults /etc/group to collect group information for all users. Finally, nmap -O is used to obtain information about the OS of the machines found. The result goes into a hash, whose keys are machine/IP/user combinations. The data are recorded in the following data structure:
'FF:FF:FF:FF:FF:FF$;172.16.8.16$;someuser' => {
     'nmap' => 1173681362,
     'first' => 1173111465,
     'last' => 1173716506,
     'network' => '172.16.8.1',
     'groups' => [ users, samba, print ],
     'type' => 'Microsoft Windows 95/98/ME|NT/2K/XP',
     'host' => 'host2007'
}
The respective entries for first and last show the times when the combination was last/first seen. The user may produce any kind of report from these data, as shown in the example scripts.

Downloads

The Perl module and the example scripts may be downloaded here: nws.tgz or nws.zip.

Home page, email, software

My homepage is here. Additional software for GNUstep that I have written is here.
markoriedelde@yahoo.de
SourceForge.net Logo