|
|
#!/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 "" |
|
|
|
|
|
|
|
|
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' ' ')" |
|
|
|
|
|
|
|
|
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 |