sadm_nmon_rrd_update.sh

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

 
NAME

sadm_nmon_rrd_update.sh   -   Update the performance statistics Database with the data that was collected by the Daily Farm Fetch

 
SYNOPSIS

sadm_nmon_rrd_update.sh     [ -v -h  ]    [ -d   0-9  ]   

 
DESCRIPTION
  • First this script, produce a list of all 'nmon' (Linux nmon, Aix nmon) files collected by the Daily Farm Fetch and that were produced yesterday.
  • Next it read each of these files and update the associated server rrd ([R]ound [R]obin [D]atabase) database.
  • The 'rrd' file are located in ${SADMIN}/www/rrd/${hostname} directory.

  • Example for system 'raspi5'.
    
        $ ls -l $SADMIN/www/rrd/raspi5
        total 49292
        -rw-rw-r-- 1 apache apache       11 Nov 30 05:46 netdev.txt
        -rw-rw-r-- 1 apache apache 50467232 Nov 30 05:46 raspi5.rrd
        
        $ cat $SADMIN/www/rrd/raspi5/netdev.txt
        eth0
        wlan0
        $ 
        
  • The 'netdev.txt' file, contain the network interface name on the system.
  • They are used in the network interface performance graph.



  • Sample of the script log, it show exactly what the script is doing.
    
        2018.11.30 05:06:18 ================================================================================
        2018.11.30 05:06:18 Starting sadm_nmon_rrd_update.sh V2.3 - SADM Lib. V2.52
        2018.11.30 05:06:18 Server Name: holmes.maison.ca - Type: LINUX
        2018.11.30 05:06:19 CENTOS 7.5.1804 Kernel 3.10.0-862.14.4.el7.x86_64
        2018.11.30 05:06:19 ==================================================
        2018.11.30 05:06:19  
        2018.11.30 05:06:19 List of nmon files we are about to process :
        2018.11.30 05:06:19 find /sadmin/www/dat -type f -name "*_181129_*.nmon"
        2018.11.30 05:06:19  1)  There is 718 snapshots in /sadmin/www/dat/centos6/nmon/centos6_181129_0002.nmon
        2018.11.30 05:06:19  2)  There is 718 snapshots in /sadmin/www/dat/centos7/nmon/centos7_181129_0002.nmon
        ...
        2018.11.30 05:06:19  22)  There is 2 snapshots in /sadmin/www/dat/yoda/nmon/yoda_181129_1006.nmon
        2018.11.30 05:06:19  23)  There is 413 snapshots in /sadmin/www/dat/yoda/nmon/yoda_181129_1012.nmon
        2018.11.30 05:06:19  
        2018.11.30 05:06:19 ----------
        2018.11.30 05:06:19 [1] Processing /sadmin/www/dat/centos6/nmon/centos6_181129_0002.nmon
        2018.11.30 05:06:19 Processing centos6 '^ZZZZ' Time Lines (718 elements).
        2018.11.30 05:06:36 Processing centos6 '^CPU_ALL' Lines (718 elements).
        2018.11.30 05:06:42 Processing centos6 '^PROC,T' Lines (718 elements).
        2018.11.30 05:06:44 Processing centos6 '^DISKREAD' Lines (718 elements).
        2018.11.30 05:07:17 Processing centos6 '^DISKWRITE' Lines (718 elements).
        2018.11.30 05:07:50 Processing LINUX - centos6 '^MEM,T' Lines (718 elements).
        2018.11.30 05:07:57 Processing LINUX Paging Activity '^VM,T'  Lines (718 elements)
        2018.11.30 05:08:01 Processing Network of centos6 (LINUX) '^NET,' Lines (718 elements).
        2018.11.30 05:08:01 System centos6 have 1 network interface(s)
        2018.11.30 05:08:01 Chosen Network Devices (Up to 4)
        2018.11.30 05:08:01   1) eth0
        2018.11.30 05:08:04 Updating RRD Database /sadmin/www/rrd/centos6/centos6.rrd
        2018.11.30 05:08:39 [SUCCESS] Updating centos6 RRD Database (718)
        2018.11.30 05:08:39  
        ...
        2018.11.30 05:53:04 ----------
        2018.11.30 05:53:04 [23] Processing /sadmin/www/dat/yoda/nmon/yoda_181129_1012.nmon
        2018.11.30 05:53:04 Processing yoda '^ZZZZ' Time Lines (413 elements).
        2018.11.30 05:53:15 Processing yoda '^CPU_ALL' Lines (413 elements).
        2018.11.30 05:53:19 Processing yoda '^PROC,T' Lines (413 elements).
        2018.11.30 05:53:21 Processing yoda '^DISKREAD' Lines (413 elements).
        2018.11.30 05:53:36 Processing yoda '^DISKWRITE' Lines (413 elements).
        2018.11.30 05:53:51 Processing LINUX - yoda '^MEM,T' Lines (413 elements).
        2018.11.30 05:53:56 Processing LINUX Paging Activity '^VM,T'  Lines (413 elements)
        2018.11.30 05:53:58 Processing Network of yoda (LINUX) '^NET,' Lines (413 elements).
        2018.11.30 05:53:58 System yoda have 2 network interface(s)
        2018.11.30 05:53:58 Chosen Network Devices (Up to 4)
        2018.11.30 05:53:58   1) eth0
        2018.11.30 05:53:58   2) wlx000f6002a8f0
        2018.11.30 05:54:01 Updating RRD Database /sadmin/www/rrd/yoda/yoda.rrd
        2018.11.30 05:54:21 [SUCCESS] Updating yoda RRD Database (413)
        2018.11.30 05:54:21  
        2018.11.30 05:54:21 ==================================================
        2018.11.30 05:54:21 Script return code is 0
        2018.11.30 05:54:21 Script execution time is 00:48:02
        2018.11.30 05:54:21 Trim History /sadmin/dat/rch/holmes_sadm_nmon_rrd_update.rch to 125 lines
        2018.11.30 05:54:21 Requested alert only if script fail (Won't send alert)
        2018.11.30 05:54:21 Trim log /sadmin/log/holmes_sadm_nmon_rrd_update.log to 2000 lines
        2018.11.30 05:54:21 Fri Nov 30 05:54:21 EST 2018 - End of sadm_nmon_rrd_update.sh
        2018.11.30 05:54:21 ================================================================================
        

    Example of a graph that can be view from the web interface with the data extracted for a 'rrd' file.


 
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   (Script that run everyday and run several scripts to process data collected from each client.)
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