File size: 1,397 Bytes
3e626a5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#!/bin/bash
echo "Git Repository Transfer Monitor"
echo "=============================="
echo "Source: vast2:/home/x/adaptai/experiments/.git/"
echo "Destination: /data/adaptai/platform/aiml/experiments/.git/"
echo ""
# Check if rsync process is running
if ps aux | grep "rsync.*vast2" | grep -v grep > /dev/null; then
echo "โ
Transfer Status: ACTIVE"
echo "Process ID(s): $(ps aux | grep "rsync.*vast2" | grep -v grep | awk '{print $2}' | tr '\n' ' ')"
# Check destination directory size
if [ -d "/data/adaptai/platform/aiml/experiments/.git" ]; then
DEST_SIZE=$(du -sh "/data/adaptai/platform/aiml/experiments/.git" 2>/dev/null | awk '{print $1}')
echo "๐ Destination Size: ${DEST_SIZE:-0B}"
fi
echo ""
echo "To monitor real-time progress:"
echo " tail -f /tmp/rsync_output.log"
echo ""
echo "To check process status:"
echo " ps aux | grep rsync | grep vast2"
else
echo "โ Transfer Status: NOT RUNNING"
echo ""
echo "Check if transfer completed or failed:"
if [ -d "/data/adaptai/platform/aiml/experiments/.git" ]; then
echo "โ
Destination directory exists"
DEST_SIZE=$(du -sh "/data/adaptai/platform/aiml/experiments/.git" 2>/dev/null | awk '{print $1}')
echo "๐ Destination Size: ${DEST_SIZE:-0B}"
else
echo "โ Destination directory not found"
fi
fi |