This commit is contained in:
tuend-work
2025-11-12 23:24:15 +07:00
parent 525acd79e4
commit 0b28a76e20
954 changed files with 57051 additions and 49 deletions

View File

@@ -0,0 +1,29 @@
#!/bin/sh
OS=`uname`
BIN_PS=/bin/ps
if [ -x ${BIN_PS} ]; then
echo "Top Memory Usage:"
${BIN_PS} aux | sort -r -nk 4 | head
fi
VMSTAT=/usr/bin/vmstat
if [ -x ${VMSTAT} ]; then
echo ""
echo "Virtual Memory Info:"
if [ "${OS}" = "FreeBSD" ]; then
${VMSTAT} 1 3
else
HAS_TIMESTAMP=`${VMSTAT} --help 2>&1 | grep -c '\-t'`
if [ "${HAS_TIMESTAMP}" = "0" ]; then
date
${VMSTAT} -w 1 3
date
else
${VMSTAT} -tw 1 3
fi
fi
fi
exit 0;