Skip to main content

Posts

Showing posts with the label Red Hat Satellite

Red Hat Satellite: Cleanup "Actions" history

I had run in to a situation where my Satellite had several hundred-thousand previously run scheduled jobs sitting in the history... I could delete them 25 at a time... and if I did "Select All" it would puke. So - I created the following #!/usr/bin/env python import xmlrpclib import time SATELLITE_URL = "http://rhnsat01.company.com/rpc/api" SATELLITE_LOGIN = "satadmin" SATELLITE_PASSWORD = "notMyPassword" client = xmlrpclib.Server(SATELLITE_URL, verbose=0) delete = 1 key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD) ############################### # CHANGE THINGS AFTER THIS LINE # ## Delete all Failed Actions x = "Deleting all Failed Actions" print(x) failed_list = client.schedule.listFailedActions(key) action_ids=[] for action in failed_list:     action_ids.append(action['id']) archive_result=client.schedule.archiveActions(key,action_ids) ## Archive all Completed Actions ## Generate a...

Satellite Database Management

At some point you may end up getting a message from your Red Hat Network Satellite regarding the Database utilization. So - you can take a look for yourself and then extend the Tablespace -bash-3.2$ db-control report Tablespace                  Size    Used   Avail   Use% DATA_TBS                    4.8G    4.1G  701.2M    86% SYSAUX                      500M  172.3M  327.6M    34% SYSTEM                      400M  253.1M  146.8M    63% TEMP_TBS                   1000M      0B   1000M     0% UNDO_TBS                   1000M  886.3M  113.6M    89% USERS...