Skip to content

Commit e20a960

Browse files
committed
Feat: Added memory stats script to the container image
1 parent 3c17608 commit e20a960

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

nginx-utils/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ LABEL org.opencontainers.image.source="https://github.com/nginx/nginx-supportpkg
99
LABEL org.opencontainers.image.licenses="Apache-2.0"
1010

1111
COPY --chmod=744 nginx-utils/api_stats.sh /root/api_stats.sh
12+
COPY --chmod=744 nginx-utils/memory_stats.sh /root/memory_stats.sh
1213

1314
RUN set -ex \
1415
&& apk --update add --no-cache \

nginx-utils/memory_stats.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
echo ""
4+
echo " **** Output of memory.stat ****"
5+
cat /sys/fs/cgroup/memory.stat
6+
7+
echo ""
8+
echo " **** Output of pmap for nginx and nginx-ingress processes ****"
9+
for p in $(pidof nginx nginx-ingress); do pmap ${p} -x; done
10+
11+
echo ""
12+
echo " **** Output of /proc/pid/status for nginx and nginx-ingress processes ****"
13+
for p in $(pidof nginx nginx-ingress); do cat /proc/${p}/status; done

0 commit comments

Comments
 (0)