CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
fff_monitoring Namespace Reference

Classes

class  DQMMonitor
 

Functions

def daemonize
 
def lock
 
def prepare_imports
 

Variables

 do_foreground = False
 
string do_mode = "daemon"
 
tuple flog_ch = logging.StreamHandler()
 
tuple formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
 
tuple log = logging.getLogger(__name__)
 
tuple service
 
tuple sock = lock("fff_dqmmon")
 

Function Documentation

def fff_monitoring.daemonize (   logfile,
  pidfile 
)

Definition at line 209 of file fff_monitoring.py.

210 def daemonize(logfile, pidfile):
211  # do the double fork
212  pid = os.fork()
213  if pid != 0:
214  sys.exit(0)
215 
216  os.setsid()
217  sys.stdin.close()
218  sys.stdout.close()
219  sys.stderr.close()
220 
221  fl = open(logfile, "a")
222  sys.stdout = fl
223  sys.stderr = fl
224 
225  pid = os.fork()
226  if pid != 0:
227  sys.exit(0)
228 
229  if pidfile:
230  f = open(pidfile, "w")
231  f.write("%d\n" % os.getpid())
232  f.close()
def fff_monitoring.lock (   pname)

Definition at line 200 of file fff_monitoring.py.

201 def lock(pname):
202  sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
203  try:
204  sock.bind('\0' + pname)
205  return sock
206  except socket.error:
207  return None
208 
# same as in fff_deleter.py
def fff_monitoring.prepare_imports ( )

Definition at line 17 of file fff_monitoring.py.

17 
18 def prepare_imports():
19  # minihack
20  sys.path.append('/opt/hltd/python')
21  sys.path.append('/opt/hltd/lib')
22 
23  global inotify, watcher, es_client
24 
25  import _inotify as inotify
26  import watcher
27  import pyelasticsearch.client as es_client
28 

Variable Documentation

fff_monitoring.do_foreground = False

Definition at line 236 of file fff_monitoring.py.

string fff_monitoring.do_mode = "daemon"

Definition at line 234 of file fff_monitoring.py.

tuple fff_monitoring.flog_ch = logging.StreamHandler()

Definition at line 257 of file fff_monitoring.py.

tuple fff_monitoring.formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')

Definition at line 256 of file fff_monitoring.py.

tuple fff_monitoring.log = logging.getLogger(__name__)

Definition at line 15 of file fff_monitoring.py.

tuple fff_monitoring.service
Initial value:
2  top_path = "/tmp/dqm_monitoring/",
3  )

Definition at line 268 of file fff_monitoring.py.

Referenced by edm::ProcessDesc.addService(), cond::persistency.convertoToOracleConnection(), TrackerSeedGenerator.init(), CompositeTSG.init(), MuonTrackingRegionBuilder.init(), TSGFromPropagation.init(), TrackerSeedCleaner.init(), TSGForRoadSearch.init(), FastTSGFromPropagation.init(), gen.pyr_(), HcalCoderFactory.setDbService(), CastorCoderFactory.setDbService(), HFSimParameters.setDbService(), CastorAmplifier.setDbService(), HcalSimParameters.setDbService(), HcalTDC.setDbService(), CastorSimParameters.setDbService(), HcalAmplifier.setDbService(), HPDIonFeedbackSim.setDbService(), SETPatternRecognition.setServiceProxy(), and SETSeedFinder.setServiceProxy().

tuple fff_monitoring.sock = lock("fff_dqmmon")

Definition at line 247 of file fff_monitoring.py.