SQL Script 1:
MOM 2005 SQL Query to return Only Managed computers that belong to a Computer Group. This query returns only Agent Managed Computers names for a specific Computer group.
The results will not include Cluster Server names.
select [Name] from ComputerWHERE [IsConfigManager]=0 AND ManagedType = ¡®2¡ä AND(idConfigManager IS NULL OR idComputer <> idConfigManager) AND IsAddedByServiceDiscovery = 0 AND [Type] <> 67108864 AND [Name] in (SELECT [ComputerName]FROM [OnePoint].[dbo].[SDKComputerToComputerGroupView]WHERE ComputerGroupName = ¡®YOUR COMPUTER GROUP NAME HERE¡¯)
¨C Source: http://www.systemcenterforum.org/handy-sql-queries-for-mom-2005/
SQL SCRIPT 2:
The following SQL Script will return a count of the number of computers that belong to each computer group in your OnePoint Database. This count includes all computers that is in the OnePoint Database, which includes Discovered, Unmanaged and Managed computers. This query can help you identify possible problems with a group or when troubleshooting why Computer group modifications in the Management console take a long time.
SELECT [Rule], COUNT(*) AS [Members]FROM computertocomputerruleviewgroup by [Rule]order by [Members] desc
¨C Source: http://www.systemcenterforum.org/handy-sql-queries-for-mom-2005/
SQL Script 3: chage control level from NONE to FULL
delete from configuration
where idcomputer=(select idcomputer from
computer where name = ‘%ServerName%’)
and DataCategory=’Management’
and DataName= ‘ManageType’
and DataValue=’Group’
Situation: HPBOID.exe and HPBPRO.exe are running wild on print servers. This is caused by HP Printer Toolbox, see more details here: http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c00601047&jumpid=reg_R1002_USEN.
Requirements: To take preventive action on this issue
Suggestions:
1. Install the HP fix. This may need reboot of the server if the HPBOID.exe and HPBPRO.exe is held by some process. And also if you have hundreds of servers to handle. Have to do this at some stage, I guess, with a detailed plan.
2. Schedule a script to run to loop all of your servers and kill these two processes. Put ServerList.txt in C:\ root or change location in the script. Get a copy of my script at: http://www.ozctx.com/dl/scripts/VBScripts/KillProcess.txt
3. Make MOM to alert you when the processes going wild.
3.1 Make an event rule to generate an event for you when the count of the process goes over your threshold.
* In Rule Groups, Create your own rule group (I guess it is a good idea to put your own rules under one folder for better maintenance)
* Under your own rule group, create another rule group called “Windows Servers", right click the new rule group, click “Associate with Computer Group …", choose the computer groups you need to monitor. In my case, this is “Microsoft Windows 2000 Servers” and “Microsoft Windows 2003 Servers". After you have done this, you will see in the details pane “Bound to Computer Groups:” are populated with your choice.
3.2 Create another Event Rule to catch the custom events
* in Event Rules, create a rule with following details:
** Rule name: Generate Event 90001 - Count Process - HPBOID.exe
** Provider: Schedule every 1 hours (who added this ’s’)
** Response type: Launch a script, then click New, make name “_Count_HPBOID_Process", the underscore can make your own scripts stand out.
(Thank you, Anders Bengtsson, I am copying the script from you, http://www.myitforum.com/forums/m_141782/mpage_1/key_/tm.htm#141782 )
Code:
strComputer = "." | |
| |
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") | |
Set objShell = CreateObject("Wscript.Shell") | |
| |
| |
Set colProcesses = objWMIService.ExecQuery _ | |
("Select * from Win32_Process Where Name = 'HPBOID.exe'") | |
If colProcesses.Count > 20 Then | |
Const EVENT_WARNING = 90001 | |
Set objShell = CreateObject("Wscript.Shell") | |
objShell.LogEvent EVENT_WARNING, _ | |
"There are more then 20 instances of HPBOID.exe running." | |
End If |
* Then you have a scheduled script to check the process count for you every hour. If the count goes over the threshold, an event is created in Event Log - Applications.
* Under Event Rule, create another rule to monitor this event id 90001
** Rule Name: Email Alert on Event 90001 - HPBOID Process Count
** Data Provider: Application
** Criteria: with event id 90001
** Schedule: Always process data
** Alert: Generate Alert with severity “Critical Error”
** Response: Send notification to a notification group
Done, you will get email alert as scheduled.
Hi We call us Citrix Noobs, because we are noobs. We are a group of noobs that is heckless and restless. We are not fearing of anything, and we tend to do the best in daily noobing. Join us if you are also noobs, and will keep noobing.
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | Current | > >> | ||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |