Part 1 - Randomizing Daily Inventories
Depending upon your network infrastructure, how often you collect the various inventories, how many clients you service, and other factors there comes a point when there is more data coming in than the Notification Server can efficiently consume. With us it happened when we had 6500 clients (all servers) doing a policy check every 4 hours, reporting 15 custom inventories and hardware inventory every day, patch scans every 2 days, server inventory weekly, software inventory weekly, and recreate fulls running monthly. We don't need the exchange or user inventories in our environment. All the inventories were set to run overnight so client discomfort would be minimal and we could have fresh data when we arrived every day.
This caused deadlocks and increased incidents of bad NSE files during peak periods. I also found out reporting to be nearly impossible during the busiest times. The way scheduling works in Altiris every client in a collection would run inventory at the same time causing a spike inventory data whenever a job was run. If at all possible, we did not want to add another server because we would then be required to duplicate everything we did on server 'a' over to server 'b' since the hierarchy feature is not due until Altiris NS 7.
The first thing I did was reduce the policy checks from every 4 hours to every 8 hours. Then I split the 4 or so inventory collections into more than a dozen with each one running at different times. As you can expect, this proved rather unwieldy and tough to maintain as any change to one caused me to have to check all of them. Plus, if there was an error in one it took longer to track down the error. So something else needed to be done.
Enter AeXRuncontrol. Located in your Altiris\Notification Server\NSCap\Bin\Win32\X86 directory, AeXRuncontrol will enable you to get every drop of efficiency you can from an Notification Server in anticipation of NS 7 Hierarchy when we can revert to the clients per child server model. As the daily custom and hardware inventories cause the biggest load, I'll implement it against them first and deal with the weekly and monthly inventories in a later post.
There are two ways to randomize your daily inventories. First, you can add the AeXRuncontrol.exe to each line of the .ini file you call with aexinvsoln.exe or you can randomize the aexinvsoln.exe command line itself. As my clients have no trouble running the inventories, but my server has trouble ingesting the flood of NSE's, the second serves my purposes just fine.
- Copy the AeXRuncontrol.exe to the source directory of your inventory package, in most cases Altiris\Notification Server\NSCap\Bin\Win32\X86\Inventory Solution.
- Clone the Hardware Inventory Task and name it Random Hardware Daily or some such. (In the 6.5 Console, Manage, Assets and Inventory, Tasks, Inventory Tasks - Windows, Right click the Hardware Inventory, clone).
- Under the new task's General tab, click on the Go To Program link.
- The Hardware definition file program should be showing. Copy the command line to the clipboard and click New
- Paste the command line in the New Program command line
- Type Random Hardware Program or some such on the Name line
- Under Description type: Runs Hardware Definition File randomly between 0 and 4 hours after the command is run. When the job is running, other tasks cannot start, so limit how wide a window you set.
- Edit the command line as such: AeXRuncontrol.exe "Random Hardware" 20 "AeXInvSoln.exe /hidden /s AeXInvSolnAdm1.ini" /d:1-14400
- Let me break that down for you: (Complete Command Line Arguments are available in the Inventory Solution Users Guide )
- AeXRuncontrol.exe - is the exe you copied to your Inventory Solution directory.
- "Random Hardware" - is the key where AeXRunControl stores the command and parameters. Whenever the client runs the new inventory program we are creating it looks here to see when the command can run again.
- 20 - is the minimum amount of time in hours before the command referenced in this key can be run again. Work with the advertisement and delay parameter to set run time. I set it to 20 to ensure the inventory can run every day. If I set it for 24, there is a possibility the command will not run that day.
- "AeXInvSoln.exe /hidden /s AeXInvSolnAdm1.ini" - is the original command line you copied and pasted into this program.
- /d:1-14400- this is it! This command tells the client to run the previous command randomly from 1 to 14400 seconds into the future. 14400 seconds equals 4 hours.
- Rest of program settings - Estimate disk space at 3000k, runs in 5 minutes, Terminate after 240 (This value equals the upper bounds of your random window), Run with System Account rights, Whether or not user is logged in, no input requires, no network required.
- Apply and Update Distribution Points then close the Inventory Agent Package window.
- Back on the new Random Hardware Daily screen change the Program name to Random Hardware (you may need to refresh the screen in order to see the new program.)
- Ensure you have the correct Collection selected, Run on a schedule, uncheck the as soon as notified box so program only runs after 5pm, Check Run on a schedule(All machines at the same time), 5pm every day.
- Check the Enable box and hit apply
- Be sure to disable the original Hardware Inventory.
- Now apply the same process to your other daily inventories keeping in mind that only one of these command lines will run at a time..
Now the inventories will be spread out over a defined period greatly alleviating the load on your NS server. Next I'll walk through making some of the larger less frequent inventories random, too. If you have any thoughts on ways to improve this process, or notice any errors, please let me know!
(Updated 8/30/2007 @ 9 am CDT to fix some errors in the process)