File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -610,7 +610,7 @@ def main(argv):
610
610
return
611
611
except (Exception , IOError ) as e :
612
612
logger .details ('%s' , MSG ['IntError' ].format (str (e )))
613
- logger .errort (MSG ['CollectorErr' ])
613
+ logger .error (MSG ['CollectorErr' ])
614
614
return
615
615
except (OSError ) as e :
616
616
logger .details ('%s' , MSG ['IntError' ].format (str (e )))
@@ -664,7 +664,11 @@ def main(argv):
664
664
try :
665
665
cherrypy .engine .start ()
666
666
logger .info ("server started" )
667
- logger .debug ("Server started PID: {}" .format (os .getpid ()))
667
+ with open ("/proc/{}/stat" .format (os .getpid ())) as f :
668
+ data = f .read ()
669
+ foreground_pid_of_group = data .rsplit (" " , 45 )[1 ]
670
+ is_in_foreground = str (os .getpid ()) == foreground_pid_of_group
671
+ logger .debug ("Server PID: {}. Process started in the foreground: {}" .format (os .getpid (), is_in_foreground ))
668
672
cherrypy .engine .block ()
669
673
except TypeError as e :
670
674
logger .error ("Server request could not be proceed. Reason: {}" .format (e ))
You can’t perform that action at this time.
0 commit comments