Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Pkill Not Working For Monyog 5.6+

forums forums Monyog Monyog: Bugs / Feature Requests Pkill Not Working For Monyog 5.6+

Tagged: 

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #13214
      JoeGibbs
      Member

      Hi

       

      I have been looking into the monyog errorlog, trying to get rid of all of the error messages and noticed something odd about the pkill command. It doesn’t seem to actually stop the monyog process.

       

      I included manual pgrep and pkill commands and the outout along with messages in the log file. We do not run monyog under root, but under its own local login (svc_mon). SInce that login starts and stops monyog and has fill permission to all files it should be able to kill its own process.

       

      The bottom line is the pkill does not work for our version (should be Centos but will verify) but a normal kill command does. Is there any chance that this is part of the cause of the data files getting corrupted on a regular basis ??

       

      Thanks

      Joe Gibbs

       

       

       

       

      # testing the pgrep command

       

      [svc_monyog@tinfdbvs200-001 bin]$ pgrep -f /opt/db/monyog/MONyog/bin/MONyog-bin

      29419

       

      # displaying running monyog processes

      [svc_monyog@tinfdbvs200-001 bin]$ ps -wef|grep -i monyog

      root     25849 25526  0 13:39 pts/1    00:00:00 sudo su – svc_monyog

      root     25850 25849  0 13:39 pts/1    00:00:00 su – svc_monyog

      root     27078 24732  0 14:35 pts/0    00:00:00 sudo su – svc_monyog

      root     27079 27078  0 14:35 pts/0    00:00:00 su – svc_monyog

      root     29349 29307  0 16:09 pts/2    00:00:00 sudo su – svc_monyog

      root     29351 29349  0 16:09 pts/2    00:00:00 su – svc_monyog

      1001     29419     1  0 16:12 ?        00:00:00 /opt/db/monyog/MONyog/bin/MONyog-bin -s

      1001     29546 29352  0 16:15 pts/2    00:00:00 grep -i monyog

       

      # grabbing the command from your script…

       

      [svc_monyog@tinfdbvs200-001 bin]$ grep pkill MONyog

                `pkill -15 -x MONyog-bin`

       

      # running pkill with the options from the pgrep

       

      [svc_monyog@tinfdbvs200-001 bin]$ pkill -15 -x  /opt/db/monyog/MONyog/bin/MONyog-bin

       

      # display the running processes again

       

      [svc_monyog@tinfdbvs200-001 bin]$ ps -wef|grep -i monyog

      root     25849 25526  0 13:39 pts/1    00:00:00 sudo su – svc_monyog

      root     25850 25849  0 13:39 pts/1    00:00:00 su – svc_monyog

      root     27078 24732  0 14:35 pts/0    00:00:00 sudo su – svc_monyog

      root     27079 27078  0 14:35 pts/0    00:00:00 su – svc_monyog

      root     29349 29307  0 16:09 pts/2    00:00:00 sudo su – svc_monyog

      root     29351 29349  0 16:09 pts/2    00:00:00 su – svc_monyog

      1001     29419     1  0 16:12 ?        00:00:00 /opt/db/monyog/MONyog/bin/MONyog-bin -s

      1001     29552 29352  0 16:16 pts/2    00:00:00 grep -i monyog

       

      # just the bin/executable name

       

      [svc_monyog@tinfdbvs200-001 bin]$ pgrep -f bin/MONyog-bin

      29419

       

      # again with pkill

       

      [svc_monyog@tinfdbvs200-001 bin]$ pkill -15 -x  bin/MONyog-bin

       

      # again its still there

       

      [svc_monyog@tinfdbvs200-001 bin]$ ps -wef|grep -i monyog

      root     25849 25526  0 13:39 pts/1    00:00:00 sudo su – svc_monyog

      root     25850 25849  0 13:39 pts/1    00:00:00 su – svc_monyog

      root     27078 24732  0 14:35 pts/0    00:00:00 sudo su – svc_monyog

      root     27079 27078  0 14:35 pts/0    00:00:00 su – svc_monyog

      root     29349 29307  0 16:09 pts/2    00:00:00 sudo su – svc_monyog

      root     29351 29349  0 16:09 pts/2    00:00:00 su – svc_monyog

      1001     29419     1  0 16:12 ?        00:00:00 /opt/db/monyog/MONyog/bin/MONyog-bin -s

      1001     29556 29352  0 16:16 pts/2    00:00:00 grep -i monyog

       

       

      # now lets just use the kill command and see if it works

       

      # get the process id via pgrep

      svc_monyog@tinfdbvs200-001 proc]$ pgrep -f bin/MONyog-bin

      29419

       

      # and execute the kill command vrs pkill

      [svc_monyog@tinfdbvs200-001 proc]$ kill -15 29419

       

      # rerun pgrep – looks like we did it !!!

      [svc_monyog@tinfdbvs200-001 proc]$ pgrep -f bin/MONyog-bin

       

      # double checkling via ps -wef command and its still gone !!

      [svc_monyog@tinfdbvs200-001 proc]$ ps -wef|grep -i monyog

      root     25849 25526  0 13:39 pts/1    00:00:00 sudo su – svc_monyog

      root     25850 25849  0 13:39 pts/1    00:00:00 su – svc_monyog

      root     27078 24732  0 14:35 pts/0    00:00:00 sudo su – svc_monyog

      root     27079 27078  0 14:35 pts/0    00:00:00 su – svc_monyog

      root     29349 29307  0 16:09 pts/2    00:00:00 sudo su – svc_monyog

      root     29351 29349  0 16:09 pts/2    00:00:00 su – svc_monyog

      1001     29629 29352  0 16:29 pts/2    00:00:00 grep -i monyog

       

       

      and the logfile messages that display the “IGNORING SIGNAL!” message.

       

      [5.72] [2014-05-12 14:21:36] linservicemgr.cpp(121) ErrCode:15 ErrMsg:Stopping MONyog: Received signal SIGKILL/SIGSTOP/SIGQUIT/SIGTERM/SIGSTP — IGNORING SIGNAL!

      [5.72] [2014-05-12 14:21:36] Msg:MONyog Signaled to stop!

      [5.72] [2014-05-12 14:21:36] Msg:MONyog Stopped!

      [5.72] [2014-05-12 14:21:41] Msg:MONyog is Starting … !

      [5.72] [2014-05-12 14:21:41] Msg:MONyog Started!

      [5.72] [2014-05-12 14:23:24] Msg:Rebuilt databases for ‘dlcddbps1001 3306’ successfully!

      [5.72] [2014-05-12 14:23:35] Msg:Data collection for ‘dlcddbps1001 3306’ has been stopped!

      [5.72] [2014-05-12 14:23:49] Msg:Data collection for ‘dlcddbps1001 3306’ has been stopped!

      [5.72] [2014-05-12 14:23:49] Msg:Data collection for ‘dlcddbps1001 3306’ has been started!

      [5.72] [2014-05-12 14:24:04] linservicemgr.cpp(121) ErrCode:15 ErrMsg:Stopping MONyog: Received signal SIGKILL/SIGSTOP/SIGQUIT/SIGTERM/SIGSTP — IGNORING SIGNAL!

      [5.72] [2014-05-12 14:24:04] Msg:MONyog Signaled to stop!

      [5.72] [2014-05-12 14:24:04] Msg:MONyog Stopped!

      [5.72] [2014-05-12 14:24:08] Msg:MONyog is Starting … !

      [5.72] [2014-05-12 14:24:09] Msg:MONyog Started!

      [5.72] [2014-05-12 14:27:10] linservicemgr.cpp(121) ErrCode:15 ErrMsg:Stopping MONyog: Received signal SIGKILL/SIGSTOP/SIGQUIT/SIGTERM/SIGSTP — IGNORING SIGNAL!

      [5.72] [2014-05-12 14:27:10] Msg:MONyog Signaled to stop!

      [5.72] [2014-05-12 14:27:10] Msg:MONyog Stopped!

      [5.72] [2014-05-12 14:29:55] Msg:MONyog is Starting … !

      [5.72] [2014-05-12 14:29:55] Msg:MONyog Started!

      [5.72] [2014-05-12 14:36:51] linservicemgr.cpp(121) ErrCode:15 ErrMsg:Stopping MONyog: Received signal SIGKILL/SIGSTOP/SIGQUIT/SIGTERM/SIGSTP — IGNORING SIGNAL!

      [5.72] [2014-05-12 14:36:51] Msg:MONyog Signaled to stop!

      [5.72] [2014-05-12 14:36:51] Msg:MONyog Stopped!

      [5.72] [2014-05-12 14:36:58] Msg:MONyog is Starting … !

      [5.72] [2014-05-12 14:36:58] Msg:MONyog Started!

      [5.72] [2014-05-12 16:10:03] linservicemgr.cpp(121) ErrCode:15 ErrMsg:Stopping MONyog: Received signal SIGKILL/SIGSTOP/SIGQUIT/SIGTERM/SIGSTP — IGNORING SIGNAL!

      [5.72] [2014-05-12 16:10:03] Msg:MONyog Signaled to stop!

      [5.72] [2014-05-12 16:10:03] Msg:MONyog Stopped!

      [5.72] [2014-05-12 16:12:45] Msg:MONyog is Starting … !

      [5.72] [2014-05-12 16:12:45] Msg:MONyog Started!

       

       

    • #34935
      sandhya.r
      Member

      Hi,

       

      We will check this and get back to you with more details on this. 

       

       

      Regards,

      Team MONyog.

    • #34936
      Mahesh
      Member

      Hi,

       

      You should use just “-f” option instead of “-x” option, it will work. 

       

      “man” page for “pkill” explains that:

       

      “-f” :- The pattern is normally only matched against the process name. When -f is set, the full command line is used.

      “-x” :- Only match processes whose name (or command line if -f is specified) exactly match the pattern.

       

       

       

      Regards,

      Team MONyog

Viewing 2 reply threads
  • You must be logged in to reply to this topic.