Getting CPU load from remote computers 
Author Message
 Getting CPU load from remote computers

Hi,
I would like to get information on cpu type, make and number of
processors, as well as get the cpu load
information by executing the  "uptime" command on various computers
on our network. All of these computers are intel PCs and are
running Redhat 6.2/7.1. All of them allow incoming rlogin,
ssh  and telnet connections.
I can do this for my localhost using CGI and Linux::Cpuinfo modules,
but don't have a clue how i can do this on remote computers.
Can someone give me an example?
thankyou
les


Mon, 23 Feb 2004 01:37:18 GMT  
 Getting CPU load from remote computers


Quote:
>I would like to get information on cpu type, make and number of
>processors, as well as get the cpu load
>information by executing the  "uptime" command on various computers
>on our network. All of these computers are intel PCs and are
>running Redhat 6.2/7.1. All of them allow incoming rlogin,
>ssh  and telnet connections.
>I can do this for my localhost using CGI and Linux::Cpuinfo modules,
>but don't have a clue how i can do this on remote computers.

Here's an example for a local system:

        $uptime = `uptime`;

And for a remote system:

        $uptime = `rsh -n remote-system-name uptime`;

Of course, you've got to set up your .rhosts files and all that so that
"rsh" works without a password, but that's a Unix/Linux question, not a
Perl one.  (You can also have passwordless authentication with "ssh" if
you want.)

  - Logan
--
"Our grandkids love that we get Roadrunner and digital cable."
(Adverti{*filter*}t for Time Warner cable TV and internet access, July 2001)



Mon, 23 Feb 2004 01:51:01 GMT  
 Getting CPU load from remote computers
In article

Quote:

> Hi,
> I would like to get information on cpu type, make and number of
> processors, as well as get the cpu load information by executing the
> "uptime" command on various computers on our network. All of these
> computers are intel PCs and are running Redhat 6.2/7.1. All of them
> allow incoming rlogin, ssh  and telnet connections.
> I can do this for my localhost using CGI and Linux::Cpuinfo modules, but
> don't have a clue how i can do this on remote computers. Can someone
> give me an example?
> thankyou
> les

If the rusers server is installed on each machine, all you have to do
is run "rup" from the rusers package. It performs a broadcast "ping"
to get all uptimes. It will run a lot faster than logging into each
machine.


Mon, 23 Feb 2004 05:37:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. getting file fro ma remote computer ?

2. AI Neural Network - predicting CPU load example

3. CPU, Memory, HD Load scripts

4. CPU, Memory, HD Load Prediction

5. Win32 CPU load question....

6. CPU load time for a message board

7. Oraperl ora_login for a remote computer.

8. Problems with Win32::AdminMisc::UserSetMiscAttributes on remote computers

9. Finding who's logged into remote computer

10. using TieRegistry to access remote computer

11. Accessing remote computers throught RSH

12. Help - NT Perl - copying from remote computer

 

 
Powered by phpBB® Forum Software