bash
root@computer# export AEX_DEV_MODE=1
AEX_DEV_MODE
aex-helper
agent
comminfo
root@computer# aex-helper agent comminfo AgentSDK::Interfaces::IAeXClientScheduleTaskHandler AgentSDK::Interfaces::IAeXClientScheduler AgentSDK::Interfaces::IAeXClientTransport AgentSDK::Interfaces::IAeXMachineID AgentSDK::Interfaces::IAeXMaintenanceWindows AgentSDK::Interfaces::IAeXNSManager AgentSDK::Interfaces::IAeXNTracker AgentSDK::Interfaces::IAeXNetworkManager AgentSDK::Interfaces::IAeXNfySvrClientAgent AgentSDK::Interfaces::IAeXNfySvrClientEvent AgentSDK::Interfaces::IAeXNotificationManager AgentSDK::Interfaces::IAeXObject AgentSDK::Interfaces::IAeXPackageDelivery AgentSDK::Interfaces::IAeXPkgDeliveryNotification AgentSDK::Interfaces::IAeXPkgServerClientAgent AgentSDK::Interfaces::IAeXPluginManager AgentSDK::Interfaces::IAeXPolicyManager AgentSDK::Interfaces::IAeXSWDAgent AgentSDK::Interfaces::IAeXScheduledTaskHandler AgentSDK::Interfaces::IAeXTaskScheduler AgentSDK::Interfaces::IAeXTickleAgent AgentSDK::Interfaces::IAeXUserLogonManager ClientTaskAgentSDK::Interfaces::IAeXClientTaskAgent ClientTaskAgentSDK::Interfaces::IAeXClientTaskAlertHelper ClientTaskAgentSDK::Interfaces::IAeXClientTaskNotification ClientTaskAgentSDK::Interfaces::IAeXClientTaskPolicyHelper ClientTaskAgentSDK::Interfaces::IAeXTaskHandler
root@computer# aex-helper agent comminfo AgentSDK::Interfaces::IAeXObject @ingroup mod_nsagent agent_ipc agentfunc @brief This is the common interface for all modules. Functions: ObjectDebugInfo NotifyObject
root@computer# aex-helper agent comminfo AgentSDK::Interfaces::IAeXObject ObjectDebugInfo This method is only for internal use and will return debugging/status information. @param strInfo debug information Return type: BaseSDK::AError Parameters: BaseSDK::AString strInfo
root@computer# aex-helper list plugins Altiris.ClientTaskAgent Altiris.CTSchedulingAgent Altiris.AlertUserTaskAgent Altiris.ScriptTaskAgent Altiris.PowerControlTaskAgent Altiris.ServiceControlTaskAgent Altiris.WebServiceTaskAgent Altiris.ResetTaskAgent Altiris.AgentControlTask Altiris.AeXClientTransport Altiris.AeXNfySvrClientEvent Altiris.AeXMachineID Altiris.MaintenanceWindowAgent Altiris.AeXPolicyManager Altiris.AeXNSClientConfigUpdate Altiris.AeXTaskScheduler Altiris.SWD Altiris.SWDAgent Altiris.SWDTaskProcessor Altiris.AeXPackageDelivery Altiris.AeXTickleAgent Altiris.AeXNSManager Altiris.NotificationManager Altiris.ClientScheduler
comm
root@computer# aex-helper agent comm AgentSDK::Interfaces::IAeXObject Altiris.AeXTaskScheduler ObjectDebugInfo "" Return Value = 0 strInfo = Currently running tasks: CS01 CTA01 CTA02 CTA03 MID01 PD01 PD02 PM01 PM02 Task processing is enabled.
ADoCliDeserialize
ADoCliSerialize
// Namespace for holding the custom parameter type. // The serializers should reside in the same namespace. namespace CustomNamespace { // Custom function argument type. struct ProductInventory { BaseSDK::AString product_name; unsigned quantity; }; // Represent the parameter in a user-readable format. // This function will be used to print out the parameter // to standard output. BaseSDK::AError ADoCliSerialize(const ProductInventory &BaseSDK::AString &out) { out = obj.product_name + "\n\tquantity = " + AString().SetNum(obj.quantity); return E_OK; } // Parse the parameter value from a string. // This function will be used to parse the value provided // for the parameter in command line. BaseSDK::AError ADoCliDeserialize(ProductInventory &obj, const BaseSDK::AString &in) { // Expect ~-separated input. BaseSDK::AStringTokenizer st(in, "~"); obj.product_name = st[0]; bool ok = false; obj.quantity = st[1].ToUInt(&ok); return ok ? E_OK : E_INVAL; } }
# Location of the solution's build root BUILDROOT = .. # Include common flags (should lead to loading Agent SDK build flags) include $(BUILDROOT)/buildFlags # The target binary to build. Agent plugins must always have .so extension TARGET = aex-mysolution-cli.so # Specify that we are building a plugin for custom interfaces access through CLI IS_PLUGIN = 1 # List the IDL files describing inter-plugin communication interfaces CLINT_IDLS = $(wildcard $(BUILDROOT)/MySolutionLib/Interfaces/*.idl) # Custom includes and libraries that provide the IPC interfaces CXXFLAGS += $(INC_MYSOLUTION) LINKLIBS += $(LIB_MYSOLUTION) # Additional custom object files (if necessary) OBJS = # Default target: build the plugin all : $(TARGET) # Common build rules (should lead to loading Agent SDK build rules) include $(BUILDROOT)/buildCommon
IS_PLUGIN
1
CLINT_IDLS
CXXFLAGS
LINKLIBS
root@computer# aex-helper register cliplugin /full/path/to/aex-mysolution-cli.so
root@computer# aex-helper unregister cliplugin aex-mysolution-cli
local