달력

2

« 2025/2 »

  • 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

Windows의 성능 카운터 상에서 보여지는 프로세스의 CPU 사용률은 각 코어에 대한 사용률의 합이 된다. 예를들어, 4-코어인 경우 최대 400%까지 CPU 사용률이 나올 수 있어 GUI로 구현하게 되면 오탐이 발생하게 된다.
VBS VBScript SCOM System Center Operations Manager

' 프로세스 CPU 사용률(%) 모니터(두 가지 상태)
' 수집 간격(분) x 수집 횟수 시간 동안 스크립트 실행됨(실행 주기 및 제한 시간 설정 시 유의)
' 수집 시간동안 임계값을 연속해서 초과하는 경우 상태는 Bad

' 비정상 상태 정의: Property[@Name='Status'] 같음 Good
' 정상 상태 정의: Property[@Name='Status'] 같음 Bad
' 경고 설명: $Data/Context/Property[@Name='Message']$

' 모니터링 설정
Interval =  1              ' 수집 간격(분)
Sampling = 1               ' 수집 횟수
strProcess = "notepad"     ' 대상 프로세스
PerfValue = 30             ' 임계값(%)

If UCASE(RIGHT(strProcess,3)) = "EXE" Then
strProcess = LEFT(strProcess,LEN(strProcess) - 4)
End If
ProcessorCount = GetNumProcessors
Dim oAPI, oBag
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()
i = 0
Summary = 0
Do While ( i < Sampling )
i = i + 1
ResultValue = GetCPUPerf(strProcess)
If ResultValue >= PerfValue Then
Summary = Summary + 1
End If
If Sampling = 1 Then
Exit Do
End If
WScript.Sleep Interval*60000
Loop
If cInt(Summary) = cInt(Sampling) Then
Status = "Bad"
Message = "프로세스 " & strProcess & "의 CPU 사용률이 설정된 임계값(" & PerfValue & "%)을 초과하였습니다. 프로세스 " & strProcess & "의 CPU 사용률은 " & RoundDown(ResultValue) & "%입니다."
Else
Status = "Good"
Message = "프로세스 " & strProcess & "의 CPU 사용률이 설정된 임계값(" & PerfValue & "%) 이하입니다. 프로세스 " & strProcess & "의 CPU 사용률은 " & RoundDown(ResultValue) & "%입니다."
End If
Call oBag.AddValue("Message",Message)
Call oBag.AddValue("Status",Status)
Call oBag.AddValue("CPU Usage",RoundDown(ResultValue) & "%")
Call oAPI.Return(oBag)

Function GetCPUPerf(ProcessName)
Set WMI_Service = GetObject("winmgmts:{impersonationlevel=impersonate}!\root\cimv2")
sObjectPath = "Win32_PerfRawData_PerfProc_Process.Name=" & chr(34) & ProcessName & chr(34)
Set perf_instance1 = WMI_Service.Get( sObjectPath )
N1 = perf_instance1.PercentProcessorTime
D1 = perf_instance1.TimeStamp_Sys100NS
WScript.Sleep(1000)
Set perf_instance2 = WMI_Service.get( sObjectPath )
N2 = perf_instance2.PercentProcessorTime
D2 = perf_instance2.TimeStamp_Sys100NS
If ( 0 = (D2-D1) ) then
GetCPUPerf = 0
Else
PercentProcessorTime = ((N2 - N1) / (D2 - D1)) * 100
GetCPUPerf = PercentProcessorTime / ProcessorCount
End If
Set WMI_Service = Nothing
End Function

Function RoundDown(Value)
If InStr(Value, ".") Then
RoundDown = Left(Value, InStr(Value, ".") + 3)
Else
RoundDown = Value
End If
End Function

Function GetNumProcessors
Set WMI_Service = GetObject("winmgmts:{impersonationlevel=impersonate}!\root\cimv2")
Set colItems = WMI_Service.ExecQuery ("Select * from Win32_ComputerSystem")
For Each objItem In colItems
On Error Resume Next
GetNumProcessors = objItem.NumberOfLogicalProcessors
If Err.number <> 0 Then
GetNumProcessors = objItem.NumberOfProcessors
End If
On Error GoTo 0
Next
End Function

:
Posted by 커널64
2010. 9. 29. 13:24

[VBS]레지스트리 입력 스크립트 - SCOM SystemCenter2010. 9. 29. 13:24

SCOM의 작업을 이용해 파라미터를 받아 레지스트리 입력 또는 업데이트
VBS VBScript SCOM System Center Operations Manager

Set oArgs = WScript.Arguments

' 파라미터 Validation Check
If UCASE(oArgs(0)) <> "ABC" AND UCASE(oArgs(0)) <> "DEF" AND UCASE(oArgs(0)) Then
Guide()
End If

If UCASE(oArgs(1)) <> "ABC" AND UCASE(oArgs(1)) <> "DEF" AND UCASE(oArgs(1)) Then
Guide()
End If

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\SAMPLE"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,"Parameter1",UCASE(oArgs(0))
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,"Parameter2",UCASE(oArgs(1))
WScript.Echo ""
WScript.Echo "레지스트리 업데이트 완료."
WScript.Echo " - 파라미터 1: " & UCASE(oArgs(0))
WScript.Echo " - 파라미터 2: " & UCASE(oArgs(1))
WScript.Quit

Sub Guide()
WScript.Echo ""
WScript.Echo "매개변수 입력 가이드"
WScript.Quit
End Sub

:
Posted by 커널64

VBScript VBS SCOM System Center Operations Manager

'비정상 상태 정의: Property[@Name='Status'] 같음 Good
'정상 상태 정의: Property[@Name='Status'] 같음 Bad
'경고 설명: $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/DNSName$의 $Data/Context/Property[@Name='Message']$

Dim oAPI, oBag, strProcess
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()

strProcess = "Process.exe"

Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcesses = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = '" & strProcess & "'")

if colProcesses.Count  >= 1 Then
strMSG ="프로세스 " & strProcess & "가 " & colProcesses.Count & "개 실행 중입니다."
State = "Good"
Else
strMSG ="프로세스 " & strProcess & "가 실행 중이지 않습니다."
State = "Bad"
End If
Set colProcesses = NOTHING

Call oBag.AddValue("Message",strMSG)
Call oBag.AddValue("Status",State)

Call oAPI.Return(oBag)

:
Posted by 커널64

Workgroup 컴퓨터의 DPM 2010 에이전트 설치
SCDPM 2010, System Center Data Protection Manager 2010, Workgroup Computer

1. 설치 파일 위치: %Program Files%\Microsoft DPM\DPM\ProtectionAgents\RA\3.0.7696.0
2. 아키텍쳐에 맞게 설치 DPMAgentInstaller_x86.exe 또는 DPMAgentInstaller_x64.exe
3. 다음 명령을 통해 DPM 서버 이름과 관리자 권한 계정 생성
SetDPMServer.exe -DPMServerName <DPMServerName> -IsNonDomainServer -UserName <NewUserName>
4. DPM 관리자 콘솔을 통해 Workgroup 컴퓨터 추가
> 에이전트 연결 > 작업 그룹 또는 신뢰할 수 없는 도메인의 컴퓨터 > 컴퓨터 이름, 계정 정보

:
Posted by 커널64
2010. 9. 14. 16:43

[SCOM]Event ID: 4000, 'GetSQL2008DBSpace.js : 0' SystemCenter2010. 9. 14. 16:43

SQL Server 2008이 설치된 에이전트에서 다음 이벤트가 지속적으로 기록된다.
이벤트 ID: 4000, 이벤트 설명: GetSQL2008DBSpace.js : 0

GetSQL2008DBFilesFreeSpace.vbs
GetSQL2008DBFreeSpace.vbs

이는 SQL-DMO(Microsoft SQL Server 2008 기능 팩의 구성 요소)를 설치하면 해결된다.



http://www.microsoft.com/ko-kr/download/details.aspx?id=6375

:
Posted by 커널64
2010. 9. 13. 09:23

SCVMM 2008 R2 권장 핫픽스 목록 SystemCenter2010. 9. 13. 09:23

SCVMM 2008 R2 권장 핫픽스
System Center Virtual Machine Manager 2008 R2, Hotfix, Recommended

VMM 서버 및 관리자 콘솔
SCVMM 2008 R2 핫픽스 롤업(http://support.microsoft.com/kb/982522)
SCVMM 2008 R2 관리자 콘솔 핫픽스 롤업(http://support.microsoft.com/kb/982523)

Windows Server 2008 기반의 Hyper-V 및 VMM 서버
WMI 서비스의 메모리 손상(http://support.microsoft.com/kb/954563)
SIA 확장을 포함하는 인증서가 설치되어 있는 경우 특정 응용 프로그램의 성능 저하(http://support.microsoft.com/kb/955805)
BITS가 GUID 볼륨을 포함하는 경로의 파일을 처리하지 못함(http://support.microsoft.com/kb/956774)
WMI 알림 쿼리 사용 시 wmiprvse.exe 프로세스의 메모리 누수 발생(http://support.microsoft.com/kb/958124)
장애 조치 클러스터링 WMI 공급자 롤업 핫픽스(http://support.microsoft.com/kb/968936)
Windows XP 또는 Windows Server 2003에서 WMI 인터페이스를 사용해 원격으로 Windows Server 2008을 모니터링 시 wmiprvse.exe 프로세스의 메모리 누수 발생(http://support.microsoft.com/kb/970520)
WinRM이 16KB보다 큰 HTTP 인증 요청을 수락하지 않음(http://support.microsoft.com/kb/971244)
Windows Server 2008 장애 조치 클러스터 노드에서 Win32_share WMI 클래스가 파일 공유를 열거하지 못하거나 파일 공유를 만들 수 없음(http://support.microsoft.com/kb/971403)

Windows Server 2008 기반의 클러스터된 Hyper-V 서버
Windows Server 2008 기반의 장애 조치 클러스터 권장 핫픽스(http://support.microsoft.com/kb/957311)

Windows Server 2008 R2 기반의 Hyper-V 및 VMM 서버
Win32_Service WMI 클래스의 메모리 누수(http://support.microsoft.com/kb/981314)
Windows 원격 관리 서비스 응답 중지(http://support.microsoft.com/kb/981845)

Windows Server 2008 R2 기반의 클러스터된 Hyper-V 서버
WMI 공급자를 사용해 장애 조치 클러스터 정보를 쿼리하는 응용 프로그램 또는 서비스가 낮은 성능을 보이거나 시간 초과 예외 발생(http://support.microsoft.com/kb/974930)
Windows Server 2008 R2 기반의 장애 조치 클러스터 권장 핫픽스(http://support.microsoft.com/kb/980054)

Windows 2000 P2V 대상 서버
응용 프로그램 WMI로 LoadLibrary() 또는 FreeLibrary() 함수 호출 시 교착 상태 발생(http://support.microsoft.com/kb/834010)
MS04-011 보안 업데이트 설치 후 Win32_SCSIController WMI 클래스의 SCSI 컨트롤러 정보 검색 불가(http://support.microsoft.com/kb/843527)
WMI 이벤트 알림 쿼리가 사용자 권한 변경을 감지하지 못함(http://support.microsoft.com/kb/892294)

:
Posted by 커널64

SCVMM 2008 R2 관리 콘솔에서 Windows 2000 Server 및 Advanced Server의 운영체제가 Unknown으로 표시되는 경우

1. SSMS(SQL Server Management Studio) 또는 SSMS Express 실행
2. 만약을 위해 VirtualManagerDB 백업
3. VirtualManagerDB에 대해 쿼리 분석기 실행 후 다음 쿼리 실행

INSERT INTO tbl_IL_OS (OSId, Name, Description, Edition, ProductType, Version, Architecture, OSFlags, VMWareGuestId)
VALUES ('08f954f9-6475-4e07-9e32-4d2ddefc4c54', 'Windows 2000 Advanced Server', 'Windows 2000 Advanced Server', 1, 3, '5.0', 'x86', 0x3f, 'win2000AdvServGuest')

INSERT INTO tbl_IL_OS (OSId, Name, Description, Edition, ProductType, Version, Architecture, OSFlags, VMWareGuestId)
VALUES ('e85f1375-c69e-4cbd-8249-0e32caa04abb', 'Windows 2000 Server', 'Windows 2000 Server', 0, 3, '5.0', 'x86' , 0x3f, 'win2000ServGuest')

4. SSMS 또는 SSMS Express 종료
5. VMMAgent 및 VMMService 서비스 재시작
(Integration Components가 설치된 VM에 대해 자동으로 운영체제 정보 표시)

참고: http://support.microsoft.com/?kbid=2025530

:
Posted by 커널64
2010. 8. 11. 12:45

[SCOM] SCOM 2007 Agent 강제 제거 SystemCenter2010. 8. 11. 12:45


SCOM 2007 SP1 에이전트 제거가 되지 않는 경우 강제 제거
:
Posted by 커널64
2010. 8. 4. 15:10

[SCOM] SCOM 2007 R2 업데이트 정리 SystemCenter2010. 8. 4. 15:10

SCOM, System Center Operations Manager 2007 R2 업데이트 요약

SCOM 2007 R2 CU2 (업데이트 롤업 2)
http://support.microsoft.com/kb/979257

Windows Server 2008 R2 또는 Windows 7
"Win32_Service" WMI 클래스의 메모리 누수 해결(http://support.microsoft.com/kb/981314)

Windows Server 2003 SP2 또는 Windows Server 2008 SP2
ESE Jet 데이터베이스 오류로 인한 Health Service 불안정(http://support.microsoft.com/kb/981263)

Windows Server 2003, SP1 또는 SP2
WMI 저장소 안정성 향상(http://support.microsoft.com/kb/933061)
Cscript 5.7 업데이트(http://support.microsoft.com/kb/955360)

모든 Windows 운영체제
MSXML 6.0의 XML 요청 처리에 의한 CPU 사용률 증가(http://support.microsoft.com/kb/968967)

:
Posted by 커널64
2010. 8. 3. 13:24

[SCCM] SCCM 관련 자료 모음 SystemCenter2010. 8. 3. 13:24

SCCM 관련 자료 모음, System Center Configuration Manager 2007, 구성, 설치

SCCM 설치 후 초기 구성(Windows Server 2008에 SCCM 설치)
http://www.windows-noob.com/forums/index.php?/topic/489-how-can-i-configure-sccm-2007-sp1-in-windows-server-2008/
http://www.windows-noob.com/forums/index.php?/topic/490-how-can-i-configure-sccm-2007-sp1-in-windows-server-2008/
http://www.windows-noob.com/forums/index.php?/topic/491-how-can-i-configure-sccm-2007-sp1-in-windows-server-2008/

SCCM을 통한 Windows XP SP3 배포
http://www.windows-noob.com/forums/index.php?/topic/569-how-can-i-deploy-windows-xp-sp3-using-sccm-2007-sp1-part-1/
http://www.windows-noob.com/forums/index.php?/topic/570-how-can-i-deploy-windows-xp-sp3-using-sccm-2007-sp1-part-2/

SCCM을 통한 Windows Vista SP1 배포(PXE 포인트 구성 및 MDT 통합)
http://www.windows-noob.com/forums/index.php?/topic/511-how-can-i-deploy-windows-vista-sp1-using-sccm-2007-sp1/
http://www.windows-noob.com/forums/index.php?/topic/512-how-can-i-deploy-windows-vista-sp1-using-sccm-2007-sp1/
http://www.windows-noob.com/forums/index.php?/topic/513-how-can-i-deploy-windows-vista-sp1-using-sccm-2007-sp1/
http://www.windows-noob.com/forums/index.php?/topic/515-how-can-i-deploy-windows-vista-sp1-using-sccm-2007-sp1/
http://www.windows-noob.com/forums/index.php?/topic/516-how-can-i-deploy-windows-vista-sp1-using-sccm-2007-sp1/
http://www.windows-noob.com/forums/index.php?/topic/518-how-can-i-deploy-windows-vista-sp1-using-sccm-2007-sp1/

SCCM을 통한 Windows 7 배포
http://www.windows-noob.com/forums/index.php?/topic/667-deploy-windows-7/
http://www.windows-noob.com/forums/index.php?/topic/1169-deploy-windows-7/
http://www.windows-noob.com/forums/index.php?/topic/1170-deploy-windows-7/
http://www.windows-noob.com/forums/index.php?/topic/1171-deploy-windows-7/

SCCM을 통한 응용 프로그램 배포
http://www.windows-noob.com/forums/index.php?/topic/499-how-can-i-deploy-an-application-in-sccm-2007-sp1/

특정 AD 그룹에 응용 프로그램 배포
http://www.windows-noob.com/forums/index.php?/topic/892-deploy-software-through-ad-groups-linked-to-collections-in-sccm/

:
Posted by 커널64