Last active
November 23, 2017 10:16
-
-
Save draev/b1cae946525d2c41810ec3d6b870f626 to your computer and use it in GitHub Desktop.
Memusage MacOS
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
#!/bin/bash | |
ps -eo rss,pid,user,command -m | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' |
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
watch -n 1 -d 'memusage | grep <назвение скрипта> | grep -v grep' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to use in Linux, change line
ps -eo rss,pid,user,command -m
tops -eo size,pid,user,command -sort --size