3 eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
4 if 0; # not running under some shell
16 use List
::MoreUtils qw
/ uniq /;
21 getopts
('',\
%opt) or pod2usage
(1);
23 my @servers = sort uniq
map "$_.sgn.cornell.edu",
34 for my $server (@servers) {
35 if( open my $w, "ssh $server w |" ) {
36 my $uptime = scalar <$w>;
37 my $header = scalar <$w>;
40 my ($user, $tty, $from, $logintime, $idle, $jcpu, $pcpu, $what ) = split;
41 unless( $idle =~ /days/ ) {
50 print "========== $server ==========\n";
51 print $uptime,$header,@recs;
54 warn "could not connect to $server\n";
63 person_activity.pl - ssh to a bunch of sgn servers and see what everybody is doing
79 Robert Buels, E<lt>rmb32@cornell.eduE<gt>
81 =head1 COPYRIGHT & LICENSE
83 Copyright 2009 The Boyce Thompson Institute for Plant Research
85 This program is free software; you can redistribute it and/or modify
86 it under the same terms as Perl itself.