It's your filer, you can let anyone run any command on it if you want. Only a few people have root access to our filers (and other critical servers).
Using an SNMP client, you can allow non-privileged users to get NetApp system information, from any host in a safe way.
"rsh" is completely insecure, has to be run from UID 0, and can only be run from your admin hosts.
Well, it doesn't need to be run from uid 0 from the admin host. I simply have a web interface on my admin host running as user nobody and any non-priviledged users that need this information can just browse the web page.
If you want to do it via snmp though, you really should be using the SNMP perl module. Here is an example of polling some interesting stats from the filer and inserting these into MySQL (a free SQL engine) to then later be graphed via PHP's GD interface.
#!/usr/local/bin/perl use SNMP 1.7; use DBI;
$ip = "xxx.xxx.xxx.xxx"; $SNMP::auto_init_mib=0; SNMP::setMib('/usr/local/lib/snmp/mibs/RFC1155-SMI.txt'); SNMP::setMib('/usr/local/lib/snmp/mibs/netapp.txt');
unless($drh = DBI->install_driver('mysql')) { die "Unable to load MySQL driver"; } unless($dbh = $drh->connect('xxx', 'nobody','')) { die "Unable to connect to xxx database on localhost"; }
$sess = new SNMP::Session(DestHost => $ip, Community => "xxxxxx", Version => 1); $var = new SNMP::Varbind(['cpuBusyTimePerCent','0','']); $busy = $sess->get($var); $ts=time(); $var = new SNMP::Varbind(['miscNetRcvdKB','0','']); $rcvd = $sess->get($var); $var = new SNMP::Varbind(['miscNetSentKB','0','']); $sent = $sess->get($var);
unless ($dbh->do("insert into netapp values ($ts,$busy,$rcvd,$sent)")) { die "Unable to insert Netapp data"; }
unless($dbh->disconnect()) { die "Unable to disconnect from database"; }
-Rasmus