Închis

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

Aptitudini: Linux, Shell Script, Bash Scripting

Vezi mai multe: 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

Despre angajator:
( 1 părere ) Băilești, Romania

ID Proiect: #29457878

5 freelanceri licitează în medie 34$ pentru acest proiect

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.

%bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD în 1 zi
(27 recenzii)
4.4
(0 recenzii)
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 Mai multe

%bids___i_sum_sub_35%%project_currencyDetails_sign_sub_36% USD în 7 zile
(0 recenzii)
0.0
chriscar2

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

%bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD în 1 zi
(0 recenzii)
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 Mai multe

%bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD în 1 zi
(0 recenzii)
0.0