Jump to content
Sign in to follow this  
smbotans

Dashboard - Keep an eye under the hood of your pc!

Recommended Posts

smbotans

Hey all,

i just want to share with you what i have put together for my laptop and desktop ... i call it 'dashboard' as its function is similar to the car dashboard where there are lots of dials to inform you of what is going on under the hood eg. water temperature and so on

Dashboard will help you see if you have enough ram by seeing if your pc uses a large swapfile, it will enable you to see how heavy your cpu usage is, it will help you see how hard your hard disk is working and so on ...

Posted Image

Some things i should point out:

- the HARD DISK group has 2 coloured section: the top one is for HARD DISK READ and the bottom one is for HARD DISK WRITE

- when there is no activity from the hard disk, the colours displayed will be green ... if there is activity, red will be displayed

- my system has an IP of 127.0.0.1 when not logged in to the Internet ... so it makes it very easy for me to know when I am

- the INTERNET group will display the colour red when not logged in to the net and green when i am

- you can change the 'not connected IP' to whatever your value is

- the CPU group will have green displayed for cpu activity less than 80%

- between 80% and 90%, the colour will be yellow

- over 90% the colour will be red

- the BATTERY group is also colour coded

- green when it is charging

- red when it is discharging

BUT

for battery levels less than 20%

- black text on white background will be used with the full scale used

- white text on black background will be used with the full scale used also

- NO BATTERY will be displayed if you use it on a computer that has no battery eg. a desktop

- the script has only been tested under windows xp home edition and works fine on my laptop and desktop

- the script uses wmi and as such, i think, it will only work under xp and vista ... please correct me if i am wrong

Feel free to change its colours to suit your mood, to change the IP to suit your conditions, and so on...

I would love to add cpu and hard disk temperature to it but how???!!!???

There are times when i need to make it smaller and i have tried some ways of doing it but the coloured sections never move as they are supposed to ggrr!!!!!

If there are any errors in the code, please let me know.

Enjoy,

Serge

PS Many thanks to the folks whose scripts i needed to use to make it happen eg. the cpu and battery parts.

[edited] i have rearranged the order of the elements displayed so as to have the drives listed on the bottom + the drive section will now automatically add all hard disks and cd drives and removable drives connected BUT i need help with line 115 - i am unable to adjust the size of the window when more than 2 drives are listed ... any help would be greatly appreciated :)

New Version

The new version contains the following changes (hope i remember them all):

- fixed the memory leak

- added a INI file so that you can have some more control over some settings. Have a look at it and you will see what settings are available to change and what format they use,

- added a shortcut CTRL-SHIFT-1 to cycle through decreasing levels of transparency. The number of cycles is set in the INI file,

- added a shortcut CTRL-SHIFT-2 to enable you to have a popup displaying the date and time in countries/cities of your choice. You will need to access the INI file to see how to setup your own choice of countries and cities. The popup uses a 'code' for the day to save room: = means the same day as your today, means yesterday and + means tomorrow. You may have to think about this for a little bit to get it,

- i have no control over the CPU going over 100% as i am using the code that someone else wrote. What i did do is make it show 100% if it does go over 100%,

- added the drive code suggested my emiel, let me know how it works out,

- total and free drive space now only uses 3 digits (no matter how big it is, up to 999Gb). This should solve the problem of line return when too many numbers are listed,

- gui automatically adjusts (within reason) to accommodate the number of drives,

- added emiel's code for network drives. As i don't have any networks, let me know if it works ok or not.

I am mindful of the requests of others: temperature, fan speeds, network traffic, and so on ... Some features I cannot add as i don't know how (eg. temp and fan speeds), others i have no way of testing as i do not run a network.

I think that's all for now. The new files are DASHBOARD_CODE.ZIP and DASHBOARD_RUN.ZIP below.

Serge

Edit: I have now fixed the worldtime feature, and have added the option to use public or private ip via the ini file.

Dashboard.au3

dashboard_code.zip

dashboard_run.zip

Edited by Jon

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
JustinReno

I get an error after a couple of seconds:

C:\Documents and Settings\Jar\Desktop\Dashboard.au3 (279) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: 
$aProcess[$iPID][4] = $objItem.PercentProcessorTime 
^ ERROR

I looked at the source, couldn't figure out the problem, but the program looks fantastic!

Edited by JustinReno

Share this post


Link to post
Share on other sites
smbotans

I get an error after a couple of seconds:

C:\Documents and Settings\Jar\Desktop\Dashboard.au3 (279) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: 
$aProcess[$iPID][4] = $objItem.PercentProcessorTime 
^ ERROR

I looked at the source, couldn't figure out the problem, but the program looks fantastic!

hey justin,

not sure what the problem is ... it works fine on my laptop and desktop both running windows xp home edition

perhaps those of us who know more about the code i have used from others' contributions can help

sorry :)

serge

Edited by smbotans

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
JustinReno

Its Ok! :)

I have the same OS, Windows XP Home Edition.

And yeah, maybe some one could help us.

And I was looking at your script, it was nice, organized, and I got a quick glimpse of what the program looked like on my computer, it looked great! ;)

Share this post


Link to post
Share on other sites
gseller

Works great on my winxp Media Edition..

Share this post


Link to post
Share on other sites
Achilles

Really nice work! I think there might be a problem with the CPU part though. I compared it with what my task manager was showing and yours was generally 20% higher. Also, your script uses around 10% CPU usage on average too... kind of high for something that just stays open like that.

I would suggest using TrayOnEventMode(). Also using AdLibEnable might help get some of the stuff out of the main loop. For things like the battery and hardrive space maybe you should only update those every two seconds or something... you could use a timer for that.


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites
cornholio5256

Hi,

I like your script so far, though Ive removed the Battery Meter. I do have a couple suggestions though, first of all, support for 2 or more hard drives would be nice (D:/ in my case) and also, you should try to add support for fan monitors and heat monitors, if you can, i know you said you dont know how, but it would be nice if you could maybe find someone that can.

Dylan

Share this post


Link to post
Share on other sites
DirtDBaK

nice idea really like it but its a cpu hog for me, dual core p4 3.0ghz~, and it was sitting at 11%-19%


[center][/center]

Share this post


Link to post
Share on other sites
sandman

Very cool... it would be great to add some effects to it... maybe some of these:

  • It could 'cling' to the taskbar
  • PNG-based GUI? w/transparency!
This could evolve into a greater project. :)

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites
JustinReno

OHHHHHHh, Now that I look at the source code, there was a exit line at the end! It workds fine now, except sometimes the cpu goes post its retangle when it turns red.

Share this post


Link to post
Share on other sites
smbotans

Really nice work! I think there might be a problem with the CPU part though. I compared it with what my task manager was showing and yours was generally 20% higher. Also, your script uses around 10% CPU usage on average too... kind of high for something that just stays open like that.

I would suggest using TrayOnEventMode(). Also using AdLibEnable might help get some of the stuff out of the main loop. For things like the battery and hardrive space maybe you should only update those every two seconds or something... you could use a timer for that.

i am a bit confused myself with the cpu ... if you use TASK MANAGER and look at SYSTEM IDLE PROCESS which presumably is the CPU idle time, it does not match with the CPU BAR GRAPH under PERFORMANCE ... i have temporarily changed the code to use SYSTEM IDLE WMI and it shows the cpu generally running slower ... which is correct?

[edit] i even used a WMI call to the processor for CPU LOAD and it returned zero for long periods of time ... if someone knows which is correct for cpu usage please let me know ... i don't know which one to use ... ggrr!!!

also, on my desktop, the new version of DASHBOARD shows it is using 2% cpu time but the older version on my laptop was between 3% and 7%

i am not sure how you got 20% ... did you get that figure from PROCESSES in TASK MANAGER?

[edited] i will take your suggestions under consideration once i learn how to do them although the HELP file recommends against AdLibEnable () for complex things

serge

Edited by smbotans

Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
smbotans

Hi,

I like your script so far, though Ive removed the Battery Meter. I do have a couple suggestions though, first of all, support for 2 or more hard drives would be nice (D:/ in my case) and also, you should try to add support for fan monitors and heat monitors, if you can, i know you said you dont know how, but it would be nice if you could maybe find someone that can.

Dylan

feel free to edit the code to suit your needs :)

the problem with extra drives is the extra real estate it will take up ... i would like to add automatic drive support and someone has kindly sent me the code to do this but automatic drive support means having to spend some time writing the code to automatically adjust the location of the groups, labels, graphics, ... ggrr!!! there is only so much time in a day :P

i did a search of the forum for temperature and did not find a definite idea of how to make it work ... i even tried WMI calls on my desktop and laptop using the built in TEMPERATUREPROBE and it returned nothing ... it must be able to be done ... on my laptop i have a program that tells me the hard disk temperature ... and on my desktop i have one that tells me temperature and fans

if anyone can help with this, it would be fantastic ;)

serge


Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
smbotans

nice idea really like it but its a cpu hog for me, dual core p4 3.0ghz~, and it was sitting at 11%-19%

see my previous answer about my own findings ... how did you ascertain the 11%-19%?

serge


Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
Achilles

see my previous answer about my own findings ... how did you ascertain the 11%-19%?

serge

I'm guessing he used the same thing I did... Task Manager. It shows the process usage of each individual process.

EDIT: And as a matter of interest where does the helpfile talk about TraySetOnEVent() not being good in complex situations? I looked but couldn't find it...

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites
smbotans

Very cool... it would be great to add some effects to it... maybe some of these:

  • It could 'cling' to the taskbar
  • PNG-based GUI? w/transparency!
This could evolve into a greater project. :)

i would like to be able to alter its size on screen as sometimes it is too big for the work i do ... i have tried resizing it but the graphics elements don't move ... i understand there is a problem with autoit at that level

i thought about transparency but have not had time to build it in

serge


Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
smbotans

OHHHHHHh, Now that I look at the source code, there was a exit line at the end! It workds fine now, except sometimes the cpu goes post its retangle when it turns red.

glad you have it working ... alter the size of the rectangle if you like ... it works fine for me so i am not sure what to suggest

serge


Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
smbotans

I'm guessing he used the same thing I did... Task Manager. It shows the process usage of each individual process.

EDIT: And as a matter of interest where does the helpfile talk about TraySetOnEVent() not being good in complex situations? I looked but couldn't find it...

you are of course quite right ... my mistake ... it should have been AdLibEnable ... i have edited my post accordingly

the quote from the help file

The adlib function should be kept simple as it is executed often and during this time the main script is paused. Also, the time parameter should be used carefully to avoid CPU load.

serge


Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
smbotans

hey all,

i have made some changes to accommodate extra drives but i need help with the resezing of the window ... see bottom of my initial post

thanks in advance

serge


Get a comprehensive SEO evaluation of web site.Discover the right keywords for your web site.Looking for affordable ebooks.Mental exercises to keep your mind active.

Share this post


Link to post
Share on other sites
JustinReno

You mentioned something about window transparency, why not just put WinSetTrans($GUI, "", 200)?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.