lcm_operations

Retrieves a history of patching (update and upgrade) activities in chronological order. Please note that your environment's data retention policy dictates how far back Fleet Maintenance can show update and upgrade history.

  • Read Patch History:
    emcli lcm_operations
    -getLcmHistory                
    -input_file="<path of the JSON file>"
    Where the input file contains the following:
     {
        "targetNames" : [<List of targets>],
        "targetType" : "oracle_database",
        "targetIds" : [<List of ID's>],
        "tasks" : ["update", "upgrade"],
        "timeStartedGreaterThanOrEqualTo" : "<Start date format YYYY-MM-DD HH:MM:SS>",
        "timeStartedLessThanOrEqualTo" : "<End date format YYYY-MM-DD HH:MM:SS>",
        "status" : "completed",
        "sort" : "targetType",
        "limit" : 100,
        "page" : "<Page ID>"
    }
  • Export Patch History:
    emcli lcm_operations
    -exportLcmHistory                
    -input_file="<path of the JSON file>"
    Where the input file contains:
     { 
       "destinationHostName" : "<host name>",
       "destinationHostCredential" : "<host_cred>",
       "csvFileLocation" : "<CSV file path>",
       "csvFileName" : "<file_name.csv>"
       "targetNames" : [<list of targets>],
       "targetType" : "oracle_database",
       "targetIds" : [<list of ids>],
       "tasks" : ["update", "upgrade"],
       "timeStartedGreaterThanOrEqualTo" : "<Start date format YYYY-MM-DD HH:MM:SS",
       "timeStartedLessThanOrEqualTo" : "<End date format YYYY-MM-DD HH:MM:SS",
       "status" : "completed",
       "sort" : "targetType"
    }

Example 1 Read History:

emcli lcm_operations -getLcmHistory -input_file="data:/u01/payload.json"
Where the input file contains:
{
    "targetNames" : ["DB1", "DB2"],
    "targetType" : "oracle_database",    
    "targetIds" : ["5F128B326F38C425D076B14A402C7211", "5F128B326F38C425D076B14A402C7212"],
    "tasks" : ["update", "upgrade"],    
    "timeStartedGreaterThanOrEqualTo" : "2019-08-01 16:00:00",    
    "timeStartedLessThanOrEqualTo" : "2024-03-20 09:34:57",
    "status" : "completed",
    "sort" : "targetType",
    "limit" : 100,
    "page" : "b2Zmc2V0OjA"
}
Sample Response:
LCM history fetched successfully.
Status: 200 - OK

{
"total": 2,
"count": 2,
"currentPage": "b2Zmc2V0OjA",
"timeStartedGreaterThanOrEqualTo": "2019-08-01 16:00:00",
"timeStartedLessThanOrEqualTo": "2024-03-20 09:34:57",
"items": [
{
"targetName": "DB1",
"targetDisplayName": "DB1",
"targetType": "oracle_database",
"targetId": "CBAE3A0D1AB04E88E04303A017907ABD",
"targetVersion": "11.2.0.4.0",
"task": "UPDATE_DB",
"status": "COMPLETED",
"timeStarted": "2022-11-18 11:31:27",
"timeEnded": "2022-11-18 12:26:27",
"submittedBy": "SYSMAN",
"additionalProperties": {
"patchIds": [
"29517242",
"29517243",
"29517244"
]
}
},
{
"targetName": "DB2",
"targetDisplayName": "DB",
"targetType": "oracle_database",
"targetId": "EEAD3A0D1AB04E88E04303A014567EEDA",
"targetVersion": "11.2.0.4.0",
"task": "UPDATE_DB",
"status": "COMPLETED",
"timeStarted": "2022-11-18 11:31:27",
"timeEnded": "2022-11-18 12:26:27",
"submittedBy": "SYSMAN",
"additionalProperties": {
"patchIds": [
"29517242",
"29517243",
"29517244"
]
}
},
}

Example 2 Export History

emcli lcm_operations -exportLcmHistory -input_file="data:/u01/payload.json"
Where the input file contains:
 { 
   "destinationHostName" : "myhost.com",
   "destinationHostCredential" : "myhost_cred",
   "csvFileLocation" : "/scratch/lcmhistory",
   "csvFileName" : "lcmHistory_04122024T10_10_10.csv"
   "targetNames" : ["DB1", "DB2"],
   "targetType" : "oracle_database",
   "targetIds" : ["5F128B326F38C425D076B14A402C7211", "5F128B326F38C425D076B14A402C7212"],
   "tasks" : ["update", "upgrade"],
   "timeStartedGreaterThanOrEqualTo" : "2019-08-06 09:35:04",
   "timeStartedLessThanOrEqualTo" : "2025-08-06 09:35:04",
   "status" : "completed",
   "sort" : "targetType"
}
Sample Response:
LCM history exported successfully.
Status: 200 - OK

{"message": "CSV file exported successfully to /scratch/aupatil/lcmhistory/lcmhistorynolimitemcli_2.csv"}