# Re: Ruby on Windows questions

**URL:** <https://www.ruby-forum.com/t/re-ruby-on-windows-questions/66007>\
**Category:** Ruby\
**Created:** [August 22, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/re-ruby-on-windows-questions/66007 "2006-08-22T21:15:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [August 22, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/re-ruby-on-windows-questions/66007/1 "2006-08-22T21:15:36Z")

</div>

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

Either use sys-cpu (on the RAA) or use your own custom script using a  
combination of win32ole + wmi. See

> **[Technical documentation](https://learn.microsoft.com/en-us/docs/)**

wmi/win32\_processor.asp

> 1. 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%”.

Again, win32ole + wmi. I think you want

> **[Technical documentation](https://learn.microsoft.com/en-us/docs/)**

wmi/win32\_networkadapter.asp

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

No. See the ‘start’ command for launching background processes from the  
shell. Use services for everything else.

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

Same as #1 above?

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

Yes, a service would be best.

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

I’ve never tried it but I don’t see why not. There’s no real need,  
however, as you can install services on remote windows machines,  
assuming you have permissions. See win32-service.

> 1. 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).

Windows does events, not signals. Use Process.kill to stop a program.  
Preferably the Process.kill defined in win32-process.

> 1. Any known issues with DRb and Windows?

On that topic I cannot say.

Regards,

Dan

This communication is the property of Qwest and may contain confidential  
or  
privileged information. Unauthorized use of this communication is  
strictly  
prohibited and may be unlawful. If you have received this communication  
in error, please immediately notify the sender by reply e-mail and  
destroy  
all copies of the communication and any attachments.
