Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 raspberry pis on my home network performing different tasks. sometimes, I'd like to see their cpu and disk usage on my mac, without needing to login via ssh.

is there a service (can this be done via syslog?) for debian that can broadcast this info, and any app for mac that can display it?

thanks!

share|improve this question
1  
You can execute commands via SSH. Couple this with use of SSH keys and you have a one line command run from the client + some output provided by the server. – Daniel Beck Feb 24 '13 at 13:39
    
i was looking for a nice GUI :-). or at least a set of ready scripts :-). Thaqnks anyway @DanielBeck – otmezger Feb 24 '13 at 15:43
    
Maybe panic.com/stattoo has a "show file contents" mode. There may also be dashboard widgets that do this. – Daniel Beck Feb 24 '13 at 16:06

I'd point you along the lines of Munin, but that's probably overkill for you. Instead, I'd suggest generating a ssh key-pair (if you do not have one already -- have a look in ~/.ssh/ for id_*.pub):

SSH way

You may monitor your Raspberry Pi's without typing a password every time by generating a ssh key pair and copying the public key to each of your Raspberries.

Generate SSH key

You may skip this step if you do have one already -- have a look in ~/.ssh/ for id_*.pub.

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/runejuhl/.ssh/id_rsa): <RETURN>
Enter passphrase (empty for no passphrase): <RETURN>
Enter same passphrase again: <RETURN>
Your identification has been saved in /home/runejuhl/.ssh/id_rsa.
Your public key has been saved in /home/runejuhl/.ssh/id_rsa.pub.
The key fingerprint is:
04:8c:46:96:5c:79:34:8c:88:cb:85:31:f6:98:9c:db runejuhl@libertad
The key's randomart image is:
+--[ RSA 2048]----+
|  +*o*o=o        |
| ooBB +.o.       |
| .=+.  ..        |
|  oo   .         |
|  . E   S        |
|                 |
|                 |
|                 |
|                 |
+-----------------+

Copy public key

Next step is to copy your public ssh key to your machines. For each of your Raspberries, execute the following:

ssh-copy-id hostname

E.g.:

ssh-copy-id reflexo.petardo.dk

Run commands

With your key copied, you have the ability to log in without typing a password. This enables you to quickly run commands on your machines:

ssh raspberry-1 htop

The above runs the command htop on raspberry-1. htop has a nice graphical interface, displaying CPU, RAM and swap usage by default, along with a top-like list of processes. Of course htop needs to be installed...

Munin

If you need something more long-lasting, I'd suggest you have a look at Munin. It's open source, works well and has plenty of monitoring scripts. The only thing needed besides Munin is a webserver -- I'd suggest nginx. Have a look at http://munin.readthedocs.org/en/latest/example/webserver/nginx.html for a guide on how to set up nginx with Munin.

share|improve this answer
    
Thanks. I already have ssh keys shared and can login via ssh and run top... I was looking for a software on my mac that can combine them together and display it on one window on my mac. thanks anyway for your effort! – otmezger Feb 25 '13 at 8:54
    
Yeah, I reread the question after answering, and I figured I might've misunderstood you. If you have long-running jobs, I'd still recommend you to take a look at Munin or similar software. It displays nice graphs which it by default updates every 5 minutes. – runejuhl Feb 25 '13 at 8:57
    
Thanks, I'll look at that! – otmezger Feb 25 '13 at 8:58

On your RPI install Webmin, then access your boxes via web interface: https:yourPI:10000

More about webmin: http://www.webmin.com/

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .