473,394 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to monitor Memory BUS in of computer in Java?

darksteel21
Hi All,

I want to ask for an idea on how to monitor the memory bus of a computer (windows and sun solaris platform) using JAVA technology. Does JAVA has the capability or a library for this?

Thanks,
Mark
Jan 25 '11 #1
13 2019
Oralloy
988 Expert 512MB
What are you trying to monitor?

Java, its self, is a virtual machine, completely hiding the underlieing system.

So, if you are going to do something with the lower level machine, you'll have to use JNI or JNA to drive "native" code, which in-turn interrogates the actual hardware.

Hope this helps.

Cheers!
Oralloy
Jan 26 '11 #2
I am trying to monitor a parallel port bus. Is there an available Java API/Library for this? what is JNA or JNI?
Do you have references on these?

Thanks,
Mark Tan
Jan 26 '11 #3
horace1
1,510 Expert 1GB
not sure what you mean by the "parallel port bus".
If you mean the PCs parallel port looks at the Java communications API
http://www.oracle.com/technetwork/ja...sp-141752.html
and
http://www.google.co.uk/url?sa=t&sou...3TDuzw&cad=rja
Jan 26 '11 #4
yeah...the PC's parallel ports..
i will try to study the links you provided...
Thanks!
Jan 26 '11 #5
Oralloy
988 Expert 512MB
Mark,

There are lots of libraries out there to use, if you look around.

JNA is Java Native Access
JNI is Java Native Interface

They are two different modules that interface with "native" code (.DLLs or .SOs).

Luck!
Oralloy
Jan 26 '11 #6
Oh i see.. i guess i have to research more...
thanks a lot!
Jan 27 '11 #7
Oralloy
988 Expert 512MB
Mark,

The links from horace1 are a starting point. unfortunately (and this is from my past, it may have changed) Sun dropped support of a port management class, because of the incompatabilities between platforms. Basically they were unable to build (and reasonably maintain) an I/O model that was consistent across platforms, as well as being useful.

So, you are out of luck as far as a Oracle/Sun supported package. Fortunately, there are a few shareware and commercial packages available. The trade-off is time spent versus cost of package. You have to make that call. A couple hundred dollars is cheap, compared to several days of your time.

Cheers!
Oralloy
Jan 27 '11 #8
Oralloy,

What shareware and commercial package would you recommend me? are these packages are for JAVA and good for any OS platforms?

Mark Tan
Jan 27 '11 #9
Oralloy
988 Expert 512MB
Mark,

As far as I know, none of the packages is particularly portable across O/S platforms.

This page will give you a general indication of the difficulties involved in Serial and Parallel I/O under Java.

The problem with "portable" packages is that most programmers are focused on one class of system or other. PC programmers are generally unconcerned with writing code for Linux systems, BEOS systems, or telephones.

So - what you need to do is understand your requirements - what platforms are you targeting with your application? What capabilities do you really need? What are you actually trying to accomplish?

Once you have your requirements, then you can start surveying the available packages. If you are lucky, there is a single package, which gives you everything you need on all systems. Unfortunately, I don't think you're going to find one for Serial-I/O or Parallel-I/O. If you can't find a single package, look for a set of packages that give you what you need on your various target platforms.

In the later case, you will have to write a meta-package that conditionally loads lower-level packages depending on the operating system it is running on. Essentially you will have to define your own abstract I/O system and then dispatch from it to the system you loaded.

Sorry I can't give you names of packages to solve your problems. I do not know what capabilities you need, or the systems you need your application to work on. However, THIS is a Yahoo search that might be a good starting point.

Good Luck!
Oralloy
Jan 27 '11 #10
oh..i see...
Thanks alot for sharing your ideas..
Jan 27 '11 #11
horace1
1,510 Expert 1GB
Portability across operating systems is certainly a problem. I have used the Java communications API on Windows platforms without any problems
http://www.oracle.com/technetwork/ja...sp-141752.html
Never tried it on Linux, tend to work in C or C++ then.
Can you tell us what you are trying to do with the parallel port? I gave up using serial or parallel ports to communicate with external devices some time back, now use USB, Bluetooth or TCP/IP over wired etherenet or WiFi
Jan 27 '11 #12
Thanks for that horace1, but here is my another question : is there a way on JAVA on making a data look up on PC's RAM?
Jan 28 '11 #13
horace1
1,510 Expert 1GB
don't know any way of doing this directly. Modern operating systems tend to stop programs looking outside their own address space and accessing hardware directly and Java is runningin its own virtual machine.
You could use the Java exec command
http://download.oracle.com/javase/1....g/Runtime.html
to run operating system programs to dump memory contents and by connecting streams to the program input and output send it commands and look at the output.
Jan 28 '11 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Patrick | last post by:
Hello all! I am porting an application from C++ to Java and have run into a problem using the DataInputStream reader object. The file I am trying to read in is anywhere from 20 to 60 MB and has a...
0
by: mjkahn | last post by:
I'm running IIS 5.0 under Windows 2000 Server. My ASP (VBscript) code instantiates and uses some objects implemented in custom-written Visual Basic 6 DLLs. (Thanks to a previous thread, we no...
5
by: SDS | last post by:
I am writing an ASP.NET application (in C#) that, as part of a particular response, populates a MemoryStream object with binary data that is being collected from a Process object's StandardOutput. ...
3
by: RD | last post by:
I have a VBV.NET application that runs on a timer to do a job at one hour intervals. Basically the sequence is as follows the timer event fires 1- the timer get turned off 2- the code then...
4
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over...
3
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". ...
0
by: aleu | last post by:
Hi guys, I am considering upgrading memory in my MS SQL server cluster from 8GB to 16GB on each cluster node. I was wondering, whether you could suggest how to measure the overall performance...
2
sangeeth
by: sangeeth | last post by:
python version 2.4.3 os - linux fc-4 I have a program which creates a lot of hashes and not make optimum use of memory.. I ran this program on a machine with below memory Mem: 9183196k...
3
by: James | last post by:
I realize the Garbage Collector does a lot of this for me, but I'm having trouble wrapping my head around something. We've been running into System.OutOfMemoryException on our production servers...
5
by: Remote_User | last post by:
Hi All, I am trying to check the memory usage for a process using C# (.NET 1.1). I found out several properties in the Process class that was useful. But, my question is after i tried that out and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.