• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CPU speed & Total memory

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic