Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 29, 2011 12:02 PM by lamado
Dec 09, 2011 03:46 PM|LINK
well, long time I've been gone....but that basically means I haven't had any trouble.
until now, I'm working on a testing server, this system will be available only in a LAN (or, VPN actually (PPTP)), and for the others that work with it I want to show some basic system information on one page.
the information I want is the total physical processors, the total logical processors, total RAM (in MB), the logical Operating System name, and the machine name (NetBIOS).
so far I can find the NetBIOS name (System.Environment.MachineName), the total logical processors (System.Environment.ProcessorCount) and the exact OS version (System.Environment.OSVersion.ToString).
there are a few problems.
as far as code goes, I have this:
Dim netbios As String
Dim osver As String
Dim x64os As Boolean
Dim cpunum As String
netbios = System.Environment.MachineName()
osver = System.Environment.OSVersion.ToString()
cpunum = System.Environment.ProcessorCount()
x64os = System.Environment.Is64BitOperatingSystem()
Response.Write("Server: " + netbios + "<br>")
Response.Write("Operating System: " + osver)
If x64os = True Then
Response.Write("Processor Cores: " + cpunum + "<br>")
which gives this on my desktop:
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1 64-Bit
Processor Cores: 4
which is as expected, but the number of actual processors and the memory are missing, and not all team members know which kernel version each windows release has.
Ow, and before anyone give a warning in regards to security, if anyone who means harm gets to this page, there is a other more serious security issue.
Dec 15, 2011 12:19 PM|LINK
1. Have a look at this:
http://www.codeproject.com/KB/cs/System_Meter.aspx maybe you can find some guidance on finding the # of processors in there. However, I am curious, why do you want the number of processors rather than the number or cores? Most users are happy to know
the number of cores.
2. For this on I think you you are going to have to parse the string your self and format as needed.
3. Again, this will be a bit more work, but it would be a simple case statement keyed off of the version number.
4. Have a look at this sample :
Dec 29, 2011 12:02 PM|LINK
the .net library offers only limited resources when it comes to stuff like you mentioned, you will need to use a native/c++(win32 dll's) code to get what you are looking for