Suljettu

Cloud machine bash script

Any body can give me suggestion, how to make the virtual system explicitly down/unreachable for 10 second in everyone minute so that I can fetch the appropriate logs (I am using a bash script)

Deliverables

#!/bin/bash

set -x

URL=[login to view URL]

while true; do

now=$(TZ=utc date -Iseconds)

#wget $URL -q -O /dev/null

nc -z -n -v [login to view URL] 9022 2>&1 > /dev/null

if [[ "$?" -eq "0" ]]

then

echo $now SUCCESS >> [login to view URL]

else

echo $now FAIL >> [login to view URL]

fi

echo "$(tail -60 [login to view URL])" > [login to view URL]

wc -l [login to view URL]

sleep 5

done

Taidot: Linux, Shell Script, Bash Scripting

Näytä lisää: best bash script, unix ftp bash script, mutt bash script, common bash script admin task, bash script set proxy, sendmail bash script, unit testing bash script, bash script website clicks, bash script query mysql database, bash script login webiste, file parsing bash script, parse using bash script find average, bash script check web page, script outlook text body, bash script find ftp folder existing, bash script date, bash script update date, formatting date bash script, bash script current date time

Tietoa työnantajasta:
( 1 arvostelu ) Băilești, Romania

Projektin tunnus: #29457878

5 freelanceria on tarjonnut keskimäärin $34 tähän työhön

JVMHost

Hi, If you can manage the VM and have access to host node and the VM filesystem is on LVM then you can use LVM snapshot and copy the logs without any downtime to the VM. I can script grabiing logs from snapshot.

$40 USD 1 päivässä
(27 arvostelua)
4.4
(0 arvostelua)
0.0
freaghill94

Hello there! I saw your post and I am more then certain that I would be a great fit for this job. I would need a copy of your Virtual Machine, or a documentation about what exactly you are trying to stop start and fe Lisää

$30 USD 7 päivässä
(0 arvostelua)
0.0
chriscar2

Hi there, It is possible to perform repetitive tasks with cron, see if it solves your problem: [login to view URL]

$30 USD 1 päivässä
(0 arvostelua)
0.0
osmancnr

bro you can use ping/nc command and while you can ping every 2-3 seconds and You can easily catch it when there is no response 2-3 times. if you can't I can help you for 3-4 dollars send me a message or reach me on my Lisää

$30 USD 1 päivässä
(0 arvostelua)
0.0