- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- RSH: Find & Kill the Process by automation
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2005 04:33 PM
тАО10-02-2005 04:33 PM
RSH: Find & Kill the Process by automation
Process identify-> C:\>rsh
Output -> SYSTEM 2576 2180 0 10:52:40 CONIN$ 0:00 C:\tmp\exec\MGR107\mgragent.exe
Killing Process-> C:\>rsh
I'm doing this manual process before starting the new automation run.
I would like to automate this process like find the process id and then kill it. Can someone help me on this?
Thanks,
Mugil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2005 04:49 PM
тАО10-02-2005 04:49 PM
Re: RSH: Find & Kill the Process by automation
ps -ef | grep -i mugil
will give you as follows. (assuming that there are process mugil mugilevyx, mugilggh, hjmugillp)
You can do it as follows.
rsh "host" 'UNIX95= ps -C"process_name" -p pid=|xargs kill'
Make sure that you are killing a right apps/process that you want to kill.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2005 04:53 PM
тАО10-02-2005 04:53 PM
Re: RSH: Find & Kill the Process by automation
May be this link can help you,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=838620
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2005 05:24 PM
тАО10-02-2005 05:24 PM
Re: RSH: Find & Kill the Process by automation
C:\>rsh
Winsock RSHD/NT: Error 2 executing 'UNIX95= ps -C emagent -p pid='
The system cannot find the file specified.
I forget to mention that I'm want to kill the process on Windows host.
And I tried this too,
C:\>rsh
' | xargs kill -9
kill: 780: no such process
C:\>rsh
' | xargs kill -9
kill: 780: no such process
Am I missing any more?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-02-2005 09:10 PM
тАО10-02-2005 09:10 PM
Re: RSH: Find & Kill the Process by automation
1) create a .sh file in remote machine containing ps -u ps -ef | grep -v 'grep'
| grep agent | awk '{ print $2; }' | xargs kill -9
2) create a .bat file in same host which is calling the above .sh file
3) run rsh command calling the .bat file
Thanks,
Mugil