This commit is contained in:
tuend-work
2025-11-12 23:10:39 +07:00
parent bd58de709f
commit 2e16431888
953 changed files with 57002 additions and 0 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;