source: trunk/DataCheck/Sourcefile.sh@ 19203

Last change on this file since 19203 was 19198, checked in by Daniela Dorner, 6 years ago
fixed bug in joins, simplified mysql-setup
  • Property svn:executable set to *
File size: 21.4 KB
Line 
1#!/bin/bash
2
3# to treat aliases in bash-script correctly
4shopt -s expand_aliases
5
6# check if script has been started with absolute path
7if ! dirname $0 | grep -E '^/' >/dev/null 2>&1
8then
9 echo "Please start your script with an absolute path."
10 exit
11fi
12
13if [ "$AUTOMATIONSETUP" = "" ]
14then
15 echo "Please set the environment variable \$AUTOMATIONSETUP."
16 exit
17fi
18
19if [ "$SOURCEFILEPATH" = "" ]
20then
21 export SOURCEFILEPATH=`dirname $0`
22fi
23if [ "$SCRIPTNAME" = "" ]
24then
25 SCRIPTNAME=`basename $0`
26fi
27
28source $SOURCEFILEPATH/../Setup/setup.$AUTOMATIONSETUP
29
30if [ "$mars" = "" ]
31then
32 echo "Please set the path for MARS."
33 exit
34fi
35
36datetime=`date +%F-%H-%M-%S`
37
38if [ "$transferdelay" = "" ]
39then
40 # setup where immediate report of problem is needed, i.e. mainly LP
41 checknight=`date +%Y%m%d --date="-19HOUR"`
42else
43 # any setup where transfer might cause a delay in arrival of files
44 checknight=`date +%Y%m%d --date="-${transferdelay}day"`
45fi
46
47# function to make sure that a directory is made
48function makedir()
49{
50 if [ ! -d $@ ]
51 then
52 if [ "$processlog" = "" ] || [ "$logfile" = "" ]
53 then
54 mkdir -p $@
55 else
56 mkdir -pv $@
57 fi
58 if [ ! -d $@ ]
59 then
60 if ! [ "$processlog" = "" ]
61 then
62 echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] ERROR could not make dir "$@ >> $processlog
63 else
64 echo "could not make dir "$@
65 fi
66 if ls $lockfile >/dev/null 2>&1
67 then
68 rm -v $lockfile
69 fi
70 exit
71 fi
72 fi
73}
74
75# logging paths for runlogs and processlog
76runlogpath=$logpath/run/`date +%Y/%m/%d`
77processlogpath=$logpath/processlog
78makedir $runlogpath
79makedir $processlogpath
80processlog=$processlogpath/process`date +%F`.log
81
82makedir $lockpath
83
84
85# function to provide proper logging in a single logfile ($processlog)
86function printprocesslog
87{
88 makedir $processlogpath
89 echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] "$@ >> $processlog
90}
91
92# function to exit a script properly
93function finish()
94{
95 if ! [ "$lockfile" = "" ] && ls $lockfile >/dev/null 2>&1
96 then
97 printprocesslog "DEBUG " `rm -v $lockfile`
98 fi
99 printprocesslog "DEBUG finished "$SOURCEFILEPATH"/"$SCRIPTNAME
100 # fixme: handle different cases - sometimes exit of script is needed, sometimes only continue
101 exit
102}
103
104
105# set checkvalue to ok at the beginning of the scripts
106check="ok"
107
108# setup for jobmanager:
109# log files (can't be defined in script itself, as script can run longer
110# than one day
111jmerrorlog=$runlogpath/jobmanager-`whoami`-$HOSTNAME-$AUTOMATIONSETUP-`date +%F`-error.log
112jmscriptlog=$runlogpath/jobmanager-`whoami`-$HOSTNAME-$AUTOMATIONSETUP-`date +%F`.log
113
114# check if rc-files are available
115if ! ls $steps >/dev/null
116then
117 echo "Can't find steps.rc ($steps)"
118 finish
119fi
120if ! ls $sqlrc >/dev/null 2>&1 || [ "$sqlrc" = "" ]
121then
122 echo "Can't find sql.rc ($sqlrc)"
123 finish
124fi
125
126# resetting values for jobmanager
127pno=0
128totalpno=0
129running=0
130queued=0
131runningscript=0
132queuedscript=0
133stillinqueue=0
134
135
136# alias (we cannot check the beginning of the line due to
137# color codes in filldotraw.C)
138alias 'intgrep'='grep -E -o \\\("(int|Bool_t)"\\\)[0-9]+$ | grep -E -o [0-9]+'
139
140
141# in the following the functions, which are needed by several scripts, are
142# defined
143
144# function to check if a process is already locked
145# command line option can be used to execute something, e.g. 'continue'
146function checklock()
147{
148 if ! echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] "`uname -a` > $lockfile 2>/dev/null
149 then
150 if find $lockfile -amin -5
151 then
152 printprocesslog "INFO lockfile $lockfile exists"
153 else
154 printprocesslog "WARN lockfile $lockfile exists"
155 fi
156 $@
157 exit
158 else
159 printprocesslog "DEBUG created lockfile $lockfile"
160 fi
161}
162
163# print the current status values
164function printstatusvalues()
165{
166 echo "the current values are:"
167 echo " starttime=$starttime"
168 echo " stoptime=$stoptime"
169 echo " availtime=$availtime"
170 echo " returncode=$returncode"
171 echo "-- check: -$check-"
172 echo ""
173}
174
175# function to send a mysql query
176function sendquery()
177{
178 #getdbsetup
179 printprocesslog "DEBUG sendquery QUERY: "$query
180 val=`mysql --defaults-file=$sqlrc -s -e " $query " 2>&1`
181 checkmysql=`echo $?`
182 if [ $checkmysql -gt 0 ]
183 then
184 printprocesslog "ERROR could not query DB (program: $program, function sendquery, mysqlsetup $sqlrc) "
185 printprocesslog "MYSQLERROR [returncode: "$checkmysql"] "$val
186 error=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'`
187 # here possible reaction to mysql error
188 if [ $error -eq 1213 ] || [ $error -eq 1205 ]
189 then
190 #printprocesslog "WARN Deadlock found. Should resend query."
191 printprocesslog "DEBUG sendquery QUERY: [2nd try] "$query
192 val=`mysql --defaults-file=$sqlrc -s -e " $query " 2>&1`
193 checkmysql2=`echo $?`
194 if [ $checkmysql2 -gt 0 ]
195 then
196 printprocesslog "ERROR could not query DB (program: $program, function sendquery, mysqlsetup $sqlrc) [2nd try]"
197 printprocesslog "MYSQLERROR [returncode: "$checkmysql"] "$val" [2nd try]"
198 error2=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'`
199 val=
200 finish
201 else
202 if [ "$val" = "NULL" ]
203 then
204 val=
205 fi
206 echo $val
207 return 0
208 fi
209 fi
210 val=
211 finish
212 else
213 warning=`echo $val | grep -o -E 'mysql: \[Warning\]'`
214 if [ "$warning" != "" ]
215 then
216 printprocesslog "WARN possible problem to query DB (program: $program, function sendquery, mysqlsetup $sqlrc) "
217 printprocesslog "MYSQLWARN [returncode: "$checkmysql"] "$val
218 val=
219 finish
220 fi
221 fi
222 if [ "$val" = "NULL" ]
223 then
224 val=
225 fi
226 echo $val
227 return 0
228}
229
230# function to get information from the setupfile $steps
231function getfromsetup()
232{
233 grep $1"[.]"$2":" $steps | grep -v '#' | sed -e "s/$1[.]$2://"
234}
235
236# function to get the needed information from the dependencies-file steps.rc
237function getstepinfo()
238{
239 #getdbsetup
240 needs=( `getfromsetup $step "Needs"` )
241 noderestricted=`getfromsetup $step "NodeRestricted"`
242 prims=( `getfromsetup $step "Primaries"` )
243 maintable=`getfromsetup $step "MainTable" | sed -e "s/\ //g"`
244 sort=`getfromsetup $step "SortDirection" | sed -e "s/\ //g"`
245# echo " maintable: "$maintable
246# echo " needs: "${needs[@]}
247# echo " noderestricted: "$noderestricted
248# echo " prims: "${prims[@]}
249}
250
251# function to get the joins needed for the get/set status queries
252function getalljoins()
253{
254 # add table
255 query=$query" "$maintable"Status"
256 # add special join
257 query=$query" "`getfromsetup $maintable "SpecialJoin"`
258 # add join for step unless step is the same as maintable
259 if ! [ "$step" = "$maintable" ]
260 then
261 query=$query" LEFT JOIN "$step"Status USING("${prims[@]}") "
262 fi
263 # add joins for influences or needs
264 for otherstep in ${othersteps[@]}
265 do
266 #printprocesslog "DEBUG "$otherstep
267 if ! [ "$otherstep" = "$maintable" ]
268 then
269 # joins for needed steps
270 if [ "$1" = "get" ]
271 then
272 query=$query" LEFT JOIN "$otherstep"Status USING("`getfromsetup $otherstep "Primaries"`") "
273 fi
274 # joins for influenced steps
275 if [ "$1" = "set" ]
276 then
277 query=$query" "`getfromsetup $otherstep "SpecialJoin2"`
278 query=$query" LEFT JOIN "$otherstep"Status USING("`getfromsetup $otherstep "Primaries"`") "
279 fi
280 fi
281 done
282}
283
284# function to create the middle part of a query
285# which is identical for the functions getstatus() and gettodo()
286function getstatusquery()
287{
288 # add from which table the information is queried
289 query=$query" FROM "
290 othersteps=${needs[@]}
291 getalljoins "get"
292 # add condition
293 query=$query" WHERE "
294 # add condition for step, i.e. step is not yet done
295 query=$query" ISNULL("$step"Status.fStartTime) "
296 query=$query" AND ISNULL("$step"Status.fStopTime) "
297 query=$query" AND ISNULL("$step"Status.fAvailable) "
298 query=$query" AND ISNULL("$step"Status.fReturnCode) "
299 # add requirement for production host in case it is needed
300 if [ "$1 " != " " ]
301 then
302 query=$query" AND fProductionHostKEY=$2 "
303 fi
304 query=$query`getfromsetup $step "SpecialWhere"`
305 # add condition for needs, i.e. that step is done
306 for (( k=0 ; k < ${#needs[@]} ; k++ ))
307 do
308# if [ $k -eq 0 ]
309# then
310# query=$query" HAVING "
311# else
312 query=$query" AND "
313# fi
314# query=$query" COUNT(*)=COUNT(IF("
315 query=$query" NOT ISNULL("${needs[$k]}"Status.fStartTime) "
316 query=$query" AND NOT ISNULL("${needs[$k]}"Status.fStopTime) "
317 query=$query" AND NOT ISNULL("${needs[$k]}"Status.fAvailable) "
318 query=$query" AND ISNULL("${needs[$k]}"Status.fReturnCode) "
319# query=$query" , 1, NULL)) "
320 done
321# if ! echo $query | grep UPDATE >/dev/null 2>&1
322# then
323# query=$query" GROUP BY "${prims[@]}
324# fi
325}
326
327# function to get todolist
328# returns the next or the list of next steps
329function gettodo()
330{
331 # reset the variable for the number of the next step
332 process=
333 printprocesslog "DEBUG getting todo for step $step..."
334 getstepinfo
335 # get query
336 query=" SELECT "${prims[@]}
337 getstatusquery $2
338 # order by priority to the the number of the next step to be done
339 query=$query" ORDER BY "$step"Status.fPriority "
340 if [ "$sort" = "" ]
341 then
342 query=$query" DESC "
343 else
344 query=$query" "$sort
345 fi
346 # add limitation in case only one or a limited number of
347 # processes should be executed
348 if [ "$1 " != " " ]
349 then
350 query=$query" limit 0, $1 "
351 fi
352 # print query
353 #printprocesslog "DEBUG gettodo for step $step QUERY: "$query
354 # execute query
355 process=`sendquery`
356 #if ! process=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "`
357 #then
358 # printprocesslog "ERROR could not query processes from db (program: $program, function gettodo)"
359 # finish
360 #fi
361 # get numbers of next step from mysql result
362 if [ "$process" = "" ]
363 then
364 printprocesslog "DEBUG => nothing to do"
365 finish
366 else
367 primaries=( $process )
368 num=`expr ${#primaries[@]} / ${#prims[@]} `
369 fi
370}
371
372# function to get the number of processes which still have to be done
373function getstatus()
374{
375 printprocesslog "DEBUG getstatus for step "$step
376 # reset the variable for the number of steps to be done
377 numproc=0
378 getstepinfo
379 # get query
380 query=" SELECT "${prims[@]}
381 getstatusquery $1
382 # print query
383 #printprocesslog "DEBUG getstatus for step $step QUERY: "$query
384 # execute query
385 #numproc=`sendquery `#cannot be done with sendquery, because of row counting
386 printprocesslog "DEBUG send query "$query
387 if ! numproc=`mysql --default-file=$sqlrc -s -e " $query " | wc -l`
388 then
389 printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus, mysqlsetup $sqlrc)"
390 echo `date +%F\ %T`" ERROR could not query number of processes from db (program: $program, function getstatus, mysqlsetup $sqlrc)"
391 continue
392 fi
393}
394
395# function to set status of a process in the db
396function setstatus()
397{
398 # remark:
399 # this function does not include the 'Default' flag
400 # for resetting steps
401
402 # for dowebplots (there are steps which have no entry in the DB)
403 if [ "$step" = "no" ]
404 then
405 return
406 fi
407
408 printprocesslog "DEBUG setstatus for step "$step
409
410 # reset status values
411 starttime=NULL
412 stoptime=NULL
413 availtime=NULL
414 returncode=NULL
415 # evaluate the status values
416 case $@ in
417 start) printprocesslog "DEBUG setstatus start"
418 starttime="Now()"
419 ;;
420 startj) printprocesslog "DEBUG setstatus startj"
421 starttime="'1971-01-01 01:01:01'" # special recognizable datetime, i.e. "reserved by JobManager for processing"
422 ;;
423 stop) case $check in
424 ok) printprocesslog "DEBUG setstatus stop - ok"
425 starttime=noreset
426 stoptime="Now()"
427 if [ "$processingsite" = "$storagesite" ]
428 then
429 availtime="Now()"
430 fi
431 ;;
432 no) printprocesslog "DEBUG setstatus stop - nothing new"
433 check="ok"
434 ;;
435 *) printprocesslog "DEBUG setstatus stop - failed"
436 starttime=noreset
437 stoptime="Now()"
438 if [ "$processingsite" = "$storagesite" ]
439 then
440 availtime="Now()"
441 fi
442 if [ "$check" == "" ]
443 then
444 returncode=1
445 else
446 returncode=$check
447 fi
448 check="ok"
449 ;;
450 esac
451 ;;
452 *) printprocesslog "ERROR function setstatus got wrong variable"
453 finish
454 ;;
455 esac
456
457 # get
458 getstepinfo
459
460 # get the influences from the steps.rc by evaluating the needs of all steps
461 othersteps=`grep $step $steps | grep -v '#' | grep "Needs" | grep -v "$step[.]Needs" | cut -d'.' -f1`
462
463 # get query
464 query=" UPDATE "
465 getalljoins "set"
466 # set the status values according to the new status of the step
467 query=$query" SET "
468 if ! [ "$starttime" = "noreset" ]
469 then
470 query=$query" "$step"Status.fStartTime=$starttime, "
471 fi
472 query=$query" "$step"Status.fStopTime=$stoptime, "$step"Status.fAvailable=$availtime"
473 query=$query", "$step"Status.fReturnCode=$returncode , "$step"Status.fProcessingSiteKEY=$sitekey "
474 # set also the status values of the influenced steps
475 for otherstep in $othersteps
476 do
477 query=$query", "$otherstep"Status.fStartTime=NULL "
478 query=$query", "$otherstep"Status.fStopTime=NULL "
479 query=$query", "$otherstep"Status.fAvailable=NULL "
480 query=$query", "$otherstep"Status.fReturnCode=NULL "
481 query=$query", "$otherstep"Status.fProcessingSiteKEY=NULL "
482 done
483 # give the condition for which step the status values have to be set
484 query=$query" WHERE "
485 if [ "$s" = "" ]
486 then
487 s=0
488 fi
489 query=$query" "$step"Status."`echo ${prims[0]} | sed -e 's/,//g'`"='${primaries[$s*${#prims[@]}]}'"
490 for (( j=1 ; j < ${#prims[@]} ; j++ ))
491 do
492 query=$query" AND "$step"Status."`echo ${prims[$j]} | sed -e 's/,//g'`"='${primaries[$s*${#prims[@]}+$j]}' "
493 done
494 # add additional query to allow for locking in db
495 if [ "$1" = "start" ]
496 then
497 # process job only if it is not yet being processed
498 # i.e. either StartTime NULL or '1971-01-01 01:01:01' (reserved by JobManager for processing)
499 query=$query" AND (ISNULL("$step"Status.fStartTime) OR "$step"Status.fStartTime='1971-01-01 01:01:01')"
500 fi
501 # add row count to know how many rows have been changed
502 query=$query"; SELECT ROW_COUNT();"
503 # print query
504 #printprocesslog "DEBUG setstatus for step $step QUERY: "$query
505 #echo "DEBUG setstatus for step $step QUERY: "$query
506 # execute query
507 numchanged=`sendquery`
508 # should not be needed anymore once finish does proper exit
509 printprocesslog "DEBUG numchanged "$numchanged
510 if [ "$numchanged" = "" ]
511 then
512 printprocesslog "DEBUG numchanged empty."
513 finish
514 fi
515 if [ $numchanged -gt 0 ]
516 then
517 printprocesslog "INFO successful set of status in DB."
518 #echo "INFO successful set of status in DB."
519 else
520 # action may be taken in script using $numchanged
521 printprocesslog "DEBUG status in DB was already set by another process "
522 #echo "ERROR status in DB was already set by another process "
523 fi
524}
525
526function getdates()
527{
528 case $1 in
529 # all dates
530 all)
531 printprocesslog "DEBUG getdates case 'all'"
532 dates=( `find $auxdata -mindepth 3 -type d | sort -r | sed "s/\${auxdata_for_sed}//g" | sed -e 's/^\///'` )
533 ;;
534 # certain date
535 [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]|[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]-[0-9][0-9][0-9])
536 d=`echo $1 | grep -o '[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]'`
537 range=`echo $1 | grep -o '[0-9][0-9][0-9]$'`
538 range=`echo $range | sed -e 's/^0//' -e 's/^0//'`
539 printprocesslog "DEBUG getdates - certain date "$d"."
540 dates=( $d )
541 if [ "$range" != "" ]
542 then
543 printprocesslog "DEBUG getdates - add the last "$range" days."
544 yy=`echo $d | cut -c 1-4`
545 mm=`echo $d | cut -c 6-7`
546 dd=`echo $d | cut -c 9-10`
547 for (( numdates=1 ; numdates <= $range ; numdates++ ))
548 do
549 numhours=`echo " 12 + ( $numdates - 1 ) * 24 " | bc -l`
550 dates=( ${dates[@]} `date +%Y/%m/%d --date=$yy/$mm/$dd"-"$numhours"hour"` )
551 done
552 fi
553 ;;
554 # certain number of dates (between 0 and 9999)
555 [1-9][0-9][0-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9]|[1-9])
556 # get last n nights
557 printprocesslog "DEBUG getdates - get the last "$1" days."
558 for (( numdates=1 ; numdates <= $1 ; numdates++ ))
559 do
560 numhours=`echo " 12 + ( $numdates - 1 ) * 24 " | bc -l`
561 dates=( ${dates[@]} `date +%Y/%m/%d --date="-"$numhours"hour"` )
562 done
563 # hour-dependent number of dates
564 if [ "$2" != "" ] && [ "$3" != "" ]
565 then
566 # get current hour
567 hour=`date +%k`
568 if [ $hour -le $2 ] || [ $hour -ge $3 ]
569 then
570 printprocesslog "DEBUG getdates - get the current night."
571 dates=( `date +%Y/%m/%d --date="-19hour"` )
572 fi
573 fi
574 ;;
575 # certain number of dates in the future (between 0 and 9)
576 +[1-9])
577 # get next n nights
578 printprocesslog "DEBUG getdates - get the next "$1" days (incl today)."
579 for (( numdates=1 ; numdates <= $1 ; numdates++ ))
580 do
581 numhours=`echo " 0 + ( $numdates - 1 ) * 24 " | bc -l`
582 dates=( ${dates[@]} `date +%Y/%m/%d --date="+"$numhours"hour"` )
583 done
584 # hour-dependent number of dates
585 if [ "$2" != "" ] && [ "$3" != "" ]
586 then
587 # get current hour
588 hour=`date +%k`
589 if [ $hour -le $2 ] || [ $hour -ge $3 ]
590 then
591 printprocesslog "DEBUG getdates - get the current night."
592 dates=( `date +%Y/%m/%d --date="-12hour"` )
593 fi
594 fi
595 ;;
596 *) # nothing valid given
597 echo "Please give valid option (YYYY/MM/DD[-RRR] or 1-9999 or +0-9)"
598 finish
599 ;;
600 esac
601}
602
603# missing: implement usage of this function in Fill*.sh
604function check_file_avail()
605{
606 if [ "$1" = "" ]
607 then
608 echo "Please give file name as first argument."
609 finish
610 fi
611
612 printprocesslog "INFO checking availability of "$1
613 if ! [ -e $1 ]
614 then
615 filenight=`basename $1 | cut -c 1-8`
616 # treat raw files differently than auxfiles
617 checkraw=`echo $1 | grep -E -o raw`
618 if [ "$checkraw" = "raw" ]
619 then
620 if [ $filenight -le $checknight ]
621 then
622 printprocesslog "WARN "$1" not found."
623 else
624 printprocesslog "INFO "$1" not found."
625 fi
626 return 1
627 fi
628 # only for aux files check of DB is needed
629 # treat ratescan files
630 checkratescan=`echo $1 | grep -E -o RATE_SCAN_DATA`
631 if [ "$checkratescan" = "RATE_SCAN_DATA" ] && [ $filenight -gt 20130408 ]
632 then
633 #query="SELECT fMeasurementTypeKey from MeasurementType WHERE fMeasurementTypeName like 'Ratescan%'"
634 #ratescantypes=`sendquery`
635 query="SELECT COUNT(*) FROM Schedule WHERE fStart BETWEEN "$scheduletart" AND "$schedulestop" AND fMeasurementTypeKey IN (5,8) "
636 numratescans=`sendquery`
637 if [ $numratescans -gt 0 ]
638 then
639 printprocesslog "ERROR "$1" not found."
640 else
641 printprocesslog "INFO "$1" not found."
642 fi
643 return 1
644 fi
645 query="SELECT COUNT(*) FROM RunInfo WHERE fNight="$filenight" AND fRunTypeKey=1"
646 numdatruns=`sendquery`
647 # for some files it is more severe when they are missing
648 checkfile=`echo $1 | grep -E -o 'DRIVE'\|'RATES'`
649 # print INFO/WARN/ERROR depending on severity
650 if [ $numdatruns -eq 0 ]
651 then
652 # in case no data runs are available from this night, it's not a problem if files are missing
653 printprocesslog "INFO "$1" not found."
654 else
655 if [ "$checkfile" != "" ]
656 then
657 # drive and trigger-rates files are needed for analysis
658 #printprocesslog "ERROR "$1" not found."
659 if [ $filenight -le $checknight ]
660 then
661 printprocesslog "ERROR "$1" not found."
662 else
663 printprocesslog "WARN "$1" not found. ("$filenight" - "$checknight")"
664 fi
665 else
666 # other aux-files would be good to have
667 #printprocesslog "WARN "$1" not found."
668 if [ $filenight -le $checknight ]
669 then
670 printprocesslog "WARN "$1" not found. ("$filenight" - "$checknight")"
671 else
672 printprocesslog "INFO "$1" not found."
673 fi
674 fi
675 fi
676 return 1
677 fi
678
679 # file available
680 return 0
681}
682
Note: See TracBrowser for help on using the repository browser.