[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby on Windows questions

Joe Van Dyk

8/22/2006 6:17:00 PM

Gotta port some software to Windows... :-( I'm a Windows newbie.

Using Ruby on Windows (XP)....

1. How do I find out the CPU % (or some sort of a load indicator) of
the machine?

2. How do I find out how much of a given ethernet connection is being
used? (i.e. if it's a gigabit connection and 1Mbps are being used,
I'd like to get back "1%".

3. Starting programs into the background is done the same way as on
*nix, right?

4. How can I tell how much of a CPU a program is currently using?

5. How do I start a Ruby program at boot (a service)?

6. Can I use something like ruby2exe to package up my Ruby service?

7. Does Windows use signals? How can I tell a program that I've
started to stop (i.e. on *nix, I'd do it via SIGTERM or SIGKILL).

8. Any known issues with DRb and Windows?

Any help is greatly appreciated!

Joe

1 Answer

Joe Van Dyk

8/22/2006 6:49:00 PM

0

On 8/22/06, Joe Van Dyk <joevandyk@gmail.com> wrote:
> Gotta port some software to Windows... :-( I'm a Windows newbie.
>
> Using Ruby on Windows (XP)....
>
> 1. How do I find out the CPU % (or some sort of a load indicator) of
> the machine?
>
> 2. How do I find out how much of a given ethernet connection is being
> used? (i.e. if it's a gigabit connection and 1Mbps are being used,
> I'd like to get back "1%".
>
> 3. Starting programs into the background is done the same way as on
> *nix, right?
>
> 4. How can I tell how much of a CPU a program is currently using?
>
> 5. How do I start a Ruby program at boot (a service)?
>
> 6. Can I use something like ruby2exe to package up my Ruby service?
>
> 7. Does Windows use signals? How can I tell a program that I've
> started to stop (i.e. on *nix, I'd do it via SIGTERM or SIGKILL).
>
> 8. Any known issues with DRb and Windows?
>
> Any help is greatly appreciated!

Also, is there a Ruby idiom for how to properly do platform-specific stuff?

My first instinct is to have something like ("end"s omitted)

module OS_Services
module POSIX
module Linux
module 2.4
module 2.6
module BSD
module Solaris
module OSX
module Windows
end

And then query (somehow) what OS I'm on and including the appropriate modules.

Joe