Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

pidof: unrecognized option: x #50

Closed
george-angel opened this issue Sep 22, 2015 · 5 comments
Closed

pidof: unrecognized option: x #50

george-angel opened this issue Sep 22, 2015 · 5 comments

Comments

@george-angel
Copy link
Contributor

Hello, we are using the docker-gc as a docker image running on our cluster. It is run as a systemd service with following ExecStart: docker run --name %p --rm -v /var/run/docker.sock:/var/run/docker.sock spotify/docker-gc || docker rmi spotify/docker-gc.

Issue we are seeing is:

Sep 22 10:59:59 ip-172-23-28-118.eu-west-1.compute.internal sh[16106]: pidof: unrecognized option: x
Sep 22 10:59:59 ip-172-23-28-118.eu-west-1.compute.internal sh[16106]: BusyBox v1.23.2 (2015-04-24 15:46:01 GMT) multi-call binary.
Sep 22 10:59:59 ip-172-23-28-118.eu-west-1.compute.internal sh[16106]: Usage: pidof [OPTIONS] [NAME]...
Sep 22 10:59:59 ip-172-23-28-118.eu-west-1.compute.internal sh[16106]: List PIDs of all processes with names that match NAMEs
Sep 22 10:59:59 ip-172-23-28-118.eu-west-1.compute.internal sh[16106]: -s        Show only one PID
Sep 22 10:59:59 ip-172-23-28-118.eu-west-1.compute.internal sh[16106]: -o PID        Omit given pid
Sep 22 10:59:59 ip-172-23-28-118.eu-west-1.compute.internal sh[16106]: Use %PPID to omit pid of pidof's parent

And it seems like the process doesn't get run.

Thanks

[Edit] I suspect this is to do with difference of running natively vs running in a container that is using alpine:

~/docker run -ti alpine pidof -x
pidof: unrecognized option: x
BusyBox v1.23.2 (2015-04-24 15:46:01 GMT) multi-call binary.

Usage: pidof [OPTIONS] [NAME]...

List PIDs of all processes with names that match NAMEs

    -s  Show only one PID
    -o PID  Omit given pid
        Use %PPID to omit pid of pidof's parent

[Edit#2] Can theonlydoo@7fc4110 use -s instead of -x as that option is available in BusyBox v1.23.2 (2015-04-24 15:46:01 GMT) multi-call binary. used by Alpine?

@svenmueller
Copy link

we encounter the same problem when using the lastest image (2 days old) since there are no other image tags than latest, this is quite a PITA.

@george-angel
Copy link
Contributor Author

@svenmueller We currently forked: https://github.com/Financial-Times/docker-gc and built: coco/docker-gc as a short term solution.

@fabiankrack
Copy link

@Zapadlo Your container has the same issue:

[ ~ ] docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc coco/docker-gc
pidof: unrecognized option: x
BusyBox v1.23.2 (2015-04-24 15:46:01 GMT) multi-call binary.

Usage: pidof [OPTIONS] [NAME]...

List PIDs of all processes with names that match NAMEs

    -s  Show only one PID
    -o PID  Omit given pid
        Use %PPID to omit pid of pidof's parent

@george-angel
Copy link
Contributor Author

@onibox Thank you, pushed and tagged latest. Should be fine now.

@rohansingh
Copy link
Contributor

@Zapadlo If you want to open a PR, I'd be happy to merge it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants