On my Solaris box I have to reboot some devices like below.
However I think this can be done through a script. I've create a list that contains the devices IP addresses.
Here's the logic:
Reboot 4 devices and sleep for 5mins(300s.) While the devices are rebooting, I would like to confirm that it was indeed reboot from the reboot log file that logs a single line: "found IPADDR."
After I've confirmed the devices have rebooted and the 300s expired I would like to continue with the next 4 IPs on the list and not start from the top of the list again.
I'm not sure how to implement the "SLEEP 1" for each device and "SLEEP 300" after the 4th device. In addition confirm from the reboot log after all 4 device have been reboot.
Unless i misread, I don't think bartus11's script will do what you want. Except for every 4th ip address, it checks for the ip address in the log after only giving the device 1 second to reboot. I think you'd need to store the currently rebooting 4 ip addresses in a string and then loop over them after the 5 minute sleep.
The following isn't tested, not even for syntax errors, but I believe it's more in line with what you're trying to accomplish:
That retooling of bartus11's script also exits if an ip is not found in the log. Perhaps it may be desirable to continue on; if so, remove the 'exit 1' line.
Also, you'll need to rotate or delete that log file after each run if you're always using the same ip addresses.
---------- Post updated at 05:05 AM ---------- Previous update was at 03:33 AM ----------
Bartus can I bother for one more change: How do I modify the script to continue after it confirms the reboot from the logfile? What's happening is that if the device doesn't log it's reboot in time the script exits, which is the logic of it anyway.
Im looking for 2 Files -> *.WAV and *.wav with
find . -name 'unavail.wav' -o -name 'unavail.WAV' I need to list the Folders that contains these 2 Files?
Thx in advance (13 Replies)
Hi,
I have the following script that looks for a certain file and then executes the start.sh file. How can i make this process to kick when the box reboots. Please advice
if ; then
/u01/Essbase/Oracle//Middleware/user_projects/epmsystem7/bin/start.sh;
rm... (8 Replies)
I'm a beginner in shell scripting and doing simple scripts for work requirement.
#!/bin/bash
for blade in `cat machines.txt`
do
rsh $blade 'reboot'
done
but when I try it with root password it's throwing error saying permission denied.We're using same root password for all... (3 Replies)
Hi everyone,
My current AIX OS level is "7100-01-06-1241"
and I am planning to upgrade it to " 7100-02-03 ".
Can i directly upgrade it to "7100-02-03" from 7100-01-06" ?
or first i need to upgrade the "7100-01-06" LPAR to TL 02 and then reboot and
then upgrade it to TL 02 SP03 ?
... (4 Replies)
Hi Guys,
I need to reboot one Server as the newly inserted disk is not getting detected in system , I have also confirmed with Sun Support and finally it was the reboot which was required after doing all troubleshooting stuff.
So I have disassembled the mirror and kept working disk's single... (3 Replies)
Hi guys
I am troubleshooting a script that informs me when a system has rebooted.
The script is placed in /etc/rc3.d folder under root.
The script is as follows:
. /opt/scripts/function.sh
PATH=/usr/bin
EMAIL_ADD=<email address> ... (2 Replies)
Hi all,
i have a script in /etc/init.d directory.
-rwxr-xr-x 1 root root 26 Mar 28 16:00 myscript
I need it to run when my linux reboots/startup. However is it not being executed. Do i need to put in in the rc.local directory? (1 Reply)
I have a script that archive files then delete.How do Its working fine,however,before I perform the delete operation,I want to verify that indeed the FILE is in the path of folder I want to archive.
For example,I have a path /A/B I want all files in B to be archived,the scripts lists all the... (5 Replies)