Home
Profile
Private Messages
Usergroups
Memberlist
Search
FAQ
Log in
Register ![]() |
![]() |
Fragments A Collection of Statements, kinda |
Performance Monitoring |
Author | Message | ||||||
---|---|---|---|---|---|---|---|
martin Site Admin ![]() Joined: 19 Jan 2004 Posts: 455 Location: In the middle of Sweden |
![]() ![]() |
||||||
|
|||||||
![]() |
|||||||
crazylaz Guest |
![]() Thank you a lot for your job. I am really impresed about what I read. I have looked for it long time. Now... I'm going to check it. Regards |
||||||
![]() |
|||||||
mniklas Joined: 10 Jan 2006 Posts: 3 |
![]() Hello, Thanks for very good article. I have added monitoring to my Delphi 4 multithread server. There were some problems: D4 is little bit old, but one thing is very strange. In PerfCounters.pas there is TPerfCounter class with abstract method:
This method is overriden in TRawCounter and TDeltaCounter classes, but in both cases it tries to call base class SetValue() (inherited keyword) which is abstract:
D4 generates exception in such case. I have removed inherited keyword and now it works OK. Regards, Michal Niklas [/code] |
||||||
|
|||||||
![]() |
|||||||
mniklas Joined: 10 Jan 2006 Posts: 3 |
![]() Other problems: 1. It doesn't work on Win9x Solution: use some {$IFDEF } or change
to something like:
2. Problem when .dll is in directory with space in name, "c:\Program Files" is such directory. Then LoadPerfCounterTextStrings() fails: it gets 'xxx c:\Program Files\myapp\myapp.ini' parameter and uses 2nd parameter as file name. In this case it is 'c:\Program'. I have changed FileNameInModPath() to use ExtractShortPathName():
|
||||||
|
|||||||
![]() |
|||||||
martin Site Admin ![]() Joined: 19 Jan 2004 Posts: 455 Location: In the middle of Sweden |
![]() Michal, Thanks for sharing the fixes! I'll try to work them into the code later. PS: If you've got more, please don't hesitate to tell us. Thanks again! |
||||||
|
|||||||
![]() |
|||||||
mniklas Joined: 10 Jan 2006 Posts: 3 |
![]() I have also some observation on Shared Memory. My app is Windows Service and can by run with rights of "Local System Account" or chosen user. Performance Monitor on WinXP can see or cannot see my performance counter and it depends on user which is logged in Performance Monitor and view of PM (most common chart, counter logs, alerts). This looks different on Win2000: I cannot find user login dialog in Performance Monitor ![]() For my app I have added option to exchange information with Performance Monitor, but I have also added textual information that can be used by Web based monitoring tools like MRTG and Cacti. MRTG works fine on my Windows machine, while Kylix port of my app cooperate with Cacti. They produce nice charts for last day, week, month and year. They are very useful for admins, and I think it is simplier than Windows Performance Monitor. |
||||||
|
|||||||
![]() |
|||||||
All times are GMT + 1 Hour |
||
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum |