- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell Script
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
Forums
Discussions
Discussions
Discussions
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
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
11-09-2000 01:47 PM
11-09-2000 01:47 PM
Shell Script
I am running java class("abcd.class") five times using vbj.exe and I wanted to write a shell script, which will kill one of those program.
vbj abcd
Since I am using vbj, ps -ef command will not show the class name. Only possibility of getting pid is by 'vbj abcd &' command. This command returns pid as.
[1] 12345
where 12345 is a PID.
PROMPT>vbj abcd & > log
[1] 12345
This will not redirect pid into the log file.
Please help me out.
-Pravin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2000 04:07 PM
11-09-2000 04:07 PM
Re: Shell Script
vbj abcd &
echo $! > pid1
vbj efgh &
echo $! > pid2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2000 08:48 PM
11-09-2000 08:48 PM
Re: Shell Script
# jobs
and you get the pids for all the background processes.
OR
you can kill them by running
# kill -9 %1 <--- this will kill the first process
# kill -9 %2 <---- this the second one
ans so on...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2000 09:52 AM
11-10-2000 09:52 AM
Re: Shell Script
Try just plain 'kill' first. 'kill' without any arguments uses signal 15 (SIGTERM) by default, which is the most polite way to ask a process to terminate. If that doesn't work try 'kill -2' (SIGINT) and 'kill -1 (SIGHUP)'.
If none of those work, then you have no other resort but to use 'kill -9'. Well-written binaries will probably respond to one of the other signals first, though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2000 01:59 PM
11-10-2000 01:59 PM
Re: Shell Script
Ovidiu