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
|
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
|
# Show version of a Debian package
|
||||||
debversion() {
|
debversion() {
|
||||||
local pkgname="${1:?packagename required}"
|
local pkgname="${1:?packagename required}"
|
||||||
@ -127,6 +127,13 @@ deblist() {
|
|||||||
}
|
}
|
||||||
{{- end }}
|
{{- 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
|
# Docker helpers
|
||||||
# Update docker-compose containers
|
# Update docker-compose containers
|
||||||
# https://stackoverflow.com/questions/49316462/how-to-update-existing-images-with-docker-compose
|
# https://stackoverflow.com/questions/49316462/how-to-update-existing-images-with-docker-compose
|
||||||
@ -138,5 +145,4 @@ dcupdate() {
|
|||||||
# TODO: logfile
|
# TODO: logfile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PATH=$PATH:$HOME/bin
|
PATH=$PATH:$HOME/bin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user