Created
June 8, 2020 15:31
-
-
Save merry-swjung/92be621c5da4a29b4ed23a4eaa1c8e24 to your computer and use it in GitHub Desktop.
This file contains 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
$ vi /home/usage/check_data.py | |
... | |
#cpu usage | |
status, cpu_usage = commands.getstatusoutput("""mpstat | tail -n 1 | awk '{print 100-$NF}'""") | |
... | |
$ tail /var/log/usage_per_min.log | |
LOG_DATE:2020/06/08 15:13 | CPU_USAGE:1.46% | CONN_NUMBER:0 | DISK_USAGE:3.72% (total 80.14GB) | MEM_USAGE:4.9% (total 3.92GB) | |
LOG_DATE:2020/06/08 15:14 | CPU_USAGE:1.46% | CONN_NUMBER:0 | DISK_USAGE:3.72% (total 80.14GB) | MEM_USAGE:4.9% (total 3.92GB) | |
LOG_DATE:2020/06/08 15:15 | CPU_USAGE:1.46% | CONN_NUMBER:0 | DISK_USAGE:3.72% (total 80.14GB) | MEM_USAGE:4.9% (total 3.92GB) | |
... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment