User Tools

Site Tools


uls:agents:win_tools:win_watch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uls:agents:win_tools:win_watch [2013-12-03 16:55]
uls [Info]
uls:agents:win_tools:win_watch [2014-12-16 15:04] (current)
uls
Line 16: Line 16:
 restarted. See also Performance Counter. restarted. See also Performance Counter.
  
 +-----
 ==== Configuration ==== ==== Configuration ====
  
Line 23: Line 23:
 in order of appearance: in order of appearance:
  
-<​file>​+<​file ​- win_watch.conf> 
 + 
 +
 +# win_watch.conf - configuration file for win_watch.ps1 
 +
 + 
 +# ------------------------------------------------------------------- 
 +#   Name of the ULS teststep where the script runtime information is found  
 IDENTIFIER = _win_watch IDENTIFIER = _win_watch
-  ​There may be more than one instance of win_watch running on the same  +   
-  ​computer. Use the IDENTIFIER to uniquely distinguish them. It is  +# ------------------------------------------------------------------- 
-  also the name of the teststep in ULS where the script runtime information is found.+# Where to place log files and files with intermediate results ​
  
 WORK_DIRECTORY = C:​\TEMP\WIN_TOOLS WORK_DIRECTORY = C:​\TEMP\WIN_TOOLS
-  That is the directory, where log files and work value files are placed. 
-  You MUST specify the full path! 
  
-ULS_SERVER = 10.1.2.3:​11975 
-  The win_watch script generates a value file in the ULS value file format. 
-  That must be transferred to the ULS-server. You must sepecify here the  
-  IP address and port of the ULS-server. 
  
-  If ULS_SERVER is not set or remarked, no value files will be transferred to ULS. +# ------------------------------------------------------------------- 
-  ​But ​the ULS value files are **always** placed in the ULS_DIRECTORY,​ regardless  +# Name and port of the ULS-Server ​
-  of whether they will be further processed or not.+
  
-ULS_DIRECTORY = C:\\TEMP\\ULS +ULS_SERVER = 10.1.2.3:​11976 
-  That is the directorywhere win_watch writes its ULS value files to.+   
 +# ------------------------------------------------------------------- 
 +# Directory, where to write the ULS value file  
 + 
 +ULS_DIRECTORY = C:​\TEMP\ULS 
 + 
 +# ------------------------------------------------------------------- 
 +# Enter the complete path to the send2uls.exe executable. 
 +# If not setnothing is transferred to ULS
 +# The files are always placed in the ULS_DIRECTORY. 
 + 
 +# SEND2ULS = C:​\ADMIN\WIN_TOOLS\send2uls.exe 
 +# for HTTPS connections use: 
 +SEND2ULS = C:​\ADMIN\WIN_TOOLS\send2uls.exe -S 
 + 
 + 
 +# ------------------------------------------------------------------- 
 +# The name of the server ​to be used in ULS  
 +# You only need to set this, if you have a cluster and  
 +# you want to use a clustername instead of the real 
 +# computername,​ which is the default.
  
-SEND2ULS ​C:​\\TEMP\\WIN_TOOLS\\send2uls.exe +# ULS_HOSTNAME ​=  
-  ​send2uls.exe is the W*ndows executable, which transfers all the ULS value files  +# ULS_HOSTNAME = WVXP3073B
-  from the ULS_DIRECTORY to the ULS-server. Enter the complete path to the  +
-  send2uls.exe executable. If not set, nothing is transferred to ULS. +
-  But the files are **always** placed in the ULS_DIRECTORY.+
  
-ULS_HOSTNAME =  +# ------------------------------------------------------------------
-  All gathered metrics are save on the ULS-server in relation to the  +# Section ​to be used in the ULS 
-  ​hostname of the current computer. If you want to use an alternate  +
-  ULS_HOSTNAME instead of the default computer name, you can define  +
-  it here. Remember that you have to define that computer name in the  +
-  ​ULS administration and define all possible IP addresses for that. +
-  A "​virtual"​ hostname may be useful in cluster environments. +
-  The entry is remarked by default.+
  
 ULS_SECTION = Windows ULS_SECTION = Windows
-  That expression is used as section in ULS. 
-  See the :​ref:​`uls_overview` for an explanation of what the section is. 
  
-NETWORK_DRIVES = { yes | no } 
-  All attached disk shares will be checked for size and usage. 
-  Local disks are always checked. There will be no error if no  
-  disk shares are present. 
  
-SERVICES ​yes | no } +# ------------------------------------------------------------------- 
-  All services ​will be checked for its state.+# OPTIONS 
 +
 +# ----- 
 +# OPTION_NETWORK_DRIVES ​= yes 
 +# Attached disk shares ​will be checked for size and usage. 
 +# Local disks are always checked.
  
-AUTO_SERVICES_RESTART ​{ no | yes +NETWORK_DRIVES ​= yes
-  Restart the services with start mode auto if they do not run.+
  
-NEVER_RESTART_SERVICES = <​service1>,​ <​service2>,​ <​se*ice5>​... +# ----- 
-  If AUTO_SERVICES_RESTART=yes is specified, ​you may exclude a list of  +# Set SERVICES=yes if you do want information or actions 
-  services ​(internal names!!! (Dienstname)) from being restarted +# concerning ​services. ​The default is NO.
-  Use the property / Eigenschaften to find the internal name of a service.+
  
-  Some services do have a start mode auto but terminate after some time or actions. +SERVICES ​= yes
-  Use show_services to generate a list of all available services +
-  on the current computer. +
-   +
-  You may use wildcards in the <​serviceX>,​ the comparison in the script +
-  is done by using "​-like"​. +
-   +
-SERVICE_INFOS_TO_ULS ​yes | no } +
-  If "​yes"​ all information about all services is sent to the ULS-server. +
-  If a service is restarted a notice is definitly sent to ULS.+
  
-SERVICE_ULS_TESTSTEP_FORMAT = __name__ (__displayname__) +# ----- 
-  ​Customize ​the formatting of the ULS teststep for services.+# Restart ​the automatic ​services ​if they do not run. 
 +# no (default) / yes
  
-  * __name__ ​       :the internal name of the service +AUTO_SERVICES_RESTART ​yes
-  * __displayname__ := the name of the service as shown in the service +
-                       list to the user in the W*ndows'​ gui (localized).+
  
-PERFxxx ​<​category>​ | <counter 1> [ <counter 2>, <counter 3>, ...]  [ | <​instance_filter>​ ] +# ----- 
-  ​Specify ​the categories, performance counters and, if applicable,  +# If AUTO_SERVICES_RESTART=yes is specifiedyou may exclude the list of  
-  the instance filters for the performance measurementsRun the  +# services (internal names!!! Dienstname) from being restarted.  
-  ​script perf_counter_categories.ps1 to generate ​an html file with all +# Use the property / Eigenschaften to find the internal name of a service
-  ​available ​performance categories and counters ​on the destination computer.+
 +# Some services do have a start mode auto but terminate after some time/​actions. 
 +
 +# Use show_services.ps1 to generate ​a list of all available ​services 
 +on the destination computer
 +
 +# You may use wildcards in the <​serviceX>,​ the comparison in the script 
 +# is done by using "​-like"​. 
 +
 +# NEVER_RESTART_SERVICES = <​service1>,​ <​service2>,​ <​se*ice5>​...
  
-  Currently supported counter types:+NEVER_RESTART_SERVICES = Browser,​clr_optimization*
  
-  * CountPerTimeInterval* +# ----- 
-  * NumberOfItems* +# There will always be data sent to the ULS if a service is restarted. ​ 
-  * RateOfCountsPerSecond* +# Set this option to "​yes",​ if you want to send all information about  
-  * Timer100Ns +# all services ​to the ULS.
-  * Timer100NsInverse +
-  * PERF_PRECISION_100NS_TIMER or 542573824  +
-    (although the correct usage was not clear to me) +
-  * PERF_COUNTER_100NS_QUEUELEN_TYPE or 5571840  +
-    (although ​the correct usage was not clear to me) +
-  * PERF_COUNTER_QUEUELEN_TYPE+
  
-  The <​instance_filter>​ is applied thru a "if $instance -like <​instance_filter>"​ comparison.+SERVICE_INFOS_TO_ULS = yes
  
-  The following settings are present by default:: 
  
-    PERF010 = Processor | % Idle Time% Processor Time% User Time% Privileged Time, Interrupts/​sec | _Total+# ------------------------------------------------------------------- 
 +# Performance Measurements 
 +
 +#  Specify the categoriesperformance counters andif applicable 
 +#  the instance filters for the performance measurements. Run the  
 +#  script perf_counter_categories.ps1 to generate an html file with all 
 +#  available performance categories and counters on the destination computer.
  
-    PERF020 = Network Interface | Bytes Received/​sec,​ Bytes Sent/sec+# Currently supported counter types: 
 +#    CountPerTimeInterval* 
 +#    NumberOfItems* 
 +#    RateOfCountsPerSecond* 
 +#    Timer100Ns 
 +#    Timer100NsInverse
  
-    ​PERF030 = Server | Files Open, Server Sessions, Errors System, Errors Access Permissions+# PERFxxx = <​category>​ | <counter 1> [ , <counter 2>, <counter 3>, ...]  [ | <​instance_filter>​ ] 
 +# The <​instance_filter>​ is applied thru a "if $instance -like <​instance_filter>"​ comparison. 
 +
 + 
 +PERF010 = Processor | % Idle Time, % Processor Time, % User Time, % Privileged Time, Interrupts/​sec | _Total 
 + 
 +PERF020 = Network Interface | Bytes Received/​sec,​ Bytes Sent/sec 
 + 
 +PERF030 = Server | Files Open, Server Sessions, Errors System, Errors Access Permissions 
 + 
 +PERF040 = LogicalDisk | Current Disk Queue Length, Disk Read Bytes/sec, Disk Write Bytes/sec 
 + 
 +# PERF042 = ... 
 +# PERF222 = ... 
 + 
 +# ------------------------------------------------------------------- 
 +# Formatting of teststep for ULS 
 + 
 +# Set up the format of the service teststeps in ULS 
 +# "​__name__ (__displayname__)"​ is the default.  
 +# __name__ ​       := the internal name of the service 
 +# __displayname__ := the name of the service as shown in the service 
 +#                    list to the user in the W*ndows'​ gui (localized). 
 + 
 +SERVICE_ULS_TESTSTEP_FORMAT = __name__ (__displayname__) 
 + 
 + 
 +# ------------------------------------------------------------------- 
 +# APACHE 
 +
 +# Monitor Apache Mod-Status and grep statistics like: 
 +# Total Accesses, Total kBytes, Uptime, ReqPerSec, BytesPerSec,​ 
 +# BytesPerReq,​ BusyWorkers,​ IdleWorkers 
 +
 +# Set APACHExx = <​section>​ | http://<​HOSTNAME>:<​PORT>/<​PAGE>​ 
 +# e.g. 
 +# APACHE09 = Apache [PROJECT] | http://​localhost:​80/​server-status?​auto 
 +
 +# Define as much as you like. 
 + 
 +# Set to "​yes"​ if used 
 +# APACHE_MOD-STATUS = yes 
 + 
 +# APACHE01 = Apache [VHOST1]|http://​localhost:​81/​server-status?​auto
  
-    PERF040 = LogicalDisk | Current Disk Queue Length, Disk Read Bytes/sec, Disk Write Bytes/sec 
 </​file>​ </​file>​
  
Line 136: Line 190:
 Check also the delivered win_watch.conf for more information. Check also the delivered win_watch.conf for more information.
  
 +-----
 ==== Usage ==== ==== Usage ====
  
Line 144: Line 198:
 need some privileges to access all operating system objects): need some privileges to access all operating system objects):
  
-<code winbatch>​+<code winbatch ​win_watch.bat>
 C:\> cd C:​\ADMIN\WIN_TOOLS\ C:\> cd C:​\ADMIN\WIN_TOOLS\
 C:​\ADMIN\WIN_TOOLS>​ win_watch.bat C:​\ADMIN\WIN_TOOLS>​ win_watch.bat
Line 153: Line 207:
 is "​C:​\TEMP\WIN_TOOLS"​. is "​C:​\TEMP\WIN_TOOLS"​.
  
 +-----
 === Regular Execution === === Regular Execution ===
  
Line 159: Line 213:
 (or whatever other name or path you have chosen). Have it executed e.g. every 10 mins. (or whatever other name or path you have chosen). Have it executed e.g. every 10 mins.
  
 +-----
 ==== Gathered Metrics ==== ==== Gathered Metrics ====
  
 +-----
 === Bootup === === Bootup ===
  
Line 177: Line 232:
 |} |}
  
 +-----
 === Disk === === Disk ===
  
Line 201: Line 256:
 |} |}
  
 +-----
  
 === eventlog === === eventlog ===
Line 207: Line 262:
 The eventlog is covered in [[uls:​agents:​win_tools:​win_eventlog]]. The eventlog is covered in [[uls:​agents:​win_tools:​win_eventlog]].
  
 +-----
  
 === Info === === Info ===
Line 234: Line 290:
 |} |}
  
 +-----
  
 === Page File === === Page File ===
Line 241: Line 298:
 uses the ':'​ as hierarchy separator in teststeps. uses the ':'​ as hierarchy separator in teststeps.
  
-size +^ teststep ^ description ^ 
-  The size of the page file+| size | The size of the page file | 
- +used The amount of used space in the page file | 
-used +%used The percentage of used space in the page file |
-  ​The amount of used space in the page file+
- +
-%used +
-  ​The percentage of used space in the page file.+
  
 +-----
  
 === Performance === === Performance ===
  
-A number of performance counters are already defined in ``win_watch.conf``+A number of performance counters are already defined in 'win_watch.conf'
-You can define additional performance counters, see `Performance Counter`_.+You can define additional performance counters, see also [[uls:​agents:​win_tools:​perf_counter_categories]].
  
-In the description below, you will find abbreviated descriptions of the  +In the description below, you will find abbreviated descriptions of the official W*ndows counter descriptions.
-official W*ndows counter descriptions.+
  
 == LogicalDisk == == LogicalDisk ==
Line 264: Line 317:
 Different disk drives are identified by its drive letter (like C:).  Different disk drives are identified by its drive letter (like C:). 
  
-Current Disk Queue Length +{| 
-  An instantaneous snapshot of the number of requests outstanding on the disk. +! teststep 
-  if there is a sustained load on the disk drive, this metric will probably be consistently high. +! description 
- +|- 
-Disk Read Bytes/sec +Current Disk Queue Length 
-  The rate at which bytes are transferred from the disk during read operations. +An instantaneous snapshot of the number of requests outstanding on the disk. 
- + if there is a sustained load on the disk drive, this metric will probably be consistently high. 
-Disk Write Bytes/sec +|- 
-  The rate at which bytes are transferred to the disk during write operations. +Disk Read Bytes/sec 
 +The rate at which bytes are transferred from the disk during read operations. 
 +|- 
 +Disk Write Bytes/sec 
 +The rate at which bytes are transferred to the disk during write operations. 
 +|}
  
 == Network Interface == == Network Interface ==
Line 281: Line 338:
 Several network interfaces are possible. Several network interfaces are possible.
  
-Bytes Received/​sec +{| 
-  The rate at which bytes are received over each network adapter, including framing characters. +! teststep 
- +! description 
-Bytes Sent/sec +|- 
-  The rate at which bytes are sent over each each network adapter, including framing characters. +Bytes Received/​sec 
 +The rate at which bytes are received over each network adapter, including framing characters. 
 +|- 
 +Bytes Sent/sec 
 +The rate at which bytes are sent over each each network adapter, including framing characters. 
 +|}
  
 == Processor == == Processor ==
Line 292: Line 353:
 Processor activity of each cpu or core and in total (_Total). Processor activity of each cpu or core and in total (_Total).
  
-% Idle Time +{| 
-  The percentage of time the processor is idle. +! teststep 
- +! description 
-% Privileged Time +|- 
-  The percentage of elapsed time that the process threads spent executing code in privileged mode. +% Idle Time 
- +The percentage of time the processor is idle. 
-% Processor Time +|- 
-  The percentage of elapsed time that the processor spends to execute a non-Idle thread. +% Privileged Time 
- +The percentage of elapsed time that the process threads spent executing code in privileged mode. 
-% User Time +|- 
-  The percentage of elapsed time the processor spends in the user mode. +% Processor Time 
- +The percentage of elapsed time that the processor spends to execute a non-Idle thread. 
-Interrupts/​sec +|- 
-  The average rate at which the processor received and serviced hardware interrupts. +% User Time 
 +The percentage of elapsed time the processor spends in the user mode. 
 +|- 
 +Interrupts/​sec 
 +The average rate at which the processor received and serviced hardware interrupts. 
 +|}
  
 == Server == == Server ==
Line 312: Line 377:
 Some Performance metrics concerning the communication between the local computer and the network. Some Performance metrics concerning the communication between the local computer and the network.
  
-Errors Access Permissions +{| 
-  The number of times opens on behalf of clients have failed with STATUS_ACCESS_DENIED.  +! teststep 
-  Can indicate whether somebody is randomly attempting to access files in hopes of getting ​ +! description 
-  ​at something that was not properly protected. +|- 
- +Errors Access Permissions 
-Errors System +The number of times opens on behalf of clients have failed with STATUS_ACCESS_DENIED.  
-  The number of times an internal Server Error was detected. ​ + Can indicate whether somebody is randomly attempting to access files in hopes of getting at something that was not properly protected. 
-  ​Unexpected errors usually indicate a problem with the Server. +|- 
- +Errors System 
-Files Open +The number of times an internal Server Error was detected. Unexpected errors usually indicate a problem with the Server. 
-  The number of files currently opened in the server. Indicates current server activity. +|- 
- +Files Open 
-Server Sessions +The number of files currently opened in the server. Indicates current server activity. 
-  The number of sessions currently active in the server. Indicates current server activity.+|- 
 +Server Sessions 
 +The number of sessions currently active in the server. Indicates current server activity. 
 +|}
  
 +-----
  
 === Physical Memory === === Physical Memory ===
Line 332: Line 401:
 Information about the physical memory of the computer. Information about the physical memory of the computer.
  
-size +^ teststep ^ description ^ 
-  Size of physical memory. +| size | Size of physical memory. ​| 
- +used Used space in the physical memory. ​| 
-used +free Free space in the physical memory. ​| 
-  ​Used space in the physical memory. +%used Percentage of used space in the physical memory.|
- +
-free +
-  ​Free space in the physical memory. +
- +
-%used +
-  ​Percentage of used space in the physical memory.+
  
 +-----
  
 === Services === === Services ===
Line 351: Line 415:
 automatically. Exceptions may be defined. automatically. Exceptions may be defined.
  
-start mode +{| 
-  Each service has a startup mode ("​automatic",​ "​manual"​ or "​disabled"​). +! teststep 
- +! description 
-state +|- 
-  The current status of the service ("​running",​ "​stopped",​ "​paused"​). +start mode 
- +Each service has a startup mode ("​automatic",​ "​manual"​ or "​disabled"​). 
-action +|- 
-  If a service has been restarted, because its start mode is "​automatic"​  +state 
-  and its state was not "​running",​ then the service is restarted and  +The current status of the service ("​running",​ "​stopped",​ "​paused"​). 
-  ​"​restarted"​ is sent as action.+|- 
 +action 
 +If a service has been restarted, because its start mode is "​automatic"​  
 + and its state was not "​running",​ then the service is restarted and "​restarted"​ is sent as action. 
 +|}
  
 +-----
  
 === Virtual Memory === === Virtual Memory ===
Line 368: Line 437:
 where data from RAM is moved to if physical memory gets low. where data from RAM is moved to if physical memory gets low.
  
-size +^ teststep ^ description ^ 
-  Size of virtual memory. +| size |  Size of virtual memory.| 
- +used  Used space in the virtual memory.| 
-used +free Free space in the virtual memory. ​| 
-  Used space in the virtual memory. +%used Percentage of used space in the virtual memory. ​|
- +
-free +
-  ​Free space in the virtual memory. +
- +
-%used +
-  ​Percentage of used space in the virtual memory.+
  
 +-----
  
 === _win_watch === === _win_watch ===
Line 385: Line 449:
 Meta information to the execution of the monitoring script. Meta information to the execution of the monitoring script.
 Note that the name may differ because it is configurable in the  Note that the name may differ because it is configurable in the 
-``win_watch.conf``.+'win_watch.conf'.
  
-message +{| 
-  Is "​OK"​ if there have been no errors during execution of the script. ​ +! teststep 
-  ​Else it will hold the error message(s). +! description 
- +|- 
-script name, version +message 
-  The name and version of the script. +Is "​OK"​ if there have been no errors during execution of the script. Else it will hold the error message(s). 
- +|- 
-runtime +script name, version 
-  The execution time of the script without transfer to ULS. +The name and version of the script. 
- +|- 
-start-stop +runtime 
-  The start and stop timing tuple of the execution time of the script.+The execution time of the script without transfer to ULS. 
 +|- 
 +start-stop 
 +The start and stop timing tuple of the execution time of the script. 
 +|}
  
 +-----
  
 === Restrictions === === Restrictions ===
Line 407: Line 476:
 about the counter categories which are not covered, please let me know. about the counter categories which are not covered, please let me know.
  
 +-----
uls/agents/win_tools/win_watch.1386086152.txt.gz · Last modified: 2014-12-16 14:08 (external edit)