sadm_subnet_lookup.py

Updated: 2018/11/30
O/S : Aix, Linux

 
NAME

sadm_subnet_lookup.py   -   Scan network subnet specified in sadmin.cfg and build IP/Hostname/Status in Database

 
SYNOPSIS

sadm_subnet_lookup.py     [ -v -h  ]    [ -d   0-9  ]   

 
DESCRIPTION
  • Scan the server network subnet specified in sadmin.cfg and update the sadmin Database.

  • You decide what subnet you wish to scan, by specifying them in SADMIN configuration file.
    In this example, we are scanning one subnet (192.168.1.0/24), but we can specify up to four subnet.


    This is an example what the result that can be viewed from the web interface.
    In this example, we are scanning one subnet (192.168.1.0/24), but we can specify up to four subnet.


    This is a sample of what you would see on the screen when you run the 'sadm_network_subnet-lookup.sh' script.
    
        2018.11.30 05:54:22 - ====================================================================
        2018.11.30 05:54:22 - Starting sadm_subnet_lookup.py V2.1 - SADM Lib. V2.23
        2018.11.30 05:54:22 - Server Name: holmes.maison.ca - Type: Linux
        2018.11.30 05:54:22 - O/S: Centos  7.5.1804 - Code Name: Core
        2018.11.30 05:54:22 - ==================================================
        2018.11.30 05:54:22 -  
        2018.11.30 05:54:22 - Current host interface name     : em1
        2018.11.30 05:54:22 - Possible IP on 192.168.1.0/24   : 256 
        2018.11.30 05:54:22 - Network netmask                 : 255.255.255.0
        2018.11.30 05:54:22 - Output Network Information file : /sadmin/dat/net/network_192.168.1.0_24.txt
        2018.11.30 05:54:22 - The arp-scan output file        : /sadmin/dat/net/arp-scan.txt
        2018.11.30 05:54:24 - The fping output file           : /sadmin/dat/net/fping.txt
        2018.11.30 05:54:48 -  
        2018.11.30 05:54:48 - ----------
        2018.11.30 05:54:48 - 192.168.1.1       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.2       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.3       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.4       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.5       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.6       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.7       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.8       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.9       - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.9       - Leave old mac at 'e4:ce:8f:51:83:32' since new mac is ''
        2018.11.30 05:54:48 - 192.168.1.10      - Ping Date Updated
        2018.11.30 05:54:48 - 192.168.1.10      - Leave old mac at '00:21:70:b2:b7:21' since new mac is ''
        2018.11.30 05:54:48 - 192.168.1.11      - Ping Date Updated
        ...
        2018.11.30 05:54:51 -  
        2018.11.30 05:54:51 - Sort /sadmin/dat/net/network_192.168.1.0_24.txt 
                              to /sadmin/www/dat/holmes/net/network_192.168.1.0_24.txt
        2018.11.30 05:54:51 - Change file owner and group to apache.apache
        2018.11.30 05:54:51 -  
        2018.11.30 05:54:51 - ==================================================
        2018.11.30 05:54:51 - Script return code: 0
        2018.11.30 05:54:51 - Script execution time is 00:00:29
        2018.11.30 05:54:51 - Trim /sadmin/dat/rch/holmes_sadm_subnet_lookup.rch to 125 lines.
        2018.11.30 05:54:51 - Mail requested if script fail - No mail sent
        2018.11.30 05:54:51 - Trim /sadmin/log/holmes_sadm_subnet_lookup.log to 2000 lines.
        2018.11.30 05:54:51 - Fri Nov 30 05:54:51 2018 - End of sadm_subnet_lookup.py
        2018.11.30 05:54:51 - =====================================================================
        

 
OPTIONS

-d
Specify debug level (0-9).
Value of 0 indicate that no debug information is to be displayed.
-h
Display this help and exit.
-v
Output version information and exit.



REQUIREMENTS
 
EXIT STATUS
[0]    An exit status of zero indicates success
[1]    Failure is indicated by a nonzero value, typically ‘1’.

 
AUTHOR
Jacques Duplessis (jacques.duplessis@sadmin.ca.).
Any suggestions or bug report can be sent at http://www.sadmin.ca/support.php

 
COPYRIGHT
Copyright © 2018 Free Software Foundation, Inc. License GPLv3+:
    - GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software, you are free to change and redistribute it.
There is NO WARRANTY to the extent permitted by law.

 
SEE ALSO
sadm_server_sunrise.sh   (This is the script that execute the Subnet Lookup every morning)
sadm_daily_farm_fetch.sh   (Get all systems information files generated the SADM client)


 
INDEX
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
REQUIREMENTS
EXIT STATUS
AUTHOR
COPYRIGHT
SEE ALSO

Copyright © 2015-2019 - www.sadmin.ca - Suggestions, Questions or Report a problem at support@sadmin.ca