sadm_create_sysinfo.sh

2 minute read

$SADMIN/bin/sadm_create_sysinfo.sh - v3.21
Posted 2021-04-22 - Updated 2021-06-03
Supported on Linux, Aix, MacOS

NAME

sadm_create_sysinfo.sh - Collect hardware & software information about the system

SYNOPSIS

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

DESCRIPTION

This script is use to collect different software and hardware about the system you are running it and record this information in the System Information File. When you run this script, no question is asked and information collected are stores in the disaster recovery directory ($SADMIN/dat/dr). This script is part of the ‘client sunset script’ (${SADMIN}/bin/sadm_client_sunset.sh). The ‘client sunset script’ is scheduled to run daily from the client crontab (/etc/cron.d/sadm_client). You can also run it manually whenever you want to update files in the disaster recovery information directory.

EXAMPLE

root@holmes:~ # sadm_create_sysinfo.sh 
================================================================================
Sat May 22 10:51:25 EDT 2021 - sadm_create_sysinfo.sh V3.23 - SADM Lib. V3.70
Server Name: holmes.maison.ca - Type: LINUX
CENTOS 7.9.2009 Kernel 3.10.0-1160.25.1.el7.x86_64
==================================================
 
Verifying command availability ...
Creating /sadmin/dat/dr/holmes_diskinfo.txt ...
Creating /sadmin/dat/dr/holmes_lvm.txt ...
Creating /sadmin/dat/dr/holmes_network.txt ...
Creating /sadmin/dat/dr/holmes_system.txt ...
Creating /sadmin/dat/dr/holmes_lshw.html ...
Creating /sadmin/dat/dr/holmes_sysinfo.txt ...
Getting last O/S Update date from /sadmin/dat/rch/holmes_sadm_osupdate.rch ...

==================================================
Script exit code is 0 (Success) and execution time is 00:00:24
History ($SADMIN/dat/rch/holmes_sadm_create_sysinfo.rch) trim to 35 lines.
Script will send an alert only when it terminate with error ($SADM_ALERT_TYPE=1).
Script succeeded, no alert will be send to 'default' alert group.
New log (/sadmin/log/holmes_sadm_create_sysinfo.log) created ($SADM_LOG_APPEND='N').
End of sadm_create_sysinfo.sh - Sat May 22 10:51:45 EDT 2021
================================================================================

Information in the Disaster Recovery directory, will be useful in case of complete system rebuild. Files in this directory ($SADMIN/dat/dr) are updated daily.

sadm_create_sysinfo_files.png

To view information generated from this script from the web interface, choose “Systems” options from the heading line. sadm_create_sysinfo_system.png

Then choose the server you want to view the information by clicking on it’s name. sadm_create_sysinfo_choose_system.png

The server main information screen will be shown like below. sadm_create_sysinfo_web_buttons.png

This is an example of what you would get by pressing the ‘Server Summary’ button. sadm_create_sysinfo_web_info.png

OPTIONS

Options Description
[ -d 0-9 ] Set debug level from 0 to 9 (Default is 0)
[ -h ] Display this help and exit.
[ -v ] Output version information and exit.

ENVIRONMENT

  • The “$SADMIN” environment variable must be defined and contains the root directory of the SADMIN tools (normally /opt/sadmin). It should be already done, the setup script have updated the ‘/etc/profile.d/sadmin.sh’ and the ‘/etc/environment’ files.
  • The SADMIN configuration file, is needed and loaded in memory at the beginning of every scripts. This file should already exist and contains your SADMIN configuration and preference setting.
  • For Shell script the Shell Library is used and for Python script the Python Library is used.

EXIT STATUS

Exit Code Description
0 An exit status of zero indicates success.
1 Failure is indicated by a nonzero value, typically ‘1’.

AUTHOR

Jacques Duplessis
Any suggestions or bug report can be submitted at the support page

Copyright © 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
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_fetch_client.sh - rsync all .rch/.log/.rpt from actives clients to the SADMIN Server.
sadm_requirements.sh - List/Install required SADMIN Tools packages
sadm_template.sh - Using SADMIN Shell script template
sadm_template.py - Using SADMIN Python script template
sadm_template_menu.sh - Using SADMIN shell menu template
sadm_wrapper.sh - Use to run your existing scripts & benefit of SADMIN tools
sadmlib_std_demo.sh - SADMIN Shell Library Functions Demo
sadmlib_std_demo.py - SADMIN Python Library Functions Demo
SADMIN installation - SADMIN installation page.