Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Falcon Cluster Handler
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gerfried Krainz
Falcon Cluster Handler
Commits
1d08e576
Commit
1d08e576
authored
Apr 11, 2024
by
Gerfried Krainz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshot
parent
e9ade5a0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
3 deletions
+96
-3
printstats.sh
printstats.sh
+2
-0
recv.sh
recv.sh
+49
-0
rsync.log
rsync.log
+0
-0
run.sh
run.sh
+4
-1
script copy.sh
script copy.sh
+35
-0
script.sh
script.sh
+6
-2
No files found.
printstats.sh
View file @
1d08e576
...
...
@@ -9,6 +9,8 @@ for i in {01..10}; do
MEMFREE
=
$(
echo
-e
$MEMINFO
|
grep
-Po
'(?<=MemFree: )[0-9]{1,10}(?= kB)'
)
MEMAVAIL
=
$(
echo
-e
$MEMINFO
|
grep
-Po
'(?<=MemAvailable: )[0-9]{1,10}(?= kB)'
)
echo
-e
"
\t
TOAL|FREE|AVAIL
\t
(GB)
\t
$((
$MEMTOTAL
/
1000000
))
\t
$((
$MEMFREE
/
1000000
))
\t
$((
$MEMAVAIL
/
1000000
))
"
DISK
=
$(
ssh
-q
fc
$i
'df -H | grep sda3'
)
echo
-e
"
\t
$DISK
"
done
exit
0
\ No newline at end of file
recv.sh
0 → 100755
View file @
1d08e576
#!/bin/bash
HOME_DIR
=
"
\$
(pwd)"
REMOTE_REPO_NAME
=
"iqeval"
REMOTE_REPO_DIR
=
"
$HOME_DIR
/
$REMOTE_REPO_NAME
"
SCREEN_SESSION_NAME
=
"iqeval"
RSYNC_EXCLUDE_FILE
=
"rsync_excludes"
download_dir
()
{
RSYNC_FROM
=
$1
RSYNC_TO
=
$2
rsync
-e
'ssh -q'
-a
--no-links
--exclude-from
=
$RSYNC_EXCLUDE_FILE
$RSYNC_FROM
$RSYNC_TO
>
rsync.log
}
# declare -a paths=("/dev/shm/$SCREEN_SESSION_NAME/figures" "/dev/shm/$SCREEN_SESSION_NAME/.cachedir")
# declare -a paths=("~/iqeval/analysis/pdp/figures" "/dev/shm/$SCREEN_SESSION_NAME/.cachedir")
declare
-a
paths
=(
"/dev/shm/
$SCREEN_SESSION_NAME
/logf/"
)
for
i
in
{
01..10
}
;
do
printf
"FALCON
$i
| "
IS_FIN
=
$(
ssh
-q
fc
$i
"[ -f /dev/shm/
$SCREEN_SESSION_NAME
/.fin ] && echo 1"
)
if
[
-z
"
$IS_FIN
"
]
;
then
echo
"Not finished yet"
continue
else
echo
"Finished"
fi
for
REMOTE_DIR
in
"
${
paths
[@]
}
"
;
do
echo
-e
"
\t
Download dir
$REMOTE_DIR
"
IS_VALID_PATH
=
$(
ssh
-q
fc01
"[ -d
$REMOTE_DIR
] && echo 1"
)
if
[
!
-z
$IS_VALID_PATH
]
;
then
download_dir
fc
$i
:
$REMOTE_DIR
../logf/
fi
done
done
exit
0
\ No newline at end of file
rsync.log
0 → 100644
View file @
1d08e576
run.sh
View file @
1d08e576
...
...
@@ -30,7 +30,9 @@ for i in {01..10}; do
ssh
-q
fc
$i
"screen -S
$SCREEN_SESSION_NAME
-X quit"
>
/dev/null
# Generate script and upload it
script_template
"20230220 12-22-06"
"
\$
(for j in {0..17}; do printf
\"\$
((
\$
j + 18 * (
$i
-1)))
\"
; done)"
script_template
"20230221 18-12-12"
"
\$
(for j in {0..17}; do printf
\"\$
((
\$
j + 18 * (10#
$i
-1)))
\"
; done)"
# script_template "20230220 12-22-06" "\$(for j in {0..17}; do printf \"\$((\$j + 18 * (10#$i-1))) \" ; done)"
# script_template "20230328 12-18-41" "\$(for j in {0..17}; do printf \"\$((\$j + 18 * (10#$i-1))) \" ; done)"
# Upload script to Falcon server
scp
-q
$SCRIPT_TEMP_DIR
fc
$i
:/tmp
...
...
@@ -47,6 +49,7 @@ for i in {01..10}; do
else
printf
"session exists
\n
"
fi
sleep
20
done
...
...
script copy.sh
0 → 100755
View file @
1d08e576
#!/bin/bash
script_template
()
{
echo
-e
"#!/bin/bash
signal_handler () {
echo
\"
SCRIPT QUIT
\"
kill
\$
PID0
}
trap signal_handler SIGINT
wait_ctrl_c () {
echo
\"
Waiting for CTRL-C to quit ...
\"
while true; do sleep 5; done
}
source
$VENV_HOME_DIR
cd
$REMOTE_REPO_DIR
python3 main.py -p REFMEAS
\#
1 p0 -mid
\"
$1
\"
-sid
$2
-njobs 4 &
PID0 =
\$
!
wait
\$
PID0
python3 analysis/pdp/main.py -mid
\"
$1
\"
wait_ctrl_c
"
>
$SCRIPT_TEMP_DIR
chmod
+x
$SCRIPT_TEMP_DIR
}
script.sh
View file @
1d08e576
...
...
@@ -20,11 +20,15 @@ wait_ctrl_c () {
source
$VENV_HOME_DIR
cd
$REMOTE_REPO_DIR
python3 main.py -p REFMEAS
\#
1 p0 -mid
\"
$1
\"
-sid
$2
-njobs
4
&
PID0
=
\$
!
python3 main.py -p REFMEAS
\#
1 p0 -mid
\"
$1
\"
-sid
$2
-njobs
2
&
PID0
=
\$
!
wait
\$
PID0
#python3 analysis/pdp/main.py -mid
\"
$1
\"
touch /dev/shm/
$REMOTE_REPO_NAME
/.fin
wait_ctrl_c
"
>
$SCRIPT_TEMP_DIR
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment