Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

NS EventQ Cleanup Script

Created: 10 Jul 2008 • Updated: 22 Jul 2008 | 10 comments
Antonp's picture
+1 1 Vote
Login to vote

Everyone has seen the "Bad" folders in NS Event queues and if not deleted they grow and grow, waste disk space and also decrease server performance.

Yes, you can manually delete them, but people tend to forget about them.

I created this script so that I don't have to repeat the same job over and over again and waste time, this script does it automatically for me.

How the script works:

  1. Detect if the "Bad" folder exists in eventqueue folders.
  2. If it does exist, then the script will delete the folder and all it's content and make a log entry (c:\EvtQBADlog.txt).
  3. If it doesn't exist, then nothing changes except an entry into the log file stating what has happened. Nothing, "file does not exist".

How to use the script:

  1. Download the attached .zip file and extract to the local drive on the server where you are going to run the script.
  2. Schedule a task, in Task Scheduler, a Microsoft tool.
  3. (Start\All Programs\Accessories\System Tools\Task Scheduler)
  4. Configure the schedule that best suits you, example: daily, weekly, monthly, etc.

Script will now run on the schedule configured and delete "Bad" folders for you, and record the changes in the log file.

Note: Working on the date- and timestamps for the log file, any help will be appreciated.
License: AJSL
By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License
Support: User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab.

Comments 10 CommentsJump to latest comment

aspradlin's picture

Dont' you want to review some of them to see if you have a bigger problem before you delete them all?

0
Login to vote
Antonp's picture

As i mentioned in the article that you schedule the script to run,a schedule that you decide on, can be once a month, enough time to troubleshoot errors.
You would normally use your Altiris Log Viewer to monitor any errors and in the event that a major error does arise, go to the bad folders to further troubleshoot them.
This script is just to prevent the bad folders from building up and waste disk space.

Technical Consultant
Http://www.alttech.co.za

0
Login to vote
gabelopezjr's picture

Antonp

As a "feature request", a drive variable would be useful for those that do not install applications on C:. :-)

0
Login to vote
Antonp's picture

The script was updated to look for the "BAD" folder in the d:\ aswell if your programs are installed on that partition. So your D:\ will be scanned and there will be a seprate log for each partition scanned.

Try it and let me know if it helps.

Technical Consultant
Http://www.alttech.co.za

0
Login to vote
SK's picture

If you dont want the script to have a hardcoded location, you could have it grab the "HKLM\SOFTWARE\Altiris\eXpress\Notification Server\InstallPath" value and then add "NSCap\queuename" to it.

Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.

0
Login to vote
jjesse's picture

Great article... thansk for the script. Why is this tagged "Worfkflow"? I blame Ohzone....

Jonathan Jesse
Director of Training
ITS Partners

Jonathan Jesse Practice Principal ITS Partners

0
Login to vote
ohzone - CherylPeterson's picture

Shoot the editor... no longer Workflow. Thanks jjesse!

Ohzone

Endpoint Management,
Endpoint Virtualization
Managing Mobility
Community Manager
www.twitter.com/EMnV_symc
Need Altiris help? IRC chat #Altiris

0
Login to vote
drew.ohara's picture

which attached zip file are we supposed to use for this?

0
Login to vote
Antonp's picture

Hi,

Use v1.1 to scan ( c:\ and d:\ ) and v1.0 only scans ( c:\ )

Technical Consultant
Http://www.alttech.co.za

0
Login to vote
drew.ohara's picture

Thanks, we will be implementing this soon. Great idea.

0
Login to vote