VenMon - PC Monitoring Software
Re: VenMon - PC Monitoring Software
Hi Ventural.
I am using Win 7 Pro, classic theming, and 100% DPI settings. If you cant get to the bottom of it, I'll try to replicate it.
EDIT: To illustrate - https://www.dropbox.com/s/cupfst6zr9bx6 ... 1.png?dl=0 - seems to occur when toggling between floating window modes.
I am using Win 7 Pro, classic theming, and 100% DPI settings. If you cant get to the bottom of it, I'll try to replicate it.
EDIT: To illustrate - https://www.dropbox.com/s/cupfst6zr9bx6 ... 1.png?dl=0 - seems to occur when toggling between floating window modes.
Proud supporter of PB! * Musician * C64/6502 Freak
Re: VenMon - PC Monitoring Software
Nice program!
But I got two questions:
1. Where do I enable or change update intervall for processor load?
See picture #1. There is an update time (?) of 1090 seconds displayed,
but nothing happend after this time.
2. What is the meaning of read only text for "Optimization" in tab "Settings"?
See picture #2 (red arrow).
Is there any help file coming?
But I got two questions:
1. Where do I enable or change update intervall for processor load?
See picture #1. There is an update time (?) of 1090 seconds displayed,
but nothing happend after this time.
2. What is the meaning of read only text for "Optimization" in tab "Settings"?
See picture #2 (red arrow).
Is there any help file coming?
Re: VenMon - PC Monitoring Software
1090 seconds or 18.2 minutes is the length of each cpu graph. The more processor cores, the smaller the graphs will be and shorter the time period. Regardless of the time length, it should be updating the processor info every 2 to 3 seconds. It's very strange that the cpu field is completely blank in the mini-window because I have a backup routine that should have kicked in with basic info. I'll have to look into it more when I get a chance, maybe add some debug info that will appear on the screen if the load%, handle, threads, processes are all zero.Lord wrote: 1. Where do I enable or change update intervall for processor load?
See picture #1. There is an update time (?) of 1090 seconds displayed,
but nothing happend after this time.
It represents the total number of entries in each of the other dialog boxes. Not sure if I want to keep that little info box or disable it in the future. Numbers represent: Physical, Pagefile, CPU Speed, Battery %, Idle, Storage, Storage Monitor, Networks, Network Events, then a slash followed by the current limit. If the Extended box is checked in Optimizations, it jumps from 500 to 9999.Lord wrote: 2. What is the meaning of read only text for "Optimization" in tab "Settings"?
See picture #2 (red arrow).
Is there any help file coming?
Yes, have been working on the help file, but it's not ready as I keep making changes and additions to the program.
Re: VenMon - PC Monitoring Software
Should be fixed in the latest version (2.15), please try it out and make sure it works on your system when you have a chance. My work PC (Windows 7 Pro) was experiencing the same issues in both Aero and Classic themes, either missing or unaligned text after going back and forth between borderless and normal a few times.oreopa wrote:Hi Ventural.
I am using Win 7 Pro, classic theming, and 100% DPI settings. If you cant get to the bottom of it, I'll try to replicate it.
EDIT: To illustrate - https://www.dropbox.com/s/cupfst6zr9bx6 ... 1.png?dl=0 - seems to occur when toggling between floating window modes.
http://www.ventural.com/venmon
Re: VenMon - PC Monitoring Software
Ventural wrote:Should be fixed in the latest version (2.15), please try it out and make sure it works on your system when you have a chance. My work PC (Windows 7 Pro) was experiencing the same issues in both Aero and Classic themes, either missing or unaligned text after going back and forth between borderless and normal a few times.
http://www.ventural.com/venmon
Thanx Ventural. 2.15 fixes the issue.
I'm still experiencing problems with it not remembering the window position between runs.
Proud supporter of PB! * Musician * C64/6502 Freak
Re: VenMon - PC Monitoring Software
Updated to v2.16
http://www.ventural.com/venmon
--
Venmon 2.16 - Added: All graphs now display current values below title name.
Added: Option to remember window positions for Main and Mini with x,y locations shown in settings page.
Added: Program will switch to portable mode if cannot find Venmon.ini in the default folder and if not running from booted Windows drive.
Added: Storage Monitor will now display and save a log entry when it detects a partition size change.
Fixed: In event of lost or ejected drive, Storage Monitor will report last known Volume Serial instead of current 0000-0000.
http://www.ventural.com/venmon
--
Venmon 2.16 - Added: All graphs now display current values below title name.
Added: Option to remember window positions for Main and Mini with x,y locations shown in settings page.
Added: Program will switch to portable mode if cannot find Venmon.ini in the default folder and if not running from booted Windows drive.
Added: Storage Monitor will now display and save a log entry when it detects a partition size change.
Fixed: In event of lost or ejected drive, Storage Monitor will report last known Volume Serial instead of current 0000-0000.
Re: VenMon - PC Monitoring Software
Hi Ventural!
Still no fix for this: http://www.purebasic.fr/english/viewtop ... 6&start=16 ?Ventural wrote:Updated to v2.16
...
Fixed: In event of lost or ejected drive, Storage Monitor will report last known Volume Serial instead of current 0000-0000.
Re: VenMon - PC Monitoring Software
Nice tool !
Re: VenMon - PC Monitoring Software
Which OS are you using? Looks like Windows 7? My work PC is using Win7 and has an Core i5, screenshot: https://imgur.com/4DD9AAgLord wrote:Hi Ventural!
Still no fix for this: http://www.purebasic.fr/english/viewtop ... 6&start=16 ?
The cpu usage relies on Performance Data Helper (Pdh.dll), if that file is missing, disabled, or not running, the program will not be able to pull data for the processors. Not sure what you can do to fix this, quick google search and I found:
Re-register the file by opening Command Prompt with Administrator rights and run:
Code: Select all
regsvr32 C:\Windows\System32\pdh.dll
Code: Select all
sfc /scannow
Re: VenMon - PC Monitoring Software
Hi Ventural!
but 'RegSvr' showed this error:I think, this shows that 'phd.dll' is up and working or i'm wrong?
Is your system allover 64 bit?
I'm using Win7 Ultimate 64 SP1.Ventural wrote:..
Which OS are you using? Looks like Windows 7?
...
My CPU can be seen here:Ventural wrote:...
My work PC is using Win7 and has an Core i5, screenshot: https://imgur.com/4DD9AAg
...
A 'sfc /scannow' before and after a 'regsvr' didn't state any problems,Ventural wrote:...
The cpu usage relies on Performance Data Helper (Pdh.dll), if that file is missing, disabled, or not running, the program will not be able to pull data for the processors. Not sure what you can do to fix this, quick google search and I found:
Re-register the file by opening Command Prompt with Administrator rights and run:then try System file checker:Code: Select all
regsvr32 C:\Windows\System32\pdh.dll
Code: Select all
sfc /scannow
but 'RegSvr' showed this error:
[Window Title]
RegSvr32
[Content]
Das Modul C:\Windows\System32\pdh.dll wurde geladen, aber der DllRegisterServer-Eingangspunkt wurde nicht gefunden.
Stellen Sie sicher, dass C:\Windows\System32\pdh.dll eine gültige .DLL- oder .OCX-Datei ist, und wiederholen Sie den Vorgang.
[OK]
I made a quick test with this:Translation by deepl.com wrote:[Window title]
RegSvr32
[Content]
The module C:\Windows\System32\pdh.dll was loaded, but the DllRegisterServer input point was not found.
Make sure that C:\Windows\System32\pdh.dll is a valid.DLL or.OCX file and repeat the operation.
[OK]
Code: Select all
#phd_dll = 1
If OpenLibrary(1, "pdh.dll")
cnt1.i=CountLibraryFunctions(#phd_dll)
cnt2.i=0
If cnt1
If ExamineLibraryFunctions(#phd_dll)
While NextLibraryFunction()
*LFAddr=LibraryFunctionAddress()
LFName.s=LibraryFunctionName()
*FuncAddr=GetFunction(#phd_dll, LFName)
Debug Hex(*LFAddr)+#TAB$+LFName+#TAB$+" -> "+#TAB$+StringField("ERROR, OK", Bool(*LFAddr=*FuncAddr)+1, ",")
cnt2+1
Wend
If cnt1=cnt2
Debug "Entry count is the same"
Else
Debug "Entry count differs"
EndIf
*FuncAddr=GetFunction(#phd_dll, "PdhGetDllVersion")
Version.l=0
If *FuncAddr
If CallCFunctionFast(*FuncAddr, @Version)=#ERROR_SUCCESS
Debug "Returned version of 'pdh.dll': "+Version
Else
Debug "No Version"
EndIf
Else
Debug "No Version"
EndIf
EndIf
EndIf
CloseLibrary(#phd_dll)
Else
Debug "Couldn't open 'phd.dll'"
EndIf
Is your system allover 64 bit?
Re: VenMon - PC Monitoring Software
Cpu usage % test code using pdh.dll
Please try this everyone. I welcome any suggestions or improvements.
All credit should be given to Author: Ascend4nt. I simply translated it for Purebasic.
Edit: Code Updated, Memsize.l was reset to the length of last lookup which caused it to fail the 2nd attempt of PdhLookupPerfNameByIndex and my temporary workaround broke non-US computers. Oops.
Please try this everyone. I welcome any suggestions or improvements.
All credit should be given to Author: Ascend4nt. I simply translated it for Purebasic.
Edit: Code Updated, Memsize.l was reset to the length of last lookup which caused it to fail the 2nd attempt of PdhLookupPerfNameByIndex and my temporary workaround broke non-US computers. Oops.
Code: Select all
#PDH_NO_DATA = $A00007D5 ;For CPU Usage %
#PDH_INVALID_HANDLE = $E0000BBC ;For CPU Usage %
Prototype PdhLookupPerfNameByIndex(szMachineName.s, dwNameIndex.l, *szNameBuffer, *pcchNameBufferSize)
Global PdhLookupPerfNameByIndex.PdhLookupPerfNameByIndex, MemSize.l
Structure PDH_FMT_COUNTERVALUE ;For CPU Usage %
CStatus.l; As Long
; case Cardinal of
; 0: (longValue: Integer);
; 1: (doubleValue: Double);
; 2: (largeValue: Int64);
; 3: (AnsiStringValue: PChar);
; 4: (WideStringValue: PWideChar);
padding.l ; As Long
ulValueLow.l ; As Long
ulValueHigh.l ; As Long
EndStructure
Procedure.s PDH_CounterName(CoreNum.s = "_Total")
;Good Result for English: \Processor(0)\% Processor Time
Define *LPTSTR, Temp.s
MemSize.l = 1024 ;Global Variable
*LPTSTR = AllocateMemory(MemSize)
If *LPTSTR
If CoreNum.s = "-1"
CoreNum.s = "_Total"
EndIf
If PdhLookupPerfNameByIndex(#Null$, 238, *LPTSTR, @MemSize) = 0
Temp.s = "\" + PeekS(*LPTSTR, MemSize) + "(" + CoreNum.s + ")\"
;Debug PeekS(*LPTSTR, MemSize)
EndIf
EndIf
FreeMemory(*LPTSTR)
MemSize.l = 1024
*LPTSTR = AllocateMemory(MemSize)
If *LPTSTR
If PdhLookupPerfNameByIndex(#Null$, 6, *LPTSTR, @MemSize) = 0
Temp.s = Temp.s + PeekS(*LPTSTR, MemSize)
;Debug PeekS(*LPTSTR, MemSize)
EndIf
EndIf
FreeMemory(*LPTSTR)
Debug Temp.s
ProcedureReturn Temp.s
EndProcedure
#PerformanceLib = 88 ;Temp #
If OpenLibrary(#PerformanceLib, "pdh.dll")
CompilerIf #PB_Compiler_Unicode
PdhLookupPerfNameByIndex = GetFunction(#PerformanceLib, "PdhLookupPerfNameByIndexW")
CompilerElse
PdhLookupPerfNameByIndex = GetFunction(#PerformanceLib, "PdhLookupPerfNameByIndexA")
CompilerEndIf
EndIf
hQuery.l
hCounter.l
RESULT.q = PdhOpenQuery_( 0, 1, @hQuery )
If result = ERROR_SUCCESS
Debug Result
Debug hQuery
Debug "Good!"
Debug "------"
EndIf
NewList ProcessorUsage.l()
CpuCount.l = CountCPUs(#PB_System_CPUs)
For AddC.l = 0 To CpuCount - 1
RESULT = PdhAddCounter_(hQuery, PDH_CounterName(Str(Addc)), 0, @hCounter)
AddElement(ProcessorUsage())
ProcessorUsage() = hCounter
;If result = ERROR_SUCCESS
; Debug Result
; Debug hCounter
; Debug "Good!"
; Debug "------"
;EndIf
Next AddC
retcode.d
lpValue.PDH_FMT_COUNTERVALUE
RESULT = PdhCollectQueryData_(hQuery)
Delay(250)
Debug "--- Begin Tests ---"
For i=1 To 40 ;Test Loop, 40 times
RESULT = PdhCollectQueryData_(hQuery)
If result = ERROR_SUCCESS
Debug "Good Query! Run # " + Str(i)
ElseIf result = #PDH_INVALID_HANDLE
Debug "PDH_INVALID_HANDLE"
ElseIf result = #PDH_NO_DATA
Debug "#PDH_NO_DATA"
Else
Debug "Error "+Hex(Result)
EndIf
megaRetcode.d = 0
ForEach ProcessorUsage()
hCounter = ProcessorUsage()
PdhGetFormattedCounterValue_(hCounter, $200 | $8000, @dwType.l, @lpValue)
CopyMemory(@lpValue\ulValueLow, @retcode, 8)
Debug Str(Retcode) + "%"
megaRetcode + retcode
Next
Debug " = " + StrF(megaRetcode,1) + " / " + Str(CpuCount) + " = " + StrF(megaRetcode / CpuCount, 1) + "%"
Delay(5000)
Next
Last edited by Ventural on Thu Apr 26, 2018 12:36 am, edited 1 time in total.
Re: VenMon - PC Monitoring Software
The PDH.dll is language-sensitive! For the german-version replace in the procedure
with
Code: Select all
Temp.s + "% Processor Time"
Code: Select all
Temp.s + "Prozessorzeit (%)"
Re: VenMon - PC Monitoring Software
Returns always 0%.Ventural wrote:Cpu usage % test code using pdh.dll
Please try this everyone. I welcome any suggestions or improvements.
All credit should be given to Author: Ascend4nt. I simply translated it for Purebasic.
Code: Select all
...
Maybe Helle is right and you should compile a language-sensitive version?
(There are other languages in outer space than english )
Re: VenMon - PC Monitoring Software
Thank you Helle and Lord! I've updated the cpu usage code above, please test it.
What was happening was after using PdhLookupPerfNameByIndex the value of MemSize.l went from 1024 to 10. So, when I used PdhLookupPerfNameByIndex again, it failed with a blank result and I placed a temporary workaround of Temp.s + "% Processor Time" instead of actually fixing it.
What was happening was after using PdhLookupPerfNameByIndex the value of MemSize.l went from 1024 to 10. So, when I used PdhLookupPerfNameByIndex again, it failed with a blank result and I placed a temporary workaround of Temp.s + "% Processor Time" instead of actually fixing it.
Re: VenMon - PC Monitoring Software
Hm, nothing changed here. Still got CPU at 0%.
Maybe my CPU is that fast, that its load is below 1%?
Again:
Another thought: I got one CPU with 4 cores, so tab "Processors" should display "Core x" instead of "CPU x".
Or do I have 4 CPU and I didn't realized 'til now?
That would maybe explain the low CPU load?
(Just kidding, se my signature)
Maybe my CPU is that fast, that its load is below 1%?
Again:
Another thought: I got one CPU with 4 cores, so tab "Processors" should display "Core x" instead of "CPU x".
Or do I have 4 CPU and I didn't realized 'til now?
That would maybe explain the low CPU load?
(Just kidding, se my signature)