Created
September 6, 2024 17:03
-
-
Save velopert/9aaed8843ad5fc4bdf635aeac55535ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path=$1 | |
process_name="Server" | |
check_unity_memory_usage() { | |
# 유니티 관련 프로세스의 메모리 사용량 및 프로세스 ID 확인 | |
# linux | |
ps -eo pid,%cpu,rss,comm --sort=-rss | grep -i "$process_name" | awk '{printf "PID: %d, CPU: %.2f%%, RSS: %d, COMMAND: %s\n", $1, $2, $3, $4}' >> "$path/memory-log.txt" | |
echo "\n" >> "$path/memory-log.txt" | |
free -m >> "$path/memory-log.txt" | |
} | |
check_unity_memory_usage |
Author
velopert
commented
Sep 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment