SQL Server Performance

AutoAdd performance counters from log file?

Discussion in 'Performance Tuning for DBAs' started by Chappy, Jan 10, 2003.

  1. Chappy New Member

    If I open a performance log file, is there any way to automatically add the set of counters in the log, to the graph display. Its very tedious having to add them all back in manually.
    Thanks
  2. bradmcgehee New Member

    Yes. Once you have all the counters you want, you can save this as a file, and then reload the file anytime you want. How you do this is slightly different in Windows NT 4.0 and Windows 2000 Performance Monitors, but the theory is the same. For example, in Windows 2000, go to Console and select "Save As", and then give this file a name. When you restart Performance Monitor again, go to Console and then select "Open", and choose the file you want to open. You can have as many of these as you want.


    ------------------
    Brad M. McGehee
    Webmaster
    SQL-Server-Performance.Com
  3. Chappy New Member

    Cheers Brad.
    Ive tried saving the counter list in both TSV and HTM format, but when I select Open from right click menu (or Action menu), nothing happens.. no open dialog like Id expect. Do you know of a known issue with this ?
    The same happens on all my w2k machines at work.
  4. bradmcgehee New Member

    You should have a Console menu, and this is the one you want to use, not the Action menu. Have you tried this?


    ------------------
    Brad M. McGehee
    Webmaster
    SQL-Server-Performance.Com
  5. satya Moderator

    If you're using NT then you should select 'Save Chart Setting as...' which will save chart files with .PMC extension which can be called to capture those counters for PERMFON.

    Satya SKJ
  6. Chappy New Member

    I have no File menu that I can see. I have Action, View and Favorites. The Open on Action menu does nothing, as does the Open on the popup menu when I right click in the treeview. There is also a Console menu which has an Open option, but I think this is purely for opening new MMC snapins, and has no context to perfmon as such. Im very confused; everyone seems to have a different view to what Im getting <img src='/community/emoticons/emotion-6.gif' alt=':(' /><br /><br /><br />
  7. HarryArchibald New Member

    I was confused myself by this topic but I got there by trial and error.<br /> <br />Using 2000, I opened the ComputerManagement part of Administrative Tools. After selecting ComputerManagement-&gt;SystemTools-&gt<img src='/community/emoticons/emotion-4.gif' alt=';P' />erformance Logs and Alerts -&gt;Counter Logs, a right-click gives you the option of New Log Settings. Enter a name and at least one counter, then go to the Log Files tab and enter the file location and name. I save the file as a CSV file type from the Log File Type option. <br /><br />I start and stop this file every day.<br /><br />
  8. bradmcgehee New Member

    Chappy, so you don't have a Console drop-down menu at the top of the screen of Performance Monitor (This is where Save is located)? If you don't, this can mean one of two things. Perhaps you are not a local adminstrator of the server, or the MMC used for Performance Monitor is not set up correctly. If you go to a command prompt, and type mmc, a new mmc will be brought up. From here, you can add Performance Monitor to this mmc and save the mmc with whatever name you like, assuming you are an admin. This is not the easiest way, but once you do it, you will have access to the Console drop-down menu. HarryArchibald's option will also work.


    ------------------
    Brad M. McGehee
    Webmaster
    SQL-Server-Performance.Com
  9. Chappy New Member

    I do have a console menu, yes, but the problem is I dont appear to have the Open menu that you have (my problem is I want to auto-add counters based on whats present in a log file).

    I havent yet had time to try HarryArchibalds suggestion, if the MMC snapin appears differently by opening it via that route, then this might be useful. I will report back once Ive had time to test.
  10. sqljunkie New Member

    Chappy, I've only heard of this funcationlity under NT 4.0 PerfMon, which you can run in W2K. You can save PerfMon-MMC settings to open and view live perfmon counters, but I don't know of a way to do it from a saved perfmon log.
  11. Chappy New Member

    Ok thanks. This confirms the problems Ive been having.
    My problem probably doesnt warrant this big long thread, Im just being lazy by not wanting to manually readd the counters everytime, but it would have been nice, especially for logs which contain 20 or more counters.
    Cheers to all who helped.
  12. bradmcgehee New Member

    I save the performance monitor counters all the time in Windows 2000, as I have described above. I just checked on several different servers, and without any special work (even the work I described above) I am able to see the Open option under Console.


    ------------------
    Brad M. McGehee
    Webmaster
    SQL-Server-Performance.Com
  13. Chappy New Member

    I can see the Open option under Console menu, but the open dialog filter is for snap ins. I tried opening a log file, which it didnt like. I then tried to open saved counters (in both TSV and HTM format), and it really didnt like that (it complained and then my whole MMC snapin disappeared!)
  14. bradmcgehee New Member

    I just noticed that if you click on the ? mark (the ? next to the camera, not the very top ?) from Performance Monitor, you get a Help file. If you then go to "Create A Custom Console", you will see the steps I take to save and re-open counters. Maybe this will help.


    ------------------
    Brad M. McGehee
    Webmaster
    SQL-Server-Performance.Com

Share This Page