This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uls:agents:win_tools:win_watch [2014-12-16 14:15] uls [Services] |
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 directory, where win_watch writes its ULS value files to. | + | |
+ | # ------------------------------------------------------------------- | ||
+ | # Directory, where to write the ULS value file | ||
- | SEND2ULS = C:\\TEMP\\WIN_TOOLS\\send2uls.exe | + | ULS_DIRECTORY = C:\TEMP\ULS |
- | send2uls.exe is the W*ndows executable, which transfers all the ULS value files | + | |
- | 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 | + | # Enter the complete path to the send2uls.exe executable. |
- | hostname of the current computer. If you want to use an alternate | + | # If not set, nothing is transferred to ULS. |
- | ULS_HOSTNAME instead of the default computer name, you can define | + | # The files are always placed in the ULS_DIRECTORY. |
- | it here. Remember that you have to define that computer name in the | + | |
- | ULS administration and define all possible IP addresses for that. | + | # SEND2ULS = C:\ADMIN\WIN_TOOLS\send2uls.exe |
- | A "virtual" hostname may be useful in cluster environments. | + | # for HTTPS connections use: |
- | The entry is remarked by default. | + | 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. | ||
+ | |||
+ | # ULS_HOSTNAME = | ||
+ | # ULS_HOSTNAME = WVXP3073B | ||
+ | |||
+ | # ------------------------------------------------------------------- | ||
+ | # Section to be used in the ULS | ||
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 specified, you may exclude the list of |
- | the instance filters for the performance measurements. Run 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 |
+ | |||
+ | |||
+ | # ------------------------------------------------------------------- | ||
+ | # Performance Measurements | ||
+ | # | ||
+ | # Specify the categories, performance counters and, if 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. | ||
+ | |||
+ | # Currently supported counter types: | ||
+ | # CountPerTimeInterval* | ||
+ | # NumberOfItems* | ||
+ | # RateOfCountsPerSecond* | ||
+ | # Timer100Ns | ||
+ | # Timer100NsInverse | ||
+ | |||
+ | # 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__) | ||
- | The following settings are present by default:: | ||
- | PERF010 = Processor | % Idle Time, % Processor Time, % User Time, % Privileged Time, Interrupts/sec | _Total | + | # ------------------------------------------------------------------- |
+ | # 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. | ||
- | PERF020 = Network Interface | Bytes Received/sec, Bytes Sent/sec | + | # Set to "yes" if used |
+ | # APACHE_MOD-STATUS = yes | ||
- | PERF030 = Server | Files Open, Server Sessions, Errors System, Errors Access Permissions | + | # 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 246: | Line 303: | ||
| %used | The percentage 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 :TODO: 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 official W*ndows counter descriptions. | In the description below, you will find abbreviated descriptions of the official W*ndows counter descriptions. | ||
Line 337: | Line 395: | ||
|} | |} | ||
+ | ----- | ||
=== Physical Memory === | === Physical Memory === | ||
Line 348: | Line 407: | ||
| %used | Percentage of used space in the physical memory.| | | %used | Percentage of used space in the physical memory.| | ||
+ | ----- | ||
=== Services === | === Services === | ||
Line 369: | Line 429: | ||
and its state was not "running", then the service is restarted and "restarted" is sent as action. | and its state was not "running", then the service is restarted and "restarted" is sent as action. | ||
|} | |} | ||
+ | |||
+ | ----- | ||
=== Virtual Memory === | === Virtual Memory === | ||
Line 375: | 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 392: | 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 414: | 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. | ||
+ | ----- |