Friday, August 26, 2011

using logman to start monitoring counters in perfmon

Create a batch file



logman start test

create a schedule task to run that batch file at system start up


http://technet.microsoft.com/en-us/library/cc755366(WS.10).aspx

To start daily collections with sample intervals, account names and passwords, type:

Logman start daily_perf_log -s \\%computer_name% -u admin "adminpassword"

To start manual data collections, type:

Logman start daily_perf_log

To stop data collections, type:

Logman stop daily_perf_log

To delete data collections, type:

Logman delete daily_perf_log

To display the status of collection queries, type the following commands:

Performance log

http://technet.microsoft.com/en-us/library/cc737657(WS.10).aspx

Monitoring performance from the command line
Updated: January 21, 2005

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Monitoring performance from the command line

In addition to using the Performance graphical interface, you can use the following command line utilities:

Logman manages and schedules performance counter and event trace log collections on local and remote systems.

Perfmon allows you to open a Performance console configured with the System Monitor ActiveX control and Performance Logs and Alerts Service.

Relog extracts performance counters from performance counter logs into other formats, such as text file (tab delimited), text file (comma delimited), binary-BIN, or SQL.

Tracerpt processes event trace logs or real-time data from instrumented event trace providers and allows you to generate trace analysis reports and CSV (comma-delimited) files for the events generated.

Typeperf writes performance counter data to the command window, or to a supported log file format.

Lodctr registers new Performance counter names and Explain text for a service or device driver, and saves and restores counter settings and Explain text.

Unlodctr removes Performance counter names and Explain text for a service or device driver from the system registry.

For more information about incorporating these Performance commands into your Windows Management Instrumentation (WMI), see "Part One: Operating System Performance" in the System Performance and Troubleshooting Guide, available at the Microsoft Windows Resource Kits Web site.

For information about other command-line utilities, see Command-line reference. For more information about manageability, see Management Strategies and Tools.

Monday, August 15, 2011

Tuesday, July 12, 2011

ssh snapshot netapp

Little script i pieced together to create a snapshot via batch file
Requirement
plink just google for putty ssh


@echo off

echo Note:
echo
echo This batch file will create a snapshot of volumes
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º º
echo ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º Created by Tony Unger 6/10/2011 º
echo º V1.0 Initial Release º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ

echo Enter Username:
set /p UserName=

echo Enter Password:
set /p PassWord=



rem ************************* boot_udfdax64db ******************************************************************************************

echo Creating boot_udfdax64db
REM boot_udfdax64db Snapshot

rem creates command to run
echo snap create boot_udfdax64db WedsSnapshot%date:~4,2%%date:~7,2%%date:~10,4%> commands\boot_udfdax64db.txt
rem use plink to ssh tunnel to netapp box and force snapshot
"exe\plink.exe" -ssh -pw %PassWord% -noagent -m commands/boot_udfdax64db.txt %UserName%@172.16.1.1



echo Creating app_udfdax64db
REM app_udfdax64db Snapshot
rem creates command to run
echo snap create app_udfdax64db WedsSnapshot%date:~4,2%%date:~7,2%%date:~10,4%> commands\app_udfdax64db.txt
rem use plink to ssh tunnel to netapp box and force snapshot
"exe\plink.exe" -ssh -pw %PassWord% -noagent -m commands/app_udfdax64db.txt %UserName%@172.16.1.1


rem end

echo Snapshots have completed!

echo Checking if snapshots where configured logs

rem looks to see if snapshot was created on filer
findstr /i "WedsSnapshot%date:~4,2%%date:~7,2%%date:~10,4%" "log\SnapShot_app_udfdax64db.txt"> NUL
if %ERRORLEVEL% EQU 0 (
@echo  app_server  snapshot found!
) else (
@echo Error: app_server NOT snapshot found
)


pause

Friday, July 9, 2010

Process Monitor - Error Primer

BUFFER OVERFLOW, BUFFER TO SMALL - Application is asking how much data there is

FAST IO DISALLOWED - Internal indicator that optimized I/O path is not available

END OF FILE - Application tried to access beyond the end of a file

NOT FOUND, PATH NOT FOUND, NAME NOT FOUND - Common in DLL PATH seraches , queries for optional functionality or settings

REPARSE - Symbolic link traversal - Virtualization

ACCESS DENIED - Often the source of problems

Wednesday, May 19, 2010

LUA Buglight 2.0

http://blogs.msdn.com/aaron_margosis/archive/2008/11/06/lua-buglight-2-0-second-preview.aspx

LUA Buglight is a utility that helps identify "LUA bugs" in applications -- application features that that fail as standard user but that work as administrator. I work on it in my spare time, so progress has been slow. Attached to this blog post is the second preview version of LUA Buglight 2.0.

Main changes since the previous preview:

Single executable: all the helper DLLs, EXEs, etc., are self-extracted to your temp folder when you run the program. No need to copy lots of files around.
For Vista: the helper program that requires elevation is now signed, so you get the nicer elevation prompt. The driver file for Vista is signed as well, so startup is much faster.
Explicit check for x86 -- sorry, the current version cannot be used on 64-bit versions of Windows.
Various bug fixes.
Some of the improvements of LUA Buglight 2.0 over 1.0:

Much better Vista support
Streamlined UI and improved flow
Identifies more bugs
On XP, not restricted to using a local admin account to create the "this-user-as-admin" context
On Vista, prompts for elevation just one time per session instead of for each test
Log file names autogenerated with timestamp in the name to avoid accidental overwrite of previous logs.
User options saved to the registry.

Friday, March 19, 2010

Alua - Asymmetric Logical unit access

- industry standard protocol that enables the communication of storage paths and path characteristics between an initiator port and a target port.

If your storage array is ALUA compliant (as NetApp arrays are) then you’re in luck because the vSphere NMP is, by default, ALUA aware.

To enable Aula the igroups must be changed on each controller in the cluster

igroup set "igroupname" alua yes

Install ESX host utilities from netapp and run
config_mpath -s -m -a netappcontroller:root:password -a netappcontroller:root:password

This will enable round robin.

Round robin will allow for proper load balancing mult pathing

esxcli nmp device list on each ESX host to ensure RR and Aula are working
http://now.netapp.com/NOW/knowledge/docs/ontap/rel732_vs/html/ontap/bsag/GUID-EB9DBAE9-1E88-4421-9D02-FD820589515D.html

Powershell: Microsoft Graph to add new roles to application registration

PowerShell Script Bulk add new roles to application registration in azure. Update $roles with ,Us...