Skip to content

Commit

Permalink
script: Add replicable column to dcache service output
Browse files Browse the repository at this point in the history
Motivation:

With named queues it becomes possible to build replicable services in
dCache.

Modification:

Adds a replicable column to the dcache service output. This indicates whether
any given service is replicable. Currently no service is replicable. The log
column is moved to the dcache status command.

Result:

Added a replicable column to the `dcache services` output. Moved the log
column to the `dcache status` output.

Target: trunk
Require-notes: yes
Require-book: yes
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: https://rb.dcache.org/r/9225/
  • Loading branch information
gbehrmann committed May 4, 2016
1 parent 1ccea45 commit 77d28c1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions skel/bin/dcache
Expand Up @@ -384,15 +384,16 @@ case "$1" in
rc_0=0
rc_1=0
rc_3=0
printf "DOMAIN\tSTATUS\tPID\tUSER\n"
printf "DOMAIN\tSTATUS\tPID\tUSER\tLOG\n"
for domain in $(getProperty dcache.domains); do
count=$((${count}+1))
rc=0
status=$(printDetailedDomainStatus "$domain") || rc=$?
eval rc_$rc=$((rc_$rc+1))
pid=$(printJavaPid "$domain") || :
user=$(userForProcessOrDomain "$pid" "$domain") || :
printf "${domain}\t${status}\t${pid}\t${user}\n"
log=$(getProperty dcache.log.file "$domain")
printf "${domain}\t${status}\t${pid}\t${user}\t${log}\n"
done

# Derive common exit status
Expand All @@ -419,12 +420,16 @@ case "$1" in
shift
. ${lib}/utils.sh
(
printf "DOMAIN\tSERVICE\tCELL\tLOG\n"
printf "DOMAIN\tSERVICE\tCELL\tREPLICABLE\n"
for domain in $(getProperty dcache.domains); do
for cell in $(getProperty dcache.domain.cells "$domain"); do
service=$(getProperty dcache.domain.service "$domain" "$cell")
log=$(getProperty dcache.log.file "$domain" "$cell")
printf "${domain}\t${service}\t${cell}\t${log}\n"
if [ "$(getScopedProperty cell.replicable "$domain" "$cell")" = "true" ]; then
replicable=Yes
else
replicable=No
fi
printf "${domain}\t${service}\t${cell}\t${replicable:-true}\n"
done
done
) | column
Expand Down

0 comments on commit 77d28c1

Please sign in to comment.