(SM) Support Tip: How to Auto clear eventin and eventout queues via scheduled script?
Once the event records are processed, it will stay at in the eventout and eventin queues, this queues will be keep on increasing if not cleared.
The scauto events like pmo, pmu, pmc will be dumped in the event in/out queues and needs manually clearance.
It’s always suggested to clear the queues, in case you the administrator prefers to auto clear the event queues,
The below script can be used and can be scheduled once a day, like at 12 00 hours every day to clean this queues.
Create a JSScript with below coding:
var evet = new SCFile("eventout");
var rc1 =evet.doSelect("evtime<tod()");
if (rc1 == RC_SUCCESS)
print("EVENTOUT RECORDS FOUND");
}while (evet.getNext() == RC_SUCCESS);
print("No records found");
Compile and test then to schedule it, please follow the below steps
- Logon SM eclipse client using falcon.
- Command: sch
- Input these values:
Expiration Time: set to current time
Scheduled Class: problem
Action Time: set to current time
Repeat Internal: Other -> 00:01:00 (This means to execute this schedule record every 1 min)
Java Script tab: copy paste the script (with its name)
- Click 'Add'.
- Wait for 1 min, then search 'test' in sm.log, see if you can find entry of the script name, which means the script is been executed and the events are cleared.