Skip to content

Collect limits more reliably #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions varnishgather
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ TOPDIR=$(mktemp -d ${TMPDIR:-/tmp}/varnishgather.XXXXXXXX)
ID="$(cat /etc/hostname)-$(date +'%Y%m%d-%H%M%S')"
RELDIR="varnishgather-$ID"
ORIGPWD=$PWD
VERSION=1.100
VERSION=1.101
USERID=$(id -u)
PID_ALL_VARNISHD=$(pidof varnishd 2> /dev/null)
PID_ALL_VARNISHD_COMMA=$(pidof varnishd 2> /dev/null | sed 's/ /,/g')
Expand Down Expand Up @@ -297,7 +297,7 @@ show_packages() {
}

show_limits() {
file="/proc/$(echo $PID_VARNISHD | awk '{print $1;}')/limits"
file="/proc/$1/limits"

incr

Expand Down Expand Up @@ -608,8 +608,14 @@ mycat /proc/sys/net/ipv4/tcp_tw_reuse
for pid in ${PID_VARNISHD}; do
run cat -v /proc/$pid/cmdline
mycat /proc/$pid/cgroup
show_limits $pid
done

for file in /etc/security/limits.conf /etc/security/limits.d/*.conf
do
test -f $file || continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cat (mycat) does a "-r", isnt that good enough?

(Also, for some reason it incrememts task-"item-id", dunno why :))

mycat $file
done
show_limits

mycat /etc/sysconfig/vha-agent
mycat /etc/default/vha-agent
Expand Down