Dynamic Dervice Groups (DDGs) in Server Automation are dynamically maintained lists of SA
managed servrers that grows and contracts as servers are added and removed from the
SA environment. They are very handy, but if used incorrectly DDGs can have a negative effect
on the performance of the SA database server as their memberships are recalculated hourly;
if the rules defining the DDGs are inefficient and/or there are a very large number of DDGs
in the environment, their recalculations can make the SA database very busy.
Starting with SA 10.10, three tools were introduced via the SA Rollups (product patches that
can be obtained from HP Support). The tools/scripts are called dgDump, dgTree and dgUsage.
All three tools (if installed) will be found in /opt/opsware/support/bin, and each has man pages
dgDump - Dumps the details of a dynamic device group, reports on the select statement being
generated by the membership rules of the DDG. The optional -t flag, if specified, will also
cause the select statements to be executed, and will report both the amount of time required
by the select statement and how many members currently belong in the DDG.
Example of the dgDump usage..
dgDump -t 5540001
role_class_full_name: Device Groups Private brett Demo DeviceGroup
role_class_short_name: Demo DeviceGroup
modified_by: : brett
modified_dt: : 20150414T06:44:37
rule: ((device_ram LESS_THAN_OR_EQUAL_TO â2048â))
sql: SELECT DISTINCT dvc_id from (select /* ResourceTypeView.01 */ devices.*
from truth.devices where devices.DVC_ID in (((((select /* RA.device_base_view */
distinct devices.dvc_id from (select /* RA.device_ram */ devices.dvc_id as
dvc_id, round(to_number(mem.quantity) / 1024) as device_ram from truth.devices
left join (select * from truth.memory_components where memory_type = âRAMâ) mem
on devices.dvc_id = mem.dvc_id) device_ram, truth.devices where
devices.opsw_lifecycle != âDELETEDâ and devices.dvc_id = device_ram.dvc_id and
device_ram.device_ram <= 2048)))))) devices
time_to_execute: 1 devices in 0.002 seconds.
Of note in the above, is the name of the DDG, the creator, the rules used in SA to define the membership, and the resulting
SQL generated by SA. The amount of time and the number of devices present in the DDG will only
be present if the -t option is selected.
dgTree - Reports on the number and type of Device groups for a specific user.
Example of the dgTree output:
# dgTree -di -s ascii2 "Private/jyaya"
+- Mine (D:17360001)
| +- Still Mine (D:17380001)
| â- Also Mine (D:17370001)
+- My other Static (S:17400001)
â- My Static (S:17390001)
It the example above, jyaya is the SA user, and the D or S before the Device Group ID is either Dynamic or Static.
dgUsage - Reports on the usage of the device groups by other components of SA (software policies, audit polices,
patch policies, etc. Very useful to tracking down DDGs that are no longer used and that can be removed in order
to remove their impact on the database.
Example of the dbUsage tool.
# dgUsage --verbose Public/dgRoot
dgRoot  - DeviceGroup:[17600001,17570001,17560001,17570002,17590001,17580001]
dgRoot/AccessControlUserGroup  - AccessControl
dgRoot/AuditLinkedDG  - AuditPolicy:
dgRoot/SoftwarePolicyLinkedDG  - SoftwarePolicy:
dgRoot/MultiUsage  - SoftwarePolicy:[610001,920001],PatchPolicy:
dgRoot/PatchPolicyLinkedDG  - PatchPolicy:[980001,17560002]
dgRoot/DeviceGroupWithServer  - ORPHAN
In the case above, ORPHAN indicates that the DDG is not being used by any SA component currently.
Again, man pages for each of these tools can be found in /opt/opsware/support/man/man1.