Migrated from https://bitbucket.org/saaj/workspace/snippets/zedA8x/chronologer-intro-demo
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
alias topmem='smemstat -sm | termsql -01 -r 6 -T 3 "SELECT SUM(PSS) as PSS, SUM(RSS) as RSS, Command \ | |
FROM tbl GROUP BY Command ORDER BY SUM(PSS) DESC LIMIT 5" | column -t -s "|"' | |
alias topmemps='ps -x -o rss,%mem,cmd | termsql -m tabs -01 "SELECT SUM(rss) / 1024 as RSS, SUM([%mem]) AS PCT, cmd \ | |
FROM tbl GROUP BY cmd ORDER BY SUM(rss) DESC LIMIT 5"' |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# -*- coding: utf-8 -*- | |
''' | |
Ranking code based on: | |
https://github.com/coleifer/peewee/blob/master/playhouse/sqlite_ext.py | |
''' | |
import struct | |
import math |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.