About Me ·
At GROSSWEBER we practice what we preach. We offer trainings for modern software technologies like Behavior Driven Development, Clean Code and Git. Our staff is fluent in a variety of languages, including English.
In case you own a server that is located in your apartment or is hosted at a professional data center, you might find it interesting to know how the server's tasks and services affect the overall load. Load is what you pay for in regard to the hosting provider and it's desirable to have an eye on the server performance.
Of course you could RDP into the server and start up the task manager or the performance monitor. However, this will only give you an impression of the current load. Perfmon is able to record statistics of various performance counters, but downloading the logs and analyzing them locally is quite a hassle. Also, you will have to repeatedly download and analyze logs in order to get an impression how the counter values evolve over time.
What about a easy solution that leverages standards and renders nice graphs? I use MRTG by Tobi Oetiker to monitor some performance counters of the (two) servers I'm in charge of. MRTG, a mature and free addition to the administrator's toolbox, uses SNMP and is able to generate graphs and web sites. Needless to say that MRTG is not targeted to replace advanced approaches to server management like SMS or MOM.
In order to give you an impression what can be achieved with MRTG, take a look at the following screenshot of a web site. The aggregated graphs you see show the activity of our home server over the last 24 hours.
A click on any of daily graphs reveal a detailed view depicting the values of the selected counter up to over the last year. See how memory consumption steadily rises?
MRTG is also good for finding temporary problems with server services. If you monitor HTTP connections and find that they come to a grinding halt, chances are that the web server has been running into problems. Of course, an enterprise-ready server monitoring solution would have sent out a notification about the problem in this case.
As said above, MRTG uses SNMP to get its data. However, finding the right SNMP OIDs for the counters you're interested in can be a complicated task because of the hierarchical nature of OIDs. MRTG can also run custom scripts (Batch, WSH, PowerShell, …) to acquire counter data, so you could query WMI (thus, also Windows performance counters), custom log files or any other data source. In this respect, MRTG is pretty powerful.
Data points are stored in log files that virtually newer grow because old data will be coalesced over time. The files take up about 55 KB for each counter on the machine above. Of course, this results in less accuracy for data from weeks ago, but generating 10000-foot-level graphs from these values is perfectly okay.
One tenable drawback of MRTG is that it's only able to acquire data points in 5-minute intervals. To get a higher temporal resolution choose RRDtool by the same author along with any supported application.
In order to get you started with MRTG here are some useful links for installing MRTG on your server:
Set wmiService = GetObject("winmgmts:root\cimv2")
query = "SELECT AnonymousUsersPersec, NonAnonymousUsersPersec FROM Win32_PerfRawData_W3SVC_WebService WHERE Name='_Total'"
For Each data In wmiService.ExecQuery(query)
For Each property in data.Properties_
If property.Name = "AnonymousUsersPersec" Then
anonymous = property.Value
ElseIf property.Name = "NonAnonymousUsersPersec" Then
authenticated = property.Value
wmiService = null
WScript.Echo Date() & " " & Time()
Now Playing [?]: Koop – Koop Islands – Let's elope
a@href@title, blockquote@cite, em, strike, strong, sub, sup, u
Page rendered at Monday, May 25, 2015 7:18:12 PM (W. Europe Daylight Time, UTC+02:00)
newtelligence dasBlog 2.3.257.0
© Copyright 2015, admin
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in any way.