on 05-26-2006 10:10 AM
HI,
I want to know the performence of the system(Like physical memory details,RAM size,Processor,O/S name,O/S version,Total Disk space,Free space).So tell me the way of getting them.
Regards,
kiran.
You can use this code for some of the things. For Memory related things you can use Runtime calls as already answered on a separate thread.
public class GetOpenProperties {
String[] propertyNames = {"file.separator",
"line.separator",
"path.separator",
"java.class.version",
"java.vendor",
"java.vendor.url",
"java.version",
"os.name",
"os.arch",
"os.version"};
final int numProperties = propertyNames.length;
public static void main(String args[]){
String value = null;
for (int i = 0; i < numProperties; i++) {
try {
value = System.getProperty(propertyNames<i>);
System.out.println(propertyNames<i>+ "=" + value);
} catch (Exception e) {
}
}
}
Regards,
ps: please do award points for useful answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
GOOD
GO LIKE THIS
START MENU->CONTROL PANEL->SYSTEM
THE SYSTEM SCREEN CONTAIN VARIOUS TABS AND YOU CAN SEE THE THE DETAILS RELATED TO THE SYSTEM.
THANKS
MRUTYUN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhogi,
You can use Properties getProperties() and api doc is here
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#getProperties()
Use Apache Java package freeSpace(String path)
Here you go the API link
http://jakarta.apache.org/commons/io/api-release/org/apache/commons/io/FileSystemUtils.html
Cheers
Jawahar Govindaraj
Ps: reward pts
Message was edited by: Jawahar Govindaraj
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.