码迷,mamicode.com
首页 > 其他好文 > 详细

kill procedure in os level

时间:2015-04-17 13:33:40      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:

通常遇到执行时间大于10000秒的任务(SM37),除非是系统初始化或者有巨大的数据量,否则可以判定就是系统异常了,不是互锁就是“卡”(说不清的情况下)了。 系统提供任务监控(SM37),我们可以在这里结束异常任务。 选择任务-> stop active Job,一般情况下可以结束。如果仍旧无法停止,进入下一步。 我们通过SM50进行进程监控,至于任务和进程的对应关系,我还真没找到专业的方法,准专业的方法就是看时间,如果时间一致,应该可以判定此进程为对应任务,在这里也可以通过结束进程的方式来结束任务。 菜单:menu -> Process -> Cancel Without Core 当然很多时候,做到这里就可以了。如果还是不行,进入下一步。 其实到这一步杀不了,应该救助Basis了,因为要到操作系统层面去操作了。 不过系统还是提供了小窗口给我们的,不是那么直接而已。 通过SM69 可以定义操作系统层命令,所以针对Server的操作系统,可以选择专门的kill进程的命令。进入SM69后,新建命令,名字随便只要不重复,设置的时候,需要把命令和参数分开写。 因为我们是在Windows系统,所以命令为KILLTASK ,参数是: /pid XXX1 /pid XXX2 /F . XXXX 按照实际情况写进程号就行了, 进程号可以通过SM50获取。 这一招出来,肯定是必死无疑啦。 不过(还是有不过),如果Client的状态是不允许更改,那么这一招就不是很好使了。 因为需要通过传输Request来实现。 不断追寻之后,又找到了,新的方法。 那就是通过程序。 windows system operation: SE38:RSBDCOS0, 点击执行,输入完整的命令: 比如: taskkill /pid XXX1 /F , 回车,执行完成。 NT system operation: Solution: Stopping the process on operating system level and remove the trace files after next restart. -- Hints To Kill Job on Operation System Level: SE38->Execute Program: ‘RSBDCOS0‘->Enter kill -9 [ProcessID]

以上最后两种方法,慎用。

 

 

 

How to Kill a work process in SAP

 

Description

 

You may see a work process in SAP in hung state thru SM50 transaction code. The following steps will explain you the detailed process on dealing with the killing it.

 

Procedure:

 

1. Try to kill it in SM50. Select the work process, and in the Process menu, select either Kill with core, or without core option.

 技术分享 

 

2. Use transaction SM04 using the Sessions button. Try to end all the sessions of the user.

 技术分享 

 

3. If killing the process via the SAP instance fails, you will need to kill it from the Operating system level. Identify the PID of the work processes enter a kill -9 from a Unix command prompt.

Incase of Windows, you can do it from Windows Task manager.

Unix operate system

kill -9  PID

windowns operate system

taskkill /pid XXX1 /F

 

4. On NT, if everything else has failed, there should be an executable called sapntkill in your \usr\sap\\SYS\exe\run directory. Use the PID with it.

 

 

You can also use the RSBDCOS0 program, incase if the issue is not resolved.

However, the most important thing to remember when killing a WP in SM50 is Change to restart option to No as otherwise the session can jump back in sometimes as most of its memory is not actually living in the WP.

 

Allow 5-10 minutes of time to stop, there is no need to do it many times. 

kill procedure in os level

标签:

原文地址:http://www.cnblogs.com/yanglikun/p/4434300.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!