You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by chihi asma <ch...@yahoo.fr> on 2008/10/31 14:07:19 UTC

System Information

Hi Karl,

After installing Felix, I have to implement a bundle that informs about 
the RAM size of the system, its processor speed, network devices ...
there is any special functions?
I still a beginner on Java and OSGi.

Best Regrads

Asma




________________________________
De : Karl Pauls <ka...@gmail.com>
À : users@felix.apache.org
Envoyé le : Mardi, 28 Octobre 2008, 17h35mn 43s
Objet : Re: Re : Re : Felix on read-only filesystem

In the case of the felix.cache.dir it should be the path to the dir
_not_ a url i.e.:

java -Dfelix.cache.dir=/tmp/usb/sda1

should work.

regards,

Karl

On Tue, Oct 28, 2008 at 5:18 PM, chihi asma <ch...@yahoo.fr> wrote:
> Thanks karl for your quick reply.
> I tried this
> java -Dfelix.cache.dir=file:/tmp/usb/sda1  but it doesn't work should I change anything else?
>
> Best Regards
>
> Asma
>
>
>
>
> ________________________________
> De : Karl Pauls <ka...@gmail.com>
> À : users@felix.apache.org
> Envoyé le : Mardi, 28 Octobre 2008, 16h17mn 29s
> Objet : Re: Re : Felix on read-only filesystem
>
> You can use the following properties:
>
> felix.cache.dir - Sets the directory to be used by the bundle cache as
> its cache directory. The cache directory is where all profile
> directories are stored and a profile directory is where a set of
> installed bundles are stored. By default, the cache directory is
> .felix in the user's home directory. If this property is specified,
> then its value will be used as the cache directory instead of .felix.
> This directory will be created if it does not exist.
>
> felix.cache.profile - Sets the profile name that will be used to
> create a profile directory inside of the bundle cache directory. The
> created directory will contain all installed bundles associated with
> the profile.
>
> felix.cache.profiledir - Sets the directory to use as the profile
> directory for the bundle cache; by default the profile name is used to
> create a directory in the .felix bundle cache directory (more
> precisely ${felix.cache.dir}/${felix.cache.profile}). If the
> felix.cache.profiledir property is specified, then the cache directory
> and profile name properties are ignored since they are only used to
> calculate the profile directory. The specified value of the profile
> directory property is used directly as the directory to contain all
> cached bundles. This directory will be created if it does not exist.
>
> regards,
>
> Karl
>
> On Tue, Oct 28, 2008 at 3:53 PM, chihi asma <ch...@yahoo.fr> wrote:
>> Hi karl,
>>
>> I have the same problem expect that I can write on the usb disk.
>> So, how can I let felix create the cache on it (usb disk)?
>>
>> Best Regards,
>>
>> Asma
>>
>>
>>
>>
>> ________________________________
>> De : Karl Pauls <ka...@gmail.com>
>> À : users@felix.apache.org
>> Envoyé le : Lundi, 27 Octobre 2008, 18h39mn 34s
>> Objet : Re: Felix on read-only filesystem
>>
>> On Mon, Oct 27, 2008 at 6:07 PM, Paul <pa...@nosphere.org> wrote:
>>> Le Monday 27 October 2008 17:38:56 Karl Pauls, vous avez écrit :
>>>> well, could you write on the usb disk? You could install the bundles
>>>> by reference which will leave you with a very small amount of data in
>>>> the cache ...
>>>
>>> No I can't write on the usb disk itself.
>>
>> Ok, well, then the only thing left seems to be to have a look at
>> org/apache/felix/framework/cache/*.java (in the framework subproject)
>> and try to implement a cache that is in memory. Again, not all bundles
>> will work without a cache (i.e., file system access) but depending on
>> your project this might be the way to go. Furthermore, we would be
>> very interested in this implementation if you get it done :-)
>>
>> regards,
>>
>> Karl
>>
>>> Thanks a lot for your time Karl.
>>>
>>> Paul
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Karl Pauls
>> karlpauls@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


      

Re: System Information

Posted by Didier Donsez <di...@imag.fr>.
If you uses a Sun JVM 1.5 or 6.0,  the MXBean 
(com.sun.management.OperatingSystemMXBean)
with objectName java.lang:type=OperatingSystem
provides some monitoring information
Uses the jconsole to check that !
Kind regards
Didier

Martin Thelian wrote:

>Hi,
>
>if it's no problem for you to integrate native-libraries you could
>checkout jsysmon to "to access system monitoring information like CPU or
>Memory Usage" [1] or even use the java-dbus binding [2] to connect to
>the HAL Device Manager on linux.
>
>Regards,
>Martin
>
>[1] http://jsysmon.sourceforge.net/
>[2] http://www.freedesktop.org/wiki/Software/DBusBindings
>
>chihi asma schrieb:
>  
>
>>Hi Karl,
>>
>>After installing Felix, I have to implement a bundle that informs about 
>>the RAM size of the system, its processor speed, network devices ...
>>there is any special functions?
>>I still a beginner on Java and OSGi.
>>
>>Best Regrads
>>
>>Asma
>>  
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>For additional commands, e-mail: users-help@felix.apache.org
>
>
>  
>


-- 
--------------------------------------------------------------
Didier DONSEZ

Laboratoire LIG, Equipe ADELE
Universite Joseph Fourier
Bat. C, 220 rue de la Chimie, Domaine Universitaire
BP 53, 38041 Grenoble Cedex 9, France
Tel : +33 4 76 63 55 49           Fax : +33 4 76 63 55 50
GPS : lat 45°11'38.3"N, lon 05°46'14.7"E, alt 223m

mailto:Didier.Donsez@imag.fr
URL: http://membres-liglab.imag.fr/donsez
Map:http://membres-liglab.imag.fr/donsez/map/map.html
--------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: System Information

Posted by Martin Thelian <Ma...@gmx.at>.
Hi,

if it's no problem for you to integrate native-libraries you could
checkout jsysmon to "to access system monitoring information like CPU or
Memory Usage" [1] or even use the java-dbus binding [2] to connect to
the HAL Device Manager on linux.

Regards,
Martin

[1] http://jsysmon.sourceforge.net/
[2] http://www.freedesktop.org/wiki/Software/DBusBindings

chihi asma schrieb:
> Hi Karl,
>
> After installing Felix, I have to implement a bundle that informs about 
> the RAM size of the system, its processor speed, network devices ...
> there is any special functions?
> I still a beginner on Java and OSGi.
>
> Best Regrads
>
> Asma
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: System Information

Posted by Juan Lucas Dominguez Rubio <jl...@prodevelop.es>.
Hi, Asma.
 
I'm afraid most of that info is not available from a pure-Java application. You will probably need to write a method in C or C++ to get that data, and then access it from Java using JNI, or else, use some utility library that does that.
 
You could also execute some external command from your java application and read the output. A bit dodgy, though...
 
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaha/jvlngex1.htm
 
And another interesting message:
 
http://www.javaworld.com/javaforums/showflat.php?Cat=&Board=javabeginner&Number=13190&page=5&view=collapsed&sb=3&o=&fpart=1
 
Salut,
Lucas
 
________________________________

De: chihi asma [mailto:chihi_asma@yahoo.fr]
Enviado el: vie 31/10/2008 14:07
Para: users@felix.apache.org
Asunto: System Information



Hi Karl,

After installing Felix, I have to implement a bundle that informs about
the RAM size of the system, its processor speed, network devices ...
there is any special functions?
I still a beginner on Java and OSGi.

Best Regrads

Asma




________________________________
De : Karl Pauls <ka...@gmail.com>
À : users@felix.apache.org
Envoyé le : Mardi, 28 Octobre 2008, 17h35mn 43s
Objet : Re: Re : Re : Felix on read-only filesystem

In the case of the felix.cache.dir it should be the path to the dir
_not_ a url i.e.:

java -Dfelix.cache.dir=/tmp/usb/sda1

should work.

regards,

Karl

On Tue, Oct 28, 2008 at 5:18 PM, chihi asma <ch...@yahoo.fr> wrote:
> Thanks karl for your quick reply.
> I tried this
> java -Dfelix.cache.dir=file:/tmp/usb/sda1  but it doesn't work should I change anything else?
>
> Best Regards
>
> Asma
>
>
>
>
> ________________________________
> De : Karl Pauls <ka...@gmail.com>
> À : users@felix.apache.org
> Envoyé le : Mardi, 28 Octobre 2008, 16h17mn 29s
> Objet : Re: Re : Felix on read-only filesystem
>
> You can use the following properties:
>
> felix.cache.dir - Sets the directory to be used by the bundle cache as
> its cache directory. The cache directory is where all profile
> directories are stored and a profile directory is where a set of
> installed bundles are stored. By default, the cache directory is
> .felix in the user's home directory. If this property is specified,
> then its value will be used as the cache directory instead of .felix.
> This directory will be created if it does not exist.
>
> felix.cache.profile - Sets the profile name that will be used to
> create a profile directory inside of the bundle cache directory. The
> created directory will contain all installed bundles associated with
> the profile.
>
> felix.cache.profiledir - Sets the directory to use as the profile
> directory for the bundle cache; by default the profile name is used to
> create a directory in the .felix bundle cache directory (more
> precisely ${felix.cache.dir}/${felix.cache.profile}). If the
> felix.cache.profiledir property is specified, then the cache directory
> and profile name properties are ignored since they are only used to
> calculate the profile directory. The specified value of the profile
> directory property is used directly as the directory to contain all
> cached bundles. This directory will be created if it does not exist.
>
> regards,
>
> Karl
>
> On Tue, Oct 28, 2008 at 3:53 PM, chihi asma <ch...@yahoo.fr> wrote:
>> Hi karl,
>>
>> I have the same problem expect that I can write on the usb disk.
>> So, how can I let felix create the cache on it (usb disk)?
>>
>> Best Regards,
>>
>> Asma
>>
>>
>>
>>
>> ________________________________
>> De : Karl Pauls <ka...@gmail.com>
>> À : users@felix.apache.org
>> Envoyé le : Lundi, 27 Octobre 2008, 18h39mn 34s
>> Objet : Re: Felix on read-only filesystem
>>
>> On Mon, Oct 27, 2008 at 6:07 PM, Paul <pa...@nosphere.org> wrote:
>>> Le Monday 27 October 2008 17:38:56 Karl Pauls, vous avez écrit :
>>>> well, could you write on the usb disk? You could install the bundles
>>>> by reference which will leave you with a very small amount of data in
>>>> the cache ...
>>>
>>> No I can't write on the usb disk itself.
>>
>> Ok, well, then the only thing left seems to be to have a look at
>> org/apache/felix/framework/cache/*.java (in the framework subproject)
>> and try to implement a cache that is in memory. Again, not all bundles
>> will work without a cache (i.e., file system access) but depending on
>> your project this might be the way to go. Furthermore, we would be
>> very interested in this implementation if you get it done :-)
>>
>> regards,
>>
>> Karl
>>
>>> Thanks a lot for your time Karl.
>>>
>>> Paul
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Karl Pauls
>> karlpauls@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>



--
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org