obsolete remshell script - use ssh for security#!/sbin/sh # /disk/sa/rem/ # john meister # date: 00june23 # echo "=== script running: ===============" echo $0 echo "==== log file name: ==============" export LOG="$0__`/usr/bin/date +%y%b%d.%H%M`" echo $LOG echo "======= starting script ===========" >> $LOG date >> $LOG echo "==================" > $LOG export HOSTS=" wkstn1 wkstn2 wkstn3 wkstn4 wkstn5 wkstn6 wkstn7 wkstn8 wkstn9 wkstn10 wkstn11 wkstn12 wkstn14 wkstn15 " for x in $HOSTS do echo " ==============================" | tee -a $LOG # separate entries in log file echo $x | tee -a $LOG # identify each workstation in logfile echo "---------------------" # for clarity on screen remsh $x grep $x /etc/hosts | tee -a $LOG echo " ----------------- " | tee -a $LOG remsh $x w | tee -a $LOG # executes and logs uptime, load and users echo " ----------------- " | tee -a $LOG echo "var usage:" | tee -a $LOG remsh $x bdf /var | tee -a $LOG remsh $x rm /var/tmp/* remsh $x bdf /var | tee -a $LOG echo " ----------------- " | tee -a $LOG echo "tmp usage:" | tee -a $LOG remsh $x bdf /tmp | tee -a $LOG remsh $x rm /tmp/* remsh $x bdf /tmp | tee -a $LOG echo " ----------------- " | tee -a $LOG echo "lanscan:" | tee -a $LOG remsh $x /etc/lanscan | tee -a $LOG echo " ----------------- " | tee -a $LOG echo "memory:" | tee -a $LOG remsh $x /etc/dmesg | grep Physical | tee -a $LOG remsh $x /usr/bin/graphinfo | grep product | tee -a $LOG echo " ----------------- " | tee -a $LOG echo "disks:" | tee -a $LOG remsh $x /usr/sbin/ioscan -fn | grep disk | tee -a $LOG echo " ==============================" >> /disk/sa/rem/software-00july14 echo $x >> /disk/sa/rem/software-00july14 remsh $x /usr/sbin/swlist -l fileset -a state >> /disk/sa/rem/software-00july14 remsh $x /usr/sbin/swconfig \* remsh $x rm /sbin/root/sys.dt* done echo "==============================================================" >> $LOG echo " completed list, results found in $LOG " lp -dprinter $LOG |
The Art of Linux System Administration published by O'Reilly Media Study Guide for the LPIC-2 Certification Exams |
![]() Wagoneers FULL SIZE JEEPS JeepMeister "Jeep is America's -Enzo Ferrari MeisterTech Diesels + |
One Page Overview of Linux Commands click for an image of the 5 essential Linux commands An Intro to Linux |
at Midway Auto on SR9 in Snohomish, or at Northland Diesel in Bellingham, WA |