Highlighted
Micro Focus Contributor
Micro Focus Contributor
148 views

[Support tip] - #opcagt -purge does not work to delete unwanted files on versions older that 11.x

"#opcagt -purge" command  does not work to delete unwanted files on versions older that 11.x

 

As a test, the file  "test.sh" was created on the managment server and then deployed to the local managed node.

 

Start distribution  (opcragt -distrib -instrum <local_agent>).
# opcragt -distrib -instrum <node>
Node <node>:
Create distribution data and inform agent...Done.

Distributed file should be located in "/var/opt/OV/bin/instrumentation/" directory.
# ls -la /var/opt/OV/bin/instrumentation/
total 336
drwxrwsr-x   2 bin        bin           8192 Aug 26 16:12 .
drwxr-xr-x   4 root       sys             96 Jun 24 11:10 ..
-rwxr-xr-x   1 root       bin          12927 Jun 29 12:26 cpu_mon.sh
-rwxr-xr-x   1 root       bin          13102 Jun 29 12:26 disk_mon.sh
-rwxr-xr-x   1 root       bin          12785 Jun 29 12:26 dist_mon.sh
-rwxr-xr-x   1 root       bin          12634 Jun 29 12:26 mailq_l.sh
-rwxr-xr-x   1 root       bin          41956 Jun 29 12:26 mondbfile.sh
-rwxr-xr-x   1 root       bin          13057 Jun 29 12:26 proc_mon.sh
-rwxr-xr-x   1 root       bin          12826 Jun 29 12:26 swap_mon.sh
-rwxr-xr-x   1 root       bin              0 Aug 26 16:12 test.sh
-rwxr-xr-x   1 root       bin          12414 Jun 29 12:26 vp_chk.sh


Delete file on server in category directory.
# rm /var/opt/OV/share/databases/OpC/mgd_node/instrumentation/test_cat/Unix/test.sh

Distribute again and use -purge option!
# opcragt -distrib -purge -instrum <node>
Node <node>:
Create distribution data and inform agent...Done.

File is still present on node on location "/var/opt/OV/bin/instrumentation/"
# ls -la /var/opt/OV/bin/instrumentation/
total 336
drwxrwsr-x   2 bin        bin           8192 Aug 26 16:12 .
drwxr-xr-x   4 root       sys             96 Jun 24 11:10 ..
-rwxr-xr-x   1 root       bin          12927 Aug 26 16:13 cpu_mon.sh
-rwxr-xr-x   1 root       bin          13102 Aug 26 16:13 disk_mon.sh
-rwxr-xr-x   1 root       bin          12785 Aug 26 16:13 dist_mon.sh
-rwxr-xr-x   1 root       bin          12634 Aug 26 16:13 mailq_l.sh
-rwxr-xr-x   1 root       bin          41956 Aug 26 16:13 mondbfile.sh
-rwxr-xr-x   1 root       bin          13057 Aug 26 16:13 proc_mon.sh
-rwxr-xr-x   1 root       bin          12826 Aug 26 16:13 swap_mon.sh
-rwxr-xr-x   1 root       bin              0 Aug 26 16:12 test.sh
-rwxr-xr-x   1 root       bin          12414 Aug 26 16:13 vp_chk.sh

The reason of this is that is not possible to delete instrumentation from local node (a node where OM server
is installed) using opcragt -purge on versions lower than 11.x.

You will need to manually delete non-needed instrumentation from directory /var/opt/OV/bin/instrumentation.

Alex Herrera
OMU support
TSIA Certified Support Professional (Chris Reed)
aleherma@hp.com

HP Software values your feedback regarding your overall Support experience. Contact us at software.satisfaction@hp.com or my manager directly.



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.