Skip to main content
Matrix42 Self-Service Help Center

Running the scripts on Unix/Linux

Running the scripts as a root user

The scripts need to run on every system with Oracle databases and/or Java.  If it is a virtualized system, then these must also be run on the "host" system.
Exeption: VMware. For VMware "hosts" please use the Dataprovider VMware.

After the installation of the extension all relevant scripts can be found in the folder After the installation of the "Oracle Compliance" extension, the scripts can be found in the folder Matrix42\Matrix42 Workplace Management\OracleLocalInventory.

To execute the data collection scripts on Unix/Linux systems:

  1. Place the M42DataCollectionUnix directory including all its files in any folder on the target systems.
  2. Ensure that the owner of the directory is root.
  3. Ensure that the access rights for the directory, incl. subdirectories is set to 700 (rwx------).
  4. Run the following command as user root:
# cd <path>/M42DataCollectionUnix/bin
# ./M42DataCollection.sh

Running the script will generate files and put them in the M42DataCollectionUnix/results directory. In addition, a compressed <hostname>. tar file with contents of the output directory will be created.  This resulting <hostname>. tar file must be collected for each server system.

Running the scripts as a standard user using sudo

For security reasons it is not recommended to use the root account. A safer approach is to run the scripts and commands as a regular user and then use sudo to run commands with elevated privileges. This feature is supported for Linux and Solaris systems. Currently not supported is running the Java Inventory with using sudo.

To enable the execution with sudo as a non-root user, do the following:

  1. Set the UseSudo variable in the M42DataCollection.env (or the M42DataCollection_SunOS.env file for Solaris) file to 1:
UseSudo=1
  1. Create a text file under /etc/sudoers.d/ (e.g. /etc/sudoers.d/matrix) with the following content:
matrix ALL = (oracle) NOPASSWD: ALL 
matrix ALL = NOPASSWD: /usr/bin/ls, /usr/bin/pwdx, /usr/bin/strings, /usr/sbin/dmidecode, /sbin/dmidecode

For Solaris x86 use the following instead:

matrix ALL = (oracle) NOPASSWD: ALL 
matrix ALL = NOPASSWD: /usr/bin/ls, /usr/bin/pwdx, /usr/bin/pargs, /usr/sbin/virtinfo, /usr/sbin/prtdiag, /usr/sbin/smbios

 For Solaris Sparc use the following instead:

matrix ALL = (oracle) NOPASSWD: ALL
matrix ALL = NOPASSWD: /usr/bin/ls, /usr/bin/pwdx, /usr/bin/pargs,  /usr/sbin/virtinfo, /usr/sbin/prtdiag, /opt/SUNWldm/bin/ldm, 
/usr/sbin/ldm

Additional permissions that must be granted for specialized systems/Operating systems

  • When using Oracle Virtual Machine (OVM):
    • sudoers file: matrix ALL = NOPASSWD: /usr/sbin/xm, /usr/sbin/xenpm, /usr/sbin/ovs-agent-db, /usr/local/bin/ovm-info
    • Reading access to every *.cfg file under /OVS/Repositories/*/VirtualMachines und /OVS/running_pool/*/ (Please make sure that those files are accessible by the script user!)
    • Reading access to /var/log/ovs-agent.log
  • When using Oracle Database Appliances (ODA):
    • sudoers file: matrix ALL = NOPASSWD: /opt/oracle/oak/bin/oakcli, /opt/oracle/dcs/bin/odacli, /opt/oracle/oak/bin/odaadmcli, /opt/oracle/dcs/bin/odacli

"matrix" is in this case the user who executes the DataCollection and "oracle" is the (linux) user who runs the database (also known as the process owner of the pmon process).

  1. Execute the script:
# cd <path>/M42DataCollectionUnix/bin
# ./M42DataCollection.sh

Using sudo alternatives

If you don't want to use the standard "sudo" binary, you can define an alternative in the M42DataCollection.env file (or the M42DataCollection_SunOS.env file for Solaris):

SudoAlternative=dzdo

You can either define a binary represented by the absolute path or you can specify the variable as a binary which is available through the defined $PATH variable.     

  • Was this article helpful?