{"id":78,"date":"2009-05-20T14:59:53","date_gmt":"2009-05-20T14:59:53","guid":{"rendered":"http:\/\/nicholshayes.myzen.co.uk\/blog\/?p=78"},"modified":"2009-10-12T10:34:40","modified_gmt":"2009-10-12T10:34:40","slug":"monitoring-2003-server-new-project","status":"publish","type":"post","link":"http:\/\/nicholshayes.co.uk\/blog\/?p=78","title":{"rendered":"Monitoring 2003 server &#8211; new project"},"content":{"rendered":"<p>I&#8217;ve been thinking about creating a Rails app to help me monitor my main Windows 2003 server. Today, one of the logical drives on the server got close to running out of space, so I realised it was time to get that monitoring in place.<\/p>\n<p>One of the things that had delayed starting this project was deciding on a good way to gather the data. The solution was simple &#8211; use 2003&#8217;s in built performance monitor. <\/p>\n<p>A little play with the performance monitor showed me that it was easy to get the data into a CSV file, but I could not get it to send the data directly to a SQL database. However, a little googling got me to a <a href=\"http:\/\/blog.csdn.net\/grandtree\/archive\/2009\/04\/20\/4095006.aspx\">blog by one Hilary Cotter<\/a>. That gave me the key step I needed: use relog to transfer the csv file up to the SQL server. I am still not sure why this works but writing directly to SQL does not.<\/p>\n<p>I had a little fiddle with ODBC permissions, but finally got them to work using standard logins as Hilary suggests.<\/p>\n<p>The bit I was worried about was configuring the tables the data would go into. However, I should not have worried as the process generates the tables automatically.<\/p>\n<p>The performance counter properties allows a process to be triggered after the counter stops, so it was just a case of putting the relog command into a batch file and pointing the end process at that.<\/p>\n<p>I&#8217;ve currently set the counter to close after running for 20 minutes, and scheduled a task to:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">logman start counter_process_name<\/div><\/div>\n<p>at midday every day. Strangely you cannot use the performance tool&#8217;s own scheduling to configure regular event runs, and that is why I&#8217;d had to schedule a logman command to start the process at a given time each day.<\/p>\n<p>In a few days I should be able to assess if that&#8217;s giving me enough of a snapshot of data. With the data being regularly added to the database, it should be a fairly simple task to built a Rails app to display the data.<br \/>\n&#8212;&#8212;&#8211;<br \/>\nAn update: as of October 2009 this project hasn&#8217;t moved on. I may get back to it, but at the moment it looks like it will be one of those good ideas that doesn&#8217;t get acted upon. I have used the monitor data and having that has proved useful. Just at the moment purely as a manual tool with no automated monitoring.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been thinking about creating a Rails app to help me monitor my main Windows 2003 server. Today, one of the logical drives on the server got close to running out of space, so I realised it was time to &hellip; <a href=\"http:\/\/nicholshayes.co.uk\/blog\/?p=78\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/78"}],"collection":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":10,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":144,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions\/144"}],"wp:attachment":[{"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nicholshayes.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}