Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
10-28-2018, 02:02 AM
#1
LQ Newbie
Registered: Apr 2009
Location: Alberta Canada
Distribution: KDE Neon
Posts: 10
Rep:
killall process not found
why can't `killall` find `gpg-agent` process?
Code:
codyw@cody-macbook:~$ ps -ef |grep gpg-agent
codyw 364 300 0 01:01 pts/4 00:00:00 grep --color gpg-agent
codyw 17519 1 0 00:36 ? 00:00:00 gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon
codyw@cody-macbook:~$ killall gpg-agent
gpg-agent: no process found
returned 1
codyw@cody-macbook:~$ ps -ef |grep gpg-agent
codyw 455 300 0 01:01 pts/4 00:00:00 grep --color gpg-agent
codyw 17519 1 0 00:36 ? 00:00:00 gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon
10-28-2018, 06:33 AM
#2
Senior Member
Registered: Dec 2011
Location: Simplicity
Posts: 2,791
A command might alter its arg0 that causes an inconsistancy in the naming.
Check different methods with
Code:
ps -e -o fname,cmd,comm,args
1 members found this post helpful.
10-28-2018, 05:00 PM
#3
LQ Newbie
Registered: Apr 2009
Location: Alberta Canada
Distribution: KDE Neon
Posts: 10
Original Poster
Rep:
hmmm...
Code:
codyw@cody-macbook:~$ ps -e -o fname,cmd,comm,args |grep gpg
grep grep --color gpg grep grep --color gpg
gpg-agen gpg-agent --homedir /home/c gpg-agent gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon
10-28-2018, 07:27 PM
#4
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
What happens when you try this?
Code:
$ kill [process number]
1 members found this post helpful.
10-28-2018, 07:45 PM
#5
Senior Member
Registered: Dec 2011
Location: Simplicity
Posts: 2,791
Perhaps killall takes the method that corresponds to fname and apparently truncates to 8 characters?
Then it's
1 members found this post helpful.
10-28-2018, 08:50 PM
#6
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon
that is the entire process. is it not?
killall "gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon"
and you only got one, so killall is over kill.
pkill [program name]
https://linux.die.net/man/1/pkill
is another one.
Last edited by BW-userx; 10-28-2018 at 09:04 PM .
10-28-2018, 08:57 PM
#7
LQ Newbie
Registered: Apr 2009
Location: Alberta Canada
Distribution: KDE Neon
Posts: 10
Original Poster
Rep:
tried `killall gpg-agen` and it also says process not found. I can tab-complete after killall and get gpg-agent so it knows it's a process.
`kill [process num]` does work.
some info:
Code:
$ killall --version
killall (PSmisc) 23.1
$ lsb_release -sdc; uname -sri
KDE neon LTS User Edition 5.12
bionic
Linux 4.15.0-36-generic x86_64
10-28-2018, 09:02 PM
#8
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Quote:
`kill [process num]` does work.
That leads me to theorize that there's something screwy with the process name as reported, but I have no idea what it might be.
Aside: Woo-Hoo. As a friend of mine once said, even a blind pig finds an acorn once and awhile.
10-28-2018, 09:09 PM
#9
LQ Guru
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342
Quote:
Originally Posted by
codywohlers
tried `killall gpg-agen` and it also says process not found. I can tab-complete after killall and get gpg-agent so it knows it's a process.
`kill [process num]` does work.
some info:
Code:
$ killall --version
killall (PSmisc) 23.1
$ lsb_release -sdc; uname -sri
KDE neon LTS User Edition 5.12
bionic
Linux 4.15.0-36-generic x86_64
try
Code:
ps -e -o fname,cmd,comm,args |grep gpg
to get the running one, then copy the entire line between quotes.
gpg-agent is not the process it is only part of it,
Code:
killall "gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon"
see what that tells ya.
Last edited by BW-userx; 10-28-2018 at 09:13 PM .
10-29-2018, 06:59 PM
#10
LQ Newbie
Registered: Apr 2009
Location: Alberta Canada
Distribution: KDE Neon
Posts: 10
Original Poster
Rep:
also tried with no avail:
Code:
codyw@cody-macbook:~$ ps -e -o fname,cmd,comm,args |grep gpg
gpg-agen gpg-agent --homedir /home/c gpg-agent gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon
grep grep --color gpg grep grep --color gpg
codyw@cody-macbook:~$ killall "gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon"
gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon: No such file or directory
returned 1
codyw@cody-macbook:~$ killall 'gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon'
gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon: No such file or directory
returned 1
I've only ever experienced this with gpg-agent
10-30-2018, 02:30 PM
#11
Senior Member
Registered: Dec 2011
Location: Simplicity
Posts: 2,791
Try
pkill instead.
The good thing about pkill is that you can test with
pgrep before.
You can augment with -f to search in args, or "-u user" to search for a specific user (process owner) only.
Examples with pgrep:
Code:
pgrep -f "gpg-agent --homedir /home/codyw/.gnupg --use-standard-socket --daemon"
pgrep pgp-agent
pgrep pgp-agen
pgrep -u $USER pgp-agent
Note that pgrep/pkill use regular expressions. E.g. the dot in .gnupg means any character (not just dot).
1 members found this post helpful.
10-30-2018, 02:55 PM
#12
LQ Veteran
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727
killall also has a regexp option:
Code:
-r, --regexp
Interpret process name pattern as an extended regular expression
11-09-2018, 05:52 AM
#13
LQ Newbie
Registered: Apr 2009
Location: Alberta Canada
Distribution: KDE Neon
Posts: 10
Original Poster
Rep:
pkill does work. strange.
I also tried killall -r gpg-agent but that still does not work. I'll confirm this behavior on a stock vm and then I guess I'll file a bug with killall.
11-09-2018, 12:25 PM
#14
LQ Veteran
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727
Quote:
Originally Posted by
codywohlers
tried `killall gpg-agen` and it also says process not found. I can tab-complete after killall and get gpg-agent so it knows it's a process.
Tab complete only works because there's a file in your $PATH with that name.
It has nothing to do with whether or not it's running or is a process.
Last edited by scasey; 11-09-2018 at 12:30 PM .
11-09-2018, 02:14 PM
#15
LQ Newbie
Registered: Nov 2018
Posts: 9
Rep:
Why do you need him so badly?
All times are GMT -5. The time now is 11:56 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News