• Post Reply Bookmark Topic Watch Topic
  • New Topic

CPU speed & Total memory  RSS feed

 
srini hello
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestions to get at following on unix/windows without using JNI
1) Total System memory(RAM)
2) CPU(s)information(Architecture, Speed)

Thanks
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2) make a cat /proc/cpuinfo at the commandline.
You may read this as a file.

1) is left as an excercise for the advanced programmer.
 
Mahadevan Gorti SS
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First for getting OS,OS-Version, Architecyure, JVM version, JVM vendor, use System.getProperties().

For getting physical memory info and processor extra details use OS specific
program and run that program via (Runtime.exec) and parse and get the required lines. Here are some commands that would be of use to you.



For windows NT(Also see 'typeperf' command, specified elsewhere in this forum)


For general Unix stuff


For solaris(for getting processort info, phy. memory,etc).


For Linux for getting Physical/swap memory)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!