Added 'topby' function to show processes matching name in top.
This commit is contained in:
parent
9456437be2
commit
0bd9de0021
@ -113,7 +113,7 @@ list-ssh-keys() {
|
||||
done
|
||||
}
|
||||
|
||||
{{- if (eq .chezmoi.os "linux") }}
|
||||
{{- if (or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "linuxmint") (eq .chezmoi.osRelease.id "ubuntu")) }}
|
||||
# Show version of a Debian package
|
||||
debversion() {
|
||||
local pkgname="${1:?packagename required}"
|
||||
@ -127,6 +127,13 @@ deblist() {
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
# Run 'top' with list of processes matching name.
|
||||
topof() {
|
||||
local name=${1:?name required}
|
||||
local pidlist="$(pidof $name | sed 's/ /,/g')"
|
||||
top -p $pidlist
|
||||
}
|
||||
|
||||
# Docker helpers
|
||||
# Update docker-compose containers
|
||||
# https://stackoverflow.com/questions/49316462/how-to-update-existing-images-with-docker-compose
|
||||
@ -138,5 +145,4 @@ dcupdate() {
|
||||
# TODO: logfile
|
||||
}
|
||||
|
||||
|
||||
PATH=$PATH:$HOME/bin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user