- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- killing processes
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
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
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
08-20-2019 02:30 AM
08-20-2019 02:30 AM
killing processes
Hi
I have a bunch of processes, that I have to kill them, :
report 22523 1 0 Oct 4 ? 0:00 sh -c /home/report/aceitala/aceitala_load.ksh
report 22526 22523 0 Oct 4 ? 0:00 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 29079 29057 0 Oct 2 ? 28:09 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 24838 24836 0 Oct 10 ? 28:38 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 23313 23258 0 Oct 17 ? 28:16 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 5875 5872 0 Oct 8 ? 0:00 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 26097 1 0 Oct 5 ? 0:00 sh -c /home/report/aceitala/aceitala_load.ksh
report 5235 1 0 Oct 20 ? 0:00 sh -c /home/report/aceitala/aceitala_load.ksh
report 2879 2878 0 Oct 24 ? 0:00 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 4770 1 0 Oct 6 ? 0:00 sh -c /home/report/aceitala/aceitala_load.ksh
report 6240 1 0 Sep 28 ? 0:00 sh -c /home/report/aceitala/aceitala_load.ksh
report 2881 2879 0 Oct 24 ? 27:49 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 13433 13429 0 Oct 13 ? 28:52 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 5238 5235 0 Oct 20 ? 0:00 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 3072 1 0 Oct 12 ? 0:00 sh -c /home/report/aceitala/aceitala_load.ksh
report 5872 1 0 Oct 8 ? 0:00 sh -c /home/report/aceitala/aceitala_load.ksh
report 5926 5875 0 Oct 8 ? 28:24 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 5264 5238 0 Oct 20 ? 27:53 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 22764 22761 0 Oct 15 ? 0:00 /usr/bin/ksh /home/report/aceitala/aceitala_load.ksh
report 25189 1 0 Oct 22 ? 0:00 sh -c /home/report/aceitala/aceitala_load.ksh
How can I kill them all once, instead of one by one?
all of them have a name in common, but PID is different.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 10:35 PM
08-20-2019 10:35 PM
Re: killing processes
> How can I kill them all once, instead of one by one?
Do you mean at exactly the same time, or using one command to do them
all, or what?
Use a "kill" command with a list of the PID values?
man kill
How did you produce that report, some kind of "ps" command? Are you
really asking how to extract the PID values from the "ps" output?
Possibly interesting:
$ echo ' report 5872 1 0 ' | sed -e 's/ *[^ ]* *\([^ ]*\) .*/\1/'
5872
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2019 12:56 AM - last edited on 06-29-2022 04:40 AM by Sunitha_Mod
08-21-2019 12:56 AM - last edited on 06-29-2022 04:40 AM by Sunitha_Mod
Re: killing processes
> all of them have a name in common, but PID is different.
How did you get the list of processes ?
>How can I stop them all once, instead of one by one?
You can get PID of procsses from "ps -ef" command and then use a script to terminate the PIDs.
Please check following discussion links on similar query :
Regards,
I work for HPE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2019 02:13 AM
08-21-2019 02:13 AM
Re: killing processes
Hi
I just want to use one command to kill them all.
What I have done so far is to use the kill command plus the PID like:
kill 11458 4385 5245 21619 23436
but there are so many of them
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2019 02:21 AM
08-21-2019 02:21 AM
Re: killing processes
Hi
I have listed the processes using the following command:
ps -ef | grep aceitala | more
I wonder if this command will work:
ps -ef | grep report | awk '{print $10;}' | grep aceitala |xargs kill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2019 02:05 AM
08-22-2019 02:05 AM
Re: killing processes
You might find it easier to use 'ps' in the 'UNIX Standard' mode:
I have listed the processes using the following command:
ps -ef | grep aceitala | more
(can't quote code block?)
... like:
[ host ~ ] $ ps -aef | grep cimprovagt
root 2046 2035 0 Jan 7 ? 1:02 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXSASIndicationProviderModule
root 2045 2035 0 Jan 7 ? 0:21 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXSASNativeIndicationProviderModule
root 2044 2035 0 Jan 7 ? 1:02 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXRAIDSAIndicationProviderModule
root 2043 2035 0 Jan 7 ? 0:21 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXRAIDSANativeIndicationProviderModule
root 2042 2035 0 Jan 7 ? 0:06 /opt/wbem/lbin/cimprovagt 0 4 9 root EMSHAProviderModule
root 2037 2035 0 Jan 7 ? 259:51 /opt/wbem/lbin/cimprovagt 0 4 9 root SFMProviderModule
root 2041 2035 0 Jan 7 ? 19:23 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXLANIndicationProviderModule
root 2047 2035 0 Jan 7 ? 1:23 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXFCIndicationProviderModule
root 2104 2035 0 Jan 7 ? 1:05 /opt/wbem/lbin/cimprovagt 0 4 8 root HPUXLANProviderModule
root 2052 2035 0 Jan 7 ? 0:06 /opt/wbem/lbin/cimprovagt 0 4 9 root SGProvidersModule
root 2051 2035 0 Jan 7 ? 1:16 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXStorageNativeProviderModule
root 2050 2035 0 Jan 7 ? 11:40 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXStorageIndicationProviderModule
root 2049 2035 0 Jan 7 ? 3070:24 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXIOTreeIndicationProviderModule
root 2048 2035 0 Jan 7 ? 0:22 /opt/wbem/lbin/cimprovagt 0 4 9 root HPUXFCNativeIndicationProviderModule
user 16346 15263 0 14:28:37 pts/0 0:00 grep cimprovagt
[ host ~ ] $ env UNIX95=1 ps -C cimprovagt -o pid
PID
2046
2045
2044
2043
2042
2037
2041
2047
2104
2052
2051
2050
2049
2048
I wonder if this command will work:
ps -ef | grep report | awk '{print $10;}' | grep aceitala |xargs kill
could be a little more precise with:
[ host ~ ] $ env UNIX95=1 ps -C cimprovagt -o pid | grep -v PID | xargs kill
kill: 2046: permission denied
kill: 2045: permission denied
kill: 2044: permission denied
kill: 2043: permission denied
kill: 2042: permission denied
kill: 2037: permission denied
kill: 2041: permission denied
kill: 2047: permission denied
kill: 2104: permission denied
kill: 2052: permission denied
kill: 2051: permission denied
kill: 2050: permission denied
kill: 2049: permission denied
kill: 2048: permission denied
--
ranga
[i work for hpe]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2019 02:15 AM
08-22-2019 02:15 AM
Re: killing processes
Your command will list all the processes owned by user cimprovagt, but I just to want to delete a partcular processes of user report not all of them, that is why I use the
ps -ef | grep aceitala | more
because I want to kill alll processes that involve "aceitala" string from user report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2019 08:13 AM
08-22-2019 08:13 AM
Re: killing processes
@NDO wrote:Your command will list all the processes owned by user cimprovagt
no
--
ranga
[i work for hpe]