How do I run pstree on alpine linux?

0

Can I see the process list as a tree on alpine linux? I tried using apk add but it gave an error about unsatisfiable constraints. The error isn't very helpful :-(

/ # apk search pstools
WARNING: Ignoring APKINDEX.84815163.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.24d64ab1.tar.gz: No such file or directory

/ # apk search ps
WARNING: Ignoring APKINDEX.84815163.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.24d64ab1.tar.gz: No such file or directory

/ # apk add pstree
WARNING: Ignoring APKINDEX.84815163.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.24d64ab1.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  pstree (missing):
    required by: world[pstree]

Thank you for reading.

user674669

Posted 2019-01-15T23:26:14.177

Reputation: 377

1Did you try installing the dependencies? Have you researched the error codes? Have you checked the documentation for pstree to see if there are known issues with your specific flavors? – music2myear – 2019-01-16T00:30:42.727

Answers

0

The following commands helped me:

/#     apk update 
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
v3.6.3-58-g8a2e635d73 [http://dl-cdn.alpinelinux.org/alpine/v3.6/main]
v3.6.3-57-gfd0de89d0b [http://dl-cdn.alpinelinux.org/alpine/v3.6/community]
OK: 8448 distinct packages available

/ #    apk add pstree
(1/1) Installing pstree (2.39-r0)
Executing busybox-1.26.2-r5.trigger
OK: 35 MiB in 27 packages

user674669

Posted 2019-01-15T23:26:14.177

Reputation: 377

Can you add a few sentences of explanation so readers can understand how and why this solved the problem? Thanks. – fixer1234 – 2019-01-20T02:01:01.917