|
-
Sep 27th, 2005, 09:15 AM
#1
Thread Starter
Hyperactive Member
Displaying the health of the system.
Hey. I need some major help. All these guys in here like they are scared of a girl who is a programmer, and i'm not getting help. I have to display the health of the system as in:
CPU usage (already working)
cpu temperature
hard drive space
memory space
I've been trying to find tutorials on the last three, if someone knows any pages, please post them for me. Thank you very much - Jennifer
-
Sep 27th, 2005, 09:37 AM
#2
Fanatic Member
Re: Displaying the health of the system.
I don't know about temperature but see what you can get with the PosPower class.
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
-
Sep 27th, 2005, 11:11 AM
#3
Thread Starter
Hyperactive Member
Re: Displaying the health of the system.
Thanks. These methods seems like they could help me with what I have to do except I have a little problem. I hope this is not a stupid question but I will still ask. I was trying experimenting with some of the methods and it was not building since a namespace was missing. I tried using microsoft.PointOfService, but not sure how to create an assembly. But still not getting through. What am i doing wrong? I was experimenting with the StatusFanRunning.
-
Sep 27th, 2005, 11:13 AM
#4
Fanatic Member
Re: Displaying the health of the system.
To know if your question is stupid I would have to understand it, which I don't, fully. But you might have to add a reference to make it work
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
-
Sep 27th, 2005, 11:27 AM
#5
Fanatic Member
Re: Displaying the health of the system.
http://msdn.microsoft.com/library/de...f970c6414e.asp
This seems more complicated then I thought 
Better keep looking for another way I think.
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
-
Sep 27th, 2005, 11:21 PM
#6
Frenzied Member
Re: Displaying the health of the system.
All these guys in here like they are scared of a girl who is a programmer, and i'm not getting help.
What de heck is that suppose to mean?
This is not a man's world. I set in a office with nearly 500 developers/testers/etc, and half of them are female.
Am I male? Am I female? No one knows...I get help!
Maybe I should have made my name "DeafStranger", then use my *****ty hearing as an excuse to get help.
-
Sep 28th, 2005, 08:20 AM
#7
Fanatic Member
Re: Displaying the health of the system.
 Originally Posted by StrangerInBeijing
What de heck is that suppose to mean?
I took it as a joke 
RobDog888 has a VB.NET codebank submission that displays various info about the system.
http://www.vbforums.com/showthread.php?t=347552
Removed unnecessary comment. Hack
Edit: For the record: I disagree with this.
Last edited by grilkip; Oct 4th, 2005 at 03:31 PM.
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
-
Sep 28th, 2005, 08:45 AM
#8
Thread Starter
Hyperactive Member
Re: Displaying the health of the system.
Thank you for your help Grilkip. I've been trying to figure out the information from the first class that u gave to me. There's an assembly there called microsoft.pointofservice.dll. I'm using .net2003 but I'm not seeing it in the AddReference section. I think I have to download this assembly? Am I right? Boy, this is turning out to be harder than I thought!
And, At the moment, i'm not wearing a top on, sorry. http://www.vbforums.com/newreply.php...e=1&p=2184748#
Smilie
-
Sep 28th, 2005, 09:22 AM
#9
Fanatic Member
Re: Displaying the health of the system.
http://msdn.microsoft.com/library/de...tOfService.asp
With a closer look I see that it's actually a part of the whole mobile development thing.
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
-
Sep 29th, 2005, 08:28 AM
#10
Thread Starter
Hyperactive Member
Re: Displaying the health of the system.
So the question still remains. How do I display the:
CPU Temperature
Ram space
I already got the hard drive space to display. I know this is low level stuff so its not popular. GrilKip, I am exhausted trying to get the microsoft.pointofservice namespace to work. I just do not know what else to do. Does anyone else know what I could do to get the above to display? Please help me somebody
Jennifer
-
Sep 30th, 2005, 12:03 AM
#11
Re: Displaying the health of the system.
I'm not sure of a pure .NET way but you can use GlobalMemoryStatus() to find the RAM information.
Code:
using System.Runtime.InteropServices;
struct MEMORYSTATUS {
public int dwLength;
public int dwMemoryLoad;
public int dwTotalPhys;
public int dwAvailPhys;
public int dwTotalPageFile;
public int dwAvailPageFile;
public int dwTotalVirtual;
public int dwAvailVirtual;
}
// --------------
[DllImport("kernel32")]
private static extern void GlobalMemoryStatus (
ref MEMORYSTATUS lpBuffer
);
private void button1_Click (object sender, EventArgs e)
{
MEMORYSTATUS memstat = new MEMORYSTATUS();
memstat.dwLength = Marshal.SizeOf(memstat);
GlobalMemoryStatus(ref memstat);
MessageBox.Show("You have " +
(memstat.dwAvailPhys / 1048576) +
" MiB physical RAM free out of " +
(memstat.dwTotalPhys / 1048576) + ".");
}
-
Oct 4th, 2005, 07:41 AM
#12
Thread Starter
Hyperactive Member
Re: Displaying the health of the system.
Thanks Guys, and hugs to you penegate. I got the ram to work. Ther is one more and that is the cpu temperature. Is there a way to find out this? Grilkip helped me a lot with this but up to now I am still lost. Does anyone know how to display the cpu temperature? If so, or you know of any articles, please tell me. Thanks to you all especially u penegate. You're really intelligent.
Jennifer
-
Oct 4th, 2005, 08:12 AM
#13
Thread Starter
Hyperactive Member
Re: Displaying the health of the system.
Also. Does anyone know about the microsoft.PointofService namespace? Cause i'm not seeing that assembly on my system. How do I reference this?
-
Oct 4th, 2005, 09:47 AM
#14
Re: Displaying the health of the system.
All that POS stuff is for Windows XP Embedded. If you go to one of the help topics and look up the TOC tree you'll see that it's rooted in the Mobile and Embedded Development section. That's for POS equipment that uses Windows XP Embedded as its OS.
-
Oct 4th, 2005, 09:58 AM
#15
Thread Starter
Hyperactive Member
Re: Displaying the health of the system.
So the question still remains. how could I display the cpu temperature of my system?
-
Oct 6th, 2005, 03:21 AM
#16
Re: Displaying the health of the system.
Well I did some reading and it seems it is not a standard operation. Temperature sensors differ between mainboards and are generally an option (although present on pretty much all modern mainboards). Specialised utilities such as SiSoft Sandra or Motherboard Monito would have code to get temperature readings from a variety of chips.
Is this for a particular system, or a generalised solution? If it is the latter then I think you will have to decide which sensor chips you want to support. If it is the former then you need to know what mainboard it is for and what the sensor chip on that board is.
-
Oct 6th, 2005, 03:07 PM
#17
Lively Member
Re: Displaying the health of the system.
I often see lots of programs that will display computer information, including the Temp of various parts of the computer, However, all of these programs that I've seen do this rely fully on another program to run. The other program is Motherboard Monitor 5.
I've never worked with it for anything more than to display the temperature to me, so I don't know how to retrieve the values from the program, but I know it's gotta be pretty easy since a lot of other programs do it no problem.
-
Oct 7th, 2005, 07:39 AM
#18
Thread Starter
Hyperactive Member
Re: Displaying the health of the system.
The thing is that I have to construct a program to read the cpu temperature and I cannot assume what type of motherboard is being read from. I saw some code on the internet the other day, I forgot the url so here's the copied code:
using System;
namespace test
{
using System.Runtime.InteropServices;
class Class1
{
[DllImport("asus.dll")]
public static extern Int32 GetCPUTemperature();
[DllImport("asus.dll")]
public static extern Int32 GetMBTemperature();
static void Main(string[] args)
{
Int32 cpuTemp = GetCPUTemperature();
Console.WriteLine("CPU Temperature: {0}C/{1:F0}F", cpuTemp, Fahrenheit(cpuTemp));
Int32 mbTemp = GetMBTemperature();
Console.WriteLine("Motherboard Temperature:{0}C/{1:F0}F", mbTemp, Fahrenheit(mbTemp));
Console.Read();
}
static double Fahrenheit(Int32 temperature)
{
double dblTemp = (Convert.ToDouble(temperature)* 1.8) + 32.0;
return dblTemp;
}
}
}
But the thing with this code and most of the other pseudocode that I found on the internet is that it is specific to one type of motherboard, the above is specific to Anthlon. I have to find a way to read cpu temperatures from a huge system of computers that may have many different types of motherboards.
Now here's what. You could read the cpu temperature in the bios. Is there a way that I can access the bios? Tutorials on this whole topic area is almost non existant as far as my searches shows.
If I cannot get this out in a few days, I guess i will have to go deranged way and have a program read it for me. But right now, I want to have my program read it.
Jennifer
-
Oct 7th, 2005, 09:58 AM
#19
Re: Displaying the health of the system.
You could probably extract it from the BIOS, or failing that, individual sensor chips, but in any case it is a fairly low-level operation that C# is not capable of.
-
Oct 7th, 2005, 10:55 AM
#20
Thread Starter
Hyperactive Member
Re: Displaying the health of the system.
I realize that it's a very low level operation. I am at the moment doing some searching to see if I could get a dll or com file or something out there to do it for me and just read it in. When I get it out, I will post what I did.
Jennifer
-
Jul 7th, 2006, 02:10 AM
#21
New Member
Re: Displaying the health of the system.
hi yar,
my system is not have thing "microsoft.point of service.dll" can u provide a solution to this issue.....
-
Jul 7th, 2006, 02:12 AM
#22
Fanatic Member
Re: Displaying the health of the system.
I am sorry I even mentioned it, look at wat jmcilhinney said:
 Originally Posted by jmcilhinney
All that POS stuff is for Windows XP Embedded. If you go to one of the help topics and look up the TOC tree you'll see that it's rooted in the Mobile and Embedded Development section. That's for POS equipment that uses Windows XP Embedded as its OS.
"so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|