This file is indexed.

/usr/lib/oar/oarnodecheckrun is in oar-node 2.5.6-2ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 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

CHECKLOGDIR=/var/lib/oar/checklogs
CHECKSCRIPTDIR=/etc/oar/check.d
CPUSET_DIR=/dev/cpuset/oar
LOCKFILE=/var/lib/oar/$(basename $0).lock
STAMPFILE=/var/lib/oar/oarnodecheckrun.lastrun

if ! [ -r $CHECKLOGDIR ]; then
  echo 1>&2 "Error: Checklogs directory does not exist ($CHECKLOGDIR) !"
  exit 1
fi 

if ! [ -r $CHECKSCRIPTDIR ]; then
  echo 1>&2 "Error: Checkscripts directory does not exist ($CHECKSCRIPTDIR) !"
  exit 1
fi 

shopt -s nullglob

# If there is any running job then exit.
ls $CPUSET_DIR/*/tasks 2>/dev/null | grep -E "^.*_[0-9]*/tasks$" >/dev/null \
  && exit 0

# If there is another instance running then exit.
[ -f $LOCKFILE ] && exit 0
# Else take the lock and stamp this run.
touch $LOCKFILE $STAMPFILE

cd $CHECKSCRIPTDIR
for f in *; do
  [ -x $f ] && CHECKLOGFILE=$CHECKLOGDIR/$f.$(date +%F.%T) ./$f
done
cd - > /dev/null

# Release the lock.
rm -f $LOCKFILE