Print a list of processes that are using now deleted libraries. It's
output is an indication of what needs to be restarted and/or rebuilt.
* etc/pkgusr/zsh/zsh-pkgtools (deadlibs): New. Print processes
that are using deleted libraries.
(H-pkg): Document it.
Signed-off-by: Steve Youngs <steve@steveyoungs.com>
ctar [FILE] [DIRECTORY]
-- create a tarball FILE of DIRECTORY. Compression
is automatically chosen from the filename.
+ deadlibs [LIBNAME]
+ -- print processes using deleted library, LIBNAME
EOF
pkglst
}
+## See what is currently using now deleted libs
+deadlibs()
+{
+ if [[ $ARGC -ne 1 ]]; then
+ echo 1>&2 Invalid or missing argument
+ echo 1>&2 "Usage: $0 [LIBNAME]"
+ return 1
+ fi
+ ssh root@localhost grep -l -e "${argv[1]}.*deleted" /proc/*/maps |
+ tr -cd 0-9\\n | xargs -r ps --no-headers | awk '{print $5}'
+}
+
## Couple handy aliases
alias pkg_ldconfig='ssh -l root localhost ldconfig'
alias vtar=less